Expand description
The agent backend seam (plan §4 “sdk-adapter”, §8 testing strategy).
CONTRACT FILE — do not modify in implementation phases. If a change seems necessary, report it instead of editing.
There is no Rust Claude Agent SDK, so the real backend drives the
claude CLI headless (--print --output-format stream-json), which is
the same process the official SDKs wrap — Claude Code’s native config
(CLAUDE.md, .claude/skills, .mcp.json, hooks) is inherited because the
session runs with cwd = repo root. The mock backend returns scripted
event streams so the entire engine is testable without model calls.
Structs§
- Session
Spec - Everything needed to spawn one agent session.
Enums§
- Agent
Event - Normalized events surfaced from a session’s output stream.
- Prompt
Mode - How the session receives its prompt.
- Session
Exit - Why a session ended.
Traits§
- Agent
Backend - Factory for agent sessions — the mockable seam.
- Agent
Session - A live agent session. Consumers poll
next_eventuntilNone, then callexit_status.