Expand description
Newt-Agent ACP worker.
Speaks the Agent Client Protocol (agentclientprotocol.com) over stdio so
drake-foreman can dispatch coding goals to Newt instances.
Contract (per memory feedback_drake_patch_not_prose and
feedback_empty_diff_is_a_crash):
- Worker ONLY edits files; never
git add/git commit/git push. - Empty
git diffpost-turn is a deterministic crash — foreman counts it against the model’s scorecard. TaskReply.model_idis mandatory.
Structs§
- AcpServer
- JSON-RPC ACP server. Holds the inference backend and an in-memory session map.
- Session
- Per-session state kept by the ACP server.
- Task
Reply - Structured reply for one
promptturn.
Functions§
- capture_
diff - Capture the workspace diff with
git diff --no-color. - is_
empty_ diff - True when the diff has no real content (whitespace-only or empty).
- run_
stdio - Spawn the default ACP worker over stdio.
- run_
with_ io - Spawn the default ACP worker against an explicit reader/writer pair.