Expand description
The execution envelope: what the runtime hands an executor and what comes back.
Transport-neutral on purpose. Executors own their HTTP clients; nothing here knows about wreq or axum (sdk/cliproxy/executor/types.go).
Ownership: the executor owns request translation, provider preparation (cloak, aliases) and response restoration, in that order. Nothing before the executor translates; nothing after it un-aliases.
Structs§
- Cache
Breakpoint - Cache
Fingerprint - No payloads or credentials: keyed fingerprints and serialized byte lengths only. Replay estimates token positions offline from returned aggregate usage.
- Caller
- The authenticated downstream caller. Private request context: it seeds stable per-caller state such as Claude tool aliases and must never be sent upstream.
- Capture
Sink - Default no-op; providers call this at Go’s logging_helpers call sites.
- Claude
Cache Telemetry - Exec
Error - Exec
Request - Exec
Response - Exec
Session - A long-lived downstream connection (the Responses WebSocket,
GET /v1/responses) whose turns can share upstream state. It travels next to anExecRequestincpa_exec::Executors::execute_in_session. Executors that pool upstream sockets key them byidand release them inExecutors::close_sessionwhen the downstream connection ends (Go: execution session id andCloseExecutionSession). - Resolved
Model - Capabilities bound to one execution attempt (Go
*registry.ModelInfostored under a request metadata key). - Session
Lease - A shared
Retainable, compared by identity. - Upstream
Request - Go helps.UpstreamRequestLog. Credentials and bodies intentionally have no Debug implementation. The observer owns Go’s masking and formatting policy.
- Usage
Sink - A handle executors report usage through; cloning shares the observer.
- WebSocket
Emitter - Go
helps.EmitWebSocketResponseEventfor one attempt.
Enums§
- Capture
Event - Failure
Scope - What a failure says about the attempt, for retry and cooldown decisions.
- Operation
- Resolved
Source - Which request metadata key Go stores the binding under. Go’s
ResolvedModelInforeads either;ResolvedAPIKeyModelInforeads onlyResolvedSource::ApiKey. - Response
Body - Upstream
Stage - A stage of one upstream exchange, as the shared HTTP client sees it
(
cpa_exec::proxy::send_routed). A redirect sends the request again:Startedcomes once,Hop,ConnectedandBodySentfor each hop, the rest for the final response.
Traits§
- Capture
Observer - Retainable
- A Home pick a pooled upstream socket can keep beyond the turn (Go
ExecutionLifecyclewithRetain). - Usage
Observer - Receives the upstream payloads Go’s executors feed their usage reporter.
- WebSocket
Observer - Receives the upstream WebSocket frames Go’s executors pass to
helps.EmitWebSocketResponseEvent(the Codex and xAI WebSockets).
Type Aliases§
- Exec
Stream - One framed unit of a streaming response (for SSE: one complete event).
An
Erritem is terminal: consumers stop polling after it.