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

Copy Markdown View Source

Unstable ACP types that are not yet part of the stable protocol surface — the Elixir counterpart of the Rust reference implementation's #[cfg(feature = "unstable_*")]-gated types: session model selection (session/set_model), generic session config options (session/set_config_option), session fork/resume/list (session/fork, session/resume, session/list), and their capability flags. These may be removed or changed at any point; callers should gate their use on the corresponding Raxol.AgentClientProtocol.Schema.AgentTypes. SessionCapabilities fields (:list, :fork, :resume) rather than assuming availability.

Every struct here carries an _meta map (default %{}), total on decode via the shared Raxol.AgentClientProtocol.Schema.AgentTypes decode helpers (fetch/2, decode_list/2, decode_optional/3, extract_meta/2, put_meta/2) — unrecognized top-level wire keys are folded into _meta on decode and re-emitted on encode. from_json/1 never raises.

Cross-module references

SessionInfoUpdate uses Raxol.AgentClientProtocol.Schema.MaybeUndefined for its three-state undefined/null/value fields. ForkSessionRequest/ResumeSessionRequest.mcp_servers and ForkSessionResponse/ResumeSessionResponse.modes reference Raxol.AgentClientProtocol.Schema.AgentTypes.{McpServer, SessionModeState}.

Note: ACP.SessionUpdate's unstable variants (config_option_update, session_info_update) are wired in Raxol.AgentClientProtocol.Schema.SessionUpdate (session_update.ex), not here. This file defines only the payload structs those variants carry (ConfigOptionUpdate, SessionInfoUpdate).

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