Expand description
Exact cookie-agent protocol 20 with versionless session events.
This crate intentionally contains no compatibility aliases or decoders.
Modules§
- diagnostics
- Bounded user-facing diagnostics. Preserve diagnostic content while removing terminal/format controls and truncating text to the display budget.
- paths
- Cross-platform per-user path resolution for Cookie Agent.
Structs§
- Adapter
Id - Agent
Descriptor - AgentId
- Agent
MdEntry - Agent
MdSkipped - Agent
Revision - Agent
Schema Version - Agent
Snapshot - Agent
Usage Params - Agent
Usage Result - Approval
Capability - Approval
Constraints - Approval
Evaluation - Approval
Feedback - Approval
Final Decision - Approval
Id - Approval
Internal Decision - Approval
List Params - Approval
List Result - Approval
Record - Approval
Request - Approval
Respond Error - Approval
Respond Params - Approval
Respond Result - Artifact
Read Path - Public artifact routes are deliberately distinct from stored ArtifactReference URIs.
- Artifact
Reference - Assistant
Tool Call Ref - Attempt
Id - Auth
Credential Descriptor - Auth
Field Name - Auth
Method Descriptor - Auth
Method Id - Auth
Parameter Id - Auth
Recipe Id - Available
Model Descriptor - Available
Variant Descriptor - Bounded
Display Text - Bounded
Setup String - Cache
Entry Id - Cache
Revision - Canonical
Model Id - Catalog
Identifier - Catalog
Revision - Catalog
Runtime State - Catalog
Safe Error Meta - Catalog
Text - Child
Summary - Client
- A cloneable client handle. Calls and the single ordered delivery stream share one serialized message stream, regardless of transport.
- Client
Connect Id - Client
Hello - Client
Rename Id - Client
Request Id - Client
Response Id - Client
RunId - Compiled
Safe Model Blueprint - Context
Checkpoint Boundaries - Context
Checkpoint Budgets - Context
Checkpoint Commit - Context
Rehydrated File - Credential
Field Name - CwdIdentity
- Decision
Trace - Delegate
Request Payload - Delegated
Context Turn - Delegation
Reservation - Diagnostic
Text - Durable
Connection Descriptor - Durable
Provider Receipt - Durable
Provider Receipt Id - Effective
Permission Action - Effective
Permission Rule - Error
Response - Event
Origin - Event
Payload Read - Events
Subscribe Params - Events
Subscribe Result - Extension
Agent Before Start Params - Extension
Agent Before Start Result - Extension
Allow Block Result - Extension
BusEvent Params - Extension
Emit Params - Non-model publication only. Model-bound content must use producer.send with an explicitly registered producer; emit must never implicitly register one.
- Extension
Emit Result Params - Extension
Engine Capabilities - Extension
Event Params - Extension
Initialize Params - Extension
Initialize Result - Extension
Injected Message - Extension
Message EndParams - Extension
Message EndResult - Extension
Model Before Request Params - Extension
Model Before Request Result - Extension
Model Before Select Params - Extension
Model Message - Extension
Model Params Adjustments - Extension
Ping Params - Extension
Ping Result - Extension
Plugin Capabilities - Extension
Producer Discard Params - Discard an owned message only while it remains waiting. Authority is the live connection’s stable plugin owner and session, not a registration.
- Extension
Producer Discard Result - Already-discarded owned messages succeed; consumed or currently claimed messages reject.
- Extension
Producer Register Params - Plugin-to-engine request; the connection supplies the stable plugin owner. Registration is allowed during recovery and does not wait for goal readiness.
- Extension
Producer Register Result - Extension
Producer Send Params - Send requires a live registration owned by this connection and session. Identical (session, stable owner, key) retries return the original receipt; different description, body, or mode is rejected. A missing ACK is commit-uncertain.
- Extension
Producer Send Result - Returned only after durable ProducerMessageAccepted append. Retries return this same receipt, including after consumption, with no second acceptance.
- Extension
Producer Unregister Params - Extension
Producer Unregister Result - Unregister does not remove accepted messages; zero-send unregister is valid.
- Extension
Protocol Version - Extension
Provider After Response Params - Extension
Provider After Response Result - Extension
Provider Before Headers Params - Extension
Provider Before Headers Result - Extension
Provider Before Request Params - Extension
Provider Before Request Result - Extension
Recovery Complete Params - Plugin-to-engine completion request. The engine owns starting/disabled states. The transport supplies authenticated plugin name + connection epoch out of band.
- Extension
Recovery Complete Result - Extension
Recovery Start Params - Engine-to-plugin notification, never a deadlineful pending request. Restore from plugin-owned storage/services and report completion on the same connection. No response, recovery deadline, replay, or eager session adoption is implied.
- Extension
Session Before Compact Params - Extension
Session Before Compact Result - Extension
Session Before Fork Params - Extension
Session Before Revert Params - Extension
Session Before Revert Result - Extension
Shutdown Params - Extension
Tool After Result Params - Extension
Tool After Result Result - Extension
Tool Before Call Params - Extension
Tool Before Call Result - Extension
Tool Call Params - Extension
Tool Call Result - Extension
Tool Declaration - Extension
User Before Input Params - Extension
User Before Input Result - Finite
F32 - Frozen
Auth Parameter Value - Frozen
Bedrock Message Cache Point - Frozen
Credential Binding - Frozen
Delegation Policy - Frozen
Internal Agent Definition - Frozen
Model Binding - Frozen
Request Defaults - Frozen
Resolved Request Defaults - Frozen
Setup Binding - Frozen
Variant Blueprint - Global
Usage Params - Global
Usage Result - Goal
GetParams - Goal
GetResult - GoalId
- Goal
Item - Goal
Reminder Identity - Pending reminder metadata, NOT a durable send idempotency key. Coalescing uses the goal ID and revision, independently of the presentation kind. After consumption another continuation at the same revision uses a fresh send.
- Goal
State - Root-session projection, rebuilt from goal events independently of compaction. Activation starts with an empty checklist; each subsequent event advances revision.
- Goal
Update Params goal_updatereplaces the current root goal’s checklist at actor execution, even if the goal changed since the calling run started. It is never a lifecycle command. The engine rejects absent/terminal goals and blank descriptions. Replacements are serialized; the last accepted update wins. Duplicate descriptions are allowed. Empty items preserve active/paused status. A nonempty all-finished update completes even while paused, without scheduling a wake.- Goal
Update Result - Header
Name - Internal
Agent Failure - Internal
Agent Invocation Id - Internal
Agent RunId - Internal
Summary Checkpoint - Invocation
Id - Json
RpcError - Json
RpcVersion - Manifest
Entry Id - Manifest
Revision - Matched
Permission Rule - McpAuth
Begin Params - McpAuth
Begin Result - McpAuth
Cancel Params - McpAuth
Cancel Result - McpO
Auth Settings Definition - McpServer
AddParams - McpServer
Definition - McpServer
Edit Params - McpServer
Info - McpServer
List Params - McpServer
List Result - McpServer
Mutation Result - McpServer
Name Params - McpServer
Persist Params - McpServer
SetEnabled Params - Media
Capability - Mime
Type - Model
Call Id - Model
Capabilities - Model
Error Summary - Model
Key - Direct runnable
provider/model-ididentity. - Model
Revision - Model
Selection - One exact base or named-variant model selection.
- Model
Snapshot Manifest Schema Version - Model
Snapshot Manifest V1 - Model
Snapshot Payload V1 - Model
Snapshot Revision - Model
Tool Name - Model
Usage Rollup - Native
Context Scope - Native
Context Window - Native
Replay Artifact - Normalized
Decimal - Notification
- Operation
Fingerprint - Output
Delta - Output
Gap - Output
Snapshot - Output
Snapshot Envelope - Permission
Rule - Persisted
File Part - Persisted
Model Turn - Persisted
Tool Result - Plugin
Recovery State - Runtime startup readiness, not a durable producer record or recovery blob. Failed/disabled means external work is unknown, not that work is complete.
- Prepared
Approval Resource - Prepared
Operation Identity - Prepared
Resource Digest - Prepared
Resource Identity - Producer
Id - Producer
Idempotency Key - Producer
Message Id - Producer
Registration - Read-only runtime record. Never persist or restore a registration ID. A fresh registration is required on each process start, even for retries.
- Protocol
Recipe Id - Protocol
Version - The exact protocol wire version.
- Provider
Connect Error - Provider
Connect Params - Provider
Connect Result - Provider
Connection Generation - Provider
Credential Values - Provider
Descriptor - Provider
Disconnect Error - Provider
Disconnect Params - Provider
Disconnect Result - Provider
Id - Provider
Item Id - Provider
Model Id - Provider
Recipe Id - Provider
Setup Recipe Id - Provider
State Revision - Provider
Store Generation - Provider
Store Revision - Provider
Support - Quarantine
Diagnostic - Recipe
Compiler Version - Recipe
Registry Revision - Replay
Decision - Request
- Request
Defaults - Resolved
Model Ref - Resolved
Request Defaults - Retained
Tool Output - Retained
Tool Stream - RunCancel
Params - RunCancel
Result - RunId
- RunRecall
Steer Params - RunRecall
Steer Result - RunSelection
- RunStart
Conflict - RunStart
Params - RunStart
Result - RunSteer
Params - RunSteer
Result - RunTool
Stdin Params - RunTool
Stdin Result - Runtime
Changed Notification - Runtime
Revision - Runtime
Snapshot GetParams - Runtime
Snapshot Result - Runtime
Snapshot Schema Version - The exact coherent runtime snapshot schema version.
- Runtime
Snapshot V1 - Safe
Code - Stable lowercase machine-readable code shared by configuration and durable protocol values.
- Safe
Display Text - Safe
Endpoint Identity - Safe
Error Message - Safe
Internal Agent Call - Safe
Internal Agent Result - Safe
Static Header Value - Safe
Tool Error - Server
Context - Per-connection facilities available to a server implementation.
- Server
Fault - JSON-RPC failure returned by a
ServerProtocolimplementation. - Server
Hello - Session
Children Params - Session
Children Result - Session
Compact Params - Session
Compact Result - Session
Create Params - Session
Create Result - Session
Fork Params - Session
Fork Result - Session
GetParams - Session
GetResult - Session
Goal GetParams - Session
Goal GetResult - Session
Goal Lifecycle Params - Session
Goal Lifecycle Result - Session
Goal SetParams - Session
Goal SetResult - Session
Id - Session
List Params - Session
List Result - Session
Meta - Session
Model State - Session
Permission Clear Params - Session
Permission GetParams - Session
Permission GetResult - Session
Permission Mutation Result - Session
Permission Overlay - Session
Permission SetParams - Session
Producers Params - Session
Producers Result - Session
Rename Error - Session
Rename Params - Session
Rename Record - Session
Rename Result - Session
Resume Params - Session
Resume Result - Session
Revert Params - Session
Revert Result - Session
SetPermission Mode Params - Session
SetPermission Mode Result - Session
Title - Session
Tree - Session
Tree Params - Session
Tree Result - Session
Tree Usage Result - Session
Usage Params - Session
Usage Result - Setup
Field Descriptor - Setup
Field Id - Setup
Field Validation - Setup
Value Parse Error - An error returned when text does not satisfy a setup field descriptor.
- Sha256
Digest - Skill
Descriptor - Skills
GetParams - Skills
GetResult - Skills
List Params - Skills
List Result - Skipped
Event - Staged
Skill Payload - Store
Entry Id - Stored
Event - Success
Response - Summary
Byte Limit - Tool
Attachment - Tool
Call Id - Tool
Call Presentation - Tool
Call Start - Tool
Call Termination - Tool
Emitted Message - Tool
Output Chunk - Tool
Output Manifest - Tool
Output Truncation - Tree
Approval Grant - Tree
Approval Grant Id - Usage
- Usage
Rollup - Variant
Id - Wildcard
Pattern - Current wildcard grammar shared by authored configuration and frozen protocol values.
Enums§
- Adaptor
Id - Agent
Document Source - Agent
Mode - Agent
Schema Error - Approval
Boundary - Approval
Decision Source - Approval
Final Outcome - Approval
Internal Decision Kind - Approval
Reason Code - Approval
Resource Source - Approval
Respond Error Code - Approval
Schema Error - Approval
Status - Approval
Trigger - Approval
User Decision - Binding
Export Error - Cancellation
Capability - Catalog
Source - Client
Delivery - The sole ordered delivery stream consumed by the UI.
- Client
Error - Errors returned by the transport or a JSON-RPC operation.
- Compiled
Reasoning Behavior - Context
Checkpoint - Credential
Field Type - Delegated
Context Role - Effective
Auth Source - Effective
Auth State - Event
Payload - Event
Schema Error - Event
Subscription Message - Extension
Allow Block Action - Extension
Emit Status - Extension
Interception Hook - Extension
Message EndAction - Extension
Message Role - Extension
Model Before Request Action - Extension
Model Select Source - Extension
Provider Before Request Action - Extension
Recovery Outcome - Extension
Session Before Revert Action - Extension
Tool After Result Action - Extension
Tool Before Call Action - Extension
User Before Input Action - Frozen
Cache Strategy - Frozen
Cache Ttl - Frozen
Credential Source - Frozen
Google Cache Mode - Frozen
Internal Agent Fallback - Frozen
Open AiCache Mode - Frozen
Open AiCache Retention - Frozen
Open AiPrompt Cache Ttl - Frozen
Provider Source - Goal
Lifecycle Action - User-only transitions. Completion is derived from a nonempty finished checklist.
- Goal
Reminder Kind - Whether a reminder introduces the objective or continues previously consumed work. Legacy reminder events always represented continuations.
- Goal
Status - Identity
Error - Identity parsing failure.
- Internal
Agent Backend - Internal
Agent Kind - Json
RpcId - Manifest
Schema Error - McpConfig
Source - McpConfig
Target - McpO
Auth Definition - McpServer
State - Media
Kind - Message
Frame - One complete JSON-RPC message exchanged by a protocol transport.
- Modality
- Model
Error Kind - Model
Error Stage - Model
Finish Reason - Model
Schema Error - Native
Artifact Error - Output
Stream - Permission
Action - Permission
Effect - Permission
Mode - Permission
Rule Source - Persisted
Assistant Part - Persisted
Content Value - Persisted
File Source - Persisted
Tool Content - Plugin
Diagnostic Kind - Plugin
Recovery Status - Prepared
Binding Lifetime - Prepared
Capability Lifetime - Producer
Delivery Mode - Per-send mode. Queue remains accepted-but-deferred during an active run; steer joins the next safe request without interrupting an in-flight request.
- Producer
Owner - Stable identity used with session + idempotency key for durable deduplication.
Plugin connection authorization is runtime-only; the engine derives
pluginfrom the authenticated configured plugin name, never from send parameters. The transport supplies name + connection epoch for live authority separately; the epoch is never part of this durable owner or the deduplication key. GoalControl identifies engine-authored lifecycle steering, not a continuation reminder; its accepted messages survive goal-controller teardown. Agent identifies an in-tree agent mail sender; the session identity is engine-derived from the executing tool context, never from model arguments. The owner is durable and participates in(session, owner, key)dedup. - Provider
Configuration State - Provider
Connect Error Code - Provider
Disconnect Error Code - Provider
Options - Provider
Presence - Provider
Schema Error - Provider
Support State - Reasoning
Effort - Replay
Capability - Replay
Disposition - Response
- RunStart
Conflict Code - Runtime
Change Reason - Safe
Setup Value - Session
Origin - Session
Rename Change - Session
Rename Error Code - Session
Status - Session
Title Change - Setup
Field Type - Skill
Source - Staged
Skill Provenance - Tool
Choice - Tool
Completion Output - Tool
Emitted Content - Tool
Emitted Message Role - Tool
Output Declaration - Tool
Termination Outcome - Transport
Error - Variant
Origin - Wire
String Error
Constants§
- EXTENSION_
PROTOCOL_ VERSION - MAX_
TOOL_ DELTA_ BYTES - MAX_
TOOL_ DISPLAY_ BYTES - MAX_
TOOL_ STREAMS - MAX_
TOOL_ STREAM_ NAME_ BYTES - PLUGIN_
BUS_ EVENT_ METHOD - PLUGIN_
EMIT_ METHOD - PLUGIN_
EMIT_ RESULT_ METHOD - PLUGIN_
EVENT_ METHOD - PLUGIN_
INITIALIZE_ METHOD - PLUGIN_
INTERCEPT_ AGENT_ BEFORE_ START_ METHOD - PLUGIN_
INTERCEPT_ MESSAGE_ END_ METHOD - PLUGIN_
INTERCEPT_ MODEL_ BEFORE_ REQUEST_ METHOD - PLUGIN_
INTERCEPT_ MODEL_ BEFORE_ SELECT_ METHOD - PLUGIN_
INTERCEPT_ PROVIDER_ AFTER_ RESPONSE_ METHOD - PLUGIN_
INTERCEPT_ PROVIDER_ BEFORE_ HEADERS_ METHOD - PLUGIN_
INTERCEPT_ PROVIDER_ BEFORE_ REQUEST_ METHOD - PLUGIN_
INTERCEPT_ SESSION_ BEFORE_ COMPACT_ METHOD - PLUGIN_
INTERCEPT_ SESSION_ BEFORE_ FORK_ METHOD - PLUGIN_
INTERCEPT_ SESSION_ BEFORE_ REVERT_ METHOD - PLUGIN_
INTERCEPT_ TOOL_ AFTER_ RESULT_ METHOD - PLUGIN_
INTERCEPT_ TOOL_ BEFORE_ CALL_ METHOD - PLUGIN_
INTERCEPT_ USER_ BEFORE_ INPUT_ METHOD - PLUGIN_
PING_ METHOD - PLUGIN_
PRODUCER_ DISCARD_ METHOD - PLUGIN_
PRODUCER_ REGISTER_ METHOD - PLUGIN_
PRODUCER_ SEND_ METHOD - PLUGIN_
PRODUCER_ UNREGISTER_ METHOD - PLUGIN_
RECOVERY_ COMPLETE_ METHOD - PLUGIN_
RECOVERY_ START_ METHOD - PLUGIN_
SHUTDOWN_ METHOD - PLUGIN_
TOOLS_ CALL_ METHOD - PROTOCOL_
VERSION - The only protocol version supported by this build.
- PROVIDER_
CONNECT_ METHOD - PROVIDER_
DISCONNECT_ METHOD - RUNTIME_
CHANGED_ METHOD - RUNTIME_
SNAPSHOT_ GET_ METHOD - RUNTIME_
SNAPSHOT_ SCHEMA_ VERSION - The only coherent runtime snapshot schema supported by this build.
- SESSION_
GOAL_ GET_ METHOD - SESSION_
GOAL_ LIFECYCLE_ METHOD - SESSION_
GOAL_ SET_ METHOD - SESSION_
PRODUCERS_ METHOD - SESSION_
TREE_ USAGE_ CORRUPT_ DELEGATION_ CODE - SESSION_
TREE_ USAGE_ MISSING_ SESSION_ CODE
Traits§
- Client
Event Sink - Consumer of ordered protocol notifications and replay deliveries.
- Client
Protocol - Client end of the protocol contract over shared session mechanics.
- Message
Stream - Frame-level channel with no JSON-RPC semantics.
- Server
Protocol - Server end of the protocol contract after session-level validation.
- Transport
- Frame-level channel with no JSON-RPC semantics.
Functions§
- decode_
skill_ submission - deserialize_
event_ payload_ best_ effort - Decodes an event payload, replacing only leaves which Serde identifies as nullable fields. Required-field and unknown-variant failures remain errors. Historical checklist item IDs are ignored here only; authored tool/RPC values remain strict. The original event log is not rewritten.
- encode_
skill_ submission - encode_
skill_ submission_ with_ prompt - export_
json_ schema_ set - extension_
initialize_ request - extension_
recovery_ start_ notification - extension_
shutdown_ notification - json_
schema_ documents - parse_
setup_ value - Parses text according to a setup field’s type and validation constraints.
- serve
- Run one complete server-side protocol session over a transport.
- setup_
value_ text - Formats a setup value for editing or display.
- validate_
tool_ stream_ name - The same name grammar is used for declarations, output chunks, and artifact URI suffixes.
- visible_
events - Reduces an append-only event stream to the currently visible branch. Revert markers are physical control records and are not model/transcript content.