Expand description
Curated config-section endpoints. Used by the /config page in the
web dashboard to navigate the schema by curated section rather than
raw prop paths. OpenAPI is authoritative for the exact route set.
Structs§
- Agent
Options Response - All alias-reference choices an agent form needs, in one round-trip.
Channels and model model_providers are returned in dotted form
(
telegram.default,anthropic.work); the bundle/profile/namespace lists are bare HashMap keys. - Models
Query - Section
Item Path - Section
Path - Section
Select Body POST /api/config/sections/<section>/items/<key>— instantiate the selected item in the live config (idempotent) and return the dotted prefix the frontend should fetch fields under.
Functions§
- build_
agent_ options - Build the
AgentOptionsResponsefrom a config snapshot. Pure function so tests can drive the same code path the handler runs without spinning up anAppState. - derive_
section_ status - Pure derivation of the section status response from a config snapshot.
needs_quickstartisfalseiff at least one enabled[agents.<alias>]block has a resolved model provider with a selected model plus resolved risk/runtime profile refs. A provider without a bound, runnable agent is not a completion signal: chat dispatch still bounces with a setup error in that state. - handle_
agent_ options GET /api/config/agent-options— every alias-reference list the agent form needs, derived from the live config. Mirrors the lists the TUI computes locally for its alias pickers.- handle_
catalog GET /api/config/catalog— list every model provider the CLI wizard knows about. The dashboard shows these in the “+ Add model provider” picker so CLI / web stay in sync.- handle_
catalog_ models GET /api/config/catalog/models?model_provider=<name>— fetch the model list for one model_provider. Same code path the CLI wizard uses (zeroclaw_providers::create_model_provider(...).list_models()), which goes through the models.dev cached catalog for OpenAI / Anthropic / Gemini, the live/v1/modelsendpoint for OpenRouter, etc.- handle_
section_ picker GET /api/config/sections/<section>— picker items for that section.- handle_
section_ select - handle_
section_ status GET /api/config/status— boolean signal for the dashboard’s fresh-install redirect. The daemon writes a defaultconfig.tomlon first init, so file existence isn’t a useful “is the user new?” check. Section status: ready iff at least one agent has itsmodel_provider,risk_profile, andruntime_profilebound.- handle_
sections GET /api/config/sections— list every top-level config section.