Raxol.AgentClientProtocol.Schema.ClientTypes.RequestPermissionRequest (Raxol Agent Client Protocol v0.1.0)

Copy Markdown View Source

Request from the agent asking the client for permission to perform a tool call, sent before a sensitive operation.

tool_call is a Raxol.AgentClientProtocol.Schema.ToolCallUpdate. Per the established convention in this schema layer (see Plan.entries), options decodes leniently -- a missing/non-list value defaults to [] and individual options that fail to decode are skipped, even though the oracle schema marks options as required; only sessionId and toolCall can fail this request's decode.

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

Summary

Functions

Total: never raises. A missing/non-string sessionId, or a missing/ unparseable toolCall, is the only failure mode -- options decodes leniently (see moduledoc).

Types

t()

@type t() :: %Raxol.AgentClientProtocol.Schema.ClientTypes.RequestPermissionRequest{
  _meta: map(),
  options: [Raxol.AgentClientProtocol.Schema.ClientTypes.PermissionOption.t()],
  session_id: String.t(),
  tool_call: Raxol.AgentClientProtocol.Schema.ToolCallUpdate.t()
}

Functions

from_json(map)

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

Total: never raises. A missing/non-string sessionId, or a missing/ unparseable toolCall, is the only failure mode -- options decodes leniently (see moduledoc).

new(session_id, tool_call, options \\ [])

to_json(r)

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