Expand description
Onboarding 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 ONBOARDING_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
both the
/onboardstep-through and the/configexplorer.
Constants§
- ONBOARDING_
SECTIONS - Canonical ordering of onboarding sections, walked by
/onboardand thezeroclaw onboardCLI in order. The dashboard renders Next/Finish navigation against this list. Every consumer that needs section ordering reads from here.
Functions§
- is_
known_ section - True when
keyparses as a knownSection. - 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 onboard flow, and the future TUI config editor all call this rather than maintaining parallel tables. - section_
index - Canonical-order index of
sectioninONBOARDING_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.