Skip to main content

Crate harness_codex

Crate harness_codex 

Source
Expand description

Codex harness edge and isolated configuration planning.

Structs§

ActiveCodexTurn
AppServerDiscoveryReceipt
AuthCommand
AuthToken
CodexAgentRuntime
CodexAppServerCapabilityReceipt
CodexAppServerClient
Drives the pure transcript state machine through an injected line transport.
CodexAppServerProbe
Non-secret observations supplied by a separately controlled probe.
CodexCliVersion
CodexRequestIdentity
CodexRoleProjection
CodexSseEncoder
CodexSubagentRequestContext
Fixed, owner-authorized limits for a canonical Codex multi-agent turn.
CodexWireError
ConfigPreview
ConfirmedConfigPlan
InstalledCodexCli
InstalledCodexDesktop
InstalledConfig
MachinePlan
ManagedAccountProjection
Mav2SpawnAgentContract
Validated MAv2 spawn_agent contract (PRD-001u R5).
ModelPageProjection
ModelProjection
OwnedAppServerConfig
Configuration for a newly owned codex app-server process.
OwnedAppServerTransport
A newly spawned app-server child with exclusively owned stdio handles.
RateLimitWindowProjection
RateLimitsProjection
S08OwnedChildTurnReceipt
ShutdownReceipt
TurnCompletionReceipt
TurnRunReceipt
UserConfigTarget

Enums§

AppServerAuthMode
AppServerProcessError
AppServerRpc
AppServerTransport
AuthError
CapabilityInputError
CodexRole
CodexSseEncodeError
CodexSubscriptionUnavailableReason
CodexToolPolicy
Explicit handling policy for whole-agent tool lifecycle events.
CodexWireErrorKind
ConfigError
Mav2ForkTurns
MAv2 fork_turns semantics: none, all, or a positive integer.
Mav2SpawnAgentError
NamespaceIdSmuggleError
ReasoningEffort
ReplayDisposition
RuntimeError
RuntimeEvent
TerminalFailureClass
Content-free mapping of canonical turn/completed failure metadata.
TerminalStatus
ToolCallStatus

Constants§

APP_SERVER_DISCOVERY_SCHEMA_VERSION
CODEX_APP_SERVER_PROTOCOL_VERSION
CURRENT_DESKTOP_APP_VERSION
ChatGPT Desktop application version verified for the current bounded receipt.
CURRENT_DESKTOP_BUILD
ChatGPT Desktop build verified for the current bounded receipt.
CURRENT_DESKTOP_CODEX_VERSION
Codex CLI version embedded in the verified ChatGPT Desktop application.
CURRENT_STANDALONE_CLI_VERSION
Standalone Codex CLI version verified for the current bounded receipt.
MAV2_AGENTS_NAMESPACE
The documented non-reserved MAv2 namespace workaround (openai/codex#31864): moving the fully-qualified tool identity to functions.agents.<fn> bypasses the reserved-schema 400.
MAV2_COLLABORATION_NAMESPACE
The Codex MAv2 fixed namespace (openai/codex#29067, merged 2026-06-23). This namespace is model-reserved for GPT-5.6 Sol/Terra/Luna and requires the exact canonical schema.
MAV2_TOOL_NAMES
The fixed MAv2 tool set exposed under the chosen namespace.
MULTI_AGENT_NAMESPACE
The Codex harness multi-agent namespace exposed to the CLI.
NAMESPACE_ID_SMUGGLE_MARKER
Id-smuggling separator modeled on the rflectr __ts__ pattern (PRD-001u R-A/AC-09): the namespace is carried through a field the host echoes unchanged (the tool-use call id) as <rawId>__ns__<base64url(namespace)>. The marker is collision-proof: a raw id that already contains it is refused at encode time, so the encoder never produces an ambiguous value. A value that carries the marker and decodes to a canonical subagent namespace is by construction one this encoder produced; decode_namespace_call_id cannot, however, distinguish a provider-supplied id that happens to match the shape from an encoder-produced id, so callers must treat the decode result as advisory rather than provenance.
OPENAI_ROLE_PROJECTIONS
S08_OPENAI_MODEL
S08_OWNED_CHILD_TURN_SCHEMA
SUPPORTED_DISCOVERY_QUOTA_RPCS
The complete app-server RPC set SteadyMux may inspect.

Traits§

AppServerLineTransport
A bounded line transport consumed by CodexAppServerClient.

Functions§

canonical_subagent_request_context
Returns the fixed subagent context only for canonical Codex subagent requests: the multi_agent_v1 namespace, either MAv2 namespace (collaboration or agents), or a bare MAv2 tool name. Both the namespace tool declaration and a namespace function-call are authoritative request context. A bare canonical namespace name is also refused conservatively so it cannot bypass the pre-visible contract through a malformed provider seam.
decode_namespace_call_id
Decodes a namespace-smuggled call id back to (raw, namespace). Returns None when the value does not carry the marker or the payload does not decode to a canonical subagent namespace, so a plain call id always round-trips as a plain call id.
encode_namespace_call_id
Encodes a namespace into a call id as <rawId>__ns__<base64url(namespace)>. Idempotent: an already-encoded id is returned unchanged. Collision-proof: a raw id that already contains the marker is refused instead of producing an ambiguous value.
is_mav2_tool_name
Returns true when a bare tool name identifies a canonical Codex MAv2 tool.
is_subagent_namespace
Returns true when a namespace is one of the canonical subagent namespaces (multi_agent_v1, collaboration, or agents).
normalize_mav2_provider_tool_call
Normalizes a provider-emitted tool call name into a (namespace, name) pair for the Codex wire, resolving MAv2 namespace semantics for the route’s chosen namespace (PRD-001u R2.1/R2.2). Backends that cannot represent namespaces receive the flattened namespace__name form on the request side; this reverses that translation. A bare MAv2 tool name (for example spawn_agent, the PRD-001u AC-04 fake emission shape) is mapped to the route’s chosen namespace so the CLI can resolve the call instead of rejecting it with unsupported call. Flattened-name and v1-container handling is delegated to normalize_provider_tool_call.
normalize_provider_tool_call
Normalizes a provider-emitted tool call name into a (namespace, name) pair for the Codex wire. Backends that cannot represent namespaces receive the flattened namespace__name form on the request side; this reverses that translation. A bare namespace-container name (for example multi_agent_v1) is mapped to the namespace function its argument shape matches so the CLI can resolve the call instead of rejecting it with unsupported call.
normalize_responses_request
restore_from_receipt
run_s08_owned_child_turn
Runs exactly one fixed, tool-free OpenAI subscription turn through an injected app-server transport. The receipt is content-free and its correlation is the exact client message ID accepted by the protocol.
validate_mav2_spawn_agent_arguments
Validates an MAv2 spawn_agent argument object deterministically before any visible output (PRD-001u R5.1/R5.2). fork_context is rejected in v2; fork_turns must be none, all, or a positive integer; model and reasoning_effort are optional per-child overrides.