344 lines
17 KiB
Rust
344 lines
17 KiB
Rust
// file: kb-app-demo-desktop/src/lib.rs
|
|
// version: 10
|
|
|
|
//! Tauri desktop demo application for `khadhroony-bot3`.
|
|
|
|
#![forbid(unsafe_code)]
|
|
#![deny(unreachable_pub)]
|
|
#![warn(missing_docs)]
|
|
|
|
mod app_state;
|
|
mod constants;
|
|
mod demo_backfill;
|
|
mod demo_config;
|
|
mod demo_core_extraction;
|
|
mod demo_decode_replay;
|
|
mod demo_execution_solana_core;
|
|
mod demo_execution_spl;
|
|
mod demo_http;
|
|
mod demo_spl_ata;
|
|
mod demo_spl_token;
|
|
mod demo_spl_token2022;
|
|
mod demo_sql_common;
|
|
mod demo_sql_diag;
|
|
mod demo_sql_pg_core;
|
|
mod demo_sql_pg_raw;
|
|
mod demo_sql_replay_candidates;
|
|
mod demo_ws;
|
|
mod frontend_log;
|
|
mod main_window;
|
|
mod splash;
|
|
mod tauri;
|
|
|
|
/// Runs the desktop demo application.
|
|
pub use self::tauri::run;
|
|
|
|
/// Shared application state managed by Tauri.
|
|
pub(crate) use self::app_state::AppState;
|
|
/// Backfill observer forwarding pipeline progress to the Tauri window.
|
|
pub(crate) use self::demo_backfill::DemoBackfillObserver;
|
|
/// Initial options shown by the backfill window.
|
|
pub(crate) use self::demo_backfill::DemoBackfillOptionsPayload;
|
|
/// One known program suggested by the backfill Program ID autocomplete.
|
|
pub(crate) use self::demo_backfill::DemoBackfillProgramOption;
|
|
/// One progress event emitted to the backfill window.
|
|
pub(crate) use self::demo_backfill::DemoBackfillProgressPayload;
|
|
/// UI request for one bounded backfill campaign.
|
|
pub(crate) use self::demo_backfill::DemoBackfillRequest;
|
|
/// One endpoint role selectable by the backfill window.
|
|
pub(crate) use self::demo_backfill::DemoBackfillRoleOption;
|
|
/// Guard restoring the single-campaign flag.
|
|
pub(crate) use self::demo_backfill::DemoBackfillRunGuard;
|
|
/// Final UI-safe summary for one backfill campaign.
|
|
pub(crate) use self::demo_backfill::DemoBackfillSummaryPayload;
|
|
/// Builds one validated pipeline request from the UI contract.
|
|
pub(crate) use self::demo_backfill::build_demo_backfill_pipeline_request;
|
|
/// Builds selectable endpoint roles from the HTTP pool snapshot.
|
|
pub(crate) use self::demo_backfill::build_role_options;
|
|
/// Converts a pipeline summary to the UI-safe summary.
|
|
pub(crate) use self::demo_backfill::demo_backfill_summary_payload;
|
|
/// Configuration payload shown by the configuration window.
|
|
pub(crate) use self::demo_config::DemoConfigPayload;
|
|
/// Builds the configuration payload from shared application state.
|
|
pub(crate) use self::demo_config::demo_config_payload;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::DemoCoreExtractionObserver;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::DemoCoreExtractionOptionsPayload;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::DemoCoreExtractionProgressPayload;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::DemoCoreExtractionRequest;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::DemoCoreExtractionRunGuard;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::DemoCoreExtractionSummaryPayload;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::build_demo_core_extraction_pipeline_request;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::cancel_demo_core_extraction;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::demo_core_extraction_options_payload;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::demo_core_extraction_summary_payload;
|
|
/// Internal demo core extraction item.
|
|
pub(crate) use self::demo_core_extraction::execute_demo_core_extraction;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoDecodeCoverageSummaryPayload;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoDecodeDiagnosticsPayload;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoDecodeProcessorSummaryPayload;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoDecodeReplayDecoderOption;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoDecodeReplayObserver;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoDecodeReplayOptionsPayload;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoDecodeReplayProgressPayload;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoDecodeReplayRequest;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoDecodeReplayRunGuard;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoDecodeReplaySummaryPayload;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoTransactionAnnotationRequest;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::DemoTransactionAnnotationRow;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::annotation_payload;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::available_decoders;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::available_materializers;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::build_demo_decode_replay_pipeline_request;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::coverage_payload;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::demo_decode_replay_summary_payload;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::optional_line_count;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::register_active_campaign;
|
|
/// Internal demo decode replay item.
|
|
pub(crate) use self::demo_decode_replay::text_sample;
|
|
/// Request sent by the Memo v4 Devnet execution panel.
|
|
pub(crate) use self::demo_execution_solana_core::DemoExecutionMemoRequest;
|
|
/// UI-safe result of one Memo v4 Devnet execution orchestration.
|
|
pub(crate) use self::demo_execution_solana_core::DemoExecutionMemoSummaryPayload;
|
|
/// Public key generated for a disposable Devnet recipient.
|
|
pub(crate) use self::demo_execution_solana_core::DemoExecutionSolanaCoreGeneratedRecipientPayload;
|
|
/// ????
|
|
pub(crate) use self::demo_execution_solana_core::DemoExecutionSolanaCoreObserver;
|
|
/// Initial options shown by the Solana Core execution demo.
|
|
pub(crate) use self::demo_execution_solana_core::DemoExecutionSolanaCoreOptionsPayload;
|
|
/// One Devnet execution profile exposed to the demo window.
|
|
pub(crate) use self::demo_execution_solana_core::DemoExecutionSolanaCoreProfileOption;
|
|
/// Progress event emitted during execution and post-validation.
|
|
pub(crate) use self::demo_execution_solana_core::DemoExecutionSolanaCoreProgressPayload;
|
|
/// Request sent by the execution demo.
|
|
pub(crate) use self::demo_execution_solana_core::DemoExecutionSolanaCoreRequest;
|
|
/// ????
|
|
pub(crate) use self::demo_execution_solana_core::DemoExecutionSolanaCoreRunGuard;
|
|
/// UI-safe result of one execution orchestration.
|
|
pub(crate) use self::demo_execution_solana_core::DemoExecutionSolanaCoreSummaryPayload;
|
|
/// ????
|
|
pub(crate) use self::demo_execution_solana_core::confirmation_status_code;
|
|
/// ????
|
|
pub(crate) use self::demo_execution_solana_core::demo_execution_solana_core_memo_summary_payload;
|
|
/// ????
|
|
pub(crate) use self::demo_execution_solana_core::demo_execution_solana_core_summary_payload;
|
|
/// ????
|
|
pub(crate) use self::demo_execution_solana_core::devnet_profile_options;
|
|
/// ????
|
|
pub(crate) use self::demo_execution_solana_core::execution_cluster_code;
|
|
/// ????
|
|
pub(crate) use self::demo_execution_solana_core::pretty_json;
|
|
/// ????
|
|
pub(crate) use self::demo_execution_solana_core::select_devnet_profile;
|
|
/// Frontend payload for one independent Devnet SPL validation scenario.
|
|
pub(crate) use self::demo_execution_spl::DevnetSplValidationScenarioPayload;
|
|
/// HTTP demo response payload.
|
|
pub(crate) use self::demo_http::DemoHttpExecutionPayload;
|
|
/// One selectable HTTP JSON-RPC method.
|
|
pub(crate) use self::demo_http::DemoHttpMethodOption;
|
|
/// HTTP demo options payload.
|
|
pub(crate) use self::demo_http::DemoHttpOptionsPayload;
|
|
/// HTTP demo request payload.
|
|
pub(crate) use self::demo_http::DemoHttpRequest;
|
|
/// One selectable HTTP endpoint role.
|
|
pub(crate) use self::demo_http::DemoHttpRoleOption;
|
|
/// Builds the HTTP method inventory.
|
|
pub(crate) use self::demo_http::build_http_method_options;
|
|
/// Builds the HTTP role inventory from pool snapshots.
|
|
pub(crate) use self::demo_http::build_http_role_options;
|
|
/// Executes one raw HTTP JSON-RPC request.
|
|
pub(crate) use self::demo_http::demo_http_execute_request_inner;
|
|
/// Request for one representative ATA creation on Devnet.
|
|
pub(crate) use self::demo_spl_ata::DemoExecutionSplAtaRequest;
|
|
/// UI-safe ATA execution result.
|
|
pub(crate) use self::demo_spl_ata::DemoExecutionSplAtaSummaryPayload;
|
|
/// Readonly payer, wallet, Token Program and derived ATA values.
|
|
pub(crate) use self::demo_spl_ata::DemoSplAtaDerivationPayload;
|
|
/// Request used to derive the representative wallet ATA before execution.
|
|
pub(crate) use self::demo_spl_ata::DemoSplAtaDerivationRequest;
|
|
/// Bounded ATA lifecycle journal request.
|
|
pub(crate) use self::demo_spl_ata::DemoSplAtaJournalRequest;
|
|
/// One UI-safe ATA lifecycle journal row.
|
|
pub(crate) use self::demo_spl_ata::DemoSplAtaJournalRow;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_ata::demo_spl_ata_summary_payload;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_ata::derive_ata;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_ata::journal_matches;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_ata::journal_row;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_ata::load_profile_wallet;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_ata::parse_token_program;
|
|
/// Request for one checked classic SPL Token transfer on Devnet.
|
|
pub(crate) use self::demo_spl_token::DemoExecutionSplTokenRequest;
|
|
/// UI-safe result of one checked SPL Token transfer orchestration.
|
|
pub(crate) use self::demo_spl_token::DemoExecutionSplTokenSummaryPayload;
|
|
/// Bounded exact filters for the classic SPL Token materialized journal.
|
|
pub(crate) use self::demo_spl_token::DemoSplTokenJournalRequest;
|
|
/// UI-safe materialized classic SPL Token journal row.
|
|
pub(crate) use self::demo_spl_token::DemoSplTokenJournalRow;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_token::demo_spl_token_journal_row;
|
|
/// Executes one checked SPL Token simulation or explicitly authorized Devnet submission.
|
|
pub(crate) use self::demo_spl_token::demo_spl_token_summary_payload;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_token::payload_matches;
|
|
/// Loads a bounded, typed journal of committed classic SPL Token projections.
|
|
pub(crate) use self::demo_spl_token::validate_journal_request;
|
|
/// Request for one independent public Token-2022 Devnet scenario.
|
|
pub(crate) use self::demo_spl_token2022::DemoExecutionSplToken2022Request;
|
|
/// UI-safe result of one public Token-2022 Devnet orchestration.
|
|
pub(crate) use self::demo_spl_token2022::DemoExecutionSplToken2022SummaryPayload;
|
|
/// Public values loaded from one persisted Token-2022 validation fixture.
|
|
pub(crate) use self::demo_spl_token2022::DemoSplToken2022FixturePayload;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_token2022::demo_spl_token2022_summary_payload;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_token2022::operation_from_request;
|
|
/// ????
|
|
pub(crate) use self::demo_spl_token2022::parse_fixture;
|
|
/// UI-safe SQL table diagnostic snapshot.
|
|
pub(crate) use self::demo_sql_common::DemoSqlTableSnapshot;
|
|
/// Connects to the configured PostgreSQL store.
|
|
pub(crate) use self::demo_sql_common::connect_postgres_store;
|
|
/// Formats diagnostic statuses.
|
|
pub(crate) use self::demo_sql_common::debug_status;
|
|
/// Initializes the PostgreSQL schema during startup.
|
|
pub(crate) use self::demo_sql_common::initialize_postgres_schema_for_startup;
|
|
/// Builds PostgreSQL options from the active profile.
|
|
pub(crate) use self::demo_sql_common::postgres_store_options_from_profile;
|
|
/// Converts one PostgreSQL table diagnostic.
|
|
pub(crate) use self::demo_sql_common::table_snapshot_from_pg;
|
|
/// Converts PostgreSQL table diagnostics.
|
|
pub(crate) use self::demo_sql_common::table_snapshots_from_pg;
|
|
/// SQL diagnostic payload.
|
|
pub(crate) use self::demo_sql_diag::DemoSqlDiagPayload;
|
|
/// PostgreSQL core-table payload.
|
|
pub(crate) use self::demo_sql_pg_core::DemoSqlPgCorePayload;
|
|
/// PostgreSQL raw-table payload.
|
|
pub(crate) use self::demo_sql_pg_raw::DemoSqlPgRawPayload;
|
|
/// SQL replay entity request.
|
|
pub(crate) use self::demo_sql_replay_candidates::DemoSqlReplayEntityRequest;
|
|
/// SQL replay entity row.
|
|
pub(crate) use self::demo_sql_replay_candidates::DemoSqlReplayEntityRow;
|
|
/// Known program option.
|
|
pub(crate) use self::demo_sql_replay_candidates::DemoSqlReplayKnownProgramOption;
|
|
/// SQL replay options payload.
|
|
pub(crate) use self::demo_sql_replay_candidates::DemoSqlReplayOptionsPayload;
|
|
/// SQL replay program request.
|
|
pub(crate) use self::demo_sql_replay_candidates::DemoSqlReplayProgramRequest;
|
|
/// SQL replay program row.
|
|
pub(crate) use self::demo_sql_replay_candidates::DemoSqlReplayProgramRow;
|
|
/// SQL replay transaction request.
|
|
pub(crate) use self::demo_sql_replay_candidates::DemoSqlReplayTransactionRequest;
|
|
/// SQL replay transaction row.
|
|
pub(crate) use self::demo_sql_replay_candidates::DemoSqlReplayTransactionRow;
|
|
/// Resolves an available CSV path.
|
|
pub(crate) use self::demo_sql_replay_candidates::available_csv_export_path;
|
|
/// Resolves the CSV export directory.
|
|
pub(crate) use self::demo_sql_replay_candidates::csv_export_directory_from_current_dir;
|
|
/// Parses an entity-kind code.
|
|
pub(crate) use self::demo_sql_replay_candidates::entity_kind_from_code;
|
|
/// Converts a PostgreSQL entity row.
|
|
pub(crate) use self::demo_sql_replay_candidates::entity_row_from_pg;
|
|
/// Parses an optional entity-kind code.
|
|
pub(crate) use self::demo_sql_replay_candidates::optional_entity_kind_from_code;
|
|
/// Converts a PostgreSQL program row.
|
|
pub(crate) use self::demo_sql_replay_candidates::program_row_from_pg;
|
|
/// Parses a program-scope code.
|
|
pub(crate) use self::demo_sql_replay_candidates::program_scope_from_code;
|
|
/// Converts a PostgreSQL transaction row.
|
|
pub(crate) use self::demo_sql_replay_candidates::transaction_row_from_pg;
|
|
/// Validates a CSV filename.
|
|
pub(crate) use self::demo_sql_replay_candidates::validated_csv_file_name;
|
|
/// WebSocket execution response payload.
|
|
pub(crate) use self::demo_ws::DemoWsExecutionPayload;
|
|
/// WebSocket message emitted to the frontend.
|
|
pub(crate) use self::demo_ws::DemoWsMessagePayload;
|
|
/// One selectable WebSocket method.
|
|
pub(crate) use self::demo_ws::DemoWsMethodOption;
|
|
/// WebSocket demo options payload.
|
|
pub(crate) use self::demo_ws::DemoWsOptionsPayload;
|
|
/// WebSocket subscription request.
|
|
pub(crate) use self::demo_ws::DemoWsRequest;
|
|
/// One selectable WebSocket role.
|
|
pub(crate) use self::demo_ws::DemoWsRoleOption;
|
|
/// Current WebSocket session status.
|
|
pub(crate) use self::demo_ws::DemoWsStatusPayload;
|
|
/// One active WebSocket subscription status.
|
|
pub(crate) use self::demo_ws::DemoWsSubscriptionStatusPayload;
|
|
/// WebSocket unsubscribe request.
|
|
pub(crate) use self::demo_ws::DemoWsUnsubscribeRequest;
|
|
/// Builds the standard WebSocket method inventory.
|
|
pub(crate) use self::demo_ws::build_ws_method_options;
|
|
/// Builds selectable WebSocket roles from pool snapshots.
|
|
pub(crate) use self::demo_ws::build_ws_role_options;
|
|
/// Connects and subscribes through the persistent WebSocket session.
|
|
pub(crate) use self::demo_ws::demo_ws_connect_inner;
|
|
/// Disconnects the persistent WebSocket session.
|
|
pub(crate) use self::demo_ws::demo_ws_disconnect_inner;
|
|
/// Returns the current WebSocket session status.
|
|
pub(crate) use self::demo_ws::demo_ws_status_inner;
|
|
/// Unsubscribes one active WebSocket subscription.
|
|
pub(crate) use self::demo_ws::demo_ws_unsubscribe_inner;
|
|
/// Disconnects the persistent WebSocket session during application shutdown.
|
|
pub(crate) use self::demo_ws::disconnect_demo_ws_app_state;
|
|
/// Frontend logging payload.
|
|
pub(crate) use self::frontend_log::FrontendLogPayload;
|
|
/// Emits one normalized frontend log event.
|
|
pub(crate) use self::frontend_log::emit_frontend_log;
|
|
/// Loads the project README for the main window.
|
|
pub(crate) use self::main_window::load_project_readme;
|
|
/// Returns the workspace root directory.
|
|
pub(crate) use self::main_window::workspace_root_dir;
|
|
/// Delay after fade-out before destroying the splash window.
|
|
pub(crate) use self::splash::SPLASH_CLOSE_WAIT_MS;
|
|
/// Splash fade duration.
|
|
pub(crate) use self::splash::SPLASH_FADE_MS;
|
|
/// Minimum startup splash duration before fade-out begins.
|
|
pub(crate) use self::splash::SPLASH_MINIMUM_MS;
|
|
/// Command sent from Rust to the splash frontend.
|
|
pub(crate) use self::splash::SplashOrder;
|
|
/// Emits one order to the splash frontend.
|
|
pub(crate) use self::splash::emit_splash_order;
|
|
/// Runs the startup sequence after the splash frontend is ready.
|
|
pub(crate) use self::splash::splash_frontend_ready_inner;
|
|
/// Waits for the minimum splash duration.
|
|
pub(crate) use self::splash::wait_until_minimum;
|
|
|
|
// Keep the canonical tracing target as the final facade export.
|
|
/// Canonical tracing target for the desktop demo application.
|
|
pub(crate) use self::constants::TRACING_TARGET;
|