Skip to content

Agent port

Definition

Hexagonal port for agent runner operations used by infrastructure modules. Implemented by agent.AgentRunner via base_runner.BaseRunner. The port was introduced so that infrastructure modules like merge_conflict_resolver can accept the agent runner via dependency injection without importing from the runner layer, keeping the four-layer boundary clean and making those modules independently testable with a mock.

Invariants

  • Pure Protocol — no implementation, no state.
  • Three methods: build_command constructs the CLI invocation; execute runs the subprocess and returns the full transcript; verify_result checks that the agent produced valid commits and that make quality passes.
  • Parameter names and types are kept identical to the concrete implementations to satisfy structural subtype checks in tests/test_ports.py.