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

Copy Markdown View Source

Input specification for an AvailableCommand: an untagged union with a single documented variant, unstructured (free text typed after the command name). Per package convention, tagged-tuple unions don't get a Jason.Encoder impl of their own.

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

Summary

Functions

Total: never raises. A map carrying "hint" delegates to UnstructuredCommandInput.from_json/1; any other map still decodes as :unstructured with an empty hint (matching upstream's fallback), so only a non-map argument fails.

Types

Functions

from_json(map)

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

Total: never raises. A map carrying "hint" delegates to UnstructuredCommandInput.from_json/1; any other map still decodes as :unstructured with an empty hint (matching upstream's fallback), so only a non-map argument fails.

to_json(arg)

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