README

colmugx/acp/protocol does not have a README file

#
ElicitationId

type ElicitationId = String

Stable wire identifier for a URL elicitation.

#
MessageId

type MessageId = String

#
PermissionOptionId

type PermissionOptionId = String

#
SessionConfigGroupId

type SessionConfigGroupId = String

#
SessionConfigId

type SessionConfigId = String

#
SessionConfigValueId

type SessionConfigValueId = String

#
SessionId

type SessionId = String

Stable ACP identifiers are strings on the wire.

#
SessionModeId

type SessionModeId = String

#
TerminalId

type TerminalId = String

#
ToolCallId

type ToolCallId = String

#
ProtocolDecodeError

pub(all) suberror ProtocolDecodeError {
JsonParse(message~ : String)
ExpectedObject(path~ : String)
ExpectedArray(path~ : String)
ExpectedString(path~ : String)
ExpectedBoolean(path~ : String)
ExpectedNumber(path~ : String)
MissingField(path~ : String)
UnknownField(path~ : String)
InvalidField(path~ : String, reason~ : String)
InvalidDiscriminator(path~ : String, value~ : String)
InvalidPath(path~ : String, value~ : String)
InvalidBase64(path~ : String)
} derive(Eq,
Debug
)

Structured failures raised while decoding the stable ACP data model.

The path is always a wire-property path (with array indexes where applicable). No decoder in this package turns an invalid value into a default value.

#
SessionUpdateFoldError

pub(all) suberror SessionUpdateFoldError {
DuplicateToolCall(tool_call_id~ : String)
UnknownToolCall(tool_call_id~ : String)
UnknownMode(mode_id~ : String)
InvalidTimestamp(field~ : String, value~ : String)
} derive(Eq,
Debug
)

Structured failures produced while folding typed session updates into consumer state.

These are consumer-side aggregation failures, not wire decode failures: malformed payloads are rejected earlier by session_update_from_json, so a typed update that reaches the fold always decoded cleanly.

#
AgentAuthCapabilities

