Expand description
Curated sections surface — a flat ordered set of Sections the
operator walks (new install) or scans (returning user) to configure
a working ZeroClaw deployment.
Every fact about a section (its enum variant, its on-the-wire key,
its UI shape, its help blurb, its canonical position) lives in ONE
table — the sections! invocation below. The macro expands that
table into the Section enum, every per-variant match helper,
and the QUICKSTART_SECTIONS const, so adding a section is exactly
one row, no hand-listed variant set anywhere else.
Consumers (CLI runtime, gateway, dashboard) dispatch off this enum; drift is a compile error.
Enums§
- Section
- One pickable section. The variant ordering follows the
sections!macro invocation. - Section
Shape - UI rendering shape for a section. Drives picker / form dispatch on
the
/configcurated section explorer and the Quickstart flow.
Constants§
- QUICKSTART_
SECTIONS - Canonical ordering of sections enumerated by the Quickstart flow and the curated section explorer. The dashboard renders Next/Finish navigation against this list. Every consumer that needs section ordering reads from here.
Functions§
- humanize_
section_ key - Humanize a section wire key for display (
risk_profiles→Risk profiles,providers.models→Model providers). Single source of truth for section labels across the gateway dashboard, zerocode Config pane, and docs. Specific wording overrides are listed explicitly; everything else is mechanically title-cased from the key. - is_
known_ section - True when
keyparses as a knownSection. - section_
for_ path - First segment of a dotted property path mapped back to the section
it lives under, or
Nonefor non-section paths (onboard_state.completed_sections, etc.). - section_
has_ signal - Does this section show any signal of having been touched on this install? Used by callers (RPC config-list filtering, lifecycle dispatch) to decide whether to surface a section as “untouched”.
- section_
help - Help blurb for a section key, covering both
Sectionvariants and the long tail of top-levelConfigfields the dashboard / TUI config editor surface (gateway, scheduler, observability, …). Single source of truth shared by every surface — the gateway sidebar, the CLI Quickstart flow, and the future TUI config editor all call this rather than maintaining parallel tables. - section_
index - Canonical-order index of
sectioninQUICKSTART_SECTIONS. AlwaysSomefor any validSectionvariant — the const includes every variant by construction. ReturnsOptionfor API symmetry withsection_index_for_key, which can fail on unknown keys. - section_
index_ for_ key - Canonical-order index for a wire key, or
Noneif the key isn’t a knownSection. Used by gateway / dashboard sort comparators that take string keys from the HTTP layer.