Add callback webhook and per-role config #1

Closed
opened 2026-04-14 11:27:04 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As the warchief orchestrator, I want claude-hooks to notify me when a task completes and support different agent roles, so that I can coordinate chaman and veteran without polling.

Acceptance criteria

Callback webhook

  • POST /task accepts optional callback_url field
  • On task completion (success or failure), POST result to callback URL
  • Callback payload includes: task_id, status (success/failure), pr_url (if any), error (if any), repo, issue_number
  • Callback is fire-and-forget (don't block on delivery, retry once on failure)

Result persistence

  • Each task gets a unique task_id (returned in POST /task response)
  • Store task results in memory (map of task_id → result)
  • GET /task/:id returns task status and result
  • Results expire after 1 hour (prevent memory leak)

Per-role config

  • POST /task accepts optional role field (e.g. chaman, veteran)
  • Each role has a different system prompt prefix
  • Each role uses a different Forgejo user/token
  • Role configs defined in a config file or environment variables
  • Default role if none specified

Tests

  • Test callback delivery on task completion
  • Test result persistence and expiry
  • Test per-role system prompt injection
  • Test missing/invalid role falls back to default

Out of scope

  • Session persistence across HTTP calls (not needed — context lives in Forgejo issues)
  • Priority queue (FIFO is fine for now)
  • Authentication (LAN-only service)

References

  • Part of Claw Refactor v1 milestone
  • Consumed by warchief (proxmox-iac) and webhook bridge
## User story As the warchief orchestrator, I want claude-hooks to notify me when a task completes and support different agent roles, so that I can coordinate chaman and veteran without polling. ## Acceptance criteria ### Callback webhook - [ ] `POST /task` accepts optional `callback_url` field - [ ] On task completion (success or failure), POST result to callback URL - [ ] Callback payload includes: `task_id`, `status` (success/failure), `pr_url` (if any), `error` (if any), `repo`, `issue_number` - [ ] Callback is fire-and-forget (don't block on delivery, retry once on failure) ### Result persistence - [ ] Each task gets a unique `task_id` (returned in POST /task response) - [ ] Store task results in memory (map of task_id → result) - [ ] `GET /task/:id` returns task status and result - [ ] Results expire after 1 hour (prevent memory leak) ### Per-role config - [ ] `POST /task` accepts optional `role` field (e.g. `chaman`, `veteran`) - [ ] Each role has a different system prompt prefix - [ ] Each role uses a different Forgejo user/token - [ ] Role configs defined in a config file or environment variables - [ ] Default role if none specified ### Tests - [ ] Test callback delivery on task completion - [ ] Test result persistence and expiry - [ ] Test per-role system prompt injection - [ ] Test missing/invalid role falls back to default ## Out of scope - Session persistence across HTTP calls (not needed — context lives in Forgejo issues) - Priority queue (FIFO is fine for now) - Authentication (LAN-only service) ## References - Part of Claw Refactor v1 milestone - Consumed by warchief (proxmox-iac) and webhook bridge
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#1
No description provided.