Skip to main content

Module initialize

Module initialize 

Source
Expand description

initialize — the editor’s first call, the agent’s first reply.

Source of truth: crates/protocol-droid-schema/spec/acp/v1.25.0/schema.json under $defs.InitializeRequest and $defs.InitializeResponse.

§The minimum-viable initialize

A complete wire round-trip needs:

  • the protocolVersion integer on both sides
  • the clientCapabilities and agentCapabilities blocks
  • the optional clientInfo / agentInfo block
  • the optional authMethods on the response (gated on the client advertising auth.terminal = true)

The capability shapes are nested (fs, terminal, promptCapabilities, mcpCapabilities, etc.). A consumer that does not need the nested surface can leave them at the schema’s defaults and the round-trip is still well-formed.

§Why a hand-rolled ClientCapabilities is OK here

The full set of capability types the schema names (FileSystemCapabilities, AuthCapabilities, PromptCapabilities, McpCapabilities, SessionCapabilities, ClientSessionCapabilities, ElicitationCapabilities, …) is the bulk of the 178-definition schema. Building every one of them is its own commit. This module ships the minimum the initialize round-trip needs: a ClientCapabilities and AgentCapabilities that pass through the schema’s default values for the un-built sub-types. A future increment fills in the per-capability shapes.

Structs§

AgentCapabilities
The agent’s capabilities block. Source of truth: schema.json::$defs.AgentCapabilities.
AuthCapabilities
The auth capabilities the client advertises. The only field the v1.25.0 schema names is terminal (whether the client can present a terminal-based auth flow).
AuthMethodAgent
The agent variant of AuthMethod.
AuthMethodTerminal
The terminal variant of AuthMethod.
ClientCapabilities
The editor’s capabilities block. Source of truth: schema.json::$defs.ClientCapabilities.
FileSystemCapabilities
The file-system capabilities the client advertises.
InitializeRequest
The initialize request body. Sent by the editor to the agent as its first call.
InitializeResponse
The initialize response body. Sent by the agent in reply to InitializeRequest.
McpCapabilities
The MCP capabilities the agent advertises. The agent is itself an MCP client; these flags say which transports the agent speaks.
PromptCapabilities
The prompt capabilities the agent advertises.

Enums§

AuthMethod
The auth method the agent advertises. The schema is a discriminated union (AuthMethodAgent / AuthMethodTerminal); the typed form is the same enum shape.