mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-27 08:00:17 +00:00
Refactor the setup wizard to work with both postgres and libsql feature flags. Previously the wizard was gated behind #[cfg(feature = "postgres")] only, so libsql-only builds would print an error on `ironclaw onboard`. - Add libsql fields to Settings (database_backend, libsql_path, libsql_url) - Split wizard database/migration/secrets methods into feature-gated variants - Add step_database_libsql() with local path and Turso remote replica prompts - Update setup/mod.rs and main.rs feature gates to any(postgres, libsql) - Extend check_onboard_needed() to detect libsql database presence Co-Authored-By: Claude Opus 4.6 <[email protected]>
35 lines
936 B
Rust
35 lines
936 B
Rust
//! Interactive setup wizard for IronClaw.
|
|
//!
|
|
//! Provides a guided setup experience for:
|
|
//! 1. Database connection
|
|
//! 2. Security (secrets master key)
|
|
//! 3. NEAR AI authentication
|
|
//! 4. Model selection
|
|
//! 5. Embeddings
|
|
//! 6. Channel configuration (HTTP, Telegram, etc.)
|
|
//! 7. Heartbeat (background tasks)
|
|
//!
|
|
//! # Example
|
|
//!
|
|
//! ```ignore
|
|
//! use ironclaw::setup::SetupWizard;
|
|
//!
|
|
//! let mut wizard = SetupWizard::new();
|
|
//! wizard.run().await?;
|
|
//! ```
|
|
|
|
mod channels;
|
|
mod prompts;
|
|
#[cfg(any(feature = "postgres", feature = "libsql"))]
|
|
mod wizard;
|
|
|
|
pub use channels::{
|
|
SecretsContext, setup_http, setup_telegram, setup_tunnel, validate_telegram_token,
|
|
};
|
|
pub use prompts::{
|
|
confirm, input, optional_input, print_error, print_header, print_info, print_step,
|
|
print_success, secret_input, select_many, select_one,
|
|
};
|
|
#[cfg(any(feature = "postgres", feature = "libsql"))]
|
|
pub use wizard::{SetupConfig, SetupWizard};
|