// file: crates/ksp-app-wallet-desk/src/lib.rs // version: 2 //! Tauri desktop application shell for KSP Wallet management and inspection. #![forbid(unsafe_code)] #![deny(unreachable_pub)] #![warn(missing_docs)] mod app_state; mod bootstrap; mod constants; mod dto_common; mod errors; mod frontend_logging; mod logging_runtime; mod splash; mod tauri; mod tw_main; mod tw_splash; mod wallet_config; /// Runs the KSP wallet desktop application. pub use self::tauri::run; /// Shared Wallet Desk application state managed by Tauri. pub(crate) use self::app_state::AppState; /// Crate-internal Logging startup state shared by the application state. pub(crate) use self::bootstrap::LoggingStartup; /// Builds the Config management facade from the common KSP CLI bootstrap contract. pub(crate) use self::bootstrap::config_management; /// Initializes the Logging runtime from Config, with the same bounded fallback policy as Config Desk. pub(crate) use self::bootstrap::initialize_logging; /// Loads the concrete Wallet Desk Config composite. pub(crate) use self::bootstrap::load_wallet_desk_composite; /// Resolves and validates one required standard-document component from the Wallet Desk composite. pub(crate) use self::bootstrap::required_composite_component_profile; /// Composite-local identifier for the Logging standard document. pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_LOGGING; /// Composite-local identifier for the HTTP Transport standard document. pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT; /// Composite-local identifier for the Wallet standard document. pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_WALLET; /// Structured domain used while bootstrapping Config and Logging. pub(crate) use self::constants::TRACING_DOMAIN_BOOTSTRAP; /// Structured domain used by technical frontend events. pub(crate) use self::constants::TRACING_DOMAIN_FRONTEND; /// Structured domain used by the Wallet Desk shell. pub(crate) use self::constants::TRACING_DOMAIN_SHELL; /// Structured domain used while preparing Wallet filesystem roots. pub(crate) use self::constants::TRACING_DOMAIN_WALLET_CONFIG; /// Structured domain used by Tauri window lifecycle operations. pub(crate) use self::constants::TRACING_DOMAIN_WINDOWS; /// Owning target for backend events emitted by Wallet Desk. pub(crate) use self::constants::TRACING_TARGET; /// Owning target for generic frontend events emitted through the KSP bridge. pub(crate) use self::constants::TRACING_TARGET_FRONTEND; /// Owning target for main-window frontend events. pub(crate) use self::constants::TRACING_TARGET_FRONTEND_MAIN; /// Owning target for splash-window frontend events. pub(crate) use self::constants::TRACING_TARGET_FRONTEND_SPLASH; /// Safe command error projection exposed to Tauri commands. pub(crate) use self::dto_common::CommandErrorDto; /// Initial application/runtime snapshot exposed to the Wallet Desk shell. pub(crate) use self::dto_common::RuntimeStatusDto; /// Shared Wallet Desk application state is internally inconsistent. pub(crate) use self::errors::ERROR_CODE_APP_STATE_INVALID; /// Shared Wallet Desk runtime state cannot be locked safely. pub(crate) use self::errors::ERROR_CODE_APP_STATE_LOCK_FAILED; /// The Wallet Desk Config composite is missing or misroutes one required standard component. pub(crate) use self::errors::ERROR_CODE_CONFIG_COMPOSITE_INVALID; /// Frontend logging requested an unsupported level. pub(crate) use self::errors::ERROR_CODE_FRONTEND_LOG_LEVEL_INVALID; /// Frontend logging requested a target outside the application whitelist. pub(crate) use self::errors::ERROR_CODE_FRONTEND_LOG_TARGET_INVALID; /// Wallet Desk could not install the managed Logging runtime or its safe fallback. pub(crate) use self::errors::ERROR_CODE_LOGGING_BOOTSTRAP_FAILED; /// Splash readiness was invoked from a window other than the splash window. pub(crate) use self::errors::ERROR_CODE_SPLASH_ORIGIN_INVALID; /// A KSP desk splash environment duration is malformed or exceeds its safety bound. pub(crate) use self::errors::ERROR_CODE_SPLASH_SETTING_INVALID; /// Tauri runtime assembly or execution failed. pub(crate) use self::errors::ERROR_CODE_TAURI_RUNTIME_FAILED; /// A required Tauri window is missing from the configured application runtime. pub(crate) use self::errors::ERROR_CODE_TAURI_WINDOW_MISSING; /// A Tauri window show/focus/destroy/event operation failed. pub(crate) use self::errors::ERROR_CODE_TAURI_WINDOW_OPERATION_FAILED; /// The configured Wallet root or effective profile directory resolves to an unsupported filesystem object. pub(crate) use self::errors::ERROR_CODE_WALLET_DIRECTORY_INVALID; /// Wallet Desk could not inspect or create the configured Wallet directory tree. pub(crate) use self::errors::ERROR_CODE_WALLET_DIRECTORY_PREPARE_FAILED; /// Log payload sent by Wallet Desk frontend scripts. pub(crate) use self::frontend_logging::FrontendLogPayloadDto; /// Emits one validated frontend event through the KSP Logging facade. pub(crate) use self::frontend_logging::emit_frontend_log_event; /// Creates the stable runtime identity for this Wallet Desk process launch. pub(crate) use self::logging_runtime::launch_identity; /// Command emitted by Rust to the splash frontend. pub(crate) use self::splash::SplashOrderDto; /// Runtime timings used by the common desk splash lifecycle. pub(crate) use self::splash::SplashSettings; /// Resolves the required main window or returns a typed error. pub(crate) use self::tw_main::require_main_window; /// Shows and focuses the main Wallet Desk window. pub(crate) use self::tw_main::show_main_window; /// Resolves the required splash window or returns a typed error. pub(crate) use self::tw_splash::require_splash_window; /// Starts the one-shot splash lifecycle after the splash frontend reports readiness. pub(crate) use self::tw_splash::splash_frontend_ready_service; /// Resolved Wallet Config and directory preparation status captured during application bootstrap. pub(crate) use self::wallet_config::WalletConfigStartup; /// Resolves the composite-selected Wallet Config and prepares its application-owned directory tree. pub(crate) use self::wallet_config::initialize_wallet_config;