Skip to main content

Module adapter

Module adapter 

Source
Expand description

Agent adapters: the adapter trait and registry (spec §2, §4, §38), capability and evidence metadata (spec §3, §28), profile presence (spec §8), lazy initialization (spec §9) and argument conflicts (spec §21). SP2 design §4-§6.

Adapters never spawn processes: plan() returns a LaunchPlan and the launcher runs it (spec §4).

Re-exports§

pub use metadata::AdapterEvidence;
pub use metadata::AdapterMetadata;
pub use metadata::Capability;
pub use metadata::CapabilityClaim;
pub use metadata::CapabilityState;
pub use metadata::ConflictOption;
pub use metadata::EnvOverride;
pub use metadata::Mechanism;
pub use metadata::ProfilePresence;
pub use metadata::SupportLevel;

Modules§

aider 🔒
Aider: --config <profile file> (SP2 design §5.3).
amp 🔒
Amp CLI: --settings-file <profile settings.json> (SP4 design §8.4; §9 outcome 5 — the flag is accepted, but the agent’s own writes went to the default .local/share/amp and did not follow it).
claude 🔒
Claude Code: CLAUDE_CONFIG_DIR per profile (SP2 design §5.1).
cline 🔒
Cline CLI: CLINE_DATA_DIR env var (SP4 design §8.3, §9 outcome 5 — the env var is honoured, but the measured delta at the watched locations was empty; the agent wrote nothing).
codex 🔒
Codex CLI: CODEX_HOME per profile (SP2 design §5.2).
continue 🔒
Continue CLI: --config <profile config.yaml> (SP4 design §8, table row; §9 outcome 5 — the flag is real and accepted, but the measured delta at the watched locations was empty).
copilot 🔒
GitHub Copilot CLI: COPILOT_HOME per profile (SP2 design §8, probe outcome 5).
cursor 🔒
Cursor Agent CLI: CURSOR_CONFIG_DIR per profile (SP4 design §8, table row; probe outcome 1).
fake 🔒
The debug-only test agent: FAKE_AGENT_HOME per profile (SP1 design D1, SP2 design §5.4).
gate
The evidence gates (SP4 design §5), as predicates over AdapterMetadata.
gemini 🔒
Gemini CLI: GEMINI_CLI_HOME per profile (SP2 design §8.1).
kiro 🔒
Kiro CLI: KIRO_HOME per profile (SP4 design §8.5 — settings move, the data tree does not).
metadata
Declarative adapter metadata: support level, capabilities, evidence, environment declarations, conflicting options and profile presence (spec §3, §8, §21, §22, §28; SP2 design §4.2).
opencode 🔒
OpenCode: OPENCODE_CONFIG_DIR per profile (SP2 design §8.2).
pi 🔒
Pi: PI_CODING_AGENT_DIR per profile (SP4 design §8 — provider keys bypass, unless auth.json is present).

Structs§

Aider
The Aider adapter.
Amp
The Amp adapter.
Claude
The Claude Code adapter.
Cline
Codex
The Codex CLI adapter.
Continue
The Continue adapter.
Copilot
The GitHub Copilot CLI adapter.
Cursor
The Cursor Agent CLI adapter.
Fake
The test agent, launched through the fake-agent fixture.
Gemini
The Gemini CLI adapter.
Kiro
The Kiro CLI adapter.
Opencode
The OpenCode adapter.
Pi
The Pi adapter.
PlanContext
Everything plan() needs. The agent id is always metadata().id.
PlannedLaunch
A launch plus what the report shows but the launcher does not need.
ProfilePath
A path an adapter owns, and whether it already had the declared kind at plan time.

Enums§

PathKind
What a profile path must be.

Constants§

REAL_ADAPTERS
The real adapters, in every build (SP2 design §4.2).

Traits§

Adapter
One supported coding agent (SP2 design §4.2).

Functions§

check_conflicts
Refuses an opaque argument that selects the adapter’s own mechanism (spec §21, SP2 design §6). The scan stops at the first --, after which arguments are positional for the agent.
config_file 🔒
The one configuration file an adapter owns, for the mechanisms that name a file.
create_private_dir_all 🔒
create_dir_all, but every directory it creates is 0700 on Unix, whatever the umask: a profile can hold credentials, so other local users should not be able to list it. A directory that already exists keeps its mode.
discover 🔒
ensure_paths
Ensures every path, ignoring existed, so a path created or removed after planning is still handled.
has_kind 🔒
Whether fs::metadata (which follows symlinks) reports the declared kind.
known_agents
The agent ids this build knows, in registry order.
lookup
The adapter for id, if this build knows it.
profile_dir 🔒
<root>/profiles/<profile>/<id>.
profile_paths 🔒
registry
The adapters this build knows: the real ones, plus fake when debug assertions are on.
sensitive_env 🔒
write_new_file 🔒
write_new_file_with 🔒
A lock-free, durable, no-clobber file create (SP2 design §4.4). There is no sweep of leftover temp files: without a lock a sweep could delete another launch’s live temp file.