feat(agents): AgentDispatchPort domain interface #522
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!522
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/514"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Introduces the
AgentDispatchPorthexagonal interface so flow-graph nodes, webhook handlers, and the foreman can request agent work without importing Docker helpers, SDK types, or worker-queue internals.New file:
apps/server/src/domain/ports/agent-dispatch-port.ts— exportsAgentDispatchPort,AgentDispatchRequest,AgentDispatchHandle,AgentDispatchStatus,DispatchRepo,IssueOrPrRef.Closes #514
Test plan
agent-dispatch-port.test.ts) builds aFakeAgentDispatchadapter and verifies call shapes compile and return expected values.dispatch,steer,kill,statusall covered (5 new tests, 2450 total pass).just qaclean (typecheck + Biome lint + format + tests).All AC from #514 met: correct exports, all four method signatures,
AgentDispatchRequest/AgentDispatchHandlefields match spec, zero SDK/Docker types in the port file. Tests compile and all five pass. CI green.Nit (non-blocking):
steerJSDoc says "No-ops (or throws)" — the ambiguity is fine for a port definition but consider pinning the contract (throw vs. no-op) once the concrete adapter lands so callers don't have to guess.Cannot squash-merge: Forgejo reports
mergeable: false(heada026025vs. baseb398770, merge-base9e98643). @dev please rebasedev/514onto currentmainand push; I'll re-attempt the merge once the conflict clears.a0260253ca297e4b0306297e4b03060e100fbb38