pub(all) struct AgentAuthCapabilities {
logout : ProtocolNullable[CapabilityMarker]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Agent authentication capabilities.

#
AgentCapabilities

pub(all) struct AgentCapabilities {
load_session : ProtocolNullable[Bool]
prompt_capabilities : ProtocolNullable[AgentPromptCapabilities]
mcp_capabilities : ProtocolNullable[AgentMcpCapabilities]
auth : ProtocolNullable[AgentAuthCapabilities]
session_capabilities : ProtocolNullable[AgentSessionCapabilities]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Capabilities advertised by the Agent.

#
AgentMcpCapabilities

pub(all) struct AgentMcpCapabilities {
http : ProtocolNullable[Bool]
sse : ProtocolNullable[Bool]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

MCP transports supported by the Agent.

#
AgentPromptCapabilities

pub(all) struct AgentPromptCapabilities {
image : ProtocolNullable[Bool]
audio : ProtocolNullable[Bool]
embedded_context : ProtocolNullable[Bool]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Agent prompt content capabilities.

#
AgentSessionCapabilities

pub(all) struct AgentSessionCapabilities {
list : ProtocolNullable[CapabilityMarker]
delete : ProtocolNullable[CapabilityMarker]
resume_capability : ProtocolNullable[CapabilityMarker]
close : ProtocolNullable[CapabilityMarker]
additional_directories : ProtocolNullable[CapabilityMarker]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Optional Agent session methods and workspace-root support.

#
Annotations

pub(all) struct Annotations {
audience : ProtocolNullable[Array[Role]]
last_modified : ProtocolNullable[String]
priority : ProtocolNullable[Double]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Optional annotations attached to content blocks.

#
AudioContent

pub(all) struct AudioContent {
annotations : ProtocolNullable[Annotations]
data : String
mime_type : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Audio provided to or from an LLM.

#
AuthMethod

pub(all) struct AuthMethod {
id : String
name : String
description : ProtocolNullable[String]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

One authentication method advertised by an Agent.

#
AuthenticateParams

pub(all) struct AuthenticateParams {
method_id : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Authenticate request parameters.

#
AuthenticateResult

pub(all) struct AuthenticateResult {
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Authenticate response. It carries only optional protocol metadata.

#
AvailableCommand

pub(all) struct AvailableCommand {
name : String
description : String
input : ProtocolNullable[AvailableCommandInput]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

One command exposed by an agent.

#
AvailableCommandInput

pub(all) enum AvailableCommandInput {
Unstructured(UnstructuredCommandInput)
} derive(Eq,
Debug
)

Available command input variants.

#
AvailableCommandsUpdate

pub(all) struct AvailableCommandsUpdate {
available_commands : Array[AvailableCommand]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Complete replacement list of available commands.

#
BlobResourceContents

pub(all) struct BlobResourceContents {
blob : String
mime_type : ProtocolNullable[String]
uri : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Binary resource contents embedded directly in a message.

#
CapabilityMarker

pub(all) struct CapabilityMarker {
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

An empty object used as a capability support marker.

The marker is distinct from an omitted or null capability. _meta is the only extension accepted by the wire schema; all other fields are rejected.

#
ClientCapabilities

Capabilities advertised by the Client.

#
ClientConfigOptionCapabilities

pub(all) struct ClientConfigOptionCapabilities {
boolean : ProtocolNullable[CapabilityMarker]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Client-side config-option capabilities.

#
ClientElicitationCapabilities

pub(all) struct ClientElicitationCapabilities {
form : ProtocolNullable[CapabilityMarker]
url : ProtocolNullable[CapabilityMarker]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Client elicitation modes. An empty outer object supports neither mode.

#
ClientFileSystemCapabilities

pub(all) struct ClientFileSystemCapabilities {
read_text_file : ProtocolNullable[Bool]
write_text_file : ProtocolNullable[Bool]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Client file-system capabilities. Read and write are independent gates.

#
ClientSessionCapabilities

pub(all) struct ClientSessionCapabilities {
config_options : ProtocolNullable[ClientConfigOptionCapabilities]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Client session capabilities advertised during initialization.

#
ConfigOptionUpdate

pub(all) struct ConfigOptionUpdate {
config_options : Array[SessionConfigOption]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Complete replacement configuration option list.

#
Content

pub(all) struct Content {
content : ContentBlock
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

A standard content wrapper.

#
ContentBlock

pub(all) enum ContentBlock {
Text(TextContent)
Image(ImageContent)
Audio(AudioContent)
ResourceLink(ResourceLink)
Resource(EmbeddedResource)
} derive(Eq,
Debug
)

The five stable ACP content block variants.

#
ContentChunk

pub(all) struct ContentChunk {
content : ContentBlock
message_id : ProtocolNullable[String]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

One streamed content item.

#
Cost

pub(all) struct Cost {
amount : Double
currency : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Cumulative cost information.

#
CurrentModeUpdate

pub(all) struct CurrentModeUpdate {
current_mode_id : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Current mode selected for a session.

#
Diff

pub(all) struct Diff {
path : String
old_text : ProtocolNullable[String]
new_text : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

A file modification shown in a tool call.

#
ElicitationAction

pub(all) enum ElicitationAction {
Accept
Decline
Cancel
} derive(Eq,
Debug
)

The action returned by the client for elicitation/create.

#
ElicitationCompleteParams

pub(all) struct ElicitationCompleteParams {
elicitation_id : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Parameters for the elicitation/complete notification.

#
ElicitationCreateParams

pub(all) enum ElicitationCreateParams {
Form(ElicitationFormParams)
Url(ElicitationUrlParams)
} derive(Eq,
Debug
)

The form/URL union for elicitation/create.

#
ElicitationCreateResult

pub(all) struct ElicitationCreateResult {
action : ElicitationAction
content : ProtocolNullable[Json]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Result of elicitation/create.

content carries the accept-action form values. Only the accept outcome may carry content; decline and cancel are payload-free per the fixed v1 schema (CreateElicitationResponse/ElicitationAcceptAction).

#
ElicitationFormParams

pub(all) struct ElicitationFormParams {
scope : ElicitationScope
message : String
requested_schema : Json
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Form-mode elicitation parameters.

#
ElicitationScope

pub(all) enum ElicitationScope {
Request(
RequestId
)
Session(session_id~ : String, tool_call_id~ : ProtocolNullable[String])
} derive(Eq,
Debug
)

Request scope for elicitation/create. The two variants are flattened into requestId or sessionId on the wire.

#
ElicitationUrlParams

pub(all) struct ElicitationUrlParams {
scope : ElicitationScope
elicitation_id : String
message : String
url : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

URL-mode elicitation parameters.

#
EmbeddedResource

pub(all) struct EmbeddedResource {
annotations : ProtocolNullable[Annotations]
resource : EmbeddedResourceResource
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Complete resource contents embedded directly in a message.

#
EmbeddedResourceResource

pub(all) enum EmbeddedResourceResource {
Text(TextResourceContents)
Blob(BlobResourceContents)
} derive(Eq,
Debug
)

The two resource payloads accepted by an embedded resource.

#
ImageContent

pub(all) struct ImageContent {
annotations : ProtocolNullable[Annotations]
data : String
mime_type : String
uri : ProtocolNullable[String]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

An image provided to or from an LLM.

#
Implementation

pub(all) struct Implementation {
name : String
title : ProtocolNullable[String]
version : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Information identifying an ACP client or agent implementation.

#
InitializeParams

pub(all) struct InitializeParams {
protocol_version : Int
client_capabilities : ProtocolNullable[ClientCapabilities]
client_info : ProtocolNullable[Implementation]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Initialize request parameters sent by a Client.

#
InitializeResult

pub(all) struct InitializeResult {
protocol_version : Int
agent_capabilities : ProtocolNullable[AgentCapabilities]
auth_methods : ProtocolNullable[Array[AuthMethod]]
agent_info : ProtocolNullable[Implementation]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Initialize response returned by an Agent.

#
LogoutParams

pub(all) struct LogoutParams {
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Logout request parameters.

#
LogoutResult

pub(all) struct LogoutResult {
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Logout response.

#
McpEnvVariable

pub(all) struct McpEnvVariable {
name : String
value : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

One environment variable passed to a stdio MCP server.

#
McpHttpHeader

pub(all) struct McpHttpHeader {
name : String
value : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

One HTTP header passed to an HTTP or SSE MCP server.

#
McpServer

pub(all) enum McpServer {
Stdio(McpServerStdio)
Http(McpServerHttp)
Sse(McpServerSse)
} derive(Eq,
Debug
)

MCP server transport union. The wire discriminator is type.

#
McpServerHttp

pub(all) struct McpServerHttp {
name : String
url : String
headers : Array[McpHttpHeader]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

HTTP MCP transport configuration.

#
McpServerSse

pub(all) struct McpServerSse {
name : String
url : String
headers : Array[McpHttpHeader]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Server-sent-events MCP transport configuration.

#
McpServerStdio

pub(all) struct McpServerStdio {
name : String
command : String
args : Array[String]
env : Array[McpEnvVariable]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Stdio MCP transport configuration.

#
PermissionOption

pub(all) struct PermissionOption {
option_id : String
name : String
kind : PermissionOptionKind
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

One selectable permission option.

#
PermissionOptionKind

pub(all) enum PermissionOptionKind {
AllowOnce
AllowAlways
RejectOnce
RejectAlways
} derive(Eq,
Debug
)

Permission option kinds presented to a user.

#
Plan

pub(all) struct Plan {
entries : Array[PlanEntry]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

A complete replacement execution plan.

#
PlanEntry

pub(all) struct PlanEntry {
content : String
priority : PlanEntryPriority
status : PlanEntryStatus
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

One item in an execution plan.

#
PlanEntryPriority

pub(all) enum PlanEntryPriority {
High
Medium
Low
} derive(Eq,
Debug
)

Priority of a plan entry.

#
PlanEntryStatus

pub(all) enum PlanEntryStatus {
Pending
InProgress
Completed
} derive(Eq,
Debug
)

Lifecycle status of a plan entry.

#
ProtocolNullable

pub(all) enum ProtocolNullable[T] {
Omitted
Null
Value(T)
} derive(Eq,
Debug
)

A three-state field used when the wire protocol distinguishes an omitted property from an explicit JSON null.

#
ReadTextFileParams

pub(all) struct ReadTextFileParams {
session_id : String
path : String
line : ProtocolNullable[UInt64]
limit : ProtocolNullable[UInt64]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Parameters for the Agent -> Client fs/read_text_file request.

#
ReadTextFileResult

pub(all) struct ReadTextFileResult {
content : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Result of the Agent -> Client fs/read_text_file request.

#
RequestPermissionOutcome

pub(all) enum RequestPermissionOutcome {
Cancelled
Selected(SelectedPermissionOutcome)
} derive(Eq,
Debug
)

The two stable permission outcomes.

#
RequestPermissionRequest

pub(all) struct RequestPermissionRequest {
session_id : String
tool_call : ToolCallUpdate
options : Array[PermissionOption]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Agent request for client permission to execute a tool call.

#
RequestPermissionResponse

pub(all) struct RequestPermissionResponse {
outcome : RequestPermissionOutcome
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Client response to a permission request.
pub(all) struct ResourceLink {
annotations : ProtocolNullable[Annotations]
description : ProtocolNullable[String]
mime_type : ProtocolNullable[String]
name : String
size : ProtocolNullable[Int64]
title : ProtocolNullable[String]
uri : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

A resource that the server can read.

#
Role

pub(all) enum Role {
User
Assistant
} derive(Eq,
Debug
)

Roles used by ACP annotations.

#
SelectedPermissionOutcome

pub(all) struct SelectedPermissionOutcome {
option_id : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

The selected permission outcome payload.

#
SessionConfigBoolean

pub(all) struct SessionConfigBoolean {
current_value : Bool
} derive(Eq,
Debug
)

Boolean-specific configuration payload.

#
SessionConfigOption

pub(all) struct SessionConfigOption {
id : String
name : String
description : ProtocolNullable[String]
category : ProtocolNullable[SessionConfigOptionCategory]
kind : SessionConfigOptionKind
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

One complete session configuration option.

#
SessionConfigOptionCategory

pub(all) enum SessionConfigOptionCategory {
Mode
Model
ModelConfig
ThoughtLevel
Other(String)
} derive(Eq,
Debug
)

Semantic categories for configuration selectors.

#
SessionConfigOptionKind

pub(all) enum SessionConfigOptionKind {
Select(SessionConfigSelect)
Boolean(SessionConfigBoolean)
} derive(Eq,
Debug
)

Configuration option payload variants.

#
SessionConfigSelect

pub(all) struct SessionConfigSelect {
current_value : String
options : SessionConfigSelectOptions
} derive(Eq,
Debug
)

Selector-specific configuration payload.

#
SessionConfigSelectGroup

pub(all) struct SessionConfigSelectGroup {
group : String
name : String
options : Array[SessionConfigSelectOption]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

A grouped set of selectable configuration values.

#
SessionConfigSelectOption

pub(all) struct SessionConfigSelectOption {
value : String
name : String
description : ProtocolNullable[String]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

One selectable configuration value.

#
SessionConfigSelectOptions

pub(all) enum SessionConfigSelectOptions {
Ungrouped(Array[SessionConfigSelectOption])
Grouped(Array[SessionConfigSelectGroup])
} derive(Eq,
Debug
)

Flat or grouped selectable values.

#
SessionInfo

pub(all) struct SessionInfo {
session_id : String
cwd : String
additional_directories : ProtocolNullable[Array[String]]
title : ProtocolNullable[String]
updated_at : ProtocolNullable[String]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Session metadata used by session listing.

#
SessionInfoUpdate

pub(all) struct SessionInfoUpdate {
title : ProtocolNullable[String]
updated_at : ProtocolNullable[String]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Partial session metadata update.

#
SessionUpdate

pub(all) enum SessionUpdate {
UserMessageChunk(ContentChunk)
AgentMessageChunk(ContentChunk)
AgentThoughtChunk(ContentChunk)
ToolCall(ToolCall)
ToolCallUpdate(ToolCallUpdate)
Plan(Plan)
AvailableCommandsUpdate(AvailableCommandsUpdate)
CurrentModeUpdate(CurrentModeUpdate)
ConfigOptionUpdate(ConfigOptionUpdate)
SessionInfoUpdate(SessionInfoUpdate)
UsageUpdate(UsageUpdate)
} derive(Eq,
Debug
)

All stable v1 session update variants.

#
SessionUpdateFold

pub(all) struct SessionUpdateFold {
known_modes : Array[String]
user_messages : Array[SessionUpdateMessage]
agent_messages : Array[SessionUpdateMessage]
agent_thoughts : Array[SessionUpdateMessage]
tool_calls : Array[ToolCall]
plan : Plan?
available_commands : Array[AvailableCommand]
current_mode_id : String?
config_options : Array[SessionConfigOption]
session_title : ProtocolNullable[String]
session_updated_at : ProtocolNullable[String]
usage : UsageUpdate?
} derive(Eq,
Debug
)

Pure per-session consumer state for a stream of typed session updates.

This is the consumer-side half of the session/update semantics (matrix rows E01-E11): the codec in this file owns wire shape and tri-state fidelity, while this fold owns aggregation and replacement semantics. The fold follows the same discipline as connection/reducer.mbt: it is a pure function of (state, update), allocates the next state without mutating the input state, keeps no mutable registry, and holds no global state. Each session owns one fold value, so a rejected update for one session can never pollute another session's state.

Semantics per variant:

  • user_message_chunk / agent_message_chunk / agent_thought_chunk (E01-E03): chunks aggregate by messageId within their own kind bucket; the three kinds never merge with each other.
  • tool_call (E04): the first occurrence creates the tracked call keyed by toolCallId; a duplicate id is a typed error, never an overwrite.
  • tool_call_update (E05): present fields replace, omitted fields keep, and JSON null clears the field back to the omitted state; an unknown toolCallId is a typed error and never fabricates a new call.
  • plan (E06), available_commands_update (E07), and config_option_update (E09): each update is the complete replacement set; the fold never append-merges entries or options.
  • current_mode_update (E08): currentModeId is validated against the caller-supplied known_modes. Consistent with the C10 boundary, the codec validates only shape; which modes exist is session knowledge the consumer owns. The fold is strict: an empty known-mode set rejects every mode update rather than accepting a silent default mode.
  • session_info_update (E10): title/updatedAt keep tri-state semantics (omitted keeps, null clears, value sets) and an updatedAt value must parse as an RFC 3339 / ISO 8601 extended timestamp.
  • usage_update (E11): replaces the previously recorded usage; the non-negative used/size invariant is enforced at the codec by the unsigned integer decode.

#
SessionUpdateMessage

pub(all) struct SessionUpdateMessage {
message_id : ProtocolNullable[String]
blocks : Array[ContentBlock]
} derive(Eq,
Debug
)

One message aggregated from streamed content chunks.

Chunks that carry the same messageId value fold into one message, in arrival order. The v1 schema pins the aggregation contract: all chunks belonging to the same message share one messageId, and a change of messageId starts a new message. A chunk without a messageId value (omitted or JSON null) cannot be correlated, so the fold records it as its own standalone message instead of merging or overwriting anything.

#
Terminal

pub(all) struct Terminal {
terminal_id : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

A terminal created by the client and referenced by a tool call.

#
TerminalCreateParams

pub(all) struct TerminalCreateParams {
session_id : String
command : String
args : ProtocolNullable[Array[String]]
env : ProtocolNullable[Array[TerminalEnvVariable]]
cwd : ProtocolNullable[String]
output_byte_limit : ProtocolNullable[UInt64]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Parameters for terminal/create.

#
TerminalCreateResult

pub(all) struct TerminalCreateResult {
terminal_id : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Result of terminal/create.

#
TerminalEnvVariable

pub(all) struct TerminalEnvVariable {
name : String
value : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

One environment variable for terminal/create.

#
TerminalExitStatus

pub(all) struct TerminalExitStatus {
exit_code : ProtocolNullable[UInt64]
signal : ProtocolNullable[String]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Exit status shared by terminal output and runtime-independent terminal results. A normal exit supplies exit_code; signal termination supplies signal. The wire schema keeps both fields optional to preserve null and omission exactly.

#
TerminalKillParams

pub(all) struct TerminalKillParams {
session_id : String
terminal_id : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Parameters for terminal/kill.

#
TerminalKillResult

pub(all) struct TerminalKillResult {
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Result of terminal/kill.

#
TerminalOutputParams

pub(all) struct TerminalOutputParams {
session_id : String
terminal_id : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Parameters for terminal/output.

#
TerminalOutputResult

pub(all) struct TerminalOutputResult {
output : String
truncated : Bool
exit_status : ProtocolNullable[TerminalExitStatus]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Result of terminal/output.

#
TerminalReleaseParams

pub(all) struct TerminalReleaseParams {
session_id : String
terminal_id : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Parameters for terminal/release.

#
TerminalReleaseResult

pub(all) struct TerminalReleaseResult {
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Result of terminal/release.

#
TerminalWaitForExitParams

pub(all) struct TerminalWaitForExitParams {
session_id : String
terminal_id : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Parameters for terminal/wait_for_exit.

#
TerminalWaitForExitResult

pub(all) struct TerminalWaitForExitResult {
exit_code : ProtocolNullable[UInt64]
signal : ProtocolNullable[String]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Result of terminal/wait_for_exit.

#
TextContent

pub(all) struct TextContent {
annotations : ProtocolNullable[Annotations]
text : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Text provided to or from an LLM.

#
TextResourceContents

pub(all) struct TextResourceContents {
mime_type : ProtocolNullable[String]
text : String
uri : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Text-based resource contents embedded directly in a message.

#
ToolCall

pub(all) struct ToolCall {
tool_call_id : String
title : String
kind : ProtocolNullable[ToolKind]
status : ProtocolNullable[ToolCallStatus]
content : ProtocolNullable[Array[ToolCallContent]]
locations : ProtocolNullable[Array[ToolCallLocation]]
raw_input : ProtocolNullable[Json]
raw_output : ProtocolNullable[Json]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Initial description of a tool call.

#
ToolCallContent

pub(all) enum ToolCallContent {
Content(Content)
Diff(Diff)
Terminal(Terminal)
} derive(Eq,
Debug
)

Content produced by a tool call.

#
ToolCallLocation

pub(all) struct ToolCallLocation {
path : String
line : ProtocolNullable[UInt64]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

A file location affected by a tool call.

#
ToolCallStatus

pub(all) enum ToolCallStatus {
Pending
InProgress
Completed
Failed
} derive(Eq,
Debug
)

Lifecycle status of a tool call.

#
ToolCallUpdate

pub(all) struct ToolCallUpdate {
tool_call_id : String
kind : ProtocolNullable[ToolKind]
status : ProtocolNullable[ToolCallStatus]
title : ProtocolNullable[String]
content : ProtocolNullable[Array[ToolCallContent]]
locations : ProtocolNullable[Array[ToolCallLocation]]
raw_input : ProtocolNullable[Json]
raw_output : ProtocolNullable[Json]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Partial replacement update for an existing tool call.

#
ToolKind

pub(all) enum ToolKind {
Read
Edit
Delete
Move
Search
Execute
Think
Fetch
SwitchMode
Other
} derive(Eq,
Debug
)

Categories of tools that can be invoked by an agent.

#
UnstructuredCommandInput

pub(all) struct UnstructuredCommandInput {
hint : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

The unstructured command input form.

#
UsageUpdate

pub(all) struct UsageUpdate {
used : UInt64
size : UInt64
cost : ProtocolNullable[Cost]
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Current context-window usage.

#
WriteTextFileParams

pub(all) struct WriteTextFileParams {
session_id : String
path : String
content : String
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Parameters for the Agent -> Client fs/write_text_file request.

#
WriteTextFileResult

pub(all) struct WriteTextFileResult {
meta : ProtocolNullable[Json]
} derive(Eq,
Debug
)

Result of the Agent -> Client fs/write_text_file request.

#
agent_auth_capabilities_from_json

fn agent_auth_capabilities_from_json(value : Json, path? : String) -> AgentAuthCapabilities raise ProtocolDecodeError

Decode Agent authentication capabilities.

#
agent_auth_capabilities_to_json

fn agent_auth_capabilities_to_json(value : AgentAuthCapabilities) -> Json raise ProtocolDecodeError

Encode Agent authentication capabilities.

#
agent_capabilities_from_json

fn agent_capabilities_from_json(value : Json, path? : String) -> AgentCapabilities raise ProtocolDecodeError

Decode Agent capabilities.

#
agent_capabilities_to_json

fn agent_capabilities_to_json(value : AgentCapabilities) -> Json raise ProtocolDecodeError

Encode Agent capabilities.

#
agent_mcp_capabilities_from_json

fn agent_mcp_capabilities_from_json(value : Json, path? : String) -> AgentMcpCapabilities raise ProtocolDecodeError

Decode Agent MCP capabilities.

#
agent_mcp_capabilities_to_json

fn agent_mcp_capabilities_to_json(value : AgentMcpCapabilities) -> Json raise ProtocolDecodeError

Encode Agent MCP capabilities.

#
agent_prompt_capabilities_from_json

fn agent_prompt_capabilities_from_json(value : Json, path? : String) -> AgentPromptCapabilities raise ProtocolDecodeError

Decode Agent prompt capabilities.

#
agent_prompt_capabilities_to_json

fn agent_prompt_capabilities_to_json(value : AgentPromptCapabilities) -> Json raise ProtocolDecodeError

Encode Agent prompt capabilities.

#
agent_session_capabilities_from_json

fn agent_session_capabilities_from_json(value : Json, path? : String) -> AgentSessionCapabilities raise ProtocolDecodeError

Decode Agent session capabilities.

#
agent_session_capabilities_to_json

fn agent_session_capabilities_to_json(value : AgentSessionCapabilities) -> Json raise ProtocolDecodeError

Encode Agent session capabilities.

#
annotations_from_json

fn annotations_from_json(value : Json, path? : String) -> Annotations raise ProtocolDecodeError

Decode annotations from a JSON value.

#
annotations_to_json

fn annotations_to_json(value : Annotations) -> Json raise ProtocolDecodeError

Encode annotations as a JSON object.

#
audio_content_from_json

fn audio_content_from_json(value : Json, path? : String) -> AudioContent raise ProtocolDecodeError

Decode audio content from a JSON value.

#
audio_content_to_json

fn audio_content_to_json(value : AudioContent) -> Json raise ProtocolDecodeError

Encode audio content as a JSON object.

#
auth_method_from_json

fn auth_method_from_json(value : Json, path? : String) -> AuthMethod raise ProtocolDecodeError

Decode one authentication method.

#
auth_method_to_json

fn auth_method_to_json(value : AuthMethod) -> Json raise ProtocolDecodeError

Encode one authentication method.

#
authenticate_params_from_json

fn authenticate_params_from_json(value : Json, path? : String) -> AuthenticateParams raise ProtocolDecodeError

Decode authenticate request parameters.

#
authenticate_params_to_json

fn authenticate_params_to_json(value : AuthenticateParams) -> Json raise ProtocolDecodeError

Encode authenticate request parameters.

#
authenticate_result_from_json

fn authenticate_result_from_json(value : Json, path? : String) -> AuthenticateResult raise ProtocolDecodeError

Decode authenticate response data.

#
authenticate_result_to_json

fn authenticate_result_to_json(value : AuthenticateResult) -> Json raise ProtocolDecodeError

Encode authenticate response data.

#
available_command_input_from_json

fn available_command_input_from_json(value : Json, path? : String) -> AvailableCommandInput raise ProtocolDecodeError

Decode a command input from JSON.

#
available_command_input_to_json

fn available_command_input_to_json(value : AvailableCommandInput) -> Json raise ProtocolDecodeError

Encode a command input as JSON.

#
available_commands_update_from_json

fn available_commands_update_from_json(value : Json, path? : String) -> AvailableCommandsUpdate raise ProtocolDecodeError

Decode an available-commands update from JSON.

#
available_commands_update_to_json

fn available_commands_update_to_json(value : AvailableCommandsUpdate) -> Json raise ProtocolDecodeError

Encode an available-commands update as JSON.

#
blob_resource_contents_from_json

fn blob_resource_contents_from_json(value : Json, path? : String) -> BlobResourceContents raise ProtocolDecodeError

Decode binary resource contents from a JSON value.

#
blob_resource_contents_to_json

fn blob_resource_contents_to_json(value : BlobResourceContents) -> Json raise ProtocolDecodeError

Encode binary resource contents as a JSON object.

#
capability_marker_from_json

fn capability_marker_from_json(value : Json, path? : String) -> CapabilityMarker raise ProtocolDecodeError

Decode a capability marker object.

#
capability_marker_to_json

fn capability_marker_to_json(value : CapabilityMarker) -> Json raise ProtocolDecodeError

Encode a capability marker object.

#
client_capabilities_from_json

fn client_capabilities_from_json(value : Json, path? : String) -> ClientCapabilities raise ProtocolDecodeError

Decode Client capabilities.

#
client_capabilities_to_json

fn client_capabilities_to_json(value : ClientCapabilities) -> Json raise ProtocolDecodeError

Encode Client capabilities.

#
client_config_option_capabilities_from_json

fn client_config_option_capabilities_from_json(value : Json, path? : String) -> ClientConfigOptionCapabilities raise ProtocolDecodeError

Decode Client config-option capabilities.

#
client_config_option_capabilities_to_json

fn client_config_option_capabilities_to_json(value : ClientConfigOptionCapabilities) -> Json raise ProtocolDecodeError

Encode Client config-option capabilities.

#
client_elicitation_capabilities_from_json

fn client_elicitation_capabilities_from_json(value : Json, path? : String) -> ClientElicitationCapabilities raise ProtocolDecodeError

Decode Client elicitation capabilities.

#
client_elicitation_capabilities_to_json

fn client_elicitation_capabilities_to_json(value : ClientElicitationCapabilities) -> Json raise ProtocolDecodeError

Encode Client elicitation capabilities.

#
client_file_system_capabilities_from_json

fn client_file_system_capabilities_from_json(value : Json, path? : String) -> ClientFileSystemCapabilities raise ProtocolDecodeError

Decode Client file-system capabilities.

#
client_file_system_capabilities_to_json

fn client_file_system_capabilities_to_json(value : ClientFileSystemCapabilities) -> Json raise ProtocolDecodeError

Encode Client file-system capabilities.

#
client_session_capabilities_from_json

fn client_session_capabilities_from_json(value : Json, path? : String) -> ClientSessionCapabilities raise ProtocolDecodeError

Decode Client session capabilities.

#
client_session_capabilities_to_json

fn client_session_capabilities_to_json(value : ClientSessionCapabilities) -> Json raise ProtocolDecodeError

Encode Client session capabilities.

#
config_option_update_from_json

fn config_option_update_from_json(value : Json, path? : String) -> ConfigOptionUpdate raise ProtocolDecodeError

Decode a configuration-options update from JSON.

#
config_option_update_to_json

fn config_option_update_to_json(value : ConfigOptionUpdate) -> Json raise ProtocolDecodeError

Encode a configuration-options update as JSON.

#
content_block_from_json

fn content_block_from_json(value : Json, path? : String) -> ContentBlock raise ProtocolDecodeError

Decode one of the five stable ACP content block variants.

#
content_block_to_json

fn content_block_to_json(value : ContentBlock) -> Json raise ProtocolDecodeError

Encode one of the five stable ACP content block variants.

#
content_chunk_from_json

fn content_chunk_from_json(value : Json, path? : String) -> ContentChunk raise ProtocolDecodeError

#
content_chunk_to_json

fn content_chunk_to_json(value : ContentChunk) -> Json raise ProtocolDecodeError

Encode a streamed content item.

#
content_from_json

fn content_from_json(value : Json, path? : String) -> Content raise ProtocolDecodeError

#
content_to_json

fn content_to_json(value : Content) -> Json raise ProtocolDecodeError

Encode a standard content wrapper.

#
cost_from_json

fn cost_from_json(value : Json, path? : String) -> Cost raise ProtocolDecodeError

Decode cost information from JSON.

#
cost_to_json

fn cost_to_json(value : Cost) -> Json raise ProtocolDecodeError

Encode cost information as JSON.

#
current_mode_update_from_json

fn current_mode_update_from_json(value : Json, path? : String) -> CurrentModeUpdate raise ProtocolDecodeError

Decode a current-mode update from JSON.

#
current_mode_update_to_json

fn current_mode_update_to_json(value : CurrentModeUpdate) -> Json raise ProtocolDecodeError

Encode a current-mode update as JSON.

#
diff_from_json

fn diff_from_json(value : Json, path? : String) -> Diff raise ProtocolDecodeError

Decode a diff from JSON.

#
diff_to_json

fn diff_to_json(value : Diff) -> Json raise ProtocolDecodeError

Encode a diff as JSON.

#
elicitation_complete_params_from_json

fn elicitation_complete_params_from_json(value : Json, path? : String) -> ElicitationCompleteParams raise ProtocolDecodeError

Decode the elicitation/complete notification parameters.

#
elicitation_complete_params_to_json

fn elicitation_complete_params_to_json(value : ElicitationCompleteParams) -> Json raise ProtocolDecodeError

Encode the elicitation/complete notification parameters.

#
elicitation_create_params_from_json

fn elicitation_create_params_from_json(value : Json, path? : String) -> ElicitationCreateParams raise ProtocolDecodeError

Decode the form/URL union for elicitation/create.

#
elicitation_create_params_to_json

fn elicitation_create_params_to_json(value : ElicitationCreateParams) -> Json raise ProtocolDecodeError

Encode the form/URL union for elicitation/create.

#
elicitation_create_result_from_json

fn elicitation_create_result_from_json(value : Json, path? : String) -> ElicitationCreateResult raise ProtocolDecodeError

Decode the result of elicitation/create. Only the accept outcome may carry content; a decline or cancel carrying content is an explicit invalid-params failure, never a silently ignored payload.

#
elicitation_create_result_to_json

fn elicitation_create_result_to_json(value : ElicitationCreateResult) -> Json raise ProtocolDecodeError

Encode the result of elicitation/create. Encoding a decline or cancel result whose content is set fails fast instead of dropping the payload.

#
embedded_resource_from_json

fn embedded_resource_from_json(value : Json, path? : String) -> EmbeddedResource raise ProtocolDecodeError

Decode an embedded resource from a JSON value.

#
embedded_resource_resource_from_json

fn embedded_resource_resource_from_json(value : Json, path? : String) -> EmbeddedResourceResource raise ProtocolDecodeError

Decode an embedded resource payload from a JSON value.

#
embedded_resource_resource_to_json

fn embedded_resource_resource_to_json(value : EmbeddedResourceResource) -> Json raise ProtocolDecodeError

Encode an embedded resource payload as a JSON object.

#
embedded_resource_to_json

fn embedded_resource_to_json(value : EmbeddedResource) -> Json raise ProtocolDecodeError

Encode an embedded resource as a JSON object.

#
image_content_from_json

fn image_content_from_json(value : Json, path? : String) -> ImageContent raise ProtocolDecodeError

Decode image content from a JSON value.

#
image_content_to_json

fn image_content_to_json(value : ImageContent) -> Json raise ProtocolDecodeError

Encode image content as a JSON object.

#
implementation_from_json

fn implementation_from_json(value : Json, path? : String) -> Implementation raise ProtocolDecodeError

Decode implementation information.

#
implementation_to_json

fn implementation_to_json(value : Implementation) -> Json raise ProtocolDecodeError

Encode implementation information.

#
initialize_params_from_json

fn initialize_params_from_json(value : Json, path? : String) -> InitializeParams raise ProtocolDecodeError

Decode initialization request parameters.

#
initialize_params_to_json

fn initialize_params_to_json(value : InitializeParams) -> Json raise ProtocolDecodeError

Encode initialization request parameters.

#
initialize_result_from_json

fn initialize_result_from_json(value : Json, path? : String) -> InitializeResult raise ProtocolDecodeError

Decode initialization response data.

#
initialize_result_to_json

fn initialize_result_to_json(value : InitializeResult) -> Json raise ProtocolDecodeError

Encode initialization response data.

#
logout_params_from_json

fn logout_params_from_json(value : Json, path? : String) -> LogoutParams raise ProtocolDecodeError

Decode logout request parameters.

#
logout_params_to_json

fn logout_params_to_json(value : LogoutParams) -> Json raise ProtocolDecodeError

Encode logout request parameters.

#
logout_result_from_json

fn logout_result_from_json(value : Json, path? : String) -> LogoutResult raise ProtocolDecodeError

Decode logout response data.

#
logout_result_to_json

fn logout_result_to_json(value : LogoutResult) -> Json raise ProtocolDecodeError

Encode logout response data.

#
mcp_server_from_json

fn mcp_server_from_json(value : Json, path? : String) -> McpServer raise ProtocolDecodeError

Decode one MCP server transport configuration.

#
mcp_server_to_json

fn mcp_server_to_json(value : McpServer) -> Json raise ProtocolDecodeError

Encode one MCP server transport configuration with its wire discriminator.

#
permission_option_from_json

fn permission_option_from_json(value : Json, path? : String) -> PermissionOption raise ProtocolDecodeError

Decode a permission option from JSON.

#
permission_option_to_json

fn permission_option_to_json(value : PermissionOption) -> Json raise ProtocolDecodeError

Encode a permission option as JSON.

#
plan_entry_from_json

fn plan_entry_from_json(value : Json, path? : String) -> PlanEntry raise ProtocolDecodeError

Decode a plan entry from JSON.

#
plan_entry_to_json

fn plan_entry_to_json(value : PlanEntry) -> Json raise ProtocolDecodeError

Encode a plan entry as JSON.

#
plan_from_json

fn plan_from_json(value : Json, path? : String) -> Plan raise ProtocolDecodeError

Decode a plan update from JSON.

#
plan_to_json

fn plan_to_json(value : Plan) -> Json raise ProtocolDecodeError

Encode a plan update as JSON.

#
protocol_decode_boolean

fn protocol_decode_boolean(value : Json, path~ : String) -> Bool raise ProtocolDecodeError

#
protocol_decode_string

fn protocol_decode_string(value : Json, path~ : String) -> String raise ProtocolDecodeError

#
protocol_field

fn protocol_field(fields : Map[String, Json], key : String) -> ProtocolNullable[Json]

#
protocol_meta

fn protocol_meta(fields : Map[String, Json], path~ : String) -> ProtocolNullable[Json] raise ProtocolDecodeError

#
protocol_nullable_string

fn protocol_nullable_string(fields : Map[String, Json], key : String, path~ : String) -> ProtocolNullable[String] raise ProtocolDecodeError

#
protocol_parse_json

fn protocol_parse_json(source : String) -> Json raise ProtocolDecodeError

Parse one JSON value for the protocol data-model codecs.

#
protocol_put_meta

fn protocol_put_meta(fields : Map[String, Json], value : ProtocolNullable[Json]) -> Unit raise ProtocolDecodeError

#
protocol_put_nullable

fn[T] protocol_put_nullable(fields : Map[String, Json], key : String, value : ProtocolNullable[T], encode : (T) -> Json) -> Unit

#
protocol_reject_unknown

fn protocol_reject_unknown(fields : Map[String, Json], allowed : ArrayView[String], prefix~ : String) -> Unit raise ProtocolDecodeError

#
protocol_require_array

fn protocol_require_array(value : Json, path~ : String) -> Array[Json] raise ProtocolDecodeError

#
protocol_require_object

fn protocol_require_object(value : Json, path~ : String) -> Map[String, Json] raise ProtocolDecodeError

#
protocol_required

fn protocol_required(fields : Map[String, Json], key : String, path~ : String) -> Json raise ProtocolDecodeError

#
protocol_required_string

fn protocol_required_string(fields : Map[String, Json], key : String, path~ : String) -> String raise ProtocolDecodeError

#
protocol_stringify_json

fn protocol_stringify_json(value : Json) -> String

Stringify one protocol JSON value without adding a framing newline.

#
protocol_validate_absolute_path

fn protocol_validate_absolute_path(path : String, field_path~ : String) -> String raise ProtocolDecodeError

#
read_text_file_params_from_json

fn read_text_file_params_from_json(value : Json, path? : String) -> ReadTextFileParams raise ProtocolDecodeError

Decode fs/read_text_file parameters.

#
read_text_file_params_to_json

fn read_text_file_params_to_json(value : ReadTextFileParams) -> Json raise ProtocolDecodeError

Encode fs/read_text_file parameters.

#
read_text_file_result_from_json

fn read_text_file_result_from_json(value : Json, path? : String) -> ReadTextFileResult raise ProtocolDecodeError

Decode the result of fs/read_text_file.

#
read_text_file_result_to_json

fn read_text_file_result_to_json(value : ReadTextFileResult) -> Json raise ProtocolDecodeError

Encode the result of fs/read_text_file.

#
request_permission_outcome_from_json

fn request_permission_outcome_from_json(value : Json, path? : String) -> RequestPermissionOutcome raise ProtocolDecodeError

Decode a permission outcome from JSON.

#
request_permission_outcome_to_json

fn request_permission_outcome_to_json(value : RequestPermissionOutcome) -> Json raise ProtocolDecodeError

Encode a permission outcome as JSON.

#
request_permission_request_from_json

fn request_permission_request_from_json(value : Json, path? : String) -> RequestPermissionRequest raise ProtocolDecodeError

Decode a permission request payload from JSON.

#
request_permission_request_to_json

fn request_permission_request_to_json(value : RequestPermissionRequest) -> Json raise ProtocolDecodeError

Encode a permission request payload as JSON.

#
request_permission_response_from_json

fn request_permission_response_from_json(value : Json, path? : String) -> RequestPermissionResponse raise ProtocolDecodeError

Decode a permission response payload from JSON.

#
request_permission_response_to_json

fn request_permission_response_to_json(value : RequestPermissionResponse) -> Json raise ProtocolDecodeError

Encode a permission response payload as JSON.
fn resource_link_from_json(value : Json, path? : String) -> ResourceLink raise ProtocolDecodeError

Decode a resource link from a JSON value.
fn resource_link_to_json(value : ResourceLink) -> Json raise ProtocolDecodeError

Encode a resource link as a JSON object.

#
selected_permission_outcome_from_json

fn selected_permission_outcome_from_json(value : Json, path? : String) -> SelectedPermissionOutcome raise ProtocolDecodeError

Decode a selected permission outcome payload from JSON.

#
selected_permission_outcome_to_json

fn selected_permission_outcome_to_json(value : SelectedPermissionOutcome) -> Json raise ProtocolDecodeError

Encode a selected permission outcome payload as JSON.

#
session_config_option_category_from_json

fn session_config_option_category_from_json(value : Json, path? : String) -> SessionConfigOptionCategory raise ProtocolDecodeError

Decode a session configuration category from JSON.

#
session_config_option_category_to_json

fn session_config_option_category_to_json(value : SessionConfigOptionCategory) -> Json

Encode a session configuration category as JSON.

#
session_config_option_from_json

fn session_config_option_from_json(value : Json, path? : String) -> SessionConfigOption raise ProtocolDecodeError

Decode one complete configuration option from JSON.

#
session_config_option_to_json

fn session_config_option_to_json(value : SessionConfigOption) -> Json raise ProtocolDecodeError

Encode one complete configuration option as JSON.

#
session_config_select_group_from_json

fn session_config_select_group_from_json(value : Json, path? : String) -> SessionConfigSelectGroup raise ProtocolDecodeError

Decode a selectable configuration group from JSON.

#
session_config_select_group_to_json

fn session_config_select_group_to_json(value : SessionConfigSelectGroup) -> Json raise ProtocolDecodeError

Encode a selectable configuration group as JSON.

#
session_config_select_option_from_json

fn session_config_select_option_from_json(value : Json, path? : String) -> SessionConfigSelectOption raise ProtocolDecodeError

Decode a selectable configuration option from JSON.

#
session_config_select_option_to_json

fn session_config_select_option_to_json(value : SessionConfigSelectOption) -> Json raise ProtocolDecodeError

Encode a selectable configuration option as JSON.

#
session_config_select_options_from_json

fn session_config_select_options_from_json(value : Json, path? : String) -> SessionConfigSelectOptions raise ProtocolDecodeError

Decode selectable configuration values from JSON.

#
session_config_select_options_to_json

fn session_config_select_options_to_json(value : SessionConfigSelectOptions) -> Json raise ProtocolDecodeError

Encode selectable configuration values as JSON.

#
session_info_from_json

fn session_info_from_json(value : Json, path? : String) -> SessionInfo raise ProtocolDecodeError

Decode session metadata from JSON.

#
session_info_to_json

fn session_info_to_json(value : SessionInfo) -> Json raise ProtocolDecodeError

Encode session metadata as JSON.

#
session_info_update_from_json

fn session_info_update_from_json(value : Json, path? : String) -> SessionInfoUpdate raise ProtocolDecodeError

Decode a session-information update from JSON.

#
session_info_update_to_json

fn session_info_update_to_json(value : SessionInfoUpdate) -> Json raise ProtocolDecodeError

Encode a session-information update as JSON.

#
session_update_apply

fn session_update_apply(state : SessionUpdateFold, update : SessionUpdate) -> Result[SessionUpdateFold, SessionUpdateFoldError]

Apply one typed session update to consumer state, returning either the next state or a typed rejection. The input state is never mutated, so a caller that keeps the previous value still observes it unchanged after a rejection.

#
session_update_fold

fn session_update_fold(known_modes~ : Array[String]) -> SessionUpdateFold

Create the initial consumer state for one session.

known_modes is the immutable mode set the consumer knows for the session (typically SessionModeState.available_modes from session/new); it is only read by current_mode_update validation and is never modified by any applied update.

#
session_update_from_json

fn session_update_from_json(value : Json, path? : String) -> SessionUpdate raise ProtocolDecodeError

Decode one stable v1 session update variant.

#
session_update_to_json

fn session_update_to_json(value : SessionUpdate) -> Json raise ProtocolDecodeError

Encode one stable v1 session update variant.

#
terminal_create_params_from_json

fn terminal_create_params_from_json(value : Json, path? : String) -> TerminalCreateParams raise ProtocolDecodeError

Decode terminal/create parameters.

#
terminal_create_params_to_json

fn terminal_create_params_to_json(value : TerminalCreateParams) -> Json raise ProtocolDecodeError

Encode terminal/create parameters.

#
terminal_create_result_from_json

fn terminal_create_result_from_json(value : Json, path? : String) -> TerminalCreateResult raise ProtocolDecodeError

Decode the result of terminal/create.

#
terminal_create_result_to_json

fn terminal_create_result_to_json(value : TerminalCreateResult) -> Json raise ProtocolDecodeError

Encode the result of terminal/create.

#
terminal_from_json

fn terminal_from_json(value : Json, path? : String) -> Terminal raise ProtocolDecodeError

Decode a terminal reference from JSON.

#
terminal_kill_params_from_json

fn terminal_kill_params_from_json(value : Json, path? : String) -> TerminalKillParams raise ProtocolDecodeError

Decode terminal/kill parameters.

#
terminal_kill_params_to_json

fn terminal_kill_params_to_json(value : TerminalKillParams) -> Json raise ProtocolDecodeError

Encode terminal/kill parameters.

#
terminal_kill_result_from_json

fn terminal_kill_result_from_json(value : Json, path? : String) -> TerminalKillResult raise ProtocolDecodeError

Decode the result of terminal/kill.

#
terminal_kill_result_to_json

fn terminal_kill_result_to_json(value : TerminalKillResult) -> Json raise ProtocolDecodeError

Encode the result of terminal/kill.

#
terminal_output_params_from_json

fn terminal_output_params_from_json(value : Json, path? : String) -> TerminalOutputParams raise ProtocolDecodeError

Decode terminal/output parameters.

#
terminal_output_params_to_json

fn terminal_output_params_to_json(value : TerminalOutputParams) -> Json raise ProtocolDecodeError

Encode terminal/output parameters.

#
terminal_output_result_from_json

fn terminal_output_result_from_json(value : Json, path? : String) -> TerminalOutputResult raise ProtocolDecodeError

Decode the result of terminal/output.

#
terminal_output_result_to_json

fn terminal_output_result_to_json(value : TerminalOutputResult) -> Json raise ProtocolDecodeError

Encode the result of terminal/output.

#
terminal_release_params_from_json

fn terminal_release_params_from_json(value : Json, path? : String) -> TerminalReleaseParams raise ProtocolDecodeError

Decode terminal/release parameters.

#
terminal_release_params_to_json

fn terminal_release_params_to_json(value : TerminalReleaseParams) -> Json raise ProtocolDecodeError

Encode terminal/release parameters.

#
terminal_release_result_from_json

fn terminal_release_result_from_json(value : Json, path? : String) -> TerminalReleaseResult raise ProtocolDecodeError

Decode the result of terminal/release.

#
terminal_release_result_to_json

fn terminal_release_result_to_json(value : TerminalReleaseResult) -> Json raise ProtocolDecodeError

Encode the result of terminal/release.

#
terminal_to_json

fn terminal_to_json(value : Terminal) -> Json raise ProtocolDecodeError

Encode a terminal reference as JSON.

#
terminal_wait_for_exit_params_from_json

fn terminal_wait_for_exit_params_from_json(value : Json, path? : String) -> TerminalWaitForExitParams raise ProtocolDecodeError

Decode terminal/wait_for_exit parameters.

#
terminal_wait_for_exit_params_to_json

fn terminal_wait_for_exit_params_to_json(value : TerminalWaitForExitParams) -> Json raise ProtocolDecodeError

Encode terminal/wait_for_exit parameters.

#
terminal_wait_for_exit_result_from_json

fn terminal_wait_for_exit_result_from_json(value : Json, path? : String) -> TerminalWaitForExitResult raise ProtocolDecodeError

Decode the result of terminal/wait_for_exit.

#
terminal_wait_for_exit_result_to_json

fn terminal_wait_for_exit_result_to_json(value : TerminalWaitForExitResult) -> Json raise ProtocolDecodeError

Encode the result of terminal/wait_for_exit.

#
text_content_from_json

fn text_content_from_json(value : Json, path? : String) -> TextContent raise ProtocolDecodeError

Decode text content from a JSON value.

#
text_content_to_json

fn text_content_to_json(value : TextContent) -> Json raise ProtocolDecodeError

Encode text content as a JSON object.

#
text_resource_contents_from_json

fn text_resource_contents_from_json(value : Json, path? : String) -> TextResourceContents raise ProtocolDecodeError

Decode text resource contents from a JSON value.

#
text_resource_contents_to_json

fn text_resource_contents_to_json(value : TextResourceContents) -> Json raise ProtocolDecodeError

Encode text resource contents as a JSON object.

#
tool_call_content_from_json

fn tool_call_content_from_json(value : Json, path? : String) -> ToolCallContent raise ProtocolDecodeError

Decode tool-call content from JSON.

#
tool_call_content_to_json

fn tool_call_content_to_json(value : ToolCallContent) -> Json raise ProtocolDecodeError

Encode tool-call content as JSON.

#
tool_call_from_json

fn tool_call_from_json(value : Json, path? : String) -> ToolCall raise ProtocolDecodeError

Decode an initial tool call from JSON.

#
tool_call_location_from_json

fn tool_call_location_from_json(value : Json, path? : String) -> ToolCallLocation raise ProtocolDecodeError

Decode a tool-call location from JSON.

#
tool_call_location_to_json

fn tool_call_location_to_json(value : ToolCallLocation) -> Json raise ProtocolDecodeError

Encode a tool-call location as JSON.

#
tool_call_to_json

fn tool_call_to_json(value : ToolCall) -> Json raise ProtocolDecodeError

Encode an initial tool call as JSON.

#
tool_call_update_from_json

fn tool_call_update_from_json(value : Json, path? : String) -> ToolCallUpdate raise ProtocolDecodeError

Decode a tool call update from JSON.

#
tool_call_update_to_json

fn tool_call_update_to_json(value : ToolCallUpdate) -> Json raise ProtocolDecodeError

Encode a tool call update as JSON.

#
unstructured_command_input_from_json

fn unstructured_command_input_from_json(value : Json, path? : String) -> UnstructuredCommandInput raise ProtocolDecodeError

Decode unstructured command input from JSON.

#
unstructured_command_input_to_json

fn unstructured_command_input_to_json(value : UnstructuredCommandInput) -> Json raise ProtocolDecodeError

Encode unstructured command input as JSON.

#
usage_update_from_json

fn usage_update_from_json(value : Json, path? : String) -> UsageUpdate raise ProtocolDecodeError

Decode a usage update from JSON.

#
usage_update_to_json

fn usage_update_to_json(value : UsageUpdate) -> Json raise ProtocolDecodeError

Encode a usage update as JSON.

#
write_text_file_params_from_json

fn write_text_file_params_from_json(value : Json, path? : String) -> WriteTextFileParams raise ProtocolDecodeError

Decode fs/write_text_file parameters.

#
write_text_file_params_to_json

fn write_text_file_params_to_json(value : WriteTextFileParams) -> Json raise ProtocolDecodeError

Encode fs/write_text_file parameters.

#
write_text_file_result_from_json

fn write_text_file_result_from_json(value : Json, path? : String) -> WriteTextFileResult raise ProtocolDecodeError

Decode the result of fs/write_text_file.

#
write_text_file_result_to_json

fn write_text_file_result_to_json(value : WriteTextFileResult) -> Json raise ProtocolDecodeError

Encode the result of fs/write_text_file.