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

Copy Markdown View Source

A single entry in the execution plan. content, priority, and status are all required per the ACP schema (no x-deserialize-default-on-error leniency for this struct's own fields) -- a malformed value for any of them fails the whole entry's decode; the caller (Plan.from_json/1) skips entries that fail to decode rather than failing the whole plan.

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

Summary

Functions

Total: never raises. Missing/wrong-typed content, or an unrecognized priority/status value, fails the whole entry -- these three fields are required with no schema-documented default.

Types

priority()

@type priority() :: :high | :medium | :low

status()

@type status() :: :pending | :in_progress | :completed

t()

@type t() :: %Raxol.AgentClientProtocol.Schema.PlanEntry{
  _meta: map(),
  content: String.t(),
  priority: priority(),
  status: status()
}

Functions

from_json(map)

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

Total: never raises. Missing/wrong-typed content, or an unrecognized priority/status value, fails the whole entry -- these three fields are required with no schema-documented default.

new(content, priority, status)

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

to_json(entry)

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