pub enum AppEvent {
Show 26 variants
ServerStarted {
model_id: i64,
model_name: String,
port: u16,
},
ServerStopped {
model_id: i64,
model_name: String,
},
ServerError {
model_id: Option<i64>,
model_name: String,
error: String,
},
ServerSnapshot {
servers: Vec<ServerSnapshotEntry>,
},
Download {
event: DownloadEvent,
},
ModelAdded {
model: ModelSummary,
},
ModelRemoved {
model_id: i64,
},
ModelUpdated {
model: ModelSummary,
},
VerificationProgress {
model_id: i64,
model_name: String,
shard_name: String,
bytes_processed: u64,
total_bytes: u64,
},
VerificationComplete {
model_id: i64,
model_name: String,
overall_health: OverallHealth,
},
ServerHealthChanged {
server_id: i64,
model_id: i64,
status: ServerHealthStatus,
detail: Option<String>,
timestamp: u64,
},
McpServerAdded {
server: McpServerSummary,
},
McpServerRemoved {
server_id: i64,
},
McpServerStarted {
server_id: i64,
server_name: String,
},
McpServerStopped {
server_id: i64,
server_name: String,
},
McpServerError {
error: McpErrorInfo,
},
VoiceStateChanged {
state: String,
},
VoiceTranscript {
text: String,
is_final: bool,
},
VoiceSpeakingStarted,
VoiceSpeakingFinished,
VoiceAudioLevel {
level: f32,
},
VoiceError {
message: String,
},
VoiceModelDownloadProgress {
model_id: String,
bytes_downloaded: u64,
total_bytes: u64,
percent: f64,
},
ProxyStarted {
port: u16,
},
ProxyStopped,
ProxyCrashed,
}Expand description
Canonical event types for all adapters.
This enum unifies server, download, and model events into a single discriminated union. Each variant includes all necessary context for the event to be self-describing.
Variants§
ServerStarted
A model server has started and is ready to accept requests.
Fields
ServerStopped
A model server has been stopped (clean shutdown).
Fields
ServerError
A model server encountered an error.
Fields
ServerSnapshot
Snapshot of all currently running servers.
Fields
servers: Vec<ServerSnapshotEntry>List of currently running servers.
Download
Download lifecycle + progress events (including shard progress).
Wraps DownloadEvent verbatim to preserve all detail including
shard-specific progress information.
Fields
event: DownloadEventThe download event payload.
ModelAdded
A model was added to the library.
Fields
model: ModelSummarySummary of the added model.
ModelRemoved
A model was removed from the library.
ModelUpdated
A model was updated in the library.
Fields
model: ModelSummarySummary of the updated model.
VerificationProgress
Model verification progress update.
Fields
VerificationComplete
Model verification completed.
Fields
overall_health: OverallHealthOverall health status.
ServerHealthChanged
Server health status has changed.
Emitted by continuous monitoring when a server’s health state changes.
Fields
status: ServerHealthStatusNew health status.
McpServerAdded
An MCP server was added to the configuration.
Fields
server: McpServerSummarySummary of the added server.
McpServerRemoved
An MCP server was removed from the configuration.
McpServerStarted
An MCP server has started and is ready.
McpServerStopped
An MCP server has been stopped.
McpServerError
An MCP server encountered an error.
Fields
error: McpErrorInfoUser-safe error information.
VoiceStateChanged
Voice pipeline state changed (idle → listening → recording → …).
Fields
VoiceTranscript
Speech transcript produced by the STT engine.
VoiceSpeakingStarted
TTS playback has started.
VoiceSpeakingFinished
TTS playback has finished.
VoiceAudioLevel
Microphone audio level sample (0.0 – 1.0) for UI visualisation.
Throttled to ≤ 20 fps at the SSE bridge before entering the bus.
VoiceError
Voice pipeline encountered a non-fatal error.
VoiceModelDownloadProgress
Download progress for a voice model (STT / TTS / VAD).
Emitted by VoiceService during download_stt_model,
download_tts_model, and download_vad_model calls so that
SSE subscribers receive live progress without Tauri’s app.emit().
Fields
ProxyStarted
The OpenAI-compatible proxy has started.
ProxyStopped
The proxy has been stopped (clean shutdown).
ProxyCrashed
The proxy crashed (task exited without cancellation).
Implementations§
Source§impl AppEvent
impl AppEvent
Sourcepub const fn model_added(model: ModelSummary) -> Self
pub const fn model_added(model: ModelSummary) -> Self
Create a model added event.
Sourcepub const fn model_removed(model_id: i64) -> Self
pub const fn model_removed(model_id: i64) -> Self
Create a model removed event.
Sourcepub const fn model_updated(model: ModelSummary) -> Self
pub const fn model_updated(model: ModelSummary) -> Self
Create a model updated event.
Source§impl AppEvent
impl AppEvent
Sourcepub fn download_started(
id: impl Into<String>,
_display_name: impl Into<String>,
) -> Self
pub fn download_started( id: impl Into<String>, _display_name: impl Into<String>, ) -> Self
Create a download started event.
Sourcepub fn download_progress(
id: impl Into<String>,
downloaded: u64,
total: u64,
speed_bps: f64,
eta_seconds: f64,
percentage: f64,
) -> Self
pub fn download_progress( id: impl Into<String>, downloaded: u64, total: u64, speed_bps: f64, eta_seconds: f64, percentage: f64, ) -> Self
Create a download progress event.
Sourcepub fn download_completed(
id: impl Into<String>,
message: Option<String>,
) -> Self
pub fn download_completed( id: impl Into<String>, message: Option<String>, ) -> Self
Create a download completed event.
Sourcepub fn download_failed(id: impl Into<String>, error: impl Into<String>) -> Self
pub fn download_failed(id: impl Into<String>, error: impl Into<String>) -> Self
Create a download failed event.
Sourcepub fn download_cancelled(id: impl Into<String>) -> Self
pub fn download_cancelled(id: impl Into<String>) -> Self
Create a download cancelled event.
Source§impl AppEvent
impl AppEvent
Sourcepub const fn mcp_server_added(server: McpServerSummary) -> Self
pub const fn mcp_server_added(server: McpServerSummary) -> Self
Create an MCP server added event.
Sourcepub const fn mcp_server_removed(server_id: i64) -> Self
pub const fn mcp_server_removed(server_id: i64) -> Self
Create an MCP server removed event.
Sourcepub fn mcp_server_started(
server_id: i64,
server_name: impl Into<String>,
) -> Self
pub fn mcp_server_started( server_id: i64, server_name: impl Into<String>, ) -> Self
Create an MCP server started event.
Sourcepub fn mcp_server_stopped(
server_id: i64,
server_name: impl Into<String>,
) -> Self
pub fn mcp_server_stopped( server_id: i64, server_name: impl Into<String>, ) -> Self
Create an MCP server stopped event.
Sourcepub const fn mcp_server_error(error: McpErrorInfo) -> Self
pub const fn mcp_server_error(error: McpErrorInfo) -> Self
Create an MCP server error event.
Source§impl AppEvent
impl AppEvent
Sourcepub fn server_started(
model_id: i64,
model_name: impl Into<String>,
port: u16,
) -> Self
pub fn server_started( model_id: i64, model_name: impl Into<String>, port: u16, ) -> Self
Create a server started event.
Sourcepub fn server_stopped(model_id: i64, model_name: impl Into<String>) -> Self
pub fn server_stopped(model_id: i64, model_name: impl Into<String>) -> Self
Create a server stopped event.
Sourcepub fn server_error(
model_id: Option<i64>,
model_name: impl Into<String>,
error: impl Into<String>,
) -> Self
pub fn server_error( model_id: Option<i64>, model_name: impl Into<String>, error: impl Into<String>, ) -> Self
Create a server error event.
Sourcepub const fn server_snapshot(servers: Vec<ServerSnapshotEntry>) -> Self
pub const fn server_snapshot(servers: Vec<ServerSnapshotEntry>) -> Self
Create a server snapshot event.
Source§impl AppEvent
impl AppEvent
Sourcepub const fn event_name(&self) -> &'static str
pub const fn event_name(&self) -> &'static str
Get the event name for wire protocols.
This provides consistent event naming across Tauri and SSE transports.
Source§impl AppEvent
impl AppEvent
Sourcepub fn voice_state_changed(state: impl Into<String>) -> Self
pub fn voice_state_changed(state: impl Into<String>) -> Self
Create a [VoiceStateChanged] event.
Sourcepub fn voice_transcript(text: impl Into<String>, is_final: bool) -> Self
pub fn voice_transcript(text: impl Into<String>, is_final: bool) -> Self
Create a [VoiceTranscript] event.
Sourcepub const fn voice_speaking_started() -> Self
pub const fn voice_speaking_started() -> Self
Create a [VoiceSpeakingStarted] event.
Sourcepub const fn voice_speaking_finished() -> Self
pub const fn voice_speaking_finished() -> Self
Create a [VoiceSpeakingFinished] event.
Sourcepub const fn voice_audio_level(level: f32) -> Self
pub const fn voice_audio_level(level: f32) -> Self
Create a [VoiceAudioLevel] event.
Sourcepub fn voice_error(message: impl Into<String>) -> Self
pub fn voice_error(message: impl Into<String>) -> Self
Create a [VoiceError] event.
Source§impl AppEvent
impl AppEvent
Sourcepub const fn proxy_started(port: u16) -> Self
pub const fn proxy_started(port: u16) -> Self
Create a [ProxyStarted] event.
Sourcepub const fn proxy_stopped() -> Self
pub const fn proxy_stopped() -> Self
Create a [ProxyStopped] event.
Sourcepub const fn proxy_crashed() -> Self
pub const fn proxy_crashed() -> Self
Create a [ProxyCrashed] event.