diff --git a/src/wasm-lib/kcl/src/coredump/mod.rs b/src/wasm-lib/kcl/src/coredump/mod.rs index 0e412fcc6..dcdb6ae2a 100644 --- a/src/wasm-lib/kcl/src/coredump/mod.rs +++ b/src/wasm-lib/kcl/src/coredump/mod.rs @@ -27,6 +27,8 @@ pub trait CoreDump: Clone { async fn get_webrtc_stats(&self) -> Result; + async fn get_client_state(&self) -> Result; + /// Return a screenshot of the app. async fn screenshot(&self) -> Result; @@ -109,6 +111,9 @@ pub struct AppInfo { /// Engine pool the client is connected to. pub pool: String, + + /// The client state (singletons and xstate) + pub client_state: ClientState, } impl AppInfo { @@ -197,3 +202,23 @@ pub struct WebrtcStats { /// Packet jitter for this synchronizing source, measured in seconds. pub jitter: f32, } + +/// Client State Structure +#[derive(Default, Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)] +#[ts(export)] +#[serde(rename_all = "snake_case")] +pub struct ClientState { + pub engine_command_manager: EngineCommandManager, +} + +#[derive(Default, Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)] +#[ts(export)] +#[serde(rename_all = "snake_case")] +pub struct EngineCommandManager { + pub engine_connection: EngineConnection, +} + +#[derive(Default, Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)] +#[ts(export)] +pub struct EngineConnection { +} \ No newline at end of file