Skip to main content

Module presets

Module presets 

Source
Expand description

Quickstart preset tables and submission shape.

Two preset tables — RISK_PRESETS and RUNTIME_PRESETS — give the Quickstart UI a fixed-shape menu of named, opinionated profile defaults the user can pick from. Each preset carries:

  • preset_name — the alias key written to config when picked (risk-profiles.<preset_name> / runtime-profiles.<preset_name>). Never default. The preset is canonical: picking it again overwrites the alias of the same name with the preset’s struct values.
  • label / help — the strings the UI renders.
  • values — a struct literal of RiskProfileConfig / RuntimeProfileConfig field values. The Quickstart writes these verbatim into the corresponding config table on apply.

Adding or removing a preset is one row in the risk_presets! / runtime_presets! table below; every consumer dispatches off &'static [RiskPreset] / &'static [RuntimePreset] so drift is impossible.

BuilderSubmission is the single payload shape both surfaces (web gateway HTTP route, zerocode RPC route) and the CLI build and hand to zeroclaw-runtime’s apply path. The runtime validates and writes atomically. There is exactly one type, one validator, one apply function — surface code never assembles config directly.

Re-exports§

pub use crate::multi_agent::MemoryBackendKind as MemoryChoice;

Structs§

AgentIdentity
Agent identity payload from the Agent step. Personality file authoring is handled by the existing PersonalityEditor widget; Quickstart passes only the chosen personality_file path here.
BuilderSubmission
The complete Quickstart submission both surfaces hand to zeroclaw-runtime::quickstart::apply (and pre-validate via validate_only). Single source of truth; assembling config outside this type is a layering bug.
ChannelQuickStart
Single-channel entry submitted by the Channels widget. The Channels selector renders a Vec<ChannelQuickStart>; Quickstart writes one channels.<channel_type>.<alias> block per entry.
ModelProviderChoice
Model provider widget submission. The Quickstart UI surfaces only the “greatest hits” fields an agent literally cannot start without; everything else (retry policy, rate limits, custom headers) lives in the post-Quickstart config editor.
QuickstartPeerGroup
Peer-group entry staged in the Quickstart. Maps 1:1 to a [peer-groups.<name>] table written at apply time. The channel field carries a <type>.<alias> ref pointing at either a staged channel from the same submission or a pre-existing one.
QuickstartPersonalityFile
One personality file staged for write during Quickstart apply. The runtime writes <workspace>/<filename> with content, overwriting if the path already exists.
RiskPreset
One row in the Risk preset table. The Quickstart UI renders the label, the runtime writes values to risk-profiles.<preset_name> on apply.
RuntimePreset
One row in the Runtime preset table. Same shape and contract as RiskPreset — see its docs for the per-field semantics.

Enums§

SelectorChoice
Dual-mode selector outcome. Every Quickstart selector lets the user either pick an existing configured alias or create a fresh one; this enum carries which path was taken so the runtime apply path can branch on Existing (record an alias ref only, no writes to that section) vs Fresh (write a new entry).

Constants§

RISK_PRESETS
Canonical Risk preset table. Order is the order the picker renders. Add or remove a preset by editing one row here; every consumer reads from the slice so nothing else has to change.
RUNTIME_PRESETS
Canonical Runtime preset table. See RISK_PRESETS for the ordering / consumer contract.

Functions§

risk_preset
Look up a Risk preset by its preset_name. Returns None for unknown keys.
runtime_preset
Look up a Runtime preset by its preset_name. Returns None for unknown keys.