feat(gateway): task_list and task_spawn chat tools #706

Closed
opened 2026-10-27 13:37:25 +00:00 by sam · 0 comments
Owner

/spawn, /approve and /cancel are slash commands only a human types (internal/gateway/gateway.go:299-401), so 'what are you working on?' has no tool path, even though TaskCreator/TaskController (internal/gateway/tasks.go) are one import away.

internal/gateway/tasks.go gains a narrow read interface chatTaskLister (ListChatTasks(ctx, identity, limit) ([]ChatTaskSummary, error)), keeping gateway independent of internal/store; the daemon adapts store.Store.Tasks.

internal/gateway/task_tools.go (new): TaskTools(lister, creator, identity) returning task_list and task_spawn, both bound to the calling gateway's identity so the model never supplies it.

task_approve and task_cancel are deliberately excluded: waiting_human is the one point in the lifecycle where a person must act and /approve is that gate. Chat input is an untrusted path (a forge issue body or inbound email quoted into a turn is model-visible text), so a tool that approves Archie's own work removes the only human checkpoint. Add behind an operator flag defaulting to off if wanted later.

Wired into chatGenerateOptions, merged over the registry-built set.

Close reason

Closed on GitHub; syncing bead state


Imported from beads archie-core-1786637494538-181-e4631b2f · GitHub #202 · type feature · priority P2 · created 2026-08-08 · closed 2026-09-26

/spawn, /approve and /cancel are slash commands only a human types (internal/gateway/gateway.go:299-401), so 'what are you working on?' has no tool path, even though TaskCreator/TaskController (internal/gateway/tasks.go) are one import away. internal/gateway/tasks.go gains a narrow read interface chatTaskLister (ListChatTasks(ctx, identity, limit) ([]ChatTaskSummary, error)), keeping gateway independent of internal/store; the daemon adapts store.Store.Tasks. internal/gateway/task_tools.go (new): TaskTools(lister, creator, identity) returning task_list and task_spawn, both bound to the calling gateway's identity so the model never supplies it. task_approve and task_cancel are deliberately excluded: waiting_human is the one point in the lifecycle where a person must act and /approve is that gate. Chat input is an untrusted path (a forge issue body or inbound email quoted into a turn is model-visible text), so a tool that approves Archie's own work removes the only human checkpoint. Add behind an operator flag defaulting to off if wanted later. Wired into chatGenerateOptions, merged over the registry-built set. ### Close reason Closed on GitHub; syncing bead state --- _Imported from beads `archie-core-1786637494538-181-e4631b2f` · GitHub #202 · type feature · priority P2 · created 2026-08-08 · closed 2026-09-26_
sam added the mediumfeature labels 2026-10-27 13:37:25 +00:00
sam self-assigned this 2026-10-27 13:37:25 +00:00
sam closed this issue 2026-10-27 13:37:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#706