Expand description
Built-in agent vocabulary — single source of truth across FFI surfaces.
Holds:
- The list of v1 built-in agents (
Researcher,Summarizer,Verifier,Transcriber,NoteTaker) - Each agent’s identity (system prompt / display name / description)
- The capability ids each agent advertises
- Per-capability payload-format adapters (caller-supplied JSON → prompt text)
Why this lives in car-engine and not in any single FFI crate:
NAPI (car-ffi-napi), PyO3 (car-ffi-pyo3), and UniFFI
(car-ffi-uniffi) are sibling consumers of the same runtime —
they MUST agree on the agent vocabulary or the surfaces drift.
Per CLAUDE.md §2 (bindings parity), capability-shape changes
land in all binding sites in the same change. Owning the data
here makes that mechanically enforceable.
When agent bundles ship via car install, the bundle loader
registers additional agents on top of these. The built-ins are
the floor — the runtime always offers them even before any
bundle is installed.
Structs§
- Builtin
Agent - One built-in agent’s static metadata.
Enums§
- Capability
Payload Error - Errors from
format_capability_payload. Surfaced to the FFI crate asCarError::InvalidArgumentso Swift / Kotlin / JS callers see a structured failure when their JSON contract drifts.
Constants§
- BUILTIN_
AGENTS - V1 built-in roster. New entries are additive; ids are stable wire format (host UI persists them as user pinning).
Functions§
- agent_
metadata - Look up a built-in agent by id.
Nonefor unknown ids. - format_
capability_ payload - Format the per-capability JSON payload into a natural-language
task for the selected agent. The contract is per-capability and
documented in
docs/agent-bundle-spec.md. - register_
builtins - Register every built-in agent’s capabilities with the registry. Called by FFI surfaces during runtime construction; idempotent.