Skip to main content

Module agents

Module agents 

Source
Expand description

Agent driver contract and implementations.

Each driver knows how to render a stage prompt for its agent and wrap it into the CLI’s non-interactive launch command. Prompt RENDERING is driver-owned (AgentDriver::render_prompt): Claude/OpenCode render the legacy slash-command text, Codex renders a Codex-native instruction.

Re-exports§

pub use claude::ClaudeDriver;
pub use codex::CodexDriver;
pub use opencode::OpenCodeDriver;
pub use pi::PiDriver;

Modules§

claude
Claude Code agent driver.
codex
OpenAI Codex agent driver.
opencode
OpenCode agent driver.
pi
Pi coding-agent harness adapter.

Structs§

ContractResult
One case from a driver’s conformance contract (37-04).
DriverCapabilities
Capabilities a driver declares, enumerated as-needed (999.31 D-01). #[non_exhaustive] + Default so adding a field never breaks an existing driver (CONTEXT D-12).
SandboxRequirements
What a driver’s sandbox needs from the launch environment. Reserved for 37-03 (Codex’s writable-roots requirement).

Enums§

DriverHealth
A driver’s health classification, distinguishing “installed” from “headless-usable” (999.31 / 31c).
InteractivityMode
Per-stage interactivity requirement a driver declares (999.31 / 31c), replacing the hardcoded Codex-Define check.

Traits§

AgentDriver
The modular driver contract (999.31): each agent owns its prompt rendering, command building, completion parsing, and health/capability discovery — instead of that logic being scattered across prompt.rs, agents/*.rs, agent_result.rs, and preflight.rs.

Functions§

driver_for
Return the driver for a configured agent kind.