Skip to main content

Crate codewhale_protocol

Crate codewhale_protocol 

Source

Modules§

agent_mail
Canonical protocol contract for durable communication between Codewhale tasks.
agent_run
Dependency-neutral agent-run read model.
cloud_facts
Pure provenance data shared by hosts and portable status reports. Provenance for /status: where the facts in use came from and how old they are.
display
Pure path and size display shared by host and portable commands.
engine_owner
Safe, ordered Engine owner projection shared by desktop and web hosts.
event_msg
EventMsg-out API in crates/protocol (issue #5261, Phase A1 of the core/protocol extraction spec).
fleet
Agent Fleet control-plane protocol types.
ids
Typed ThreadId / SessionId for the crates/core boundary (issue #5261).
journal
Session tree journal placeholder (issue #5262).
op
Op-in API in crates/protocol (issue #5261, Phase A1 of the core/protocol extraction spec).
placement
request
Provider-neutral outbound model-request boundary.
role
The closed set of message roles Codewhale can put on a transcript.
runtime

Structs§

AppResponse
Response to an AppRequest.
ApprovalDecisionRequest
A user’s approval decision sent in response to an approval request.
CanonicalHistoryImportRequest
An authenticated import proposal carries conversation data only. Routing and permissions remain the current owner’s create-thread policy.
CanonicalHistoryOptions
CanonicalThreadMutationRequest
One client-captured intent. The key is retained after an uncertain reply; retrying it never allocates another canonical identity.
CanonicalThreadOperationAssociation
CanonicalThreadOperationLookup
CanonicalThreadOperationRecovery
Explicit completion of an already-prepared retained intent, with no source proposal.
CanonicalThreadReceipt
Durable result of the actual canonical owner operation. Its scope fields are captured from RuntimeStoreBinding; historical receipts never authenticate a current process or convey credentials.
CanonicalThreadSnapshot
A complete read projection from the actual Engine and its existing saved journal. session retains the established SavedSession wire shape, including every branch; it is data, never a policy or operation-commit receipt.
Envelope
ExecApprovalRequestEvent
An event requesting user approval for a command execution or patch application.
LegacyThreadHistory
A complete immutable legacy SQLite graph, not a limit or active-branch projection.
LocalShellParams
Parameters for executing a local shell command.
McpStartupCompleteEvent
Summary event emitted once all MCP servers have finished starting.
McpStartupFailure
Details of an MCP server that failed to start.
McpStartupUpdateEvent
A progress update for a single MCP server’s startup.
MessageRecord
A single message entry in a conversation thread.
NetworkApprovalContext
Context about a network access request that requires approval.
NetworkPolicyAmendment
A proposed amendment to the network access policy for a specific host.
PromptRequest
A simple prompt request that sends text to the model and returns output.
PromptResponse
Response to a PromptRequest.
RuntimeOwnerReceipt
Closed routing receipt captured from the held Runtime owner, never a bearer. Authentication also requires the actual connected kernel peer identity.
Thread
ThreadForkParams
ThreadGoal
ThreadGoalClearParams
ThreadGoalGetParams
ThreadGoalProgressParams
ThreadGoalSetParams
ThreadListParams
ThreadReadParams
ThreadResponse
Response to a ThreadRequest.
ThreadResumeParams
ThreadSetNameParams
ThreadStartParams
UserInputAnswerEvent
One answer to a clarification question.
UserInputOptionEvent
A selectable option presented to the user in a clarification question.
UserInputQuestionEvent
A single clarification question posed to the user.
UserInputRequestEvent
An event requesting structured user input via a model-tool call.

Enums§

AppRequest
Application-level requests that are not tied to a specific thread.
AskForApproval
Policy controlling when the agent must ask the user for approval before acting.
CanonicalHistorySource
CanonicalThreadMutation
CanonicalThreadOperationKind
CanonicalThreadOperationStatus
EventFrame
A single streaming event frame emitted during agent execution.
GoalPauseReason
Why an unfinished goal is paused. Shared by every durable host projection.
McpStartupStatus
Status of an MCP server during startup.
NetworkPolicyRuleAction
Action to take for a network policy rule.
ResponseChannel
The channel a response delta is being written to.
ReviewDecision
A user’s decision on an approval request.
SessionSource
ThreadGoalStatus
ThreadRequest
ThreadStatus
ToolKind
Classification of tool invocation origin.
ToolOutput
The result of a tool call, discriminated by tool type.
ToolPayload
The payload of a tool call, discriminated by tool type.

Constants§

MAX_CANONICAL_HISTORY_BYTES
MAX_CANONICAL_HISTORY_ENTRIES
MAX_REPEATED_GAP_COUNT
Validate the compact stall history without retaining verifier prose. Legacy records with the entire history absent start with an empty window.

Traits§

Status
Common trait for lifecycle status enums across the protocol layer.

Functions§

validate_goal_stall_state