ACP
Agent Client Protocol server and CLI integration.
Classes
AcpServer
Defined in: src/acp/server.ts:67
ACP-compliant agent built on a registered Maniac agent.
Construct one per process via AcpServer.create (or directly
with new AcpServer(...)); the server holds the underlying
Maniac instance and per-session bookkeeping. Hand it to an
AgentSideConnection via serveAcpStdio which drives
the JSON-RPC loop.
Implements
Agent
Constructors
Constructor
new AcpServer(
app,agentId,options?):AcpServer
Defined in: src/acp/server.ts:80
Parameters
app
agentId
string
options?
agentName?
string
agentTitle?
string
agentVersion?
string
Returns
Methods
bindConnection()
bindConnection(
connection):void
Defined in: src/acp/server.ts:105
Bind the SDK's connection so outbound calls
(requestPermission, sessionUpdate) can find it.
Parameters
connection
AgentSideConnection
Returns
void
initialize()
initialize(
params):Promise<InitializeResponse>
Defined in: src/acp/server.ts:113
Establishes the connection with a client and negotiates protocol capabilities.
This method is called once at the beginning of the connection to:
- Negotiate the protocol version to use
- Exchange capability information between client and agent
- Determine available authentication methods
The agent should respond with its supported protocol version and capabilities.
See protocol docs: Initialization
Parameters
params
Returns
Promise<InitializeResponse>
Implementation of
AcpAgent.initialize
authenticate()
authenticate(
_params):Promise<void|AuthenticateResponse>
Defined in: src/acp/server.ts:144
Authenticates the client using the specified authentication method.
Called when the agent requires authentication before allowing session creation. The client provides the authentication method ID that was advertised during initialization.
After successful authentication, the client can proceed to create sessions with
newSession without receiving an auth_required error.
See protocol docs: Initialization
Parameters
_params
Returns
Promise<void | AuthenticateResponse>
Implementation of
AcpAgent.authenticate
newSession()
newSession(
params):Promise<NewSessionResponse>
Defined in: src/acp/server.ts:148
Creates a new conversation session with the agent.
Sessions represent independent conversation contexts with their own history and state.
The agent should:
- Create a new session context
- Connect to any specified MCP servers
- Return a unique session ID for future requests
The request may include additionalDirectories to expand the session's filesystem
scope beyond cwd without changing the base for relative paths.
May return an auth_required error if the agent requires authentication.
See protocol docs: Session Setup
Parameters
params
Returns
Promise<NewSessionResponse>
Implementation of
AcpAgent.newSession
loadSession()
loadSession(
params):Promise<LoadSessionResponse>
Defined in: src/acp/server.ts:161
Loads an existing session to resume a previous conversation.
This method is only available if the agent advertises the loadSession capability.
The agent should:
- Restore the session context and conversation history
- Connect to the specified MCP servers
- Stream the entire conversation history back to the client via notifications
The request may include additionalDirectories to set the complete list of
additional workspace roots for the loaded session.
See protocol docs: Loading Sessions
Parameters
params
Returns
Promise<LoadSessionResponse>
Implementation of
AcpAgent.loadSession
setSessionMode()
setSessionMode(
_params):Promise<void|SetSessionModeResponse>
Defined in: src/acp/server.ts:179
Sets the operational mode for a session.
Allows switching between different agent modes (e.g., "ask", "architect", "code") that affect system prompts, tool availability, and permission behaviors.
The mode must be one of the modes advertised in availableModes during session
creation or loading. Agents may also change modes autonomously and notify the
client via current_mode_update notifications.
This method can be called at any time during a session, whether the Agent is idle or actively generating a turn.
See protocol docs: Session Modes
Parameters
_params
Returns
Promise<void | SetSessionModeResponse>
Implementation of
AcpAgent.setSessionMode
prompt()
prompt(
params):Promise<PromptResponse>
Defined in: src/acp/server.ts:183
Processes a user prompt within a session.
This method handles the whole lifecycle of a prompt:
- Receives user messages with optional context (files, images, etc.)
- Processes the prompt using language models
- Reports language model content and tool calls to the Clients
- Requests permission to run tools
- Executes any requested tool calls
- Returns when the turn is complete with a stop reason
See protocol docs: Prompt Turn
Parameters
params
Returns
Promise<PromptResponse>
Implementation of
AcpAgent.prompt
cancel()
cancel(
params):Promise<void>
Defined in: src/acp/server.ts:206
Cancels ongoing operations for a session.
This is a notification sent by the client to cancel an ongoing prompt turn.
Upon receiving this notification, the Agent SHOULD:
- Stop all language model requests as soon as possible
- Abort all tool call invocations in progress
- Send any pending
session/updatenotifications - Respond to the original
session/promptrequest withStopReason::Cancelled
See protocol docs: Cancellation
Parameters
params
Returns
Promise<void>
Implementation of
AcpAgent.cancel
TraceTranslator
Defined in: src/acp/translator.ts:73
Stateful event-to-update translator scoped to one ACP session.
Construct one per session; feed every TraceEvent into
translate and forward the returned notifications to the
connected client via the SDK's
AgentSideConnection.sessionUpdate.
Constructors
Constructor
new TraceTranslator(
sessionId):TraceTranslator
Defined in: src/acp/translator.ts:77
Parameters
sessionId
string
Returns
Properties
sessionId
readonlysessionId:string
Defined in: src/acp/translator.ts:74
state
state:
TranslatorState
Defined in: src/acp/translator.ts:75
Accessors
stopReason
Get Signature
get stopReason():
string|null
Defined in: src/acp/translator.ts:83
The terminal stop reason, or null until a terminal event arrives.
Returns
string | null
Methods
translate()
translate(
event):SessionNotification[]
Defined in: src/acp/translator.ts:87
Parameters
event
{ ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "token"; payload: {[key: string]: unknown; model?: string; scope?: string; iteration?: number; toolset?: string | null; lm_span_id?: string | null; usage_delta?: { prompt: number; completion: number; cost_usd?: number | null; cache_creation_input_tokens?: number | null; cache_read_input_tokens?: number | null; } | null; finish_reason?: string | null; raw_finish_reason?: string | null; }; delta: string; chunk_kind?: "text" | "reasoning" | "json_partial" | "object_partial" | "tool_call_partial" | "control" | null; content_part_kind?: "file" | "text" | "image" | null; partial_object?: JsonDict | null; tool_call_delta?: { index: number; id?: string | null; name?: string | null; arguments_partial: string; } | null; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "lm_call_start"; payload: {[key: string]: unknown; model: string; scope: string; iteration: number; toolset?: string | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "lm_call"; payload: {[key: string]: unknown; model: string; scope: string; iteration: number; usage: { prompt: number; completion: number; cost_usd?: number | null; cache_creation_input_tokens?: number | null; cache_read_input_tokens?: number | null; }; finish_reason: string; toolset?: string | null; raw_finish_reason?: string | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "tool"; payload: {[key: string]: unknown; tool_call_id: string; tool_name: string; toolset?: string | null; phase: "completed" | "failed" | "cancelled" | "started"; args?: JsonDict; result?: JsonDict | null; result_preview?: {[key: string]: unknown; ok?: boolean; value?: unknown; error?: string | null; metadata?: JsonDict | null; result_truncated?: boolean; value_omitted_reason?: string | null; } | null; ok?: boolean | null; allowed?: boolean | null; error?: string | null; reason?: string | null; started_at?: string | null; finished_at?: string | null; elapsed_ms?: number | null; decision?: {[key: string]: unknown; allowed: boolean; requires_approval: boolean; matched_rule_id?: string | null; reason?: string | null; } | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "tool_call_arguments_delta"; payload: {[key: string]: unknown; tool_call_id?: string | null; tool_name?: string | null; index: number; arguments_delta: string; sequence: number; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "cell"; payload: {[key: string]: unknown; cell_id: string; phase: "completed" | "failed" | "cancelled" | "started"; code?: string | null; result?: JsonDict | null; error?: string | null; elapsed_ms?: number | null; stdout_len?: number | null; stderr_len?: number | null; variables?: string[] | null; src?: string | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "subagent"; payload: {[key: string]: unknown; phase: "error" | "completed" | "intent" | "start" | "paused" | "errored"; agent_id?: string | null; toolset?: string | null; role?: string | null; prompt_summary?: string | null; prompt?: string | null; parent_span_id?: string | null; background?: boolean | null; iterations?: number | null; reason?: string | null; max_depth?: number | null; repl?: boolean | null; usage?: { prompt: number; completion: number; cost_usd?: number | null; cache_creation_input_tokens?: number | null; cache_read_input_tokens?: number | null; } | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "agent"; payload: {[key: string]: unknown; phase: "completed" | "started"; agent_id: string; principal?: string | null; iterations?: number | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "approval"; payload: {[key: string]: unknown; phase: "requested" | "approved" | "denied" | "resolved"; id?: string; toolset?: string | null; tool?: string | null; rule_id?: string | null; reason?: string | null; source: "guardrail" | "policy"; decision?: "approve" | "deny" | null; approvals: object[]; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "memory"; payload: {[key: string]: unknown; op: string; phase?: string | null; principal?: string | null; depth?: number | null; summary?: string | null; namespace?: string | null; agent_id?: string | null; thread_id?: string | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "guardrail"; payload: {[key: string]: unknown; phase: string; boundary?: string | null; action?: string | null; decision?: string | null; rule_id?: string | null; reason?: string | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "background_task"; payload: {[key: string]: unknown; phase: string; task_id: string; status?: string | null; progress?: number | null; output?: JsonDict | null; agent_id?: string | null; sub_agent_id?: string | null; tool?: string | null; attempt?: number | null; error?: string | null; iterations?: number | null; timeout_ms?: number | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "step"; payload: {[key: string]: unknown; phase: "before" | "after" | "repair" | "stopped" | "finalize_vetoed"; turn_index: number; iteration?: number | null; source?: string | null; reason?: string | null; elapsed_ms?: number | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "retry"; payload: {[key: string]: unknown; attempt: number; reason: string; model?: string | null; max_attempts?: number | null; delay_s?: number | null; fallback?: boolean | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "final"; payload: {[key: string]: unknown; source: string; iterations?: number | null; validated?: boolean | null; error?: string | null; pending?: number | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "error"; payload: {[key: string]: unknown; message: string; kind_of_error?: string | null; cause?: string | null; retryable?: boolean | null; reason?: string | null; detail?: string | null; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "stream_gap"; payload: {[key: string]: unknown; dropped_count_so_far: number; }; } | { ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "plan"; payload: {[key: string]: unknown; entries: object[]; }; }
Type Literal
{ ts: string; depth: number; principal?: string | null; span_id?: string | null; parent_span_id?: string | null; seq: number; event_id: string; run_id: string; turn_id?: string | null; message_id?: string | null; block_id?: string | null; thread_id?: string | null; kind: "token"; payload: {[key: string]: unknown; model?: string; scope?: string; iteration?: number; toolset?: string | null; lm_span_id?: string | null; usage_delta?: { prompt: number; completion: number; cost_usd?: number | null; cache_creation_input_tokens?: number | null; cache_read_input_tokens?: number | null; } | null; finish_reason?: string | null; raw_finish_reason?: string | null; }; delta: string; chunk_kind?: "text" | "reasoning" | "json_partial" | "object_partial" | "tool_call_partial" | "control" | null; content_part_kind?: "file" | "text" | "image" | null; partial_object?: JsonDict | null; tool_call_delta?: { index: number; id?: string | null; name?: string | null; arguments_partial: string; } | null; }
ts
string = ...
depth
number = ...
principal?
string | null = ...
span_id?
string | null = ...
parent_span_id?
string | null = ...
seq
number = ...
event_id
string = ...
run_id
string = ...
turn_id?
string | null = ...
message_id?
string | null = ...
block_id?
string | null = ...
thread_id?
string | null = ...
kind
"token" = ...
payload
{[key: string]: unknown; model?: string; scope?: string; iteration?: number; toolset?: string | null; lm_span_id?: string | null; usage_delta?: { prompt: number; completion: number; cost_usd?: number | null; cache_creation_input_tokens?: number | null; cache_read_input_tokens?: number | null; } | null; finish_reason?: string | null; raw_finish_reason?: string | null; } = ...
payload.model?
string = ...
payload.scope?
string = ...
payload.iteration?
number = ...
payload.toolset?
string | null = ...
payload.lm_span_id?
string | null = ...
payload.usage_delta?
{ prompt: number; completion: number; cost_usd?: number | null; cache_creation_input_tokens?: number | null; cache_read_input_tokens?: number | null; } | null = ...
payload.finish_reason?
string | null = ...
payload.raw_finish_reason?
string | null = ...
delta
string = ...
chunk_kind?
"text" | "reasoning" | "json_partial" | "object_partial" | "tool_call_partial" | "control" | null = ...
content_part_kind?
"file" | "text" | "image" | null = ...
Optional discriminator for the multimodal content part the delta
belongs to (Phase 3). Additive: existing producers may leave it
null/omitted, and existing consumers continue to work without
reading it. The runner sets it whenever a stream produces image
or file deltas (today only the Anthropic adapter); plain-text
streams keep it null.
partial_object?
JsonDict | null = ...
tool_call_delta?
{ index: number; id?: string | null; name?: string | null; arguments_partial: string; } | null = ...
Returns
Interfaces
AcpClientHandle
Defined in: src/acp/context.ts:15
Properties
connection
connection:
AgentSideConnection
Defined in: src/acp/context.ts:16
sessionId
sessionId:
string
Defined in: src/acp/context.ts:17
capabilities
capabilities:
ClientCapabilities|null
Defined in: src/acp/context.ts:18
TranslatorState
Defined in: src/acp/translator.ts:51
Properties
announcedToolCalls
announcedToolCalls:
Set<string>
Defined in: src/acp/translator.ts:52
stopReason
stopReason:
string|null
Defined in: src/acp/translator.ts:53
lastFinishReason
lastFinishReason:
string|null
Defined in: src/acp/translator.ts:54
Type Aliases
AgentCapabilities
AgentCapabilities =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:59
Capabilities supported by the agent.
Advertised during initialization to inform the client about available features and content types.
See protocol docs: Agent Capabilities
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:67
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
auth?
optionalauth?:AgentAuthCapabilities
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:79
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Authentication-related capabilities supported by the agent.
loadSession?
optionalloadSession?:boolean
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:83
Whether the agent supports session/load.
mcpCapabilities?
optionalmcpCapabilities?:McpCapabilities
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:87
MCP capabilities supported by the agent.
nes?
optionalnes?:NesCapabilities|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:97
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
NES (Next Edit Suggestions) capabilities supported by the agent.
positionEncoding?
optionalpositionEncoding?:PositionEncodingKind|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:107
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
The position encoding selected by the agent from the client's supported encodings.
promptCapabilities?
optionalpromptCapabilities?:PromptCapabilities
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:111
Prompt capabilities supported by the agent.
providers?
optionalproviders?:ProvidersCapabilities|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:123
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Provider configuration capabilities supported by the agent.
By supplying {} it means that the agent supports provider configuration methods.
sessionCapabilities?
optionalsessionCapabilities?:SessionCapabilities
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:124
AudioContent
AudioContent =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:171
Audio provided to or from an LLM.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:179
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
annotations?
optionalannotations?:Annotations|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:182
data
data:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:183
mimeType
mimeType:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:184
AuthenticateRequest
AuthenticateRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:392
Request parameters for the authenticate method.
Specifies which authentication method to use.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:400
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
methodId
methodId:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:407
The ID of the authentication method to use. Must be one of the methods advertised in the initialize response.
AuthenticateResponse
AuthenticateResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:412
Response to the authenticate method.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:420
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
CancelNotification
CancelNotification =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:516
Notification to cancel ongoing operations for a session.
See protocol docs: Cancellation
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:524
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:530
The ID of the session to cancel operations for.
ClientCapabilities
ClientCapabilities =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:567
Capabilities supported by the client.
Advertised during initialization to inform the agent about available features and methods.
See protocol docs: Client Capabilities
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:575
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
auth?
optionalauth?:AuthCapabilities
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:589
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Authentication capabilities supported by the client.
Determines which authentication method types the agent may include
in its InitializeResponse.
elicitation?
optionalelicitation?:ElicitationCapabilities|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:600
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Elicitation capabilities supported by the client. Determines which elicitation modes the agent may use.
fs?
optionalfs?:FileSystemCapabilities
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:605
File system capabilities supported by the client. Determines which file operations the agent can request.
nes?
optionalnes?:ClientNesCapabilities|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:615
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
NES (Next Edit Suggestions) capabilities supported by the client.
positionEncodings?
optionalpositionEncodings?:PositionEncodingKind[]
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:625
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
The position encodings supported by the client, in order of preference.
terminal?
optionalterminal?:boolean
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:629
Whether the Client support all terminal* methods.
ContentBlock
ContentBlock =
TextContent&object|ImageContent&object|AudioContent&object|ResourceLink&object|EmbeddedResource&object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:838
Content blocks represent displayable information in the Agent Client Protocol.
They provide a structured way to handle various types of user-facing content—whether it's text from language models, images for analysis, or embedded resources for context.
Content blocks appear in:
- User prompts sent via
session/prompt - Language model output streamed through
session/updatenotifications - Progress updates and results from tool calls
This structure is compatible with the Model Context Protocol (MCP), enabling agents to seamlessly forward content from MCP tool outputs without transformation.
See protocol docs: Content
CreateTerminalRequest
CreateTerminalRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:964
Request to create a new terminal and execute a command.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:972
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
args?
optionalargs?:string[]
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:978
Array of command arguments.
command
command:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:982
The command to execute.
cwd?
optionalcwd?:string|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:986
Working directory for the command (absolute path).
env?
optionalenv?:EnvVariable[]
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:990
Environment variables for the command.
outputByteLimit?
optionaloutputByteLimit?:number|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1001
Maximum number of output bytes to retain.
When the limit is exceeded, the Client truncates from the beginning of the output to stay within the limit.
The Client MUST ensure truncation happens at a character boundary to maintain valid string output, even if this means the retained output is slightly less than the specified limit.
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1005
The session ID for this request.
CreateTerminalResponse
CreateTerminalResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1010
Response containing the ID of the created terminal.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1018
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
terminalId
terminalId:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1024
The unique identifier for the created terminal.
EmbeddedResource
EmbeddedResource =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1502
The contents of a resource, embedded into a prompt or tool call result.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1510
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
annotations?
optionalannotations?:Annotations|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1513
resource
resource:
EmbeddedResourceResource
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1514
ImageContent
ImageContent =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1760
An image provided to or from an LLM.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1768
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
annotations?
optionalannotations?:Annotations|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1771
data
data:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1772
mimeType
mimeType:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1773
uri?
optionaluri?:string|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1774
InitializeRequest
InitializeRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1817
Request parameters for the initialize method.
Sent by the client to establish connection and negotiate capabilities.
See protocol docs: Initialization
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1825
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
clientCapabilities?
optionalclientCapabilities?:ClientCapabilities
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1831
Capabilities supported by the client.
clientInfo?
optionalclientInfo?:Implementation|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1837
Information about the Client name and version sent to the Agent.
Note: in future versions of the protocol, this will be required.
protocolVersion
protocolVersion:
ProtocolVersion
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1841
The latest protocol version supported by the client.
InitializeResponse
InitializeResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1850
Response to the initialize method.
Contains the negotiated protocol version and agent capabilities.
See protocol docs: Initialization
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1858
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
agentCapabilities?
optionalagentCapabilities?:AgentCapabilities
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1864
Capabilities supported by the agent.
agentInfo?
optionalagentInfo?:Implementation|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1870
Information about the Agent name and version sent to the Client.
Note: in future versions of the protocol, this will be required.
authMethods?
optionalauthMethods?:AuthMethod[]
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1874
Authentication methods supported by the agent.
protocolVersion
protocolVersion:
ProtocolVersion
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:1881
The protocol version the client specified if supported by the agent, or the latest protocol version supported by the agent.
The client should disconnect, if it doesn't support this version.
LoadSessionRequest
LoadSessionRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2076
Request parameters for loading an existing session.
Only available if the Agent supports the loadSession capability.
See protocol docs: Loading Sessions
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2084
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
additionalDirectories?
optionaladditionalDirectories?:string[]
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2100
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Additional workspace roots to activate for this session. Each path must be absolute.
When omitted or empty, no additional roots are activated. When non-empty, this is the complete resulting additional-root list for the loaded session.
cwd
cwd:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2104
The working directory for this session.
mcpServers
mcpServers:
McpServer[]
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2108
List of MCP servers to connect to for this session.
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2112
The ID of the session to load.
LoadSessionResponse
LoadSessionResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2117
Response from loading an existing session.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2125
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
configOptions?
optionalconfigOptions?:SessionConfigOption[] |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2131
Initial session configuration options if supported by the Agent.
models?
optionalmodels?:SessionModelState|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2141
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Initial model state if supported by the Agent
modes?
optionalmodes?:SessionModeState|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:2147
Initial mode state if supported by the Agent
See protocol docs: Session Modes
NewSessionRequest
NewSessionRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3060
Request parameters for creating a new session.
See protocol docs: Creating a Session
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3068
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
additionalDirectories?
optionaladditionalDirectories?:string[]
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3084
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Additional workspace roots for this session. Each path must be absolute.
These expand the session's filesystem scope without changing cwd, which
remains the base for relative paths. When omitted or empty, no
additional roots are activated for the new session.
cwd
cwd:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3088
The working directory for this session. Must be an absolute path.
mcpServers
mcpServers:
McpServer[]
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3092
List of MCP (Model Context Protocol) servers the agent should connect to.
NewSessionResponse
NewSessionResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3099
Response from creating a new session.
See protocol docs: Creating a Session
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3107
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
configOptions?
optionalconfigOptions?:SessionConfigOption[] |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3113
Initial session configuration options if supported by the Agent.
models?
optionalmodels?:SessionModelState|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3123
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Initial model state if supported by the Agent
modes?
optionalmodes?:SessionModeState|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3129
Initial mode state if supported by the Agent
See protocol docs: Session Modes
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3135
Unique identifier for the created session.
Used in all subsequent requests for this conversation.
PermissionOption
PermissionOption =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3165
An option presented to the user when requesting permission.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3173
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
kind
kind:
PermissionOptionKind
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3179
Hint about the nature of this permission option.
name
name:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3183
Human-readable label to display to the user.
optionId
optionId:
PermissionOptionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3187
Unique identifier for this permission option.
PermissionOptionKind
PermissionOptionKind =
"allow_once"|"allow_always"|"reject_once"|"reject_always"
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3198
The type of permission option being presented to the user.
Helps clients choose appropriate icons and UI treatment.
AcpPlanEntry
AcpPlanEntry =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3234
A single entry in the execution plan.
Represents a task or goal that the assistant intends to accomplish as part of fulfilling the user's request. See protocol docs: Plan Entries
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3242
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
content
content:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3248
Human-readable description of what this task aims to accomplish.
priority
priority:
AcpPlanEntryPriority
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3253
The relative importance of this task. Used to indicate which tasks are most critical to the overall goal.
status
status:
AcpPlanEntryStatus
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3257
Current execution status of this task.
AcpPlanEntryPriority
AcpPlanEntryPriority =
"high"|"medium"|"low"
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3266
Priority levels for plan entries.
Used to indicate the relative importance or urgency of different tasks in the execution plan. See protocol docs: Plan Entries
AcpPlanEntryStatus
AcpPlanEntryStatus =
"pending"|"in_progress"|"completed"
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3273
Status of a plan entry in the execution flow.
Tracks the lifecycle of each task from planning through completion. See protocol docs: Plan Entries
PromptCapabilities
PromptCapabilities =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3309
Prompt capabilities supported by the agent in session/prompt requests.
Baseline agent functionality requires support for [ContentBlock::Text]
and [ContentBlock::ResourceLink] in prompt requests.
Other variants must be explicitly opted in to. Capabilities for different types of content in prompt requests.
Indicates which content types beyond the baseline (text and resource links) the agent can process.
See protocol docs: Prompt Capabilities
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3317
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
audio?
optionalaudio?:boolean
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3323
Agent supports [ContentBlock::Audio].
embeddedContext?
optionalembeddedContext?:boolean
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3330
Agent supports embedded context in session/prompt requests.
When enabled, the Client is allowed to include [ContentBlock::Resource]
in prompt requests for pieces of context that are referenced in the message.
image?
optionalimage?:boolean
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3334
Agent supports [ContentBlock::Image].
PromptRequest
PromptRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3343
Request parameters for sending a user prompt to the agent.
Contains the user's message and any additional context.
See protocol docs: User Message
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3351
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
messageId?
optionalmessageId?:string|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3367
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
A client-generated unique identifier for this user message.
If provided, the Agent SHOULD echo this value as userMessageId in the
[PromptResponse] to confirm it was recorded.
Both clients and agents MUST use UUID format for message IDs.
prompt
prompt:
ContentBlock[]
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3383
The blocks of content that compose the user's message.
As a baseline, the Agent MUST support [ContentBlock::Text] and [ContentBlock::ResourceLink],
while other variants are optionally enabled via [PromptCapabilities].
The Client MUST adapt its interface according to [PromptCapabilities].
The client MAY include referenced pieces of context as either
[ContentBlock::Resource] or [ContentBlock::ResourceLink].
When available, [ContentBlock::Resource] is preferred
as it avoids extra round-trips and allows the message to include
pieces of context from sources the agent may not have access to.
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3387
The ID of the session to send this user message to
PromptResponse
PromptResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3394
Response from processing a user prompt.
See protocol docs: Check for Completion
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3402
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
stopReason
stopReason:
StopReason
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3408
Indicates why the agent stopped processing the turn.
usage?
optionalusage?:Usage|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3418
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Token usage for this turn (optional).
userMessageId?
optionaluserMessageId?:string|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3432
Experimental
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
The acknowledged user message ID.
If the client provided a messageId in the [PromptRequest], the agent echoes it here
to confirm it was recorded. If the client did not provide one, the agent MAY assign one
and return it here. Absence of this field indicates the agent did not record a message ID.
ReadTextFileRequest
ReadTextFileRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3540
Request to read content from a text file.
Only available if the client supports the fs.readTextFile capability.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3548
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
limit?
optionallimit?:number|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3554
Maximum number of lines to read.
line?
optionalline?:number|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3558
Line number to start reading from (1-based).
path
path:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3562
Absolute path to the file to read.
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3566
The session ID for this request.
ReadTextFileResponse
ReadTextFileResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3571
Response containing the contents of a text file.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3579
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
content
content:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3582
ReleaseTerminalRequest
ReleaseTerminalRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3614
Request to release a terminal and free its resources.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3622
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3628
The session ID for this request.
terminalId
terminalId:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3632
The ID of the terminal to release.
ReleaseTerminalResponse
ReleaseTerminalResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3637
Response to terminal/release method
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3645
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
RequestPermissionRequest
RequestPermissionRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3676
Request for user permission to execute a tool call.
Sent when the agent needs authorization before performing a sensitive operation.
See protocol docs: Requesting Permission
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3684
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
options
options:
PermissionOption[]
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3690
Available permission options for the user to choose from.
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3694
The session ID for this request.
toolCall
toolCall:
ToolCallUpdate
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3698
Details about the tool call requiring permission.
RequestPermissionResponse
RequestPermissionResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3703
Response to a permission request.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3711
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
outcome
outcome:
RequestPermissionOutcome
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3717
The user's decision on the permission request.
ResourceLink
ResourceLink =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3722
A resource that the server is capable of reading, included in a prompt or tool call result.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3730
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
annotations?
optionalannotations?:Annotations|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3733
description?
optionaldescription?:string|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3734
mimeType?
optionalmimeType?:string|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3735
name
name:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3736
size?
optionalsize?:number|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3737
title?
optionaltitle?:string|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3738
uri
uri:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:3739
SessionNotification
SessionNotification =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4287
Notification containing a session update from the agent.
Used to stream real-time progress and results during prompt processing.
See protocol docs: Agent Reports Output
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4295
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4301
The ID of the session this update pertains to.
update
update:
SessionUpdate
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4305
The actual update content.
SessionUpdate
SessionUpdate =
ContentChunk&object|ContentChunk&object|ContentChunk&object|ToolCall&object|ToolCallUpdate&object|Plan&object|AvailableCommandsUpdate&object|CurrentModeUpdate&object|ConfigOptionUpdate&object|SessionInfoUpdate&object|UsageUpdate&object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4331
Different types of updates that can be sent during session processing.
These updates provide real-time feedback about the agent's progress.
See protocol docs: Agent Reports Output
SetSessionModeRequest
SetSessionModeRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4473
Request parameters for setting a session mode.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4481
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
modeId
modeId:
SessionModeId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4487
The ID of the mode to set.
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4491
The ID of the session to set the mode for.
SetSessionModeResponse
SetSessionModeResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4496
Response to session/set_mode method.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4504
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
StopReason
StopReason =
"end_turn"|"max_tokens"|"max_turn_requests"|"refusal"|"cancelled"
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4609
Reasons why an agent stops processing a prompt turn.
See protocol docs: Stop Reasons
TerminalOutputRequest
TerminalOutputRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4766
Request to get the current output and status of a terminal.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4774
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4780
The session ID for this request.
terminalId
terminalId:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4784
The ID of the terminal to get output from.
TerminalOutputResponse
TerminalOutputResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4789
Response containing the terminal output and exit status.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4797
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
exitStatus?
optionalexitStatus?:TerminalExitStatus|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4803
Exit status if the command has completed.
output
output:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4807
The terminal output captured so far.
truncated
truncated:
boolean
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4811
Whether the output was truncated due to byte limits.
TextContent
TextContent =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4816
Text provided to or from an LLM.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4824
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
annotations?
optionalannotations?:Annotations|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4827
text
text:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4828
ToolCallContent
ToolCallContent =
Content&object|Diff&object|Terminal&object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4939
Content produced by a tool call.
Tool calls can produce different types of content including standard content blocks (text, images) or file diffs.
See protocol docs: Content
ToolCallLocation
ToolCallLocation =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4958
A file location being accessed or modified by a tool.
Enables clients to implement "follow-along" features that track which files the agent is working with in real-time.
See protocol docs: Following the Agent
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4966
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
line?
optionalline?:number|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4972
Optional line number within the file.
path
path:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4976
The file path being accessed or modified.
ToolCallStatus
ToolCallStatus =
"pending"|"in_progress"|"completed"|"failed"
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:4985
Execution status of a tool call.
Tool calls progress through different statuses during their lifecycle.
See protocol docs: Status
ToolKind
ToolKind =
"read"|"edit"|"delete"|"move"|"search"|"execute"|"think"|"fetch"|"switch_mode"|"other"
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5046
Categories of tools that can be invoked.
Tool kinds help clients choose appropriate icons and optimize how they display tool execution progress.
See protocol docs: Creating
WaitForTerminalExitRequest
WaitForTerminalExitRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5150
Request to wait for a terminal command to exit.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5158
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5164
The session ID for this request.
terminalId
terminalId:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5168
The ID of the terminal to wait for.
WaitForTerminalExitResponse
WaitForTerminalExitResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5173
Response containing the exit status of a terminal command.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5181
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
exitCode?
optionalexitCode?:number|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5187
The process exit code (may be null if terminated by signal).
signal?
optionalsignal?:string|null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5191
The signal that terminated the process (may be null if exited normally).
WriteTextFileRequest
WriteTextFileRequest =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5211
Request to write content to a text file.
Only available if the client supports the fs.writeTextFile capability.
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5219
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
content
content:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5225
The text content to write to the file.
path
path:
string
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5229
Absolute path to the file to write.
sessionId
sessionId:
SessionId
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5233
The session ID for this request.
WriteTextFileResponse
WriteTextFileResponse =
object
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5238
Response to fs/write_text_file
Properties
_meta?
optional_meta?: {[key:string]:unknown; } |null
Defined in: node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts:5246
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Variables
PROTOCOL_VERSION
constPROTOCOL_VERSION:number=ACP_PROTOCOL_VERSION
Defined in: src/acp/protocol.ts:116
Latest stable ACP protocol version supported by the upstream SDK.
Functions
getAcpClientHandle()
getAcpClientHandle():
AcpClientHandle|null
Defined in: src/acp/context.ts:23
Returns
AcpClientHandle | null
withAcpClientContext()
withAcpClientContext<
T>(handle,fn):Promise<T>
Defined in: src/acp/context.ts:27
Type Parameters
T
T
Parameters
handle
fn
() => Promise<T>
Returns
Promise<T>
coerceTextPrompt()
coerceTextPrompt(
prompt):string
Defined in: src/acp/protocol.ts:132
Concatenate the text content of an inbound ACP prompt.
The ACP session/prompt payload is a list of content blocks;
Maniac's chat() accepts a single message string. For v1 we
collapse text blocks into one string and ignore image/audio
blocks (the inference adapters that accept multimodal input read
them off the inference request directly). Mirrors Python
coerce_text_prompt.
Parameters
prompt
unknown[]
Returns
string
buildAgentCapabilities()
buildAgentCapabilities(
options?):AgentCapabilities
Defined in: src/acp/protocol.ts:153
Build an AgentCapabilities instance.
Tightening the constructor here lets the server adapter call
through with kwargs derived from the underlying Agent.model
capabilities without having to know the SDK's nested-defaulting
discipline. Mirrors Python build_agent_capabilities.
Parameters
options?
loadSession?
boolean
promptImage?
boolean
promptAudio?
boolean
promptEmbeddedContext?
boolean
Returns
serveAcpStdio()
serveAcpStdio(
app,agentId,options?):Promise<void>
Defined in: src/acp/server.ts:424
Run an ACP server over stdio.
This is the canonical ACP transport used by Zed, Neovim, and the
Gemini CLI when they spawn the agent as a subprocess and pipe
stdin / stdout to its event loop. Mirrors Python serve_acp_stdio.
Parameters
app
agentId
string
options?
agentName?
string
agentTitle?
string
agentVersion?
string
Returns
Promise<void>
createTranslatorState()
createTranslatorState():
TranslatorState
Defined in: src/acp/translator.ts:57