Skip to main content

Module sections

Module sections 

Source
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.
SectionShape
UI rendering shape for a section. Drives picker / form dispatch on the /config curated 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_profilesRisk profiles, providers.modelsModel 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 key parses as a known Section.
section_for_path
First segment of a dotted property path mapped back to the section it lives under, or None for 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 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 Quickstart flow, and the future TUI config editor all call this rather than maintaining parallel tables.
section_index
Canonical-order index of section in QUICKSTART_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.