Expand description
Droid agent backend: drives Factory droid exec -o json headless.
Ground truth is crates/engine/tests/fixtures/droid_exec_scrutiny.json, a
recorded droid exec -o json result object. Unlike codex/claude, droid
-o json emits a SINGLE result object rather than a stream — there is no
stitching required. This module is single-shot only:
DroidSession::send_user_message and a resumed SessionSpec are
both rejected at the seam rather than translated into droid flags.
Several SessionSpec fields are claude-isms with no droid equivalent and
are deliberately ignored when building argv: json_schema,
max_budget_usd, resume, permission_mode, allowed_tools /
disallowed_tools, tools, settings_json, effort.
Structs§
- Droid
Backend - The
AgentBackendfordroid exec -o json: single-shot with autonomy selected from the session role. - Droid
Session - A live
droid exec -o jsonsession (theAgentSessionimpl).
Functions§
- build_
args - Build the argv (excluding the binary itself) for one session.
- discover_
droid_ binary - Locate a working
droidbinary. - parse_
droid_ result - Parse one stdout line (a single JSON result object) into
AgentEvents: anAgentEvent::Initfollowed by a terminalAgentEvent::Result.modelis the configured model, used both as theInitmodel (droid’s result object carries no model field) and as the pricing key when the result has no CLI-reported dollar cost.