Raxol.AgentClientProtocol.Schema.Annotations (Raxol Agent Client Protocol v0.1.0)

Copy Markdown View Source

Optional annotations for the client (audience, priority, last-modified). Every field is optional and decode-lenient: a malformed value defaults to absent rather than failing the whole Annotations.

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

Summary

Functions

Total: never raises. Malformed optional fields default to absent (never fail the whole object).

Types

t()

@type t() :: %Raxol.AgentClientProtocol.Schema.Annotations{
  _meta: map(),
  audience: [Raxol.AgentClientProtocol.Schema.Role.t()] | nil,
  last_modified: String.t() | nil,
  priority: float() | nil
}

Functions

from_json(map)

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

Total: never raises. Malformed optional fields default to absent (never fail the whole object).

new()

@spec new() :: t()

to_json(a)

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