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/ampand did not follow it). - claude 🔒
- Claude Code:
CLAUDE_CONFIG_DIRper profile (SP2 design §5.1). - cline 🔒
- Cline CLI:
CLINE_DATA_DIRenv 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_HOMEper 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_HOMEper profile (SP2 design §8, probe outcome 5). - cursor 🔒
- Cursor Agent CLI:
CURSOR_CONFIG_DIRper profile (SP4 design §8, table row; probe outcome 1). - fake 🔒
- The debug-only test agent:
FAKE_AGENT_HOMEper profile (SP1 design D1, SP2 design §5.4). - gate
- The evidence gates (SP4 design §5), as predicates over
AdapterMetadata. - gemini 🔒
- Gemini CLI:
GEMINI_CLI_HOMEper profile (SP2 design §8.1). - kiro 🔒
- Kiro CLI:
KIRO_HOMEper 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_DIRper profile (SP2 design §8.2). - pi 🔒
- Pi:
PI_CODING_AGENT_DIRper profile (SP4 design §8 — provider keys bypass, unlessauth.jsonis 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-agentfixture. - Gemini
- The Gemini CLI adapter.
- Kiro
- The Kiro CLI adapter.
- Opencode
- The OpenCode adapter.
- Pi
- The Pi adapter.
- Plan
Context - Everything
plan()needs. The agent id is alwaysmetadata().id. - Planned
Launch - A launch plus what the report shows but the launcher does not need.
- Profile
Path - A path an adapter owns, and whether it already had the declared kind at plan time.
Enums§
- Path
Kind - 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 is0700on 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
fakewhen 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.