Expand description
Backwards-compatible composition facade for Supercode.
New integrations should select the narrow package they need:
supercode-interchange for session glue, supercode-reduce for reversible
token reduction, supercode-runtime for provider/runtime primitives, or
supercode-harness for the complete native Supercode agent and tool loop.
This crate preserves the historical supercode import by re-exporting the
complete harness surface.
Modules§
- acp_
frontend - First-class ACP client implementation of the canonical SDK runtime.
- acp_
server - Inbound Agent Client Protocol adapter for the SDK-owned Supercode runtime.
- audit
- Corpus coverage audit.
- background
- Compatibility path for native background-job state.
- catalog
- Compatibility path for session catalogs and durable locators.
- checkpoint
- §2 module 20
checkpoint(COMPOSABLE-HARNESS-DESIGN.md line 470): file checkpointing / shadow-git; D4-adjacent revert; D3 turn-diff tracking. Line 1504: “restores FILES, not context — pairs with, never replaces, the reduction sidecar.” - claude_
compat - Claude Code project compatibility helpers.
- claude_
peer - Live Claude Code peer sessions: registry discovery and message delivery.
- claude_
runtime_ scheduler - Deterministic execution cursor for imported Claude cron and wakeup state.
- claude_
runtime_ state - Lossless, non-executing reconstruction of Claude Code runtime state.
- codex_
peer - Live stock-Codex session discovery.
- configfile
- §3 “The Single Config File” (
docs/composable-harness/COMPOSABLE-HARNESS-DESIGN.md) — P1 of the composable-harness migration (design §5.2, phase P1). - fidelity
- Compatibility path for canonical interchange fidelity measurements.
- formatters
- §2 module 29
formatters(COMPOSABLE-HARNESS-DESIGN.md line 479): “D10/oc§10 format-on-write” — reuses the EXACTcrate::tools::WriteObserverseam P5-9 built forcheckpoint(D-5: “write-path interception seam shared with checkpoint”), rather than a second interception point. - frontend
- Protocol-neutral frontend contract for one SDK-owned Supercode runtime.
- git_
metadata - P4e (COMPOSABLE-HARNESS-DESIGN.md §1.6/§3.1
core.session.git_metadata, catalog:331 “Git integration (metadata, diff, PR)”): a persisted, TYPED record of the git branch/sha/dirty state a session was RUNNING under, captured ONCE at session start (closes the loop catalog:331 flags — supercode already preserves a foreign session’s own git-shaped fields byte-for-byte on IMPORT viaSession::raw’s verbatim capture; this is the WRITE half: supercode’s OWN sessions get the same provenance). Deliberately flat/typed (not a formatted string), the exact same rationale ascrate::usage_log::UsageRecord/crate::model_change::ModelChangeRecord(§1.13): a translatable, lossless session-data channel, not a lossy notice — so it survives a save/load round trip byte-for-byte, and a future reader (a translator,doctor/inspect stats) can consume it without re-parsing prose. - harness_
service - Versioned, language-neutral service over persisted harness sessions.
- human_
export - P4e (COMPOSABLE-HARNESS-DESIGN.md §1.6/§3.1
core.session.export_format, catalog:283 “transcript export for humans”): a READ-ONLY rendering of acrate::Session’s conversation into text a human reads directly (terminal/file/clipboard) or opens in a browser — CC’s/export+/copy, CX’s Ctrl+O copy-last. This is core, not gated by thesession.sharemodule (§1.6: “export-to-human is universal while share links … are the OC+PI-only partsession.shareactually narrows to”). - interop_
settings - Harness-owned controls that materially affect Supercode interoperability.
- live_
runtime - Trusted local receipts for attachable Supercode runtimes.
- lsp
- §2 module 28
lsp(COMPOSABLE-HARNESS-DESIGN.md line 478): “D1 LSP diagnostics in edit path + query tool” — this module ships the WEAKEST FORM that satisfies D1: server LIFECYCLE for a HANDFUL of user-configured language servers, and diagnostics surfaced in the edit/write TOOL RESULT via the shared D-5 write-path seam (crate::tools::WriteObserver, P5-9/P5-11). - mcp
- P5-2 (COMPOSABLE-HARNESS-DESIGN.md §2 module 15
mcp.client, D7 rows 1-8): full Model Context Protocol client support — stdio (P5-1 baseline, GROWN not rewritten), remote HTTP/SSE transports, resources + templates, prompts-as-commands, server instructions, and elicitation — plus thehandle_request/serve_stdioharness-as-MCP-server direction (module 16). - mcp_
oauth - P5-2 (COMPOSABLE-HARNESS-DESIGN.md §2 module 15 D7 row 2 “OAuth”; §2.1
dep “
model.oauth→ trust-grade token storage” — the same security class applies here): OAuth PROTOCOL support for authenticated remote MCP servers. - model_
catalog - §2 module 26
model.catalog(docs/composable-harness/ COMPOSABLE-HARNESS-DESIGN.md§3.1[capabilities.model_catalog]) — P4 of the composable-harness migration (design §5.2 phase P4: “aliases + fallback chains (userconfig.rs:386-411) promoted into core” + thesmall_modelknob). - model_
change - P4c (COMPOSABLE-HARNESS-DESIGN.md §5.2 “P4” core NEW-significant item,
§1.10/§3.1
core.model_switch.allow_switch, D9 row): a persisted, TYPED record of a mid-session model switch — pi’smodel_changeprecedent (design §1.10: “persisted change records … pi’smodel_changeis the cleanest precedent”). Deliberately flat/typed (not a formatted string), mirroringcrate::usage_log::UsageRecord’s exact rationale: a translatable, lossless session-data channel (§1.13), not a lossy notice — so it survives a save/load round trip byte-for-byte in the fields that matter, and a future reader (a translator emitting this same session under another harness’s format, adoctor/inspect statscommand) can consume it without re-parsing prose. - modules
- §2 “The Bolt-on Capability Taxonomy” (
docs/composable-harness/ COMPOSABLE-HARNESS-DESIGN.md) — P3 of the composable-harness migration (design §5.2, phase P3: “AModuleIdenum (the 35 names) + resolved activation set onConfig”). - permissions
- P5-1 (COMPOSABLE-HARNESS-DESIGN.md §2 modules 10-11, §2.1 D-3, §2.2 C5, §5.3 risk 1): the permissions engine — command canonicalization + rule algebra + approval policy/cache + oc/cx import translators.
- plugins
- P5-12 (COMPOSABLE-HARNESS-DESIGN.md §2 module 18
plugins, D7 “in-process extension API, packaging/marketplaces, custom tools from files, provider injection, extension UI, plugin/package installation”; §2.1 D-10: “config-borne code execution without a trust gate is an injection hole”). - presets
- §4 “Presets” (
docs/composable-harness/COMPOSABLE-HARNESS-DESIGN.md) — P2 of the composable-harness migration (design §5.2, phase P2). - pricing_
ref - Reference pricing constants used only to translate measured byte/token savings into a dollar figure in test logs and docs (D15). These are stated constants for one Opus-class API list price (July 2026) — not a live lookup, and not used anywhere on the request path.
- reduce
- Compatibility facade for optional reversible reduction.
- runtime
- Primitive live-runtime contracts and the Codex app-server reference adapter.
- runtime_
lease - Transport-neutral observer and controller leases for live SDK runtimes.
- runtime_
registry - Authenticated inventory and attachment for live and persisted sessions.
- sandbox
- P5-10 (COMPOSABLE-HARNESS-DESIGN.md §2 module 12
permissions.sandbox, ~row 462): the OS-level enforcement BACKSTOPpermissions.rules’ rule-layer floor and the file-toolcrate::tools::SandboxPolicyboth defer to for full coverage (crate::permissionsmodule doc: “complete OS-level write confinement of arbitrary bash… iscapabilities. permissions.sandbox’s job (P5 module 10, a later unit), not this one’s” — this IS that unit). - schema
- Typed schemas for the on-disk session formats.
- sdk
- Versioned public SDK contract shared by every Supercode surface.
- server
- §2 module 31
server(COMPOSABLE-HARNESS-DESIGN.md, D7 “full programmatic RPC/HTTP server”, D8 “remote attach”, D10 “daemon”; §1.9 Obligation 9’s out-of-process half — the in-process SDK already meets the core commitment viacrate::EventSink). - session
- Compatibility path for canonical sessions and native codecs.
- session_
activity - Protocol-neutral activity for persisted and live harness sessions.
- session_
index - Revisioned session-list subscriptions for latency-sensitive frontends.
- session_
title - P4b (COMPOSABLE-HARNESS-DESIGN.md §5.2 “P4”, §1.6/§3.1
core.session.auto_title, catalog:150, D-9): auto-title / session summary — a small-model side-call that titles a session, mirroringcrate::reduce::summarize’s plumbing exactly: an injectable trait (real implementations call out to a model; this crate’s own tests only ever inject deterministic fakes — no real network/model call anywhere in this crate, same posture ascrate::reduce::summarize::SpanSummarizer), a fixed versioned prompt, and a “never blocks, never fails the caller” contract. - session_
tree - Compatibility path for canonical session trees.
- sidecar
- Compatibility path for native interchange sidecars.
- store
- A directory-backed store for supercode’s own sessions — naming, titles,
listing, archiving, and deletion. The analog of
claude --name/ the Codexresume/archive/deletesession lifecycle. - subagents
- P5-3 (COMPOSABLE-HARNESS-DESIGN.md §2 module 9
subagents: “D1 spawn tool; D3 sub-agents/named-defs/background+resume/teams; D5 subagent transcripts”; §2.1 D-1 “subagents → core.session(lineage), core.tools; background-mode → permissions.approvals”; §2.2 C6): the data shapes and pure-function resource-bound checks the spawn/join/background machinery incrate::agent::Agentbuilds on. Kept separate fromagent.rsso the depth/concurrency-cap arithmetic and the lineage record shape are unit-testable without a fullAgent/mock-Providerharness — the same “pure config → set, testable without the loop” precedent P3’scrate::modulesmodule documents for itself. - support
- Canonical implementation inventory for external coding harnesses.
- tokens
- Compatibility path for native runtime token budgeting.
- tools
- Tools the agent can call.
- tui
- P5-4 (COMPOSABLE-HARNESS-DESIGN.md §2 module 30
tui; §1.9 recorded deviation; §2.1tools.question/permissions.approvals(ask-UI) →tui|server): the full-screen interactive TUI, AND — because §2.1 names it as the interactive surface three EARLIER phases explicitly deferred here — the home for the three handlers that close those deferred chains: - usage_
log - P4b (COMPOSABLE-HARNESS-DESIGN.md §5.2 “P4”, §1.6/§3.1, catalog §4a
“Turn/step usage records surfaced per turn”): persisted per-turn
token/usage records.
crate::AgentEvent::Usagealready streams this data live (UX-23); this module makes it DURABLE session data — a typed, serde-round-trippable record, not a lossy display-only channel (§1.13’s lossless/sidecar discipline: this is typed session data, exactly likecrate::reduce::ReductionLog, not a text notice). - watch
- Compatibility path for passive session following.
Structs§
- AcpFrontend
Checkpoint - Durable delivery cursor for restarting an ACP frontend without replaying events it already consumed.
- AcpFrontend
Connect Options - Connection parameters for one ACP frontend attachment.
- AcpFrontend
Runtime - ACP transport implementing the same
SdkRuntimeconsumed by local and HTTP frontends. - AcpRuntime
Backend - Generic ACP v1 client backend for any ACP agent command.
- Agent
- A stateful agent: configuration, a model transport, a tool set, and the
running conversation. Drive it with
Agent::send. - Chat
Message - A single message in a conversation.
- Chat
Request - A single model-completion request.
- Claude
Background Child - Latest known state of a Claude
Agenttool call. - Claude
Code Runtime Backend - Claude Code live-runtime backend using bidirectional stream-json print mode. It can create/resume sessions and cancel the running turn through the stream-json control channel; the print-mode protocol still exposes no permission-response primitive to this adapter.
- Claude
Cron Job - One active Claude Cron job.
- Claude
Cron Schedule State - Persisted execution cursor for one Claude cron.
- Claude
Peer Delivery - Successful hand-off of one message to a live session.
- Claude
Peer Endpoint - Opaque addressing string published on a discovered descriptor.
- Claude
Peer Refusal Error - A refusal paired with the detail that names it.
- Claude
Peer Session - One live Claude Code session: a registry record whose pid answered
kill(pid, 0)during the read that produced this value. - Claude
Peer Settings - The user-settings portion Supercode can inspect without pretending to know a target process’s complete managed/project/CLI precedence stack.
- Claude
Queue State - End-of-transcript queue state.
- Claude
Runtime Delivery State - Persisted claimed-but-unacknowledged prompt.
- Claude
Runtime Manifest - A pure, serializable reconstruction of runtime state in a Claude transcript.
- Claude
Runtime Posture - Latest Claude CLI mode and permission posture.
- Claude
Runtime Residue - Verbatim evidence for one runtime-affecting source record.
- Claude
Runtime Scheduler State - Persisted scheduler cursor. Empty/default state keeps pre-scheduler manifests backward compatible and inert.
- Claude
Runtime Trigger - One prompt made executable by an explicit scheduler claim.
- Claude
Wakeup - One scheduled one-shot wakeup that has not yet observably fired.
- Claude
Wakeup Schedule State - Persisted execution cursor for one Claude scheduled wakeup.
- Codex
Runtime Backend - Codex live-runtime backend using the official
codex app-serverJSONL protocol (initialize,thread/start|resume,turn/start|interrupt). - Config
- Everything that shapes an
crate::Agent: the model and endpoint, the credentials, sampling parameters, the system prompt, and per-tool overrides. - Config
Builder - Fluent builder for
Config. - Config
File - A config file: a set of named profiles (the analog of Codex
-p/--profile). This is the SDK/embedder config surface; the supercode CLI uses a separate TOML config (userconfig::FileConfigin theclicrate) and does not expose this file or a--profileflag. - Config
Profile - The serializable subset of a
Configthat can live in a config file. (Callbacks/handlers are code-only and are not represented here.) - Context
Injection Block - P4e (§1.4/§3.1
core.context_injections): one named ambient context block – seeConfig::context_injection_blocks. - Coordinated
Runtime - Shared transport-neutral owner of a runtime and its client leases.
- Coordinated
Runtime Client - Authenticated client projection of one coordinated SDK runtime.
- Discovery
Page - One stable newest-first discovery page.
- Discovery
Query - Filters and roots used for one catalog scan.
- Fidelity
Metric - Result of measuring one actual translation cell.
- Fidelity
Residue - Measured residue of one actual export/reload cell.
- Frontend
Actions - Actions the current runtime adapter can actually perform.
- Frontend
Attach Snapshot - Serializable half of an attachment returned by an out-of-process runtime. The live receiver is transport-owned and joined to this snapshot locally.
- Frontend
Attachment - Atomic history/replay/live attachment to one runtime.
- Frontend
Command Descriptor - One runtime-provided command surfaced by a composer.
- Frontend
Display Capabilities - Display semantics emitted by the runtime.
- Frontend
Event - Canonical event before a wire transport adds subscription metadata.
- Frontend
Operation Descriptor - One operation the runtime can genuinely invoke.
- Frontend
Request - One pending interactive request, emitted as a sequenced frontend event.
- Frontend
Runtime Descriptor - Complete frontend-facing description of one SDK-owned runtime.
- Frontend
Runtime Metadata - Source/emulation identity supplied by the session-loading surface.
- Function
Call - The function payload of a
ToolCall. - Generated
Frontend Client - Generated typed Rust client over any facade transport.
- Harness
Catalog - Read-only entry point for discovering, loading, and following persisted harness sessions.
- Harness
Config - The top-level schema (§3.1): one TOML/JSON document that fully determines the harness’s shape (§3.0: “Everything the harness does is a function of the resolved file”).
- Harness
Event - Protocol-neutral envelope around a native live event.
- Harness
Homes - Configurable session roots for the built-in harnesses.
- Harness
Id - Extensible identifier for a coding harness.
- Harness
Interop Advisory - Actionable finding derived from native harness configuration.
- Harness
Interop Control - One harness-owned setting that Supercode can inspect or configure.
- Harness
Interop Settings Report - Canonical, revisioned snapshot shared across CLI, RPC, SDK, and UI.
- Harness
Session Service - Stateful persisted-session service. Each instance owns its follow subscriptions; discovery and loading remain read-only.
- Harness
Setting Change - Requested change to one stable interoperability control.
- Harness
Setting Choice - One allowed value for an interoperability control.
- Harness
Setting Recommendation - Concrete, reviewable remediation for an advisory.
- Harness
Support Descriptor - One compiled harness implementation descriptor.
- Http
Frontend Runtime - Authenticated HTTP implementation of
FrontendRuntime. - Live
Runtime Endpoint - Browser-safe reference to a trusted local runtime receipt.
- Live
Runtime Metadata - Static runtime metadata recorded at registration. Dynamic state, actions, controller, and observers are queried from the authenticated SDK endpoint.
- Live
Runtime Record - Browser-safe inventory record for one reconciled live receipt.
- Live
Runtime Registration - RAII registration for one live runtime. Dropping it removes only the receipt created by this registration, leaving persisted chat data intact.
- Live
Runtime Source - Stable source identity through which a hosted continuation is discovered.
- Local
Runtime Registry - Local authenticated registry backed by harness discovery and private live-runtime receipts.
- Module
Activation - The resolved activation set for all 35 modules (§5.2 P3: “a resolved
activation set on
Config”) — pureHarnessConfig→ set, no loop required (§5.3 risk 2’s testability mitigation). Also carriestools_search’s three per-tool sub-flags, sincecrate::tools::ToolRegistry::from_configneeds them to decide which ofglob/search/list_dirto register — and (P4c)tools_web’s two, forweb_fetch/web_search. - Native
Support - Persisted-session and translation implementation facts.
- Open
AiProvider - An OpenAI-compatible HTTP provider. The composition layer supplies its endpoint, credentials, and headers from runtime configuration.
- Open
Code Runtime Backend - OpenCode live-runtime backend using its official HTTP API and SSE event
stream.
OpenCodeRuntimeBackend::connectcan join the server embedded in an already-running TUI when that TUI was launched with a known host/port. - PiRuntime
Backend - Pi live-runtime backend using
pi --mode rpcJSONL. - Process
Courier Runner - Real courier spawner.
- Prompt
Tokens Details - The cache portion of
Usage::prompt_tokens_details. - Resolved
Live Runtime - Secret host-side information recovered from a verified receipt.
- RpcEngine
- The out-of-process RPC driver: wraps one already-constructed
crate::Agentwith thesubmit/interrupt/status/shutdownmethod set (§ module doc). Shared by both transports (run_stdio,run_http) so the method semantics — including the fail-closed permission behavior — can never drift between them. - Runtime
Attach Request - Request to resume or attach through a new adapter connection.
- Runtime
Authorization - Permissions carried by one authenticated runtime client.
- Runtime
Capabilities - Mechanical facts an adapter can guarantee.
- Runtime
Client Id - Opaque identity scoped to one authenticated frontend connection.
- Runtime
Controller Lease - Controller lease visible through runtime describe/list operations.
- Runtime
Handle - Identity returned after a live session is started or resumed.
- Runtime
Input - User input accepted by a live runtime.
- Runtime
Launch - Executable configuration used to launch one adapter endpoint.
- Runtime
Lease Coordinator - One-controller, many-observer coordination state for a live runtime.
- Runtime
Lease Snapshot - Serializable ownership snapshot included in registry descriptors.
- Runtime
Observer Lease - One attached observer and its last authenticated activity.
- Runtime
Registry Entry - Stable joined descriptor returned by the registry.
- Runtime
Registry Owner - Process and controller ownership for one live entry.
- Runtime
Registry Query - Filters controlling one joined live/persisted inventory read.
- Runtime
Registry Watch - Bounded watch subscription. Dropping it stops the polling task.
- Runtime
Start Request - Request to create a fresh runtime session.
- Runtime
Support - Live runtime wiring known without launching the real executable.
- SdkAgent
- SDK-owned emulation runtime component.
- SdkCapabilities
- Capability inventory for the complete v1 SDK, independent of transport.
- SdkEvent
- Canonical event before a wire transport adds subscription metadata.
- SdkRequest
- One typed SDK request before a transport adds its envelope.
- SdkRuntime
Event - One runtime event paired with its durable SDK identity.
- Session
- A normalized, replayable conversation loaded from a tool’s session log.
- Session
Activity - Normalized lifecycle state for one harness-native session.
- Session
Activity Evidence - Provenance for one normalized activity observation.
- Session
Descriptor - Lightweight metadata returned by catalog discovery.
- Session
Follower - Poll-based follower for one persisted Claude Code, Codex, Pi, OpenCode, or Grok session.
- Session
Index Delta - One subscription poll result. Revisions start at one for the initial snapshot and increase by exactly one for each non-empty delta batch.
- Session
Index Key - Stable public identity for a session-index change. Persistence paths remain inside the trusted host and are sent only as part of complete descriptors.
- Session
Info - Lightweight metadata about a stored session.
- Session
Locator - Stable identity for a persisted harness session.
- Session
Meta - Metadata recovered from a session log.
- Session
Store - A filesystem session store rooted at a directory.
- Supercode
Http Runtime Backend - Adapter that joins one authenticated Supercode SDK runtime without taking ownership of the process or creating a second model loop.
- Support
Registry Report - Machine-readable compiled support inventory.
- Tool
Call - A request from the model to invoke a tool.
- Tool
Context - Ambient context passed to every tool invocation.
- Tool
Override - Per-tool customization: enable/disable a tool and/or override the description the model sees for it.
- Tool
Override Profile - A single tool’s file-settable overrides — the
ConfigProfilemirror ofToolOverride(COMPOSABLE-HARNESS-DESIGN.md §3.1[core.tools.<name>], §3.2 mapping rowcore.tools.enabled+[core.tools.<n>].*). - Tool
Registry - An ordered set of tools offered to the model.
- Tool
Schema - A tool advertised to a model.
- Usage
- Token accounting returned with a completion.
Enums§
- Agent
Event - Streaming events emitted by a native runtime agent as a turn unfolds.
- Approval
Policy - When the agent must seek approval before running a tool — the analog of
Codex’s
-a untrusted|on-request|neverand Claude’s permission modes. - Cache
Plan - Prompt-caching plan applied while building a provider request.
- Claude
Background State - Lifecycle state recovered for a Claude background child.
- Claude
Cross Session Inbound - User-level policy Claude Code applies to messages from other sessions.
- Claude
Peer Refusal - Why a message could not be delivered into a live session.
- Claude
Peer Settings Error - Failure to read or safely update Claude Code’s user settings.
- Claude
Peer Status - Activity a live Claude Code session reports for itself.
- Claude
Runtime Execution State - Execution posture for imported Claude runtime state.
- Claude
Runtime Trigger Kind - Stable trigger ordering: due time, then kind, then source id.
- Error
- Errors that can arise while configuring or running an
crate::Agent. - Fidelity
- How faithfully a reconstruction reproduces its source.
- Frontend
Approval Decision - Typed approval decision accepted by
FrontendRuntime::respond. - Frontend
Connection State - Frontend-visible runtime connection state.
- Frontend
Elicitation Action - MCP elicitation outcome accepted by a frontend response.
- Frontend
Facade Method - One method in the versioned language-neutral frontend facade.
- Frontend
Operation Invocation - Typed invocation accepted by
FrontendRuntime::invoke. - Frontend
Operation Kind - Stable family for an explicitly invocable frontend operation.
- Frontend
Operation Result - Typed result returned by
FrontendRuntime::invoke. - Frontend
Request Kind - Kind of interactive request surfaced by the SDK runtime.
- Frontend
Response - Typed response to one SDK-owned interactive request.
- Frontend
Runtime Error - Typed failure returned by every SDK adapter and compatibility projection.
- Frontend
Turn State - Whether a model/tool turn currently owns the runtime.
- Harness
Advisory Severity - Importance of an interoperability advisory.
- Harness
Interop Settings Error - Failure while inspecting or changing harness interoperability controls.
- Harness
Setting Scope - Native configuration layer from which a control was read.
- Implementation
Kind - How a primitive is wired into the compiled core.
- Live
Runtime Receipt Error - Receipt registration or resolution failure.
- Live
Runtime Supervisor - Optional local process supervisor for an attachable runtime.
- Module
Id - The 35 §2 capability modules, numbered exactly as the design’s module table (§2, rows 1-35).
- Role
- Who authored a
ChatMessage. - Runtime
Endpoint - Observable endpoint backing a runtime connection.
- Runtime
Lease Error - Stable coordination failure shared by every transport projection.
- Runtime
Permission - Capability independently granted to an authenticated runtime client.
- Runtime
Registry Event - Change emitted by
RuntimeRegistryWatch. - Runtime
Registry State - Reconciled lifecycle state reported by list/describe/watch.
- Runtime
Submit Error - Typed turn failure shared by local, HTTP, ACP, CLI, and language adapters.
- Sandbox
EnvPolicy capabilities.permissions.sandbox.env_policy(§3.1): child-process environment sanitization for the spawnedbash/shellsubprocess.Inherit(the default) is today’s behavior — the parent’s environment (pluscore.shell_env_snapshot, if configured) passes through unchanged.Filteredstrips a sensitive-variable denylist (tokens, keys, cloud credentials).Nonekeeps onlyPATHand a couple of universally-needed variables (HOME,TERM,LANG) — nearest to a bare-metal shell with nothing extra.- Sandbox
Escalation capabilities.permissions.sandbox.escalation(§3.1): what happens when a confining fs tier is requested but this platform/kernel cannot actually enforce it.Deny(the default) refuses to run the subprocess at all — the cardinal “never silently unsandboxed” rule.Askroutes the decision throughcrate::permissions::PermissionsApprovalHandler(P5-1’spermissions.approvalsseam, wired here per this module’s build brief).Allowauto-permits an unconfined run with a loud, one-time warning.- Sandbox
Policy - Filesystem confinement applied to write-capable tools — the analog of
Codex’s
read-only/workspace-write/danger-full-accesssandbox modes. - Schema
Tier - How verbose an advertised tool schema is.
Fullis today’s behavior — byte-identical to the tool’s owndescription()/parameters(). Builtins default toFull(small, load-bearing); the win target is fat activated MCP tools (set via the global knob or a per-tool override, seecrate::Config::tool_schema_tier/crate::config::ToolOverride::schema_tier). - SdkError
- Typed failure returned by every SDK adapter and compatibility projection.
- SdkError
Code - Stable machine-readable SDK failure categories.
- SdkOperation
- One operation owned by the SDK facade.
- Session
Format - An on-disk session format supercode can both read and write.
- Session
Index Change - One complete replacement in a revisioned index delta.
- Session
Presence - Whether a durable session currently has a proven live owner.
- Session
Snapshot Reason - Why a watcher emitted a complete session snapshot.
- Session
Source - Which tool produced a session log.
- Session
Turn State - Turn activity, independent of presence and frontend attention.
- Session
Watch Event - A normalized event emitted while following a local session.
- Steering
Mode - How queued steering/follow-up messages are drained (S1.7, pi3
steeringMode/followUpMode). - Storage
Locator - Durable storage address for a persisted session.
- Tool
Advertising - How tools are advertised to the model (B6, D16).
- Tool
Outcome - The structural outcome known for a tool-result message.
Constants§
- CLAUDE_
CROSS_ SESSION_ INBOUND_ KEY - Stable key for Claude Code’s native
crossSessionInboundpreference. - CLAUDE_
RUNTIME_ MANIFEST_ VERSION - Version of the persisted Claude runtime-state manifest schema.
- DEFAULT_
RUNTIME_ LEASE_ TTL_ MS - Default controller duration. Successful mutations and explicit heartbeats renew it; disconnect and detach release it immediately.
- DEFAULT_
SYSTEM_ PROMPT - A default, deliberately small system prompt. Override it freely.
- FRONTEND_
REPLAY_ CAPACITY - Maximum sequenced events retained between canonical history snapshots.
- FRONTEND_
RUNTIME_ SCHEMA_ VERSION - Frontend contract schema version.
- HARNESS_
INTEROP_ SETTINGS_ SCHEMA - Stable report schema shared by Rust, JSON-RPC, SDKs, and UIs.
- HARNESS_
SERVICE_ VERSION - Protocol namespace implemented by this service.
- RUNTIME_
EVENT_ METHOD - Notification method emitted for live runtime events.
- SDK_
SCHEMA_ VERSION - Current language-neutral SDK schema.
- SESSION_
ACTIVITY_ EVENT_ METHOD - Notification method emitted for normalized session-activity transitions.
- SESSION_
EVENT_ METHOD - Notification method emitted for followed-session changes.
- SESSION_
INDEX_ EVENT_ METHOD - Notification method emitted for revisioned session-list changes.
- SUPPORT_
REGISTRY_ SCHEMA - Schema emitted by
harness_support_registry. - TOOL_
ERROR_ METADATA_ KEY - Canonical metadata key marking a tool result as a structured error.
- TOOL_
OUTCOME_ UNKNOWN_ METADATA_ KEY - Canonical metadata key marking a tool result whose outcome is unknown.
- UNKNOWN_
MODEL_ CONTEXT_ FLOOR - Conservative fallback context limit for an unrecognized model.
Traits§
- Courier
Runner - Spawner seam for the courier process.
- Frontend
Facade Transport - Transport seam consumed by the generated Rust facade client.
- Frontend
Runtime - Canonical live-runtime contract owned by the SDK.
- Provider
- Legacy provider abstraction preserved by the composition facade.
- Runtime
Backend - Factory for starting, resuming, and (where the native protocol permits it) joining one harness’s already-running runtime endpoint.
- Runtime
Connection - One connected harness-native runtime session.
- SdkPrompt
Source - Renderable prompt source configured on an SDK emulation component.
- SdkRuntime
- Canonical live-runtime contract owned by the SDK.
- SdkService
- Stateful SDK facade consumed by public transport adapters.
- Tool
- A callable capability.
- Write
Observer - P5-9 (design §2 module 20
checkpoint, §2.1 D-5 “write-path interception seam shared withformatters”): the ONE well-defined interception point around every file-mutating built-in tool (write_file/edit_file/apply_patch) — installed onToolContext::write_observer,Noneby default. Both hooks fire AFTERToolContext::check_writehas already approved the call (so an observer never sees a write the sandbox itself refused) and BEFORE/AFTER the actual mutation:
Functions§
- claude_
user_ settings_ path - Claude Code’s user settings file for the configured Claude home.
- configure_
harness_ interop_ settings - Apply a revision-checked set of changes and return the resulting snapshot.
- core_
messages - Canonical messages participating in cross-format fidelity scoring.
- create_
agent - Construct the emulation component inside the SDK ownership boundary.
- discover_
live_ runtime - Find the newest live receipt matching a discovered source session.
- discover_
session_ page - Discover one persisted-session page with its opaque successor cursor.
- discover_
sessions - Discover persisted sessions through the canonical SDK catalog owner.
- find_
live_ runtime - Resolve one stable runtime id, requiring an explicit choice if stale or concurrent registrations would otherwise make attachment ambiguous.
- forget_
live_ runtime - Remove only a stale attachment receipt. Canonical, sidecar, source-native, and exported session data are never addressed by this operation.
- format_
reply - Format an agent’s final reply for output.
jsonwraps it as{"result": "..."}; otherwise the reply is returned as-is. The stream-json form is the liveAgentEventstream via anEventSink. - harness_
support - Look up one harness in the compiled registry.
- harness_
support_ registry - Return the single compiled inventory used by product surfaces and audits.
- inspect_
harness_ interop_ settings - Inspect the interoperability controls exposed by one harness adapter.
- is_
tool_ error - Whether a message carries the canonical structured-error marker.
- landlock_
available - Whether real Landlock filesystem confinement is available on THIS
process’s kernel — a genuine, side-effect-free (beyond dropping one
ruleset file descriptor) PARENT-PROCESS probe: it builds a
CompatLevel::HardRequirementruleset requiring exactly the write-access rightsapply_linux_confinementwould later request and checks whetherRuleset::create()succeeds — it deliberately never callsrestrict_self()(that confines the CALLING process/thread permanently and every future child of it — calling it here would confine supercode ITSELF, exactly the “confinement targets the child, not supercode” invariant this module must never violate). Cached for the process lifetime (the kernel’s Landlock support can’t change at runtime). - list_
live_ runtimes - List every reconciled live runtime without exposing its bearer token or loopback address. Dead-process receipts are removed as part of the read.
- load_
session - Load one durable locator through the canonical SDK catalog owner.
- load_
session_ path - Load an explicit transcript/store path through the SDK import boundary. An OpenCode selector is accepted only for its SQLite store.
- mark_
tool_ error - Stamp a tool-result message as a structured error.
- mark_
tool_ outcome_ unknown - Stamp a tool-result message as having no structurally known outcome.
- measure_
fidelity - Measure an export/reload cell without applying a regression floor.
- message_
claude_ peer - Resolve
session_idin the registry and delivertextinto it. - messages_
equal - Compare semantic message fields shared by the supported harnesses.
- messages_
equal_ multimodal - Compare semantics plus multimodal parts and tool names.
- model_
context_ limit - Look up a model’s context-window size by its full provider slug.
- netns_
available - Whether an unprivileged, self-contained network namespace cut-off is
available on THIS process’s kernel — a real probe, but one that (unlike
landlock_available) genuinely can’t be done risk-free in the calling process itself (unshare(2)acts on the CALLING process/thread, so probing it directly would isolate supercode’s own network, not just check availability). Instead this forks a disposable, single-purpose child that does nothing but attempt the unshare and immediately_exit()with the result — never touches the allocator, locks, or any other state the parent might hold mid-fork (the standard safe shape for a post-fork child that never execs), so it carries none ofpre_exec’s usual multi-threaded-fork hazards. Cached for the process lifetime. - read_
claude_ peer_ registry - Read every LIVE session from a Claude registry directory.
- read_
claude_ peer_ settings - Inspect only the user-level inbound setting. The report deliberately does not claim to be Claude’s effective value because managed, project, and command-line settings can have higher precedence in a particular target.
- register_
live_ runtime - Register an authenticated loopback runtime and return its opaque endpoint.
- register_
live_ runtime_ with_ metadata - Register a runtime with the static fields used by list/describe output.
- replay_
eligible - The replayable subsequence of a canonical transcript.
- resolve_
live_ runtime - Resolve an opaque endpoint and verify that it belongs to
expected. - resume_
agent - Resume canonical history inside a fresh SDK-owned emulation component.
- shell_
sandbox_ unenforceable - True when the requested sandbox policy cannot be enforced for shell
subprocesses: a confining policy, a platform without an OS sandbox
primitive wired up (only macOS/seatbelt is, via
sandbox-exec), and at least one shell tool ("bash"or"shell") enabled. - submit_
agent - Submit one text turn through the SDK-owned emulation loop.
- submit_
agent_ with_ images - Submit one multimodal turn through the SDK-owned emulation loop.
- tool_
outcome - Return the canonical structural outcome for a tool-result message.
- update_
claude_ peer_ settings - Set or reset Claude Code’s user-level inbound policy.
expected_revisionprevents an explicit UI action from overwriting settings inspected before another process changed the file. - write_
claude_ peer_ settings - Explicitly update Claude Code’s user-level inbound policy while preserving every unrelated setting. The write is atomic, refuses symlinks, and aborts when it observes an edit between its initial read and commit.
Type Aliases§
- Event
Sink - A sink for
AgentEvents. - Result
- Result alias used throughout the crate.
- Stop
Gate Hook - A stop-gate hook: receives the would-be-final assistant message; returns
Some(reason)to veto termination and continue the loop (the reason is injected as a new user message), orNoneto allow the stop. SeeConfig::stop_gate.