feat(agents): AgentDispatchPort domain interface #523
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!523
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "boss/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?
Adds
apps/server/src/domain/ports/agent-dispatch-port.ts, the hexagonal port flow-graph nodes / webhooks / foreman will consume to dispatch agent work without depending on the SDK, Docker, or MCP wiring. Type-only fake-adapter tests lock the shape; concreteDefaultAgentDispatchlands separately under M25.Closes #514
Test plan
bun x turbo run typecheck— cleanbun x @biomejs/biome@^2 check apps/server/src/domain/ports/— cleanbun test apps/server/src/domain/ports/agent-dispatch-port.test.ts— 3 pass / 9 expectsbun x turbo run test— 2448 pass / 0 failSDKMessage,Options) and no Docker types (DockerExecArgs, container names) — onlyForgeTypefrom@claude-hooks/sharedPort shape is clean and domain-pure: only
ForgeTypefrom@claude-hooks/sharedimported, no SDK or Docker types anywhere. All four AC methods present with correct signatures;AgentDispatchRequestandAgentDispatchHandlefields match the issue exactly;AgentDispatchStatusstate union covers all lifecycle transitions includingcancelled.Tests lock the shape well — fake adapter, optional-field exhaustion, and the
null-for-unknown-id contract all covered. CI green.