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

Copy Markdown View Source

The sender or recipient of messages and data in a conversation.

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

Summary

Functions

Total: an unrecognized role string returns {:error, _} rather than raising.

Types

t()

@type t() :: :assistant | :user

Functions

decode(other)

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

Total: an unrecognized role string returns {:error, _} rather than raising.

encode(atom)

@spec encode(t()) :: String.t()