Skip to main content

Crate cookie_agent_protocol

Crate cookie_agent_protocol 

Source
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§

AdapterId
AgentDescriptor
AgentId
AgentMdEntry
AgentMdSkipped
AgentRevision
AgentSchemaVersion
AgentSnapshot
AgentUsageParams
AgentUsageResult
ApprovalCapability
ApprovalConstraints
ApprovalEvaluation
ApprovalFeedback
ApprovalFinalDecision
ApprovalId
ApprovalInternalDecision
ApprovalListParams
ApprovalListResult
ApprovalRecord
ApprovalRequest
ApprovalRespondError
ApprovalRespondParams
ApprovalRespondResult
ArtifactReadPath
Public artifact routes are deliberately distinct from stored ArtifactReference URIs.
ArtifactReference
AssistantToolCallRef
AttemptId
AuthCredentialDescriptor
AuthFieldName
AuthMethodDescriptor
AuthMethodId
AuthParameterId
AuthRecipeId
AvailableModelDescriptor
AvailableVariantDescriptor
BoundedDisplayText
BoundedSetupString
CacheEntryId
CacheRevision
CanonicalModelId
CatalogIdentifier
CatalogRevision
CatalogRuntimeState
CatalogSafeErrorMeta
CatalogText
ChildSummary
Client
A cloneable client handle. Calls and the single ordered delivery stream share one serialized message stream, regardless of transport.
ClientConnectId
ClientHello
ClientRenameId
ClientRequestId
ClientResponseId
ClientRunId
CompiledSafeModelBlueprint
ContextCheckpointBoundaries
ContextCheckpointBudgets
ContextCheckpointCommit
ContextRehydratedFile
CredentialFieldName
CwdIdentity
DecisionTrace
DelegateRequestPayload
DelegatedContextTurn
DelegationReservation
DiagnosticText
DurableConnectionDescriptor
DurableProviderReceipt
DurableProviderReceiptId
EffectivePermissionAction
EffectivePermissionRule
ErrorResponse
EventOrigin
EventPayloadRead
EventsSubscribeParams
EventsSubscribeResult
ExtensionAgentBeforeStartParams
ExtensionAgentBeforeStartResult
ExtensionAllowBlockResult
ExtensionBusEventParams
ExtensionEmitParams
Non-model publication only. Model-bound content must use producer.send with an explicitly registered producer; emit must never implicitly register one.
ExtensionEmitResultParams
ExtensionEngineCapabilities
ExtensionEventParams
ExtensionInitializeParams
ExtensionInitializeResult
ExtensionInjectedMessage
ExtensionMessageEndParams
ExtensionMessageEndResult
ExtensionModelBeforeRequestParams
ExtensionModelBeforeRequestResult
ExtensionModelBeforeSelectParams
ExtensionModelMessage
ExtensionModelParamsAdjustments
ExtensionPingParams
ExtensionPingResult
ExtensionPluginCapabilities
ExtensionProducerDiscardParams
Discard an owned message only while it remains waiting. Authority is the live connection’s stable plugin owner and session, not a registration.
ExtensionProducerDiscardResult
Already-discarded owned messages succeed; consumed or currently claimed messages reject.
ExtensionProducerRegisterParams
Plugin-to-engine request; the connection supplies the stable plugin owner. Registration is allowed during recovery and does not wait for goal readiness.
ExtensionProducerRegisterResult
ExtensionProducerSendParams
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.
ExtensionProducerSendResult
Returned only after durable ProducerMessageAccepted append. Retries return this same receipt, including after consumption, with no second acceptance.
ExtensionProducerUnregisterParams
ExtensionProducerUnregisterResult
Unregister does not remove accepted messages; zero-send unregister is valid.
ExtensionProtocolVersion
ExtensionProviderAfterResponseParams
ExtensionProviderAfterResponseResult
ExtensionProviderBeforeHeadersParams
ExtensionProviderBeforeHeadersResult
ExtensionProviderBeforeRequestParams
ExtensionProviderBeforeRequestResult
ExtensionRecoveryCompleteParams
Plugin-to-engine completion request. The engine owns starting/disabled states. The transport supplies authenticated plugin name + connection epoch out of band.
ExtensionRecoveryCompleteResult
ExtensionRecoveryStartParams
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.
ExtensionSessionBeforeCompactParams
ExtensionSessionBeforeCompactResult
ExtensionSessionBeforeForkParams
ExtensionSessionBeforeRevertParams
ExtensionSessionBeforeRevertResult
ExtensionShutdownParams
ExtensionToolAfterResultParams
ExtensionToolAfterResultResult
ExtensionToolBeforeCallParams
ExtensionToolBeforeCallResult
ExtensionToolCallParams
ExtensionToolCallResult
ExtensionToolDeclaration
ExtensionUserBeforeInputParams
ExtensionUserBeforeInputResult
FiniteF32
FrozenAuthParameterValue
FrozenBedrockMessageCachePoint
FrozenCredentialBinding
FrozenDelegationPolicy
FrozenInternalAgentDefinition
FrozenModelBinding
FrozenRequestDefaults
FrozenResolvedRequestDefaults
FrozenSetupBinding
FrozenVariantBlueprint
GlobalUsageParams
GlobalUsageResult
GoalGetParams
GoalGetResult
GoalId
GoalItem
GoalReminderIdentity
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.
GoalState
Root-session projection, rebuilt from goal events independently of compaction. Activation starts with an empty checklist; each subsequent event advances revision.
GoalUpdateParams
goal_update replaces 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.
GoalUpdateResult
HeaderName
InternalAgentFailure
InternalAgentInvocationId
InternalAgentRunId
InternalSummaryCheckpoint
InvocationId
JsonRpcError
JsonRpcVersion
ManifestEntryId
ManifestRevision
MatchedPermissionRule
McpAuthBeginParams
McpAuthBeginResult
McpAuthCancelParams
McpAuthCancelResult
McpOAuthSettingsDefinition
McpServerAddParams
McpServerDefinition
McpServerEditParams
McpServerInfo
McpServerListParams
McpServerListResult
McpServerMutationResult
McpServerNameParams
McpServerPersistParams
McpServerSetEnabledParams
MediaCapability
MimeType
ModelCallId
ModelCapabilities
ModelErrorSummary
ModelKey
Direct runnable provider/model-id identity.
ModelRevision
ModelSelection
One exact base or named-variant model selection.
ModelSnapshotManifestSchemaVersion
ModelSnapshotManifestV1
ModelSnapshotPayloadV1
ModelSnapshotRevision
ModelToolName
ModelUsageRollup
NativeContextScope
NativeContextWindow
NativeReplayArtifact
NormalizedDecimal
Notification
OperationFingerprint
OutputDelta
OutputGap
OutputSnapshot
OutputSnapshotEnvelope
PermissionRule
PersistedFilePart
PersistedModelTurn
PersistedToolResult
PluginRecoveryState
Runtime startup readiness, not a durable producer record or recovery blob. Failed/disabled means external work is unknown, not that work is complete.
PreparedApprovalResource
PreparedOperationIdentity
PreparedResourceDigest
PreparedResourceIdentity
ProducerId
ProducerIdempotencyKey
ProducerMessageId
ProducerRegistration
Read-only runtime record. Never persist or restore a registration ID. A fresh registration is required on each process start, even for retries.
ProtocolRecipeId
ProtocolVersion
The exact protocol wire version.
ProviderConnectError
ProviderConnectParams
ProviderConnectResult
ProviderConnectionGeneration
ProviderCredentialValues
ProviderDescriptor
ProviderDisconnectError
ProviderDisconnectParams
ProviderDisconnectResult
ProviderId
ProviderItemId
ProviderModelId
ProviderRecipeId
ProviderSetupRecipeId
ProviderStateRevision
ProviderStoreGeneration
ProviderStoreRevision
ProviderSupport
QuarantineDiagnostic
RecipeCompilerVersion
RecipeRegistryRevision
ReplayDecision
Request
RequestDefaults
ResolvedModelRef
ResolvedRequestDefaults
RetainedToolOutput
RetainedToolStream
RunCancelParams
RunCancelResult
RunId
RunRecallSteerParams
RunRecallSteerResult
RunSelection
RunStartConflict
RunStartParams
RunStartResult
RunSteerParams
RunSteerResult
RunToolStdinParams
RunToolStdinResult
RuntimeChangedNotification
RuntimeRevision
RuntimeSnapshotGetParams
RuntimeSnapshotResult
RuntimeSnapshotSchemaVersion
The exact coherent runtime snapshot schema version.
RuntimeSnapshotV1
SafeCode
Stable lowercase machine-readable code shared by configuration and durable protocol values.
SafeDisplayText
SafeEndpointIdentity
SafeErrorMessage
SafeInternalAgentCall
SafeInternalAgentResult
SafeStaticHeaderValue
SafeToolError
ServerContext
Per-connection facilities available to a server implementation.
ServerFault
JSON-RPC failure returned by a ServerProtocol implementation.
ServerHello
SessionChildrenParams
SessionChildrenResult
SessionCompactParams
SessionCompactResult
SessionCreateParams
SessionCreateResult
SessionForkParams
SessionForkResult
SessionGetParams
SessionGetResult
SessionGoalGetParams
SessionGoalGetResult
SessionGoalLifecycleParams
SessionGoalLifecycleResult
SessionGoalSetParams
SessionGoalSetResult
SessionId
SessionListParams
SessionListResult
SessionMeta
SessionModelState
SessionPermissionClearParams
SessionPermissionGetParams
SessionPermissionGetResult
SessionPermissionMutationResult
SessionPermissionOverlay
SessionPermissionSetParams
SessionProducersParams
SessionProducersResult
SessionRenameError
SessionRenameParams
SessionRenameRecord
SessionRenameResult
SessionResumeParams
SessionResumeResult
SessionRevertParams
SessionRevertResult
SessionSetPermissionModeParams
SessionSetPermissionModeResult
SessionTitle
SessionTree
SessionTreeParams
SessionTreeResult
SessionTreeUsageResult
SessionUsageParams
SessionUsageResult
SetupFieldDescriptor
SetupFieldId
SetupFieldValidation
SetupValueParseError
An error returned when text does not satisfy a setup field descriptor.
Sha256Digest
SkillDescriptor
SkillsGetParams
SkillsGetResult
SkillsListParams
SkillsListResult
SkippedEvent
StagedSkillPayload
StoreEntryId
StoredEvent
SuccessResponse
SummaryByteLimit
ToolAttachment
ToolCallId
ToolCallPresentation
ToolCallStart
ToolCallTermination
ToolEmittedMessage
ToolOutputChunk
ToolOutputManifest
ToolOutputTruncation
TreeApprovalGrant
TreeApprovalGrantId
Usage
UsageRollup
VariantId
WildcardPattern
Current wildcard grammar shared by authored configuration and frozen protocol values.

