Mountain/Binary/IPC/IPCStatusReportingStartCommand.rs
1//! # IPCStatusReportingStartCommand
2//!
3//! Starts periodic IPC status reporting.
4//!
5//! ## RESPONSIBILITIES
6//!
7//! ### Reporting Control
8//! - Start periodic status reporting
9//! - Configure reporting interval
10//! - Enable status monitoring
11//!
12//! ## ARCHITECTURAL ROLE
13//!
14//! ### Position in Mountain
15//! - IPC wrapper command in Binary subsystem
16//! - Status reporting control endpoint
17//!
18//! ### Dependencies
19//! - crate::IPC::StatusReporter: Reporting logic
20//! - tauri: IPC framework
21//! - serde_json: JSON serialization
22//!
23//! ### Dependents
24//! - Wind frontend: Starts status monitoring
25//!
26//! ## SECURITY
27//!
28//! ### Considerations
29//! - Rate limit reporting intervals
30//! - Validate authorization before starting
31//!
32//! ## PERFORMANCE
33//!
34//! ### Considerations
35//! - Periodic reporting has ongoing overhead
36//! - Default interval should be reasonable (60s)
37
38use serde_json::Value;
39use tauri::AppHandle;
40
41/// Start IPC status reporting.
42///
43/// Enables periodic IPC status reporting for monitoring.
44///
45/// # Arguments
46///
47/// * `app_handle` - Tauri application handle
48///
49/// # Returns
50///
51/// Returns confirmation JSON, or an error string.
52///
53/// # Errors
54///
55/// Returns an error if reporting cannot be started.
56#[tauri::command]
57pub async fn MountainStartIPCStatusReporting(app_handle:AppHandle) -> Result<Value, String> {
58 crate::IPC::StatusReporter::mountain_start_ipc_status_reporting(app_handle, 60).await
59}