Available on crate feature
unstable_protocol_v2 only.Expand description
Agent Client Protocol version 2 draft types.
EXPERIMENTAL. This module is gated behind the unstable_protocol_v2
feature, is not part of the unstable umbrella, and is not
advertised by crate::ProtocolVersion::LATEST. The wire format is
currently identical to v1 (the default crate-root types) and the types
here exist only as a place to evolve v2 without disturbing the stable v1
API. The wire format intentionally diverges from v1 as draft v2 RFDs land.
Both the type definitions and the conversion helpers may change at any
time.
Re-exports§
pub use crate::rpc::JsonRpcBatch;pub use crate::rpc::JsonRpcMessage;pub use crate::rpc::Notification;pub use crate::rpc::Request;pub use crate::rpc::RequestId;
Modules§
- conversion
- Explicit conversion helpers for experimenting with ACP v2 while SDKs still speak v1.
Structs§
- Accept
NesNotification unstable_nes - Notification sent when a suggestion is accepted.
- Agent
Auth Capabilities - Authentication-related capabilities supported by the agent.
- Agent
Capabilities - Capabilities supported by the agent.
- Agent
Method Names - Names of all methods that agents handle.
- Annotations
- Optional annotations for the client. The client can use annotations to inform how objects are used or displayed
- Audio
Content - Audio provided to or from an LLM.
- Auth
Capabilities - UNSTABLE
- Auth
EnvVar - UNSTABLE
- Auth
Method Agent - Agent handles authentication itself.
- Auth
Method EnvVar - UNSTABLE
- Auth
Method Id - Auth
Method Terminal - UNSTABLE
- Authenticate
Request - Request parameters for the authenticate method.
- Authenticate
Response - Response to the
authenticatemethod. - Available
Command - Information about a command.
- Available
Commands Update - Available commands are ready or have changed
- Blob
Resource Contents - Binary resource contents.
- Boolean
Property Schema unstable_elicitation - Schema for boolean properties in an elicitation form.
- Cancel
Notification - Notification to cancel ongoing operations for a session.
- Cancel
Request Notification unstable_cancel_request - UNSTABLE
- Client
Capabilities - Capabilities supported by the client.
- Client
Method Names - Names of all methods that clients handle.
- Client
NesCapabilities unstable_nes - NES capabilities advertised by the client during initialization.
- Close
NesRequest unstable_nes - Request to close an NES session.
- Close
NesResponse unstable_nes - Response from closing an NES session.
- Close
Session Request - Request parameters for closing an active session.
- Close
Session Response - Response from closing a session.
- Complete
Elicitation Notification unstable_elicitation - UNSTABLE
- Config
Option Update - Session configuration options have been updated.
- Connect
McpRequest unstable_mcp_over_acp - UNSTABLE
- Connect
McpResponse unstable_mcp_over_acp - UNSTABLE
- Content
- Standard content block (text, images, resources).
- Content
Chunk - A streamed item of content
- Cost
- Cost information for a session.
- Create
Elicitation Request unstable_elicitation - UNSTABLE
- Create
Elicitation Response unstable_elicitation - UNSTABLE
- Delete
Session Request - Request parameters for deleting an existing session from
session/list. - Delete
Session Response - Response from deleting a session.
- DidChange
Document Notification unstable_nes - Notification sent when a file is edited.
- DidClose
Document Notification unstable_nes - Notification sent when a file is closed.
- DidFocus
Document Notification unstable_nes - Notification sent when a file becomes the active editor tab.
- DidOpen
Document Notification unstable_nes - Notification sent when a file is opened in the editor.
- DidSave
Document Notification unstable_nes - Notification sent when a file is saved.
- Diff
- A diff representing file modifications.
- Disable
Provider Request - UNSTABLE
- Disable
Provider Response - UNSTABLE
- Disconnect
McpRequest unstable_mcp_over_acp - UNSTABLE
- Disconnect
McpResponse unstable_mcp_over_acp - UNSTABLE
- Elicitation
Accept Action unstable_elicitation - UNSTABLE
- Elicitation
Capabilities unstable_elicitation - UNSTABLE
- Elicitation
Form Capabilities unstable_elicitation - UNSTABLE
- Elicitation
Form Mode unstable_elicitation - UNSTABLE
- Elicitation
Id unstable_elicitation - UNSTABLE
- Elicitation
Request Scope unstable_elicitation - UNSTABLE
- Elicitation
Schema unstable_elicitation - Type-safe elicitation schema for requesting structured user input.
- Elicitation
Session Scope unstable_elicitation - UNSTABLE
- Elicitation
UrlCapabilities unstable_elicitation - UNSTABLE
- Elicitation
UrlMode unstable_elicitation - UNSTABLE
- Embedded
Resource - The contents of a resource, embedded into a prompt or tool call result.
- Enum
Option unstable_elicitation - A titled enum option with a const value and human-readable title.
- EnvVariable
- An environment variable to set when launching an MCP server.
- Error
- JSON-RPC error object.
- ExtNotification
- Allows the Agent to send an arbitrary notification that is not part of the ACP spec. Extension notifications provide a way to send one-way messages for custom functionality while maintaining protocol compatibility.
- ExtRequest
- Allows for sending an arbitrary request that is not part of the ACP spec. Extension methods provide a way to add custom functionality while maintaining protocol compatibility.
- ExtResponse
- Allows for sending an arbitrary response to an
ExtRequestthat is not part of the ACP spec. Extension methods provide a way to add custom functionality while maintaining protocol compatibility. - Fork
Session Request - UNSTABLE
- Fork
Session Response - UNSTABLE
- General
Method Names unstable_cancel_request - Names of all methods that agents handle.
- Http
Header - An HTTP header to set when making requests to the MCP server.
- Image
Content - An image provided to or from an LLM.
- Implementation
- Metadata about the implementation of the client or agent. Describes the name and version of an MCP implementation, with an optional title for UI representation.
- Initialize
Request - Request parameters for the initialize method.
- Initialize
Response - Response to the
initializemethod. - Integer
Property Schema unstable_elicitation - Schema for integer properties in an elicitation form.
- List
Providers Request - UNSTABLE
- List
Providers Response - UNSTABLE
- List
Sessions Request - Request parameters for listing existing sessions.
- List
Sessions Response - Response from listing sessions.
- Load
Session Request - Request parameters for loading an existing session.
- Load
Session Response - Response from loading an existing session.
- Logout
Capabilities - Logout capabilities supported by the agent.
- Logout
Request - Request parameters for the logout method.
- Logout
Response - Response to the
logoutmethod. - McpAcp
Capabilities - UNSTABLE
- McpCapabilities
- MCP capabilities supported by the agent
- McpConnection
Id unstable_mcp_over_acp - UNSTABLE
- McpHttp
Capabilities - Capabilities for HTTP MCP server transports.
- McpServer
Acp - UNSTABLE
- McpServer
AcpId unstable_mcp_over_acp - UNSTABLE
- McpServer
Http - HTTP transport configuration for MCP.
- McpServer
Stdio - Stdio transport configuration for MCP.
- McpStdio
Capabilities - Capabilities for stdio MCP server transports.
- Message
Id - Unique identifier for a message within a session.
- Message
McpNotification unstable_mcp_over_acp - UNSTABLE
- Message
McpRequest unstable_mcp_over_acp - UNSTABLE
- Message
McpResponse unstable_mcp_over_acp - UNSTABLE
- Multi
Select Property Schema unstable_elicitation - Schema for multi-select (array) properties in an elicitation form.
- NesCapabilities
unstable_nes - NES capabilities advertised by the agent during initialization.
- NesContext
Capabilities unstable_nes - Context capabilities the agent wants attached to each suggestion request.
- NesDiagnostic
unstable_nes - A diagnostic (error, warning, etc.).
- NesDiagnostics
Capabilities unstable_nes - Capabilities for diagnostics context.
- NesDocument
DidChange Capabilities unstable_nes - Capabilities for
document/didChangeevents. - NesDocument
DidClose Capabilities unstable_nes - Marker for
document/didClosecapability support. - NesDocument
DidFocus Capabilities unstable_nes - Marker for
document/didFocuscapability support. - NesDocument
DidOpen Capabilities unstable_nes - Marker for
document/didOpencapability support. - NesDocument
DidSave Capabilities unstable_nes - Marker for
document/didSavecapability support. - NesDocument
Event Capabilities unstable_nes - Document event capabilities the agent wants to receive.
- NesEdit
History Capabilities unstable_nes - Capabilities for edit history context.
- NesEdit
History Entry unstable_nes - An entry in the edit history.
- NesEdit
Suggestion unstable_nes - A text edit suggestion.
- NesEvent
Capabilities unstable_nes - Event capabilities the agent can consume.
- NesExcerpt
unstable_nes - A code excerpt from a file.
- NesJump
Capabilities unstable_nes - Marker for jump suggestion support.
- NesJump
Suggestion unstable_nes - A jump-to-location suggestion.
- NesOpen
File unstable_nes - An open file in the editor.
- NesOpen
Files Capabilities unstable_nes - Capabilities for open files context.
- NesRecent
File unstable_nes - A recently accessed file.
- NesRecent
Files Capabilities unstable_nes - Capabilities for recent files context.
- NesRelated
Snippet unstable_nes - A related code snippet from a file.
- NesRelated
Snippets Capabilities unstable_nes - Capabilities for related snippets context.
- NesRename
Capabilities unstable_nes - Marker for rename suggestion support.
- NesRename
Suggestion unstable_nes - A rename symbol suggestion.
- NesRepository
unstable_nes - Repository metadata for an NES session.
- NesSearch
AndReplace Capabilities unstable_nes - Marker for search and replace suggestion support.
- NesSearch
AndReplace Suggestion unstable_nes - A search-and-replace suggestion.
- NesSuggest
Context unstable_nes - Context attached to a suggestion request.
- NesText
Edit unstable_nes - A text edit within a suggestion.
- NesUser
Action unstable_nes - A user action (typing, cursor movement, etc.).
- NesUser
Actions Capabilities unstable_nes - Capabilities for user actions context.
- NewSession
Request - Request parameters for creating a new session.
- NewSession
Response - Response from creating a new session.
- Number
Property Schema unstable_elicitation - Schema for number (floating-point) properties in an elicitation form.
- Other
Auth Method - Custom or future authentication method payload.
- Other
Available Command Input - Custom or future command input specification.
- Other
Content Block - Custom or future content block payload.
- Other
McpServer - Custom or future MCP server transport payload.
- Other
NesSuggestion unstable_nes - Custom or future NES suggestion payload.
- Other
Plan Update Content - Custom or future plan update content payload.
- Other
Session Config Kind - Custom or future session configuration option payload.
- Other
Session Update - Custom or future session update payload.
- Other
Tool Call Content - Custom or future tool call content payload.
- Permission
Option - An option presented to the user when requesting permission.
- Permission
Option Id - Unique identifier for a permission option.
- Plan
Entry - A single entry in the execution plan.
- Plan
File - UNSTABLE
- PlanId
- Unique identifier for a plan within a session.
- Plan
Items - A plan represented as structured entries.
- Plan
Markdown - UNSTABLE
- Plan
Removed - UNSTABLE
- Plan
Update - A content update for a plan identified by ID.
- Position
unstable_nes - A zero-based position in a text document.
- Prompt
Audio Capabilities - Capabilities for audio content in prompt requests.
- Prompt
Capabilities - Prompt capabilities supported by the agent in
session/promptrequests. - Prompt
Embedded Context Capabilities - Capabilities for embedded context in prompt requests.
- Prompt
Image Capabilities - Capabilities for image content in prompt requests.
- Prompt
Request - Request parameters for sending a user prompt to the agent.
- Prompt
Response - Response from processing a user prompt.
- Provider
Current Config unstable_llm_providers - UNSTABLE
- Provider
Info - UNSTABLE
- Providers
Capabilities - UNSTABLE
- Range
unstable_nes - A range in a text document, expressed as start and end positions.
- RawValue
- Reference to a range of bytes encompassing a single valid JSON value in the input data.
- Reject
NesNotification unstable_nes - Notification sent when a suggestion is rejected.
- Request
Permission Request - Request for user permission to execute a tool call.
- Request
Permission Response - Response to a permission request.
- Resource
Link - A resource that the server is capable of reading, included in a prompt or tool call result.
- Resume
Session Request - Request parameters for resuming an existing session.
- Resume
Session Response - Response from resuming an existing session.
- Selected
Permission Outcome - The user selected one of the provided options.
- Session
Additional Directories Capabilities - Capabilities for additional session directories support.
- Session
Capabilities - Session capabilities supported by the agent.
- Session
Close Capabilities - Capabilities for the
session/closemethod. - Session
Config Boolean unstable_boolean_config - UNSTABLE
- Session
Config Group Id - Unique identifier for a session configuration option value group.
- Session
Config Id - Unique identifier for a session configuration option.
- Session
Config Option - A session configuration option selector and its current state.
- Session
Config Select - A single-value selector (dropdown) session configuration option payload.
- Session
Config Select Group - A group of possible values for a session configuration option.
- Session
Config Select Option - A possible value for a session configuration option.
- Session
Config Value Id - Unique identifier for a session configuration option value.
- Session
Delete Capabilities - Capabilities for the
session/deletemethod. - Session
Fork Capabilities - UNSTABLE
- Session
Id - A unique identifier for a conversation session between a client and agent.
- Session
Info - Information about a session returned by session/list
- Session
Info Update - Update to session metadata. All fields are optional to support partial updates.
- Session
List Capabilities - Capabilities for the
session/listmethod. - Session
Load Capabilities - Capabilities for the
session/loadmethod. - Session
Notification - Notification containing a session update from the agent.
- Session
Resume Capabilities - Capabilities for the
session/resumemethod. - SetProvider
Request - UNSTABLE
- SetProvider
Response - UNSTABLE
- SetSession
Config Option Request - Request parameters for setting a session configuration option.
- SetSession
Config Option Response - Response to
session/set_config_optionmethod. - Start
NesRequest unstable_nes - Request to start an NES session.
- Start
NesResponse unstable_nes - Response to
nes/start. - String
Property Schema unstable_elicitation - Schema for string properties in an elicitation form.
- Suggest
NesRequest unstable_nes - Request for a code suggestion.
- Suggest
NesResponse unstable_nes - Response to
nes/suggest. - Terminal
Auth Capabilities - UNSTABLE
- Text
Content - Text provided to or from an LLM.
- Text
Document Content Change Event unstable_nes - A content change event for a document.
- Text
Resource Contents - Text-based resource contents.
- Titled
Multi Select Items unstable_elicitation - Items definition for titled multi-select enum properties.
- Tool
Call - Represents a tool call that the language model has requested.
- Tool
Call Id - Unique identifier for a tool call within a session.
- Tool
Call Location - A file location being accessed or modified by a tool.
- Tool
Call Update - An update to an existing tool call.
- Tool
Call Update Fields - Optional fields that can be updated in a tool call.
- Unstructured
Command Input - All text that was typed after the command name is provided as input.
- Untitled
Multi Select Items unstable_elicitation - Items definition for untitled multi-select enum properties.
- UrlElicitation
Required Data unstable_elicitation - UNSTABLE
- UrlElicitation
Required Item unstable_elicitation - UNSTABLE
- Usage
- UNSTABLE
- Usage
Update - Context window and cost update for a session.
- Workspace
Folder unstable_nes - A workspace folder.
Enums§
- Agent
Notification - All possible notifications that an agent can send to a client.
- Agent
Request - All possible requests that an agent can send to a client.
- Agent
Response - All possible responses that an agent can send to a client.
- Auth
Method - Describes an available authentication method.
- Available
Command Input - The input specification for a command.
- Client
Notification - All possible notifications that a client can send to an agent.
- Client
Request - All possible requests that a client can send to an agent.
- Client
Response - All possible responses that a client can send to an agent.
- Content
Block - Content blocks represent displayable information in the Agent Client Protocol.
- Elicitation
Action unstable_elicitation - UNSTABLE
- Elicitation
Content Value unstable_elicitation - Elicitation
Mode unstable_elicitation - UNSTABLE
- Elicitation
Property Schema unstable_elicitation - Property schema for elicitation form fields.
- Elicitation
Schema Type unstable_elicitation - Type discriminator for elicitation schemas.
- Elicitation
Scope unstable_elicitation - UNSTABLE
- Elicitation
String Type unstable_elicitation - Items definition for untitled multi-select enum properties.
- Elicitation
UrlOnly Mode unstable_elicitation - Type discriminator for URL-only elicitation error items.
- Embedded
Resource Resource - Resource content that can be embedded in a message.
- Error
Code - Predefined error codes for common JSON-RPC and ACP-specific errors.
- LlmProtocol
unstable_llm_providers - UNSTABLE
- McpServer
- Configuration for connecting to an MCP (Model Context Protocol) server.
- Multi
Select Items unstable_elicitation - Items for a multi-select (array) property schema.
- NesDiagnostic
Severity unstable_nes - Severity of a diagnostic.
- NesReject
Reason unstable_nes - The reason a suggestion was rejected.
- NesSuggestion
unstable_nes - A suggestion returned by the agent.
- NesTrigger
Kind unstable_nes - What triggered the suggestion request.
- Permission
Option Kind - The type of permission option being presented to the user.
- Plan
Entry Priority - Priority levels for plan entries.
- Plan
Entry Status - Status of a plan entry in the execution flow.
- Plan
Update Content - Updated content for a plan.
- Position
Encoding Kind unstable_nes - The encoding used for character offsets in positions.
- Protocol
Level Notification unstable_cancel_request - General protocol-level notifications that all sides are expected to implement.
- Request
Permission Outcome - The outcome of a permission request.
- Role
- The sender or recipient of messages and data in a conversation.
- Session
Config Kind - Type-specific session configuration option payload.
- Session
Config Option Category - Semantic category for a session configuration option.
- Session
Config Option Value unstable_boolean_config - UNSTABLE
- Session
Config Select Options - Possible values for a session configuration option.
- Session
Update - Different types of updates that can be sent during session processing.
- Stop
Reason - Reasons why an agent stops processing a prompt turn.
- String
Format unstable_elicitation - String format types for string properties in elicitation schemas.
- Text
Document Sync Kind unstable_nes - How the agent wants document changes delivered.
- Tool
Call Content - Content produced by a tool call.
- Tool
Call Status - Execution status of a tool call.
- Tool
Kind - Categories of tools that can be invoked.
Constants§
- AGENT_
METHOD_ NAMES - Constant containing all agent method names.
- CLIENT_
METHOD_ NAMES - Constant containing all client method names.
- PROTOCOL_
LEVEL_ METHOD_ NAMES unstable_cancel_request - Constant containing all agent method names.