Raxol.AgentClientProtocol.Schema.AgentTypes.InitializeRequest (Raxol Agent Client Protocol v0.1.0)

Copy Markdown View Source

The initialize request, sent by the client to negotiate protocol version and capabilities.

Ported from the MIT f1729/agent_client_protocol (c) 2025 f1729; see NOTICE.md.

Summary

Functions

Decodes an initialize request. Uses Raxol.AgentClientProtocol.Schema.Version.coerce/1 (tolerant of legacy string protocol versions from older clients, e.g. Zed's date-string handshake) since this is the initial handshake.

Types

t()

@type t() :: %Raxol.AgentClientProtocol.Schema.AgentTypes.InitializeRequest{
  _meta: map(),
  client_capabilities:
    Raxol.AgentClientProtocol.Schema.ClientTypes.ClientCapabilities.t() | nil,
  client_info:
    Raxol.AgentClientProtocol.Schema.AgentTypes.Implementation.t() | nil,
  protocol_version: Raxol.AgentClientProtocol.Schema.Version.t()
}

Functions

from_json(map)

@spec from_json(term()) :: {:ok, t()} | {:error, term()}

Decodes an initialize request. Uses Raxol.AgentClientProtocol.Schema.Version.coerce/1 (tolerant of legacy string protocol versions from older clients, e.g. Zed's date-string handshake) since this is the initial handshake.

new(protocol_version)

to_json(r)

@spec to_json(t()) :: map()