smelt.mode¶
Availability: Some functions need the terminal UI; each function below says which.
Agent-mode selector. smelt.mode.current() reads the active mode, smelt.mode.set(v) sets it in a TUI session, and smelt.mode.cycle_list() lists the configured cycle.
smelt.mode.current¶
Availability: Everywhere, including headless mode.
Return the active agent mode name.
smelt.mode.cycle¶
Availability: Terminal UI only; raises in headless mode.
Advance the active agent mode to the next entry in smelt.mode.cycle_list(),
wrapping at the end. No-op when the cycle is empty.
smelt.mode.cycle_list¶
Availability: Everywhere, including headless mode.
Return the configured agent-mode cycle; falls back to the built-in default when the user has not customized one.
smelt.mode.get¶
Types: smelt.mode.Mode
Availability: Everywhere, including headless mode.
Return a copy of the registered mode definition for name, or nil when unknown.
smelt.mode.list¶
Types: smelt.mode.Mode
Availability: Everywhere, including headless mode.
Return copies of registered mode definitions in registration order.
smelt.mode.register¶
Availability: Everywhere, including headless mode.
Register an agent mode from { name, label?, icon?, hl_group?, note?,
permissions?, after? }. Registering a new name appends it, or inserts it
after an existing after name. Registering an existing name replaces its
definition without changing its position. Raises when name is missing.
smelt.mode.set¶
Availability: Terminal UI only; raises in headless mode.
Set the active agent mode. The change is applied immediately to the UI and persisted according to the active remember policy.