Skip to main content

Crate newt_acp_worker

Crate newt_acp_worker 

Source
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 diff post-turn is a deterministic crash — foreman counts it against the model’s scorecard.
  • TaskReply.model_id is 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.
TaskReply
Structured reply for one prompt turn.

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.