Skip to main content

Module sections

Module sections 

Source
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.
SectionShape
UI rendering shape for a section. Drives picker / form dispatch on both the /onboard step-through and the /config explorer.

Constants§

ONBOARDING_SECTIONS
Canonical ordering of onboarding sections, walked by /onboard and the zeroclaw onboard CLI 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 key parses as a known Section.
section_help
Help blurb for a section key, covering both Section variants and the long tail of top-level Config fields 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 section in ONBOARDING_SECTIONS. Always Some for any valid Section variant — the const includes every variant by construction. Returns Option for API symmetry with section_index_for_key, which can fail on unknown keys.
section_index_for_key
Canonical-order index for a wire key, or None if the key isn’t a known Section. Used by gateway / dashboard sort comparators that take string keys from the HTTP layer.