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_commandconstructs the CLI invocation;executeruns the subprocess and returns the full transcript;verify_resultchecks that the agent produced valid commits and thatmake qualitypasses. - Parameter names and types are kept identical to the concrete implementations to satisfy structural subtype checks in
tests/test_ports.py.