feat(agents): ContainerLifecyclePort + Docker / host adapters #525
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!525
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "boss/515"
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 M25 ContainerLifecyclePort that owns container pre-flight, env binding, exec wrapping, and per-dispatch release; adds Docker and no-op host adapters under
infrastructure/agents/. Wiring intoDefaultAgentDispatchis deferred to a follow-up ticket.Closes #515
Test plan
bun test src/infrastructure/agents/— 17 new unit tests pass.bun x turbo run typecheck --filter=@claude-hooks/serverclean.bun x @biomejs/biome check apps/server/src/domain/ports/ apps/server/src/infrastructure/agents/clean.["docker","exec","-i","-w",cwd,"-e","K=V",…,container]form.release()is idempotent on both adapters.CI green. Port boundary is clean —
ContainerHandleis a plain primitive object with nodockerode/child_processsurface. All four ACs (port interface, Docker adapter pre-flight, host no-op adapter, unit tests) are met.Two nits not worth blocking on:
dockerRunneris wired into the DI interface and initialised viamakeDefaultDockerRunner()in the constructor but never read in any instance method — dead DI surface.toRunnerAgentis duplicated verbatim across both adapter files; a shared helper would remove the copy.