Enums§

AdaptorId
AgentDocumentSource
AgentMode
AgentSchemaError
ApprovalBoundary
ApprovalDecisionSource
ApprovalFinalOutcome
ApprovalInternalDecisionKind
ApprovalReasonCode
ApprovalResourceSource
ApprovalRespondErrorCode
ApprovalSchemaError
ApprovalStatus
ApprovalTrigger
ApprovalUserDecision
BindingExportError
CancellationCapability
CatalogSource
ClientDelivery
The sole ordered delivery stream consumed by the UI.
ClientError
Errors returned by the transport or a JSON-RPC operation.
CompiledReasoningBehavior
ContextCheckpoint
CredentialFieldType
DelegatedContextRole
EffectiveAuthSource
EffectiveAuthState
EventPayload
EventSchemaError
EventSubscriptionMessage
ExtensionAllowBlockAction
ExtensionEmitStatus
ExtensionInterceptionHook
ExtensionMessageEndAction
ExtensionMessageRole
ExtensionModelBeforeRequestAction
ExtensionModelSelectSource
ExtensionProviderBeforeRequestAction
ExtensionRecoveryOutcome
ExtensionSessionBeforeRevertAction
ExtensionToolAfterResultAction
ExtensionToolBeforeCallAction
ExtensionUserBeforeInputAction
FrozenCacheStrategy
FrozenCacheTtl
FrozenCredentialSource
FrozenGoogleCacheMode
FrozenInternalAgentFallback
FrozenOpenAiCacheMode
FrozenOpenAiCacheRetention
FrozenOpenAiPromptCacheTtl
FrozenProviderSource
GoalLifecycleAction
User-only transitions. Completion is derived from a nonempty finished checklist.
GoalReminderKind
Whether a reminder introduces the objective or continues previously consumed work. Legacy reminder events always represented continuations.
GoalStatus
IdentityError
Identity parsing failure.
InternalAgentBackend
InternalAgentKind
JsonRpcId
ManifestSchemaError
McpConfigSource
McpConfigTarget
McpOAuthDefinition
McpServerState
MediaKind
MessageFrame
One complete JSON-RPC message exchanged by a protocol transport.
Modality
ModelErrorKind
ModelErrorStage
ModelFinishReason
ModelSchemaError
NativeArtifactError
OutputStream
PermissionAction
PermissionEffect
PermissionMode
PermissionRuleSource
PersistedAssistantPart
PersistedContentValue
PersistedFileSource
PersistedToolContent
PluginDiagnosticKind
PluginRecoveryStatus
PreparedBindingLifetime
PreparedCapabilityLifetime
ProducerDeliveryMode
Per-send mode. Queue remains accepted-but-deferred during an active run; steer joins the next safe request without interrupting an in-flight request.
ProducerOwner
Stable identity used with session + idempotency key for durable deduplication. Plugin connection authorization is runtime-only; the engine derives plugin from 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.
ProviderConfigurationState
ProviderConnectErrorCode
ProviderDisconnectErrorCode
ProviderOptions
ProviderPresence
ProviderSchemaError
ProviderSupportState
ReasoningEffort
ReplayCapability
ReplayDisposition
Response
RunStartConflictCode
RuntimeChangeReason
SafeSetupValue
SessionOrigin
SessionRenameChange
SessionRenameErrorCode
SessionStatus
SessionTitleChange
SetupFieldType
SkillSource
StagedSkillProvenance
ToolChoice
ToolCompletionOutput
ToolEmittedContent
ToolEmittedMessageRole
ToolOutputDeclaration
ToolTerminationOutcome
TransportError
VariantOrigin
WireStringError

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§

ClientEventSink
Consumer of ordered protocol notifications and replay deliveries.
ClientProtocol
Client end of the protocol contract over shared session mechanics.
MessageStream
Frame-level channel with no JSON-RPC semantics.
ServerProtocol
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.

Type Aliases§

ExtensionSessionBeforeForkResult
FrozenProviderOptions
PreparedCapabilityOperation
SafeModelMetadata