Raxol.AgentClientProtocol.Rpc.Notification (Raxol Agent Client Protocol v0.1.0)

Copy Markdown View Source

JSON-RPC 2.0 Notification object: method + optional params, no id, no response expected.

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

Summary

Functions

Decode a Notification object. Total: a missing/wrong-typed method returns {:error, :invalid_request} rather than raising.

Types

t()

@type t() :: %Raxol.AgentClientProtocol.Rpc.Notification{
  _meta: map(),
  method: String.t(),
  params: any() | nil
}

Functions

from_json(map)

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

Decode a Notification object. Total: a missing/wrong-typed method returns {:error, :invalid_request} rather than raising.

new(method, params \\ nil)

@spec new(String.t(), any() | nil) :: t()

to_json(notif)

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