2026-01-14 02:59:52 +00:00
|
|
|
# Configuration Workflow: TypeDialog → Nickel → TOML → Rust\n\nComplete documentation of the configuration pipeline that transforms interactive user input into production Rust service configurations.\n\n## Overview\n\nThe provisioning platform uses a **four-stage configuration workflow** that leverages TypeDialog for interactive configuration,\nNickel for type-safe composition, and TOML for service consumption:\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│ Stage 1: User Interaction (TypeDialog) │\n│ - Can use Nickel configuration as default values │\n│ if use provisioning/platform/config/ it will be updated │\n│ - Interactive form (web/tui/cli) │\n│ - Real-time constraint validation │\n│ - Generates Nickel configuration │\n└────────────────┬────────────────────────────────────────────────┘\n │\n ▼\n┌─────────────────────────────────────────────────────────────────┐\n│ Stage 2: Composition (Nickel) │\n│ - Base defaults imported │\n│ - Mode overlay applied │\n│ - Validators enforce business rules │\n│ - Produces Nickel config file │\n└────────────────┬────────────────────────────────────────────────┘\n │\n ▼\n┌─────────────────────────────────────────────────────────────────┐\n│ Stage 3: Export (Nickel → TOML) │\n│ - Nickel config evaluated │\n│ - Exported to TOML format │\n│ - Saved to provisioning/platform/config/ │\n└────────────────┬────────────────────────────────────────────────┘\n │\n ▼\n┌─────────────────────────────────────────────────────────────────┐\n│ Stage 4: Runtime (Rust Services) │\n│ - Services load TOML configuration │\n│ - Environment variables override specific values │\n│ - Start services with final configuration │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Stage 1: User Interaction (TypeDialog)\n\n### Purpose\n\nCollect configuration from users through an interactive, constraint-aware interface.\n\n### Workflow\n\n```\n# Launch interactive configuration wizard\nnu scripts/configure.nu orchestrator solo --backend web\n```\n\n### What Happens\n\n1. **Form Loads**\n - TypeDialog reads `forms/orchestrator-form.toml`\n - Form displays configuration sections\n - Constraints from `constraints.toml` enforce min/max values\n - Environment variables pop
|