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

Copy Markdown View Source

An execution plan for accomplishing complex tasks: an ordered list of PlanEntry structs. Per the ACP schema, entries is decode-lenient at both levels: a missing/wrong-typed entries field defaults to [] (never fails the whole plan), and entries that individually fail to decode are skipped rather than aborting the list (x-deserialize-skip-invalid-items).

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

Summary

Functions

Total: never raises, even for a non-map argument -- a value that isn't a wire object decodes as an empty plan with no _meta, since entries alone already tolerates every other malformed shape.

Types

t()

@type t() :: %Raxol.AgentClientProtocol.Schema.Plan{
  _meta: map(),
  entries: [Raxol.AgentClientProtocol.Schema.PlanEntry.t()]
}

Functions

from_json(map)

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

Total: never raises, even for a non-map argument -- a value that isn't a wire object decodes as an empty plan with no _meta, since entries alone already tolerates every other malformed shape.

new(entries)

to_json(plan)

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