Expand description
ACP v1 wire types, method names, and the protocol error.
Data only — no runtime, no I/O. Depend on this alone if you just need to read or write ACP JSON.
Modules§
- method
- Every method name in ACP v1, in one place.
Structs§
- Accept
NesNotification - Agent
Auth Capabilities - Agent
Capabilities - Annotations
- Boxed wherever it is held: four fields almost nothing sets, which inline would widen every content block a turn streams.
- Audio
Content - Auth
Method Agent - The agent signs in on its own — an API key already in its environment, or an OAuth flow it opens a browser for.
- Auth
Method Id - Identifies an authentication method the agent offers.
- Auth
Method Terminal - The client runs a terminal for the user to sign in interactively.
- Authenticate
Request - Authenticate
Response - Available
Command - A slash command the agent offers for this session.
- Available
Command Input - Available
Commands Update - Blob
Resource Contents - Boolean
Property Schema - Cancel
Notification - A notification, not a request: the agent still ends the turn by
answering
session/promptwithStopReason::Cancelled. - Cancel
Request Notification - Cancels a single in-flight request, in either direction — unlike
CancelNotification, which cancels a whole turn. - Capability
- An empty object whose presence is itself the capability flag.
- Client
Auth Capabilities - Which
AuthMethodvariants the agent may offer. A client that cannot run a terminal must not be handedAuthMethod::Terminal. - Client
Capabilities - Client
NesCapabilities - Which suggestion kinds the client can actually apply. An agent must not send a kind the client did not advertise.
- Client
Session Capabilities - Close
NesRequest - Close
NesResponse - Close
Session Request - Close
Session Response - Complete
Elicitation Notification - Tells the client a URL-mode elicitation finished out of band.
- Config
Option Update - Connect
McpRequest - Open a connection to a server named in an
McpServerAcpentry. - Connect
McpResponse - Content
Chunk - Cost
- Create
Elicitation Request - Create
Elicitation Response - Create
Terminal Request - Create
Terminal Response - Current
Mode Update - Delete
Session Request - Delete
Session Response - DidChange
Document Notification - DidClose
Document Notification - DidFocus
Document Notification - DidOpen
Document Notification - DidSave
Document Notification - Diff
- A proposed edit, rendered by the client as a diff.
- Disable
Provider Request - Disable
Provider Response - Disconnect
McpRequest - Disconnect
McpResponse - Elicitation
Accept Action - Elicitation
Capabilities - Elicitation
Form Capabilities - Elicitation
Form Mode - Elicitation
Id - Identifies an in-flight elicitation.
- Elicitation
Request Scope - Elicitation
Schema - The JSON-Schema subset a form elicitation may describe.
- Elicitation
Session Scope - Elicitation
UrlCapabilities - Elicitation
UrlMode - Embedded
Resource - Enum
Option - EnvVariable
- Error
- A JSON-RPC error, as it appears on the wire.
- File
System Capabilities - Fork
Session Request - Branch a session: the fork starts with the original’s history and then diverges from it. The original is untouched.
- Fork
Session Response - Carries the new session’s id — the fork, not the original.
- Http
Header - Image
Content - Implementation
- Name and version of the program on either end.
- Initialize
Request - Initialize
Response - Integer
Property Schema - Kill
Terminal Request - Kill
Terminal Response - List
Providers Request - List
Providers Response - List
Sessions Request - List
Sessions Response - Load
Session Request - Load
Session Response - Logout
Request - Logout
Response - McpCapabilities
- McpConnection
Id - Identifies one live MCP-over-ACP connection the client holds.
- McpServer
Acp - McpServer
AcpId - Names an MCP server the agent reaches through the client.
- McpServer
Http - McpServer
Sse - McpServer
Stdio - Message
Id - Groups content chunks belonging to the same assistant message.
- Message
McpNotification - The same tunnel as
MessageMcpRequest, for MCP messages that expect no reply. - Message
McpRequest - One MCP call forwarded down the tunnel. Sent by whichever side has something to ask: the agent invoking a tool, or the client relaying what the MCP server sent back at it.
- Message
McpResponse - The MCP server’s reply, passed through untouched.
- Multi
Select Property Schema - NesCapabilities
- What the agent wants: which document events to receive, and which kinds of context to be given with each request.
- NesContext
Capabilities - NesCount
Capability - A context kind the agent wants, capped at however many entries it can use.
- NesDiagnostic
- NesDid
Change Capabilities - NesDocument
Event Capabilities - NesEdit
History Entry - NesEdit
Suggestion - NesEvent
Capabilities - NesExcerpt
- NesJump
Suggestion - Move the cursor somewhere else — the next edit belongs in another place, not in different text here.
- NesOpen
File - NesRecent
File - NesRelated
Snippet - NesRename
Suggestion - NesRepository
- NesSearch
AndReplace Suggestion - NesSuggest
Context - Only the kinds the agent asked for in
NesContextCapabilities. - NesSuggestion
Id - Identifies one suggestion within a next-edit response.
- NesText
Edit - NesUser
Action - NewSession
Request - NewSession
Response - Number
Property Schema - Other
Content Block - Other
Elicitation Action - Other
Elicitation Mode - Other
NesSuggestion - Other
Plan Update Content - Other
Property Schema - A property or item shape this revision doesn’t model, kept verbatim.
- Other
Session Update - Other
Tool Call Content - Permission
Option - Permission
Option Id - Identifies one choice offered in a permission request.
- Plan
- Replaces the client’s view of the plan wholesale on every report.
- Plan
Entry - Plan
File - PlanId
- Identifies one of the agent’s plans within a session.
- Plan
Items - Plan
Markdown - Plan
Removed - The agent dropped a plan it had reported with
PlanUpdate. - Plan
Update - Addresses one plan by id, so an agent can keep several alive at once —
unlike
Plan, which is the whole picture every time. - Position
- Zero-based, with
charactercounted in the negotiatedPositionEncodingKind. - Prompt
Capabilities - Prompt
Request - Prompt
Response - Protocol
Version - The protocol revision. This crate speaks
ProtocolVersion::V1. - Provider
Current Config - What the provider is pointed at right now.
- Provider
Id - Identifies an LLM provider the agent can be pointed at.
- Provider
Info - Range
- Read
Text File Request - Read
Text File Response - Reject
NesNotification - Release
Terminal Request - Release
Terminal Response - Request
Permission Request - Request
Permission Response - Wraps
RequestPermissionOutcomebecause a JSON-RPC result must be an object. - Resource
Link - A pointer to a resource the agent may fetch, rather than its contents.
- Resume
Session Request - Resume
Session Response - Session
Capabilities - Session
Config Boolean - Session
Config Group Id - Groups related config option values.
- Session
Config Id - Identifies a per-session configuration option.
- Session
Config Option - Session
Config Options Capabilities - Session
Config Select - Session
Config Select Group - Session
Config Select Option - Session
Config Value Id - Identifies one selectable value of a config option.
- Session
Id - Identifies a conversation with an agent.
- Session
Info - Session
Info Update - Session
Mode - Session
Mode Id - Identifies one of the agent’s operating modes.
- Session
Mode State - Session
Notification - SetProvider
Request - SetProvider
Response - SetSession
Config Option Request - SetSession
Config Option Response - SetSession
Mode Request - SetSession
Mode Response - Start
NesRequest - Start
NesResponse - String
Multi Select Items - String
Property Schema - Suggest
NesRequest - Suggest
NesResponse - Terminal
Exit Status - Terminal
Id - Identifies a terminal the client runs on the agent’s behalf.
- Terminal
Output Request - Terminal
Output Response - Text
Content - Text
Document Content Change Event - A
rangeofNonemeanstextreplaces the whole document — that is theTextDocumentSyncKind::Fullshape. - Text
Resource Contents - Titled
Multi Select Items - Tool
Call - A tool invocation the agent is reporting to the client.
- Tool
Call Id - Identifies one tool invocation within a session.
- Tool
Call Location - A file the tool call touches, so the client can follow along.
- Tool
Call Update - A partial update to an in-flight tool call; absent fields are unchanged.
- Tool
Call Update Fields - Usage
- Tokens the whole turn cost. Distinct from
UsageUpdate, which tracks the context window as the turn runs. - Usage
Update - Context-window consumption for the session so far.
- Wait
ForTerminal Exit Request - Wait
ForTerminal Exit Response - Workspace
Folder - Write
Text File Request - Write
Text File Response
Enums§
- Auth
Method - A way to sign in.
Agentis the untagged fallback: methods that predate thetypetag still arrive without one, and they mean “the agent handles this itself”. - Content
Block - A single piece of content in a prompt or a message.
- Elicitation
Action - Elicitation
Content Value - Elicitation
Mode Otherpreserves a mode this revision doesn’t know, so it can be declined rather than failing to parse.- Elicitation
Property Schema - Elicitation
Schema Type - Elicitation
Scope - What the elicitation belongs to: a session, or a single in-flight request.
- Embedded
Resource Resource - Untagged: text resources carry
text, blob resources carryblob. - LlmProtocol
- The API dialect an endpoint speaks.
Otheris the untagged fallback, so a dialect added later deserializes as itself instead of failing. - Maybe
Undefined - Distinguishes “field absent” from “field explicitly null”.
- McpServer
- Stdio is the untagged fallback: those entries predate the
typetag and still arrive without one. - Multi
Select Items - NesDiagnostic
Severity - NesReject
Reason Ignoredmeans the user simply kept typing;Replacedmeans a newer suggestion superseded this one.- NesSuggestion
- What the agent thinks should happen next. The client applies at most one,
then says which with
AcceptNesNotification. - NesTrigger
Kind - Why the client is asking now.
- Permission
Option Kind - Plan
Entry Priority - Plan
Entry Status - Plan
Update Content - How the plan is carried: as structured entries, as a file the client renders, or as markdown.
- Position
Encoding Kind - How the client counts columns in a
Position. - Request
Id - A JSON-RPC request id. Any shape is legal; peers echo back whatever they
were sent.
Nullis the id of an error about a frame too malformed to have one. - Request
Permission Outcome - Role
- Session
Config Kind - Session
Config Option Category Otherkeeps a category added by a newer agent from failing the parse.- Session
Config Option Value - Untagged
ValueIdis the legacy shape: a barevaluewith notype. - Session
Config Select Options - Session
Update - Stop
Reason - Why the agent stopped working on a turn.
- String
Format - Text
Document Sync Kind - Whether
DidChangeDocumentNotificationcarries the whole document or just the ranges that changed. - Tool
Call Content - Tool
Call Status - Tool
Kind - What a tool does, so the client can pick an icon and a phrasing.
Constants§
- AUTH_
REQUIRED - The agent needs
authenticatebefore it can serve this. - INTERNAL_
ERROR - The handler failed.
- INVALID_
PARAMS - Params did not match the method’s schema.
- INVALID_
REQUEST - Not a valid request object.
- METHOD_
NOT_ FOUND - The method is not implemented by this side.
- PARSE_
ERROR - Malformed JSON.
- REQUEST_
CANCELLED - The request was cancelled before it completed.
- RESOURCE_
NOT_ FOUND - The requested resource does not exist.