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

Copy Markdown View Source

Text-based resource contents.

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

Summary

Functions

Total: never raises. Missing/non-string text or uri is the only failure mode.

Types

t()

@type t() :: %Raxol.AgentClientProtocol.Schema.TextResourceContents{
  _meta: map(),
  mime_type: String.t() | nil,
  text: String.t(),
  uri: String.t()
}

Functions

from_json(map)

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

Total: never raises. Missing/non-string text or uri is the only failure mode.

new(text, uri)

@spec new(String.t(), String.t()) :: t()

to_json(trc)

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