ExMCP.ACP.Adapters.ZCode.Config (ex_mcp v1.3.0)

Copy Markdown View Source

Pure config and mode helpers for the ZCode ACP adapter.

ZCode has five operational modes (plan, build, edit, auto, yolo) that correspond to ACP SessionMode IDs. Config options expose model selection and thought-level (reasoning effort) control.

Summary

Functions

Builds the dynamic ACP config options from adapter state.

Returns the static mode list for ZCode in canonical order.

Normalizes a mode ID to a string, defaulting to the built-in default.

Normalizes a requested mode ID, returning an error for unknown modes.

Functions

config_options(state)

@spec config_options(map()) :: [map()]

Builds the dynamic ACP config options from adapter state.

default_mode()

@spec default_mode() :: String.t()

default_thought_level()

@spec default_thought_level() :: String.t()

modes()

@spec modes() :: [map()]

Returns the static mode list for ZCode in canonical order.

normalize_mode_id(mode_id)

@spec normalize_mode_id(any()) :: String.t()

Normalizes a mode ID to a string, defaulting to the built-in default.

normalize_requested_mode(mode_id)

@spec normalize_requested_mode(any()) :: {:ok, String.t()} | {:error, String.t()}

Normalizes a requested mode ID, returning an error for unknown modes.