mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-27 08:00:17 +00:00
* refactor: remove restart infrastructure and generalize Telegram-specific code Remove the gateway restart mechanism (hot-activation works, restart won't fix activation failures) and generalize Telegram-specific hardcoded checks so all WASM channels get equal treatment. Part 1 - Remove restart infrastructure: - Remove needs_restart from ActionResponse, restart_requested from GatewayState - Remove gateway_restart_handler, /api/gateway/restart route, exit code 75 - Remove restart overlay JS/CSS (dead code - restartGateway() never called) - Surface actual activation errors instead of suggesting restart Part 2 - Generalize Telegram-specific code: - Replace telegram_owner_id: Option<i64> with generic wasm_channel_owner_ids: HashMap<String, i64> (backwards-compatible via TELEGRAM_OWNER_ID env var) - Pairing status check now applies to all active WASM channels - All channels get 3-step stepper in web UI, remove "coming soon" note - Remove dead setup_telegram() code (~700 lines) - Telegram's capabilities.json declares required_secrets, so the generic setup_wasm_channel() path handles it Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * test: add Settings::set() test for wasm_channel_owner_ids Addresses review feedback: verify that setting per-channel owner IDs via the dotted-path Settings::set() API works correctly with the new HashMap<String, i64> type. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * fix(web): refresh extension stepper after pairing approval loadPairingRequests only refreshed the pairing section, not the stepper status. Call loadExtensions() instead so the stepper updates from "Awaiting Pairing" to "Active" immediately after approval. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
34 lines
965 B
Rust
34 lines
965 B
Rust
//! Interactive setup wizard for IronClaw.
|
|
//!
|
|
//! Provides a guided setup experience for:
|
|
//! 1. Database connection
|
|
//! 2. Security (secrets master key)
|
|
//! 3. Inference provider selection
|
|
//! 4. Model selection
|
|
//! 5. Embeddings
|
|
//! 6. Channel configuration (HTTP, Telegram, etc.)
|
|
//! 7. Extensions (tool installation from registry)
|
|
//! 8. 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::{ChannelSetupError, SecretsContext, setup_http, setup_tunnel};
|
|
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};
|