Skip to main content

livekit_protocol/
livekit.agent.rs

1// @generated
2// This file is @generated by prost-build.
3/// AgentDevMessage is used for IPC between the CLI and agent processes
4/// during dev-mode hot reload.
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct AgentDevMessage {
7    #[prost(oneof = "agent_dev_message::Message", tags = "1, 2, 3")]
8    pub message: ::core::option::Option<agent_dev_message::Message>,
9}
10/// Nested message and enum types in `AgentDevMessage`.
11pub mod agent_dev_message {
12    #[derive(Clone, PartialEq, ::prost::Oneof)]
13    pub enum Message {
14        #[prost(message, tag = "1")]
15        GetRunningJobsRequest(super::GetRunningAgentJobsRequest),
16        #[prost(message, tag = "2")]
17        GetRunningJobsResponse(super::GetRunningAgentJobsResponse),
18        #[prost(message, tag = "3")]
19        ServerInfo(super::ServerInfo),
20    }
21}
22/// ServerInfo is sent by the agent to the CLI when the dev-reload channel opens,
23#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
24pub struct ServerInfo {
25    #[prost(string, tag = "1")]
26    pub agent_name: ::prost::alloc::string::String,
27    #[prost(string, tag = "2")]
28    pub url: ::prost::alloc::string::String,
29}
30#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
31pub struct GetRunningAgentJobsRequest {
32}
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct GetRunningAgentJobsResponse {
35    #[prost(message, repeated, tag = "1")]
36    pub jobs: ::prost::alloc::vec::Vec<RunningAgentJobInfo>,
37}
38#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
39pub struct RunningAgentJobInfo {
40    #[prost(bytes = "vec", tag = "1")]
41    pub job: ::prost::alloc::vec::Vec<u8>,
42    #[prost(string, tag = "2")]
43    pub accept_name: ::prost::alloc::string::String,
44    #[prost(string, tag = "3")]
45    pub accept_identity: ::prost::alloc::string::String,
46    #[prost(string, tag = "4")]
47    pub accept_metadata: ::prost::alloc::string::String,
48    #[prost(string, tag = "5")]
49    pub url: ::prost::alloc::string::String,
50    #[prost(string, tag = "6")]
51    pub token: ::prost::alloc::string::String,
52    #[prost(string, tag = "7")]
53    pub worker_id: ::prost::alloc::string::String,
54    #[prost(bool, tag = "8")]
55    pub mock_job: bool,
56}
57#[derive(Clone, Copy, PartialEq, ::prost::Message)]
58pub struct MetricsReport {
59    #[prost(message, optional, tag = "1")]
60    pub started_speaking_at: ::core::option::Option<::pbjson_types::Timestamp>,
61    #[prost(message, optional, tag = "2")]
62    pub stopped_speaking_at: ::core::option::Option<::pbjson_types::Timestamp>,
63    #[prost(double, optional, tag = "3")]
64    pub transcription_delay: ::core::option::Option<f64>,
65    #[prost(double, optional, tag = "4")]
66    pub end_of_turn_delay: ::core::option::Option<f64>,
67    #[prost(double, optional, tag = "5")]
68    pub on_user_turn_completed_delay: ::core::option::Option<f64>,
69    #[prost(double, optional, tag = "6")]
70    pub llm_node_ttft: ::core::option::Option<f64>,
71    #[prost(double, optional, tag = "7")]
72    pub tts_node_ttfb: ::core::option::Option<f64>,
73    #[prost(double, optional, tag = "8")]
74    pub e2e_latency: ::core::option::Option<f64>,
75    #[prost(double, optional, tag = "9")]
76    pub llm_node_tps: ::core::option::Option<f64>,
77    #[prost(double, optional, tag = "10")]
78    pub llm_node_ttfs: ::core::option::Option<f64>,
79}
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct TimedString {
82    #[prost(string, tag = "1")]
83    pub text: ::prost::alloc::string::String,
84    #[prost(double, optional, tag = "2")]
85    pub start_time: ::core::option::Option<f64>,
86    #[prost(double, optional, tag = "3")]
87    pub end_time: ::core::option::Option<f64>,
88    #[prost(double, optional, tag = "4")]
89    pub confidence: ::core::option::Option<f64>,
90    #[prost(double, optional, tag = "5")]
91    pub start_time_offset: ::core::option::Option<f64>,
92    #[prost(string, optional, tag = "6")]
93    pub speaker_id: ::core::option::Option<::prost::alloc::string::String>,
94}
95#[derive(Clone, PartialEq, ::prost::Message)]
96pub struct ChatMessage {
97    #[prost(string, tag = "1")]
98    pub id: ::prost::alloc::string::String,
99    #[prost(enumeration = "ChatRole", tag = "2")]
100    pub role: i32,
101    #[prost(message, repeated, tag = "3")]
102    pub content: ::prost::alloc::vec::Vec<chat_message::ChatContent>,
103    #[prost(bool, tag = "4")]
104    pub interrupted: bool,
105    #[prost(double, optional, tag = "5")]
106    pub transcript_confidence: ::core::option::Option<f64>,
107    #[prost(map = "string, string", tag = "6")]
108    pub extra: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
109    #[prost(message, optional, tag = "7")]
110    pub metrics: ::core::option::Option<MetricsReport>,
111    #[prost(message, optional, tag = "8")]
112    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
113}
114/// Nested message and enum types in `ChatMessage`.
115pub mod chat_message {
116    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
117    pub struct ChatContent {
118        #[prost(oneof = "chat_content::Payload", tags = "1")]
119        pub payload: ::core::option::Option<chat_content::Payload>,
120    }
121    /// Nested message and enum types in `ChatContent`.
122    pub mod chat_content {
123        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
124        pub enum Payload {
125            #[prost(string, tag = "1")]
126            Text(::prost::alloc::string::String),
127        }
128    }
129}
130#[derive(Clone, PartialEq, ::prost::Message)]
131pub struct FunctionCall {
132    #[prost(string, tag = "1")]
133    pub id: ::prost::alloc::string::String,
134    #[prost(string, tag = "2")]
135    pub call_id: ::prost::alloc::string::String,
136    #[prost(string, tag = "3")]
137    pub arguments: ::prost::alloc::string::String,
138    #[prost(string, tag = "4")]
139    pub name: ::prost::alloc::string::String,
140    #[prost(message, optional, tag = "5")]
141    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
142    /// Framework metadata recorded on the call, kept with the history. A delegating call records
143    /// where the request went: lk.delegation.task_id, lk.delegation.endpoint,
144    /// lk.delegation.transport and lk.delegation.profile.
145    #[prost(map = "string, string", tag = "6")]
146    pub extra: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
147}
148#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
149pub struct FunctionCallOutput {
150    #[prost(string, tag = "1")]
151    pub id: ::prost::alloc::string::String,
152    #[prost(string, tag = "2")]
153    pub name: ::prost::alloc::string::String,
154    #[prost(string, tag = "3")]
155    pub call_id: ::prost::alloc::string::String,
156    #[prost(string, tag = "4")]
157    pub output: ::prost::alloc::string::String,
158    #[prost(bool, tag = "5")]
159    pub is_error: bool,
160    #[prost(message, optional, tag = "6")]
161    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
162}
163#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
164pub struct AgentHandoff {
165    #[prost(string, tag = "1")]
166    pub id: ::prost::alloc::string::String,
167    #[prost(string, optional, tag = "2")]
168    pub old_agent_id: ::core::option::Option<::prost::alloc::string::String>,
169    #[prost(string, tag = "3")]
170    pub new_agent_id: ::prost::alloc::string::String,
171    #[prost(message, optional, tag = "4")]
172    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
173}
174#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
175pub struct AgentConfigUpdate {
176    #[prost(string, tag = "1")]
177    pub id: ::prost::alloc::string::String,
178    #[prost(string, optional, tag = "2")]
179    pub instructions: ::core::option::Option<::prost::alloc::string::String>,
180    #[prost(string, repeated, tag = "3")]
181    pub tools_added: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
182    #[prost(string, repeated, tag = "4")]
183    pub tools_removed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
184    #[prost(message, optional, tag = "5")]
185    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
186}
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct ChatContext {
189    #[prost(message, repeated, tag = "1")]
190    pub items: ::prost::alloc::vec::Vec<chat_context::ChatItem>,
191}
192/// Nested message and enum types in `ChatContext`.
193pub mod chat_context {
194    #[derive(Clone, PartialEq, ::prost::Message)]
195    pub struct ChatItem {
196        #[prost(oneof = "chat_item::Item", tags = "1, 2, 3, 4, 5")]
197        pub item: ::core::option::Option<chat_item::Item>,
198    }
199    /// Nested message and enum types in `ChatItem`.
200    pub mod chat_item {
201        #[derive(Clone, PartialEq, ::prost::Oneof)]
202        pub enum Item {
203            #[prost(message, tag = "1")]
204            Message(super::super::ChatMessage),
205            #[prost(message, tag = "2")]
206            FunctionCall(super::super::FunctionCall),
207            #[prost(message, tag = "3")]
208            FunctionCallOutput(super::super::FunctionCallOutput),
209            #[prost(message, tag = "4")]
210            AgentHandoff(super::super::AgentHandoff),
211            #[prost(message, tag = "5")]
212            AgentConfigUpdate(super::super::AgentConfigUpdate),
213        }
214    }
215}
216#[derive(Clone, PartialEq, ::prost::Message)]
217pub struct LlmModelUsage {
218    #[prost(string, tag = "1")]
219    pub provider: ::prost::alloc::string::String,
220    #[prost(string, tag = "2")]
221    pub model: ::prost::alloc::string::String,
222    #[prost(int32, tag = "3")]
223    pub input_tokens: i32,
224    #[prost(int32, tag = "4")]
225    pub input_cached_tokens: i32,
226    #[prost(int32, tag = "5")]
227    pub input_audio_tokens: i32,
228    #[prost(int32, tag = "6")]
229    pub input_cached_audio_tokens: i32,
230    #[prost(int32, tag = "7")]
231    pub input_text_tokens: i32,
232    #[prost(int32, tag = "8")]
233    pub input_cached_text_tokens: i32,
234    #[prost(int32, tag = "9")]
235    pub input_image_tokens: i32,
236    #[prost(int32, tag = "10")]
237    pub input_cached_image_tokens: i32,
238    #[prost(int32, tag = "11")]
239    pub output_tokens: i32,
240    #[prost(int32, tag = "12")]
241    pub output_audio_tokens: i32,
242    #[prost(int32, tag = "13")]
243    pub output_text_tokens: i32,
244    #[prost(double, tag = "14")]
245    pub session_duration: f64,
246}
247#[derive(Clone, PartialEq, ::prost::Message)]
248pub struct TtsModelUsage {
249    #[prost(string, tag = "1")]
250    pub provider: ::prost::alloc::string::String,
251    #[prost(string, tag = "2")]
252    pub model: ::prost::alloc::string::String,
253    #[prost(int32, tag = "3")]
254    pub input_tokens: i32,
255    #[prost(int32, tag = "4")]
256    pub output_tokens: i32,
257    #[prost(int32, tag = "5")]
258    pub characters_count: i32,
259    #[prost(double, tag = "6")]
260    pub audio_duration: f64,
261}
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct SttModelUsage {
264    #[prost(string, tag = "1")]
265    pub provider: ::prost::alloc::string::String,
266    #[prost(string, tag = "2")]
267    pub model: ::prost::alloc::string::String,
268    #[prost(int32, tag = "3")]
269    pub input_tokens: i32,
270    #[prost(int32, tag = "4")]
271    pub output_tokens: i32,
272    #[prost(double, tag = "5")]
273    pub audio_duration: f64,
274}
275#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
276pub struct InterruptionModelUsage {
277    #[prost(string, tag = "1")]
278    pub provider: ::prost::alloc::string::String,
279    #[prost(string, tag = "2")]
280    pub model: ::prost::alloc::string::String,
281    #[prost(int32, tag = "3")]
282    pub total_requests: i32,
283}
284#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
285pub struct EotModelUsage {
286    #[prost(string, tag = "1")]
287    pub provider: ::prost::alloc::string::String,
288    #[prost(string, tag = "2")]
289    pub model: ::prost::alloc::string::String,
290    #[prost(int32, tag = "3")]
291    pub total_requests: i32,
292}
293#[derive(Clone, PartialEq, ::prost::Message)]
294pub struct ModelUsage {
295    #[prost(oneof = "model_usage::Usage", tags = "1, 2, 3, 4, 5")]
296    pub usage: ::core::option::Option<model_usage::Usage>,
297}
298/// Nested message and enum types in `ModelUsage`.
299pub mod model_usage {
300    #[derive(Clone, PartialEq, ::prost::Oneof)]
301    pub enum Usage {
302        #[prost(message, tag = "1")]
303        Llm(super::LlmModelUsage),
304        #[prost(message, tag = "2")]
305        Tts(super::TtsModelUsage),
306        #[prost(message, tag = "3")]
307        Stt(super::SttModelUsage),
308        #[prost(message, tag = "4")]
309        Interruption(super::InterruptionModelUsage),
310        #[prost(message, tag = "5")]
311        Eot(super::EotModelUsage),
312    }
313}
314#[derive(Clone, PartialEq, ::prost::Message)]
315pub struct AgentSessionUsage {
316    #[prost(message, repeated, tag = "1")]
317    pub model_usage: ::prost::alloc::vec::Vec<ModelUsage>,
318}
319/// Debug/trace payload carried over the remote session wire.
320/// Internal: surfaced only to the debugger/recorder, not to user code.
321#[derive(Clone, PartialEq, ::prost::Message)]
322pub struct DebugMessage {
323    #[prost(message, optional, tag = "1")]
324    pub payload: ::core::option::Option<::pbjson_types::Struct>,
325}
326#[derive(Clone, PartialEq, ::prost::Message)]
327pub struct AgentSessionEvent {
328    #[prost(message, optional, tag = "1")]
329    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
330    #[prost(oneof = "agent_session_event::Event", tags = "10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23")]
331    pub event: ::core::option::Option<agent_session_event::Event>,
332}
333/// Nested message and enum types in `AgentSessionEvent`.
334pub mod agent_session_event {
335    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
336    pub struct AgentStateChanged {
337        #[prost(enumeration = "super::AgentState", tag = "1")]
338        pub old_state: i32,
339        #[prost(enumeration = "super::AgentState", tag = "2")]
340        pub new_state: i32,
341    }
342    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
343    pub struct UserStateChanged {
344        #[prost(enumeration = "super::UserState", tag = "1")]
345        pub old_state: i32,
346        #[prost(enumeration = "super::UserState", tag = "2")]
347        pub new_state: i32,
348    }
349    #[derive(Clone, PartialEq, ::prost::Message)]
350    pub struct ConversationItemAdded {
351        #[prost(message, optional, tag = "1")]
352        pub item: ::core::option::Option<super::chat_context::ChatItem>,
353    }
354    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
355    pub struct UserInputTranscribed {
356        #[prost(string, tag = "1")]
357        pub transcript: ::prost::alloc::string::String,
358        #[prost(bool, tag = "2")]
359        pub is_final: bool,
360        #[prost(string, optional, tag = "3")]
361        pub language: ::core::option::Option<::prost::alloc::string::String>,
362    }
363    #[derive(Clone, PartialEq, ::prost::Message)]
364    pub struct FunctionToolsStarted {
365        #[prost(message, repeated, tag = "1")]
366        pub function_calls: ::prost::alloc::vec::Vec<super::FunctionCall>,
367    }
368    #[derive(Clone, PartialEq, ::prost::Message)]
369    pub struct FunctionToolsExecuted {
370        #[prost(message, repeated, tag = "1")]
371        pub function_calls: ::prost::alloc::vec::Vec<super::FunctionCall>,
372        #[prost(message, repeated, tag = "2")]
373        pub function_call_outputs: ::prost::alloc::vec::Vec<super::FunctionCallOutput>,
374    }
375    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
376    pub struct Error {
377        #[prost(string, tag = "1")]
378        pub message: ::prost::alloc::string::String,
379    }
380    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
381    pub struct OverlappingSpeech {
382        #[prost(bool, tag = "1")]
383        pub is_interruption: bool,
384        #[prost(message, optional, tag = "2")]
385        pub overlap_started_at: ::core::option::Option<::pbjson_types::Timestamp>,
386        #[prost(double, tag = "3")]
387        pub detection_delay: f64,
388        #[prost(message, optional, tag = "4")]
389        pub detected_at: ::core::option::Option<::pbjson_types::Timestamp>,
390    }
391    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
392    pub struct AmdPrediction {
393        #[prost(message, optional, tag = "1")]
394        pub speech_duration: ::core::option::Option<::pbjson_types::Duration>,
395        #[prost(enumeration = "super::AmdCategory", tag = "2")]
396        pub category: i32,
397        #[prost(string, tag = "3")]
398        pub reason: ::prost::alloc::string::String,
399        #[prost(string, tag = "4")]
400        pub transcript: ::prost::alloc::string::String,
401        #[prost(message, optional, tag = "5")]
402        pub delay: ::core::option::Option<::pbjson_types::Duration>,
403    }
404    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
405    pub struct EotPrediction {
406        #[prost(float, tag = "1")]
407        pub probability: f32,
408        #[prost(float, tag = "2")]
409        pub threshold: f32,
410        #[prost(message, optional, tag = "3")]
411        pub inference_duration: ::core::option::Option<::pbjson_types::Duration>,
412        #[prost(message, optional, tag = "4")]
413        pub delay: ::core::option::Option<::pbjson_types::Duration>,
414    }
415    #[derive(Clone, PartialEq, ::prost::Message)]
416    pub struct SessionUsageUpdated {
417        #[prost(message, optional, tag = "1")]
418        pub usage: ::core::option::Option<super::AgentSessionUsage>,
419    }
420    /// Per-call tool lifecycle. One flat update per occurrence: a call started ->
421    /// progress updates while it runs (CallUpdated) -> the single terminal entry (Ended),
422    /// with the deferred reply voicing buffered updates advancing separately (ReplyUpdated).
423    #[derive(Clone, PartialEq, ::prost::Message)]
424    pub struct ToolExecutionUpdated {
425        #[prost(oneof = "tool_execution_updated::Update", tags = "1, 2, 3, 4")]
426        pub update: ::core::option::Option<tool_execution_updated::Update>,
427    }
428    /// Nested message and enum types in `ToolExecutionUpdated`.
429    pub mod tool_execution_updated {
430        #[derive(Clone, PartialEq, ::prost::Message)]
431        pub struct Started {
432            #[prost(message, optional, tag = "1")]
433            pub function_call: ::core::option::Option<super::super::FunctionCall>,
434        }
435        /// a progress update emitted via ctx.update() while the call runs
436        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
437        pub struct CallUpdated {
438            /// synthetic id: call_id (inline) or call_id_update_N
439            #[prost(string, tag = "1")]
440            pub id: ::prost::alloc::string::String,
441            #[prost(string, tag = "2")]
442            pub call_id: ::prost::alloc::string::String,
443            #[prost(string, tag = "3")]
444            pub message: ::prost::alloc::string::String,
445        }
446        /// the call's single terminal entry
447        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
448        pub struct Ended {
449            /// synthetic id: call_id (inline) or call_id_final (deferred)
450            #[prost(string, tag = "1")]
451            pub id: ::prost::alloc::string::String,
452            #[prost(string, tag = "2")]
453            pub call_id: ::prost::alloc::string::String,
454            /// result text or error message; unset for cancelled / empty returns
455            #[prost(string, optional, tag = "3")]
456            pub message: ::core::option::Option<::prost::alloc::string::String>,
457            /// TC_DONE, TC_ERROR, or TC_CANCELLED
458            #[prost(enumeration = "super::super::ToolCallStatus", tag = "4")]
459            pub status: i32,
460        }
461        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
462        pub struct ReplyUpdated {
463            /// buffered update ids covered by this reply; one reply can span calls
464            #[prost(string, repeated, tag = "1")]
465            pub update_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
466            #[prost(enumeration = "super::super::ToolReplyStatus", tag = "2")]
467            pub status: i32,
468            /// id of the speech that voices this reply
469            #[prost(string, tag = "3")]
470            pub speech_id: ::prost::alloc::string::String,
471        }
472        #[derive(Clone, PartialEq, ::prost::Oneof)]
473        pub enum Update {
474            #[prost(message, tag = "1")]
475            Started(Started),
476            #[prost(message, tag = "2")]
477            CallUpdated(CallUpdated),
478            #[prost(message, tag = "3")]
479            ReplyUpdated(ReplyUpdated),
480            #[prost(message, tag = "4")]
481            Ended(Ended),
482        }
483    }
484    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
485    pub struct AgentFalseInterruption {
486        /// Agent paused its own speech for what turned out not to be a real interruption (a backchannel, brief noise, etc.).
487        #[prost(bool, tag = "1")]
488        pub resumed: bool,
489    }
490    #[derive(Clone, PartialEq, ::prost::Oneof)]
491    pub enum Event {
492        #[prost(message, tag = "10")]
493        AgentStateChanged(AgentStateChanged),
494        #[prost(message, tag = "11")]
495        UserStateChanged(UserStateChanged),
496        #[prost(message, tag = "12")]
497        ConversationItemAdded(ConversationItemAdded),
498        #[prost(message, tag = "13")]
499        UserInputTranscribed(UserInputTranscribed),
500        #[prost(message, tag = "14")]
501        FunctionToolsExecuted(FunctionToolsExecuted),
502        #[prost(message, tag = "15")]
503        Error(Error),
504        #[prost(message, tag = "16")]
505        OverlappingSpeech(OverlappingSpeech),
506        #[prost(message, tag = "17")]
507        SessionUsageUpdated(SessionUsageUpdated),
508        #[prost(message, tag = "18")]
509        AmdPrediction(AmdPrediction),
510        #[prost(message, tag = "19")]
511        EotPrediction(EotPrediction),
512        #[prost(message, tag = "20")]
513        FunctionToolsStarted(FunctionToolsStarted),
514        #[prost(message, tag = "21")]
515        DebugMessage(super::DebugMessage),
516        #[prost(message, tag = "22")]
517        ToolExecutionUpdated(ToolExecutionUpdated),
518        #[prost(message, tag = "23")]
519        AgentFalseInterruption(AgentFalseInterruption),
520    }
521}
522#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
523pub struct SessionRequest {
524    #[prost(string, tag = "1")]
525    pub request_id: ::prost::alloc::string::String,
526    #[prost(oneof = "session_request::Request", tags = "2, 4, 5, 6, 7, 8, 9, 10, 11, 12")]
527    pub request: ::core::option::Option<session_request::Request>,
528}
529/// Nested message and enum types in `SessionRequest`.
530pub mod session_request {
531    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
532    pub struct Ping {
533    }
534    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
535    pub struct GetChatHistory {
536    }
537    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
538    pub struct RunInput {
539        #[prost(string, tag = "1")]
540        pub text: ::prost::alloc::string::String,
541    }
542    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
543    pub struct GetAgentInfo {
544    }
545    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
546    pub struct GetSessionState {
547    }
548    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
549    pub struct GetRtcStats {
550    }
551    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
552    pub struct GetSessionUsage {
553    }
554    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
555    pub struct GetFrameworkInfo {
556    }
557    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
558    pub struct UpdateIo {
559        #[prost(message, optional, tag = "1")]
560        pub input: ::core::option::Option<update_io::Input>,
561        #[prost(message, optional, tag = "2")]
562        pub output: ::core::option::Option<update_io::Output>,
563    }
564    /// Nested message and enum types in `UpdateIO`.
565    pub mod update_io {
566        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
567        pub struct Input {
568            #[prost(bool, optional, tag = "1")]
569            pub audio_enabled: ::core::option::Option<bool>,
570            #[prost(bool, optional, tag = "2")]
571            pub video_enabled: ::core::option::Option<bool>,
572        }
573        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
574        pub struct Output {
575            #[prost(bool, optional, tag = "1")]
576            pub audio_enabled: ::core::option::Option<bool>,
577            #[prost(bool, optional, tag = "2")]
578            pub video_enabled: ::core::option::Option<bool>,
579            #[prost(bool, optional, tag = "3")]
580            pub transcription_enabled: ::core::option::Option<bool>,
581        }
582    }
583    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
584    pub struct FinalizeSimulation {
585        #[prost(bool, tag = "1")]
586        pub provisional_success: bool,
587        #[prost(string, tag = "2")]
588        pub provisional_reason: ::prost::alloc::string::String,
589    }
590    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
591    pub enum Request {
592        #[prost(message, tag = "2")]
593        Ping(Ping),
594        #[prost(message, tag = "4")]
595        GetChatHistory(GetChatHistory),
596        #[prost(message, tag = "5")]
597        RunInput(RunInput),
598        #[prost(message, tag = "6")]
599        GetAgentInfo(GetAgentInfo),
600        #[prost(message, tag = "7")]
601        GetSessionState(GetSessionState),
602        #[prost(message, tag = "8")]
603        GetRtcStats(GetRtcStats),
604        #[prost(message, tag = "9")]
605        GetSessionUsage(GetSessionUsage),
606        #[prost(message, tag = "10")]
607        GetFrameworkInfo(GetFrameworkInfo),
608        #[prost(message, tag = "11")]
609        UpdateIo(UpdateIo),
610        #[prost(message, tag = "12")]
611        FinalizeSimulation(FinalizeSimulation),
612    }
613}
614#[derive(Clone, PartialEq, ::prost::Message)]
615pub struct SessionResponse {
616    #[prost(string, tag = "1")]
617    pub request_id: ::prost::alloc::string::String,
618    #[prost(string, optional, tag = "2")]
619    pub error: ::core::option::Option<::prost::alloc::string::String>,
620    #[prost(oneof = "session_response::Response", tags = "3, 5, 6, 7, 8, 9, 10, 11, 12, 13")]
621    pub response: ::core::option::Option<session_response::Response>,
622}
623/// Nested message and enum types in `SessionResponse`.
624pub mod session_response {
625    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
626    pub struct Pong {
627    }
628    #[derive(Clone, PartialEq, ::prost::Message)]
629    pub struct GetChatHistoryResponse {
630        #[prost(message, repeated, tag = "1")]
631        pub items: ::prost::alloc::vec::Vec<super::chat_context::ChatItem>,
632    }
633    #[derive(Clone, PartialEq, ::prost::Message)]
634    pub struct GetAgentInfoResponse {
635        #[prost(string, tag = "1")]
636        pub id: ::prost::alloc::string::String,
637        #[prost(string, optional, tag = "2")]
638        pub instructions: ::core::option::Option<::prost::alloc::string::String>,
639        #[prost(string, repeated, tag = "3")]
640        pub tools: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
641        #[prost(message, repeated, tag = "4")]
642        pub chat_ctx: ::prost::alloc::vec::Vec<super::chat_context::ChatItem>,
643    }
644    #[derive(Clone, PartialEq, ::prost::Message)]
645    pub struct RunInputResponse {
646        #[prost(message, repeated, tag = "1")]
647        pub items: ::prost::alloc::vec::Vec<super::chat_context::ChatItem>,
648    }
649    #[derive(Clone, PartialEq, ::prost::Message)]
650    pub struct GetSessionStateResponse {
651        #[prost(enumeration = "super::AgentState", tag = "1")]
652        pub agent_state: i32,
653        #[prost(enumeration = "super::UserState", tag = "2")]
654        pub user_state: i32,
655        #[prost(string, tag = "3")]
656        pub agent_id: ::prost::alloc::string::String,
657        #[prost(map = "string, string", tag = "4")]
658        pub options: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
659        #[prost(message, optional, tag = "5")]
660        pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
661    }
662    #[derive(Clone, PartialEq, ::prost::Message)]
663    pub struct GetRtcStatsResponse {
664        #[prost(message, repeated, tag = "1")]
665        pub publisher_stats: ::prost::alloc::vec::Vec<::pbjson_types::Struct>,
666        #[prost(message, repeated, tag = "2")]
667        pub subscriber_stats: ::prost::alloc::vec::Vec<::pbjson_types::Struct>,
668    }
669    #[derive(Clone, PartialEq, ::prost::Message)]
670    pub struct GetSessionUsageResponse {
671        #[prost(message, optional, tag = "1")]
672        pub usage: ::core::option::Option<super::AgentSessionUsage>,
673        #[prost(message, optional, tag = "2")]
674        pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
675    }
676    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
677    pub struct GetFrameworkInfoResponse {
678        #[prost(string, tag = "1")]
679        pub sdk: ::prost::alloc::string::String,
680        #[prost(string, tag = "2")]
681        pub sdk_version: ::prost::alloc::string::String,
682    }
683    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
684    pub struct UpdateIoResponse {
685    }
686    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
687    pub struct FinalizeSimulationResponse {
688        #[prost(message, optional, tag = "1")]
689        pub user_verdict: ::core::option::Option<finalize_simulation_response::SimulationVerdict>,
690    }
691    /// Nested message and enum types in `FinalizeSimulationResponse`.
692    pub mod finalize_simulation_response {
693        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
694        pub struct SimulationVerdict {
695            #[prost(bool, tag = "1")]
696            pub success: bool,
697            #[prost(string, tag = "2")]
698            pub reason: ::prost::alloc::string::String,
699        }
700    }
701    #[derive(Clone, PartialEq, ::prost::Oneof)]
702    pub enum Response {
703        #[prost(message, tag = "3")]
704        Pong(Pong),
705        #[prost(message, tag = "5")]
706        GetChatHistory(GetChatHistoryResponse),
707        #[prost(message, tag = "6")]
708        RunInput(RunInputResponse),
709        #[prost(message, tag = "7")]
710        GetAgentInfo(GetAgentInfoResponse),
711        #[prost(message, tag = "8")]
712        GetSessionState(GetSessionStateResponse),
713        #[prost(message, tag = "9")]
714        GetRtcStats(GetRtcStatsResponse),
715        #[prost(message, tag = "10")]
716        GetSessionUsage(GetSessionUsageResponse),
717        #[prost(message, tag = "11")]
718        GetFrameworkInfo(GetFrameworkInfoResponse),
719        #[prost(message, tag = "12")]
720        UpdateIo(UpdateIoResponse),
721        #[prost(message, tag = "13")]
722        FinalizeSimulation(FinalizeSimulationResponse),
723    }
724}
725#[derive(Clone, PartialEq, ::prost::Message)]
726pub struct AgentSessionMessage {
727    #[prost(oneof = "agent_session_message::Message", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
728    pub message: ::core::option::Option<agent_session_message::Message>,
729}
730/// Nested message and enum types in `AgentSessionMessage`.
731pub mod agent_session_message {
732    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
733    pub struct ConsoleIo {
734    }
735    /// Nested message and enum types in `ConsoleIO`.
736    pub mod console_io {
737        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
738        pub struct AudioFrame {
739            #[prost(bytes = "vec", tag = "1")]
740            pub data: ::prost::alloc::vec::Vec<u8>,
741            #[prost(uint32, tag = "2")]
742            pub sample_rate: u32,
743            #[prost(uint32, tag = "3")]
744            pub num_channels: u32,
745            #[prost(uint32, tag = "4")]
746            pub samples_per_channel: u32,
747        }
748        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
749        pub struct AudioPlaybackFlush {
750        }
751        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
752        pub struct AudioPlaybackClear {
753        }
754        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
755        pub struct AudioPlaybackFinished {
756        }
757    }
758    #[derive(Clone, PartialEq, ::prost::Oneof)]
759    pub enum Message {
760        #[prost(message, tag = "1")]
761        AudioInput(console_io::AudioFrame),
762        #[prost(message, tag = "2")]
763        AudioOutput(console_io::AudioFrame),
764        #[prost(message, tag = "3")]
765        Event(super::AgentSessionEvent),
766        #[prost(message, tag = "4")]
767        Request(super::SessionRequest),
768        #[prost(message, tag = "5")]
769        Response(super::SessionResponse),
770        #[prost(message, tag = "6")]
771        AudioPlaybackFlush(console_io::AudioPlaybackFlush),
772        #[prost(message, tag = "7")]
773        AudioPlaybackClear(console_io::AudioPlaybackClear),
774        #[prost(message, tag = "8")]
775        AudioPlaybackFinished(console_io::AudioPlaybackFinished),
776    }
777}
778#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
779#[repr(i32)]
780pub enum ChatRole {
781    Developer = 0,
782    System = 1,
783    User = 2,
784    Assistant = 3,
785}
786impl ChatRole {
787    /// String value of the enum field names used in the ProtoBuf definition.
788    ///
789    /// The values are not transformed in any way and thus are considered stable
790    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
791    pub fn as_str_name(&self) -> &'static str {
792        match self {
793            Self::Developer => "DEVELOPER",
794            Self::System => "SYSTEM",
795            Self::User => "USER",
796            Self::Assistant => "ASSISTANT",
797        }
798    }
799    /// Creates an enum from field names used in the ProtoBuf definition.
800    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
801        match value {
802            "DEVELOPER" => Some(Self::Developer),
803            "SYSTEM" => Some(Self::System),
804            "USER" => Some(Self::User),
805            "ASSISTANT" => Some(Self::Assistant),
806            _ => None,
807        }
808    }
809}
810#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
811#[repr(i32)]
812pub enum AgentState {
813    AsInitializing = 0,
814    AsIdle = 1,
815    AsListening = 2,
816    AsThinking = 3,
817    AsSpeaking = 4,
818}
819impl AgentState {
820    /// String value of the enum field names used in the ProtoBuf definition.
821    ///
822    /// The values are not transformed in any way and thus are considered stable
823    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
824    pub fn as_str_name(&self) -> &'static str {
825        match self {
826            Self::AsInitializing => "AS_INITIALIZING",
827            Self::AsIdle => "AS_IDLE",
828            Self::AsListening => "AS_LISTENING",
829            Self::AsThinking => "AS_THINKING",
830            Self::AsSpeaking => "AS_SPEAKING",
831        }
832    }
833    /// Creates an enum from field names used in the ProtoBuf definition.
834    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
835        match value {
836            "AS_INITIALIZING" => Some(Self::AsInitializing),
837            "AS_IDLE" => Some(Self::AsIdle),
838            "AS_LISTENING" => Some(Self::AsListening),
839            "AS_THINKING" => Some(Self::AsThinking),
840            "AS_SPEAKING" => Some(Self::AsSpeaking),
841            _ => None,
842        }
843    }
844}
845#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
846#[repr(i32)]
847pub enum UserState {
848    UsSpeaking = 0,
849    UsListening = 1,
850    UsAway = 2,
851}
852impl UserState {
853    /// String value of the enum field names used in the ProtoBuf definition.
854    ///
855    /// The values are not transformed in any way and thus are considered stable
856    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
857    pub fn as_str_name(&self) -> &'static str {
858        match self {
859            Self::UsSpeaking => "US_SPEAKING",
860            Self::UsListening => "US_LISTENING",
861            Self::UsAway => "US_AWAY",
862        }
863    }
864    /// Creates an enum from field names used in the ProtoBuf definition.
865    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
866        match value {
867            "US_SPEAKING" => Some(Self::UsSpeaking),
868            "US_LISTENING" => Some(Self::UsListening),
869            "US_AWAY" => Some(Self::UsAway),
870            _ => None,
871        }
872    }
873}
874#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
875#[repr(i32)]
876pub enum ToolCallStatus {
877    TcRunning = 0,
878    TcDone = 1,
879    TcError = 2,
880    TcCancelled = 3,
881}
882impl ToolCallStatus {
883    /// String value of the enum field names used in the ProtoBuf definition.
884    ///
885    /// The values are not transformed in any way and thus are considered stable
886    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
887    pub fn as_str_name(&self) -> &'static str {
888        match self {
889            Self::TcRunning => "TC_RUNNING",
890            Self::TcDone => "TC_DONE",
891            Self::TcError => "TC_ERROR",
892            Self::TcCancelled => "TC_CANCELLED",
893        }
894    }
895    /// Creates an enum from field names used in the ProtoBuf definition.
896    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
897        match value {
898            "TC_RUNNING" => Some(Self::TcRunning),
899            "TC_DONE" => Some(Self::TcDone),
900            "TC_ERROR" => Some(Self::TcError),
901            "TC_CANCELLED" => Some(Self::TcCancelled),
902            _ => None,
903        }
904    }
905}
906#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
907#[repr(i32)]
908pub enum ToolReplyStatus {
909    TrScheduled = 0,
910    TrCompleted = 1,
911    TrInterrupted = 2,
912    TrSkipped = 3,
913}
914impl ToolReplyStatus {
915    /// String value of the enum field names used in the ProtoBuf definition.
916    ///
917    /// The values are not transformed in any way and thus are considered stable
918    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
919    pub fn as_str_name(&self) -> &'static str {
920        match self {
921            Self::TrScheduled => "TR_SCHEDULED",
922            Self::TrCompleted => "TR_COMPLETED",
923            Self::TrInterrupted => "TR_INTERRUPTED",
924            Self::TrSkipped => "TR_SKIPPED",
925        }
926    }
927    /// Creates an enum from field names used in the ProtoBuf definition.
928    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
929        match value {
930            "TR_SCHEDULED" => Some(Self::TrScheduled),
931            "TR_COMPLETED" => Some(Self::TrCompleted),
932            "TR_INTERRUPTED" => Some(Self::TrInterrupted),
933            "TR_SKIPPED" => Some(Self::TrSkipped),
934            _ => None,
935        }
936    }
937}
938#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
939#[repr(i32)]
940pub enum AmdCategory {
941    AmdUnknown = 0,
942    AmdHuman = 1,
943    AmdMachineIvr = 2,
944    AmdMachineVm = 3,
945    AmdMachineUnavailable = 4,
946    AmdUncertain = 5,
947}
948impl AmdCategory {
949    /// String value of the enum field names used in the ProtoBuf definition.
950    ///
951    /// The values are not transformed in any way and thus are considered stable
952    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
953    pub fn as_str_name(&self) -> &'static str {
954        match self {
955            Self::AmdUnknown => "AMD_UNKNOWN",
956            Self::AmdHuman => "AMD_HUMAN",
957            Self::AmdMachineIvr => "AMD_MACHINE_IVR",
958            Self::AmdMachineVm => "AMD_MACHINE_VM",
959            Self::AmdMachineUnavailable => "AMD_MACHINE_UNAVAILABLE",
960            Self::AmdUncertain => "AMD_UNCERTAIN",
961        }
962    }
963    /// Creates an enum from field names used in the ProtoBuf definition.
964    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
965        match value {
966            "AMD_UNKNOWN" => Some(Self::AmdUnknown),
967            "AMD_HUMAN" => Some(Self::AmdHuman),
968            "AMD_MACHINE_IVR" => Some(Self::AmdMachineIvr),
969            "AMD_MACHINE_VM" => Some(Self::AmdMachineVm),
970            "AMD_MACHINE_UNAVAILABLE" => Some(Self::AmdMachineUnavailable),
971            "AMD_UNCERTAIN" => Some(Self::AmdUncertain),
972            _ => None,
973        }
974    }
975}
976/// Request to send a text message to an agent.
977#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
978pub struct TextMessageRequest {
979    #[prost(string, tag = "1")]
980    pub text: ::prost::alloc::string::String,
981    #[prost(string, tag = "2")]
982    pub message_id: ::prost::alloc::string::String,
983    #[prost(string, tag = "3")]
984    pub session_id: ::prost::alloc::string::String,
985    #[prost(string, tag = "4")]
986    pub agent_name: ::prost::alloc::string::String,
987    #[prost(string, tag = "5")]
988    pub metadata: ::prost::alloc::string::String,
989    #[prost(message, optional, tag = "6")]
990    pub session_state: ::core::option::Option<AgentSessionState>,
991}
992/// Response to a text message request, multiple responses may be sent for a single request until it is complete.
993#[derive(Clone, PartialEq, ::prost::Message)]
994pub struct TextMessageResponse {
995    #[prost(string, tag = "1")]
996    pub message_id: ::prost::alloc::string::String,
997    #[prost(string, tag = "2")]
998    pub session_id: ::prost::alloc::string::String,
999    #[prost(oneof = "text_message_response::Event", tags = "3, 4, 5, 6, 7")]
1000    pub event: ::core::option::Option<text_message_response::Event>,
1001}
1002/// Nested message and enum types in `TextMessageResponse`.
1003pub mod text_message_response {
1004    #[derive(Clone, PartialEq, ::prost::Oneof)]
1005    pub enum Event {
1006        #[prost(message, tag = "3")]
1007        Message(super::ChatMessage),
1008        #[prost(message, tag = "4")]
1009        FunctionCall(super::FunctionCall),
1010        #[prost(message, tag = "5")]
1011        FunctionCallOutput(super::FunctionCallOutput),
1012        #[prost(message, tag = "6")]
1013        AgentHandoff(super::AgentHandoff),
1014        #[prost(message, tag = "7")]
1015        Complete(super::TextMessageComplete),
1016    }
1017}
1018/// Indicates the text message session is complete.
1019#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1020pub struct TextMessageComplete {
1021    #[prost(oneof = "text_message_complete::Result", tags = "1, 2")]
1022    pub result: ::core::option::Option<text_message_complete::Result>,
1023}
1024/// Nested message and enum types in `TextMessageComplete`.
1025pub mod text_message_complete {
1026    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1027    pub enum Result {
1028        #[prost(message, tag = "1")]
1029        SessionState(super::AgentSessionState),
1030        #[prost(message, tag = "2")]
1031        Error(super::TextMessageError),
1032    }
1033}
1034#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1035pub struct AgentSessionState {
1036    #[prost(uint64, tag = "1")]
1037    pub version: u64,
1038    #[prost(oneof = "agent_session_state::Data", tags = "2, 3")]
1039    pub data: ::core::option::Option<agent_session_state::Data>,
1040}
1041/// Nested message and enum types in `AgentSessionState`.
1042pub mod agent_session_state {
1043    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1044    pub enum Data {
1045        #[prost(bytes, tag = "2")]
1046        Snapshot(::prost::alloc::vec::Vec<u8>),
1047        #[prost(bytes, tag = "3")]
1048        Delta(::prost::alloc::vec::Vec<u8>),
1049    }
1050}
1051#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1052pub struct TextMessageError {
1053    #[prost(string, tag = "1")]
1054    pub message: ::prost::alloc::string::String,
1055    #[prost(enumeration = "TextMessageErrorCode", tag = "2")]
1056    pub code: i32,
1057}
1058#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1059#[repr(i32)]
1060pub enum TextMessageErrorCode {
1061    /// Unexpected internal error
1062    InternalError = 0,
1063    /// Session state not found in cache or version mismatch
1064    SessionStateNotFound = 1,
1065    /// An exception was raised inside the user's text handler
1066    TextHandlerError = 2,
1067    /// The worker process exited before the text session completed
1068    ProcessClosed = 3,
1069}
1070impl TextMessageErrorCode {
1071    /// String value of the enum field names used in the ProtoBuf definition.
1072    ///
1073    /// The values are not transformed in any way and thus are considered stable
1074    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1075    pub fn as_str_name(&self) -> &'static str {
1076        match self {
1077            Self::InternalError => "INTERNAL_ERROR",
1078            Self::SessionStateNotFound => "SESSION_STATE_NOT_FOUND",
1079            Self::TextHandlerError => "TEXT_HANDLER_ERROR",
1080            Self::ProcessClosed => "PROCESS_CLOSED",
1081        }
1082    }
1083    /// Creates an enum from field names used in the ProtoBuf definition.
1084    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1085        match value {
1086            "INTERNAL_ERROR" => Some(Self::InternalError),
1087            "SESSION_STATE_NOT_FOUND" => Some(Self::SessionStateNotFound),
1088            "TEXT_HANDLER_ERROR" => Some(Self::TextHandlerError),
1089            "PROCESS_CLOSED" => Some(Self::ProcessClosed),
1090            _ => None,
1091        }
1092    }
1093}
1094#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1095pub struct AgentThread {
1096}
1097/// Nested message and enum types in `AgentThread`.
1098pub mod agent_thread {
1099    #[derive(Clone, PartialEq, ::prost::Message)]
1100    pub struct CreateRequest {
1101        /// Groups threads, e.g. by user: an application-defined value, typically the
1102        /// user's identity. An AgentThreadGrant is scoped by it.
1103        #[prost(string, tag = "1")]
1104        pub scope: ::prost::alloc::string::String,
1105        #[prost(map = "string, string", tag = "2")]
1106        pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
1107        /// Unset takes the server default.
1108        #[prost(message, optional, tag = "3")]
1109        pub idle_ttl: ::core::option::Option<::pbjson_types::Duration>,
1110    }
1111    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1112    pub struct GetRequest {
1113        #[prost(string, tag = "1")]
1114        pub thread_id: ::prost::alloc::string::String,
1115    }
1116    /// The threads of one scope, newest first.
1117    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1118    pub struct ListRequest {
1119        #[prost(string, tag = "1")]
1120        pub scope: ::prost::alloc::string::String,
1121        /// next_page_token of the previous ListResponse; empty for the first page.
1122        #[prost(string, tag = "2")]
1123        pub page_token: ::prost::alloc::string::String,
1124        #[prost(int32, tag = "3")]
1125        pub limit: i32,
1126    }
1127    #[derive(Clone, PartialEq, ::prost::Message)]
1128    pub struct ListResponse {
1129        #[prost(message, repeated, tag = "1")]
1130        pub threads: ::prost::alloc::vec::Vec<Thread>,
1131        /// Empty when exhausted.
1132        #[prost(string, tag = "2")]
1133        pub next_page_token: ::prost::alloc::string::String,
1134    }
1135    #[derive(Clone, PartialEq, ::prost::Message)]
1136    pub struct UpdateRequest {
1137        #[prost(string, tag = "1")]
1138        pub thread_id: ::prost::alloc::string::String,
1139        /// Added to the existing attributes; an empty value deletes the entry.
1140        #[prost(map = "string, string", tag = "2")]
1141        pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
1142        /// Every update counts as activity and pushes expires_at out by idle_ttl.
1143        #[prost(message, optional, tag = "3")]
1144        pub idle_ttl: ::core::option::Option<::pbjson_types::Duration>,
1145    }
1146    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1147    pub struct DeleteRequest {
1148        #[prost(string, tag = "1")]
1149        pub thread_id: ::prost::alloc::string::String,
1150    }
1151    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1152    pub struct DeleteResponse {
1153    }
1154    /// The thread's chat items, oldest first unless sort_order says otherwise.
1155    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1156    pub struct GetItemsRequest {
1157        #[prost(string, tag = "1")]
1158        pub thread_id: ::prost::alloc::string::String,
1159        /// One agent's items; empty for every agent's.
1160        #[prost(string, tag = "2")]
1161        pub agent: ::prost::alloc::string::String,
1162        /// next_page_token of the previous GetItemsResponse; empty for the first page.
1163        #[prost(string, tag = "3")]
1164        pub page_token: ::prost::alloc::string::String,
1165        #[prost(int32, tag = "4")]
1166        pub limit: i32,
1167        /// Unset or ASC is oldest first. DESC starts from the latest item and each
1168        /// next_page_token walks back through older ones.
1169        #[prost(enumeration = "SortOrder", tag = "5")]
1170        pub sort_order: i32,
1171    }
1172    #[derive(Clone, PartialEq, ::prost::Message)]
1173    pub struct GetItemsResponse {
1174        #[prost(message, repeated, tag = "1")]
1175        pub items: ::prost::alloc::vec::Vec<Item>,
1176        /// Empty when exhausted.
1177        #[prost(string, tag = "2")]
1178        pub next_page_token: ::prost::alloc::string::String,
1179    }
1180    /// One chat item of an agent. Stored as the JSON of
1181    /// ChatContext.ChatItem (items.payload in thread_schema_v1.sql).
1182    #[derive(Clone, PartialEq, ::prost::Message)]
1183    pub struct Item {
1184        #[prost(string, tag = "1")]
1185        pub agent: ::prost::alloc::string::String,
1186        /// Position in the agent's history.
1187        #[prost(int64, tag = "2")]
1188        pub seq: i64,
1189        /// The A2A message the item came from.
1190        #[prost(string, tag = "3")]
1191        pub message_id: ::prost::alloc::string::String,
1192        #[prost(message, optional, tag = "4")]
1193        pub item: ::core::option::Option<super::chat_context::ChatItem>,
1194    }
1195    #[derive(Clone, PartialEq, ::prost::Message)]
1196    pub struct Thread {
1197        #[prost(string, tag = "1")]
1198        pub thread_id: ::prost::alloc::string::String,
1199        #[prost(string, tag = "2")]
1200        pub scope: ::prost::alloc::string::String,
1201        #[prost(map = "string, string", tag = "3")]
1202        pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
1203        #[prost(message, optional, tag = "4")]
1204        pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1205        #[prost(message, optional, tag = "5")]
1206        pub last_active: ::core::option::Option<::pbjson_types::Timestamp>,
1207        /// last_active + idle_ttl; every update pushes it out. The thread and its
1208        /// database are deleted once it passes.
1209        #[prost(message, optional, tag = "6")]
1210        pub expires_at: ::core::option::Option<::pbjson_types::Timestamp>,
1211        #[prost(message, optional, tag = "7")]
1212        pub idle_ttl: ::core::option::Option<::pbjson_types::Duration>,
1213        /// The thread's database ("DB_..."), created with the thread.
1214        #[prost(string, tag = "8")]
1215        pub database_id: ::prost::alloc::string::String,
1216    }
1217    /// Direction of a listing. Each request documents what unset means.
1218    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1219    #[repr(i32)]
1220    pub enum SortOrder {
1221        Unspecified = 0,
1222        Asc = 1,
1223        Desc = 2,
1224    }
1225    impl SortOrder {
1226        /// String value of the enum field names used in the ProtoBuf definition.
1227        ///
1228        /// The values are not transformed in any way and thus are considered stable
1229        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1230        pub fn as_str_name(&self) -> &'static str {
1231            match self {
1232                Self::Unspecified => "SORT_ORDER_UNSPECIFIED",
1233                Self::Asc => "SORT_ORDER_ASC",
1234                Self::Desc => "SORT_ORDER_DESC",
1235            }
1236        }
1237        /// Creates an enum from field names used in the ProtoBuf definition.
1238        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1239            match value {
1240                "SORT_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
1241                "SORT_ORDER_ASC" => Some(Self::Asc),
1242                "SORT_ORDER_DESC" => Some(Self::Desc),
1243                _ => None,
1244            }
1245        }
1246    }
1247}
1248/// AgentTask: background work an agent runs within a thread, such as a booking
1249/// that takes minutes.
1250#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1251pub struct AgentTask {
1252}
1253/// Nested message and enum types in `AgentTask`.
1254pub mod agent_task {
1255    /// A thread's tasks, oldest first.
1256    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1257    pub struct GetTasksRequest {
1258        #[prost(string, tag = "1")]
1259        pub thread_id: ::prost::alloc::string::String,
1260        /// Unset for every status.
1261        #[prost(enumeration = "Status", optional, tag = "2")]
1262        pub status: ::core::option::Option<i32>,
1263        /// next_page_token of the previous GetTasksResponse; empty for the first page.
1264        #[prost(string, tag = "3")]
1265        pub page_token: ::prost::alloc::string::String,
1266        #[prost(int32, tag = "4")]
1267        pub limit: i32,
1268    }
1269    #[derive(Clone, PartialEq, ::prost::Message)]
1270    pub struct GetTasksResponse {
1271        #[prost(message, repeated, tag = "1")]
1272        pub tasks: ::prost::alloc::vec::Vec<Task>,
1273        /// Empty when exhausted.
1274        #[prost(string, tag = "2")]
1275        pub next_page_token: ::prost::alloc::string::String,
1276    }
1277    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1278    pub struct Task {
1279        #[prost(string, tag = "1")]
1280        pub task_id: ::prost::alloc::string::String,
1281        #[prost(string, tag = "2")]
1282        pub thread_id: ::prost::alloc::string::String,
1283        /// The task's name, as the agent defines it.
1284        #[prost(string, tag = "3")]
1285        pub name: ::prost::alloc::string::String,
1286        #[prost(enumeration = "Status", tag = "4")]
1287        pub status: i32,
1288        #[prost(message, optional, tag = "5")]
1289        pub updated_at: ::core::option::Option<::pbjson_types::Timestamp>,
1290    }
1291    /// A task is never UNSPECIFIED.
1292    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1293    #[repr(i32)]
1294    pub enum Status {
1295        Unspecified = 0,
1296        Running = 1,
1297        Completed = 2,
1298        Failed = 3,
1299        Canceled = 4,
1300    }
1301    impl Status {
1302        /// String value of the enum field names used in the ProtoBuf definition.
1303        ///
1304        /// The values are not transformed in any way and thus are considered stable
1305        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1306        pub fn as_str_name(&self) -> &'static str {
1307            match self {
1308                Self::Unspecified => "UNSPECIFIED",
1309                Self::Running => "RUNNING",
1310                Self::Completed => "COMPLETED",
1311                Self::Failed => "FAILED",
1312                Self::Canceled => "CANCELED",
1313            }
1314        }
1315        /// Creates an enum from field names used in the ProtoBuf definition.
1316        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1317            match value {
1318                "UNSPECIFIED" => Some(Self::Unspecified),
1319                "RUNNING" => Some(Self::Running),
1320                "COMPLETED" => Some(Self::Completed),
1321                "FAILED" => Some(Self::Failed),
1322                "CANCELED" => Some(Self::Canceled),
1323                _ => None,
1324            }
1325        }
1326    }
1327}
1328#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1329pub struct SessionSettings {
1330    #[prost(uint32, tag = "1")]
1331    pub sample_rate: u32,
1332    #[prost(enumeration = "AudioEncoding", tag = "2")]
1333    pub encoding: i32,
1334    #[prost(oneof = "session_settings::TypeSettings", tags = "3, 4")]
1335    pub type_settings: ::core::option::Option<session_settings::TypeSettings>,
1336}
1337/// Nested message and enum types in `SessionSettings`.
1338pub mod session_settings {
1339    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1340    pub enum TypeSettings {
1341        #[prost(message, tag = "3")]
1342        EotSettings(super::EotSettings),
1343        #[prost(message, tag = "4")]
1344        InterruptionSettings(super::InterruptionSettings),
1345    }
1346}
1347#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1348pub struct InferenceError {
1349    #[prost(string, tag = "1")]
1350    pub message: ::prost::alloc::string::String,
1351    /// error code follows the HTTP status code convention
1352    /// 4xx for client errors
1353    /// 5xx for server errors
1354    #[prost(uint32, tag = "2")]
1355    pub code: u32,
1356}
1357// --- End of Turn (EOT) Settings ---
1358
1359#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1360pub struct EotSettings {
1361    #[prost(message, optional, tag = "1")]
1362    pub detection_interval: ::core::option::Option<::pbjson_types::Duration>,
1363}
1364// --- Interruption Settings ---
1365
1366#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1367pub struct InterruptionSettings {
1368    /// detection threshold in range \[0.0, 1.0\]; higher values are less sensitive
1369    #[prost(float, tag = "1")]
1370    pub threshold: f32,
1371    /// minimum number of frames with probability greater than threshold to trigger an interruption
1372    #[prost(uint32, tag = "2")]
1373    pub min_frames: u32,
1374    #[prost(message, optional, tag = "3")]
1375    pub max_audio_duration: ::core::option::Option<::pbjson_types::Duration>,
1376    #[prost(message, optional, tag = "4")]
1377    pub audio_prefix_duration: ::core::option::Option<::pbjson_types::Duration>,
1378    #[prost(message, optional, tag = "5")]
1379    pub detection_interval: ::core::option::Option<::pbjson_types::Duration>,
1380}
1381// --- Client -> Server ---
1382
1383#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1384pub struct SessionCreate {
1385    #[prost(message, optional, tag = "1")]
1386    pub settings: ::core::option::Option<SessionSettings>,
1387}
1388#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1389pub struct InputAudio {
1390    #[prost(bytes = "vec", tag = "1")]
1391    pub audio: ::prost::alloc::vec::Vec<u8>,
1392    #[prost(message, optional, tag = "2")]
1393    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1394    #[prost(uint32, tag = "3")]
1395    pub num_samples: u32,
1396}
1397#[derive(Clone, PartialEq, ::prost::Message)]
1398pub struct EotInputChatContext {
1399    #[prost(message, repeated, tag = "1")]
1400    pub messages: ::prost::alloc::vec::Vec<ChatMessage>,
1401}
1402#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1403pub struct SessionFlush {
1404}
1405#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1406pub struct SessionClose {
1407}
1408#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1409pub struct InferenceStart {
1410    #[prost(string, tag = "1")]
1411    pub request_id: ::prost::alloc::string::String,
1412}
1413#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1414pub struct InferenceStop {
1415    #[prost(string, tag = "1")]
1416    pub request_id: ::prost::alloc::string::String,
1417}
1418/// audio buffer sentinel messages
1419#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1420pub struct BufferStart {
1421}
1422#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1423pub struct BufferStop {
1424}
1425#[derive(Clone, PartialEq, ::prost::Message)]
1426pub struct ClientMessage {
1427    #[prost(message, optional, tag = "1")]
1428    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1429    #[prost(oneof = "client_message::Message", tags = "2, 3, 4, 5, 6, 7, 8, 9, 10")]
1430    pub message: ::core::option::Option<client_message::Message>,
1431}
1432/// Nested message and enum types in `ClientMessage`.
1433pub mod client_message {
1434    #[derive(Clone, PartialEq, ::prost::Oneof)]
1435    pub enum Message {
1436        #[prost(message, tag = "2")]
1437        SessionCreate(super::SessionCreate),
1438        #[prost(message, tag = "3")]
1439        InputAudio(super::InputAudio),
1440        #[prost(message, tag = "4")]
1441        SessionFlush(super::SessionFlush),
1442        #[prost(message, tag = "5")]
1443        SessionClose(super::SessionClose),
1444        #[prost(message, tag = "6")]
1445        InferenceStart(super::InferenceStart),
1446        #[prost(message, tag = "7")]
1447        InferenceStop(super::InferenceStop),
1448        #[prost(message, tag = "8")]
1449        BufferStart(super::BufferStart),
1450        #[prost(message, tag = "9")]
1451        BufferStop(super::BufferStop),
1452        /// only for end of turn
1453        #[prost(message, tag = "10")]
1454        EotInputChatContext(super::EotInputChatContext),
1455    }
1456}
1457// --- Server -> Model ---
1458//
1459// NOTE: these messages are not currently used on the wire between the model
1460// server (infserve) and the gateway; that communication is presently done via
1461// JSON requests and responses. They are kept here for reference and future use.
1462
1463#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1464pub struct EotInferenceRequest {
1465    #[prost(bytes = "vec", tag = "1")]
1466    pub audio: ::prost::alloc::vec::Vec<u8>,
1467    #[prost(string, tag = "2")]
1468    pub assistant_text: ::prost::alloc::string::String,
1469    #[prost(enumeration = "AudioEncoding", tag = "3")]
1470    pub encoding: i32,
1471    #[prost(uint32, tag = "4")]
1472    pub sample_rate: u32,
1473}
1474#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1475pub struct InterruptionInferenceRequest {
1476    #[prost(bytes = "vec", tag = "1")]
1477    pub audio: ::prost::alloc::vec::Vec<u8>,
1478    #[prost(enumeration = "AudioEncoding", tag = "2")]
1479    pub encoding: i32,
1480    #[prost(uint32, tag = "3")]
1481    pub sample_rate: u32,
1482}
1483#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1484pub struct InferenceRequest {
1485    #[prost(oneof = "inference_request::Request", tags = "1, 2")]
1486    pub request: ::core::option::Option<inference_request::Request>,
1487}
1488/// Nested message and enum types in `InferenceRequest`.
1489pub mod inference_request {
1490    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1491    pub enum Request {
1492        #[prost(message, tag = "1")]
1493        EotInferenceRequest(super::EotInferenceRequest),
1494        #[prost(message, tag = "2")]
1495        InterruptionInferenceRequest(super::InterruptionInferenceRequest),
1496    }
1497}
1498#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1499pub struct InferenceStats {
1500    /// proxy -> model: audio window timestamps
1501    #[prost(message, optional, tag = "1")]
1502    pub earliest_client_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1503    #[prost(message, optional, tag = "2")]
1504    pub latest_client_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1505    /// proxy side e2e latency (proxy send -> proxy receive)
1506    #[prost(message, optional, tag = "3")]
1507    pub client_e2e_latency: ::core::option::Option<::pbjson_types::Duration>,
1508    /// model side e2e latency (model endpoint receive -> model endpoint return)
1509    #[prost(message, optional, tag = "4")]
1510    pub server_e2e_latency: ::core::option::Option<::pbjson_types::Duration>,
1511    /// model side inference stats
1512    #[prost(message, optional, tag = "5")]
1513    pub preprocessing_duration: ::core::option::Option<::pbjson_types::Duration>,
1514    #[prost(message, optional, tag = "6")]
1515    pub inference_duration: ::core::option::Option<::pbjson_types::Duration>,
1516}
1517#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1518pub struct EotInferenceResponse {
1519    #[prost(float, tag = "1")]
1520    pub probability: f32,
1521    #[prost(message, optional, tag = "2")]
1522    pub stats: ::core::option::Option<InferenceStats>,
1523}
1524#[derive(Clone, PartialEq, ::prost::Message)]
1525pub struct InterruptionInferenceResponse {
1526    #[prost(bool, tag = "1")]
1527    pub is_interruption: bool,
1528    /// per frame probabilities
1529    #[prost(float, repeated, tag = "2")]
1530    pub probabilities: ::prost::alloc::vec::Vec<f32>,
1531    #[prost(message, optional, tag = "3")]
1532    pub stats: ::core::option::Option<InferenceStats>,
1533}
1534#[derive(Clone, PartialEq, ::prost::Message)]
1535pub struct InferenceResponse {
1536    #[prost(oneof = "inference_response::Response", tags = "1, 2")]
1537    pub response: ::core::option::Option<inference_response::Response>,
1538}
1539/// Nested message and enum types in `InferenceResponse`.
1540pub mod inference_response {
1541    #[derive(Clone, PartialEq, ::prost::Oneof)]
1542    pub enum Response {
1543        #[prost(message, tag = "1")]
1544        EotInferenceResponse(super::EotInferenceResponse),
1545        #[prost(message, tag = "2")]
1546        InterruptionInferenceResponse(super::InterruptionInferenceResponse),
1547    }
1548}
1549// --- Server -> Client ---
1550
1551#[derive(Clone, PartialEq, ::prost::Message)]
1552pub struct SessionCreated {
1553    /// Server-recommended default detection thresholds keyed by language code
1554    /// (e.g. "en", "es"). The threshold semantics match the session type: EOT
1555    /// probability threshold for EOT sessions, interruption threshold for
1556    /// barge-in sessions.
1557    #[prost(map = "string, float", tag = "1")]
1558    pub default_thresholds: ::std::collections::HashMap<::prost::alloc::string::String, f32>,
1559    /// Catch-all default applied to languages not present in default_thresholds.
1560    #[prost(float, tag = "2")]
1561    pub default_threshold: f32,
1562    /// same structure, but for backchannel
1563    #[prost(map = "string, float", tag = "3")]
1564    pub default_backchannel_thresholds: ::std::collections::HashMap<::prost::alloc::string::String, f32>,
1565    #[prost(float, tag = "4")]
1566    pub default_backchannel_threshold: f32,
1567}
1568#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1569pub struct InferenceStarted {
1570}
1571#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1572pub struct InferenceStopped {
1573}
1574#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1575pub struct SessionClosed {
1576}
1577#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1578pub struct EotPrediction {
1579    #[prost(float, tag = "1")]
1580    pub probability: f32,
1581    #[prost(message, optional, tag = "2")]
1582    pub inference_stats: ::core::option::Option<InferenceStats>,
1583    #[prost(enumeration = "eot_prediction::EotBackend", tag = "3")]
1584    pub backend: i32,
1585    #[prost(float, tag = "4")]
1586    pub backchannel_probability: f32,
1587}
1588/// Nested message and enum types in `EotPrediction`.
1589pub mod eot_prediction {
1590    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1591    #[repr(i32)]
1592    pub enum EotBackend {
1593        Unknown = 0,
1594        Multimodal = 1,
1595        Text = 2,
1596    }
1597    impl EotBackend {
1598        /// String value of the enum field names used in the ProtoBuf definition.
1599        ///
1600        /// The values are not transformed in any way and thus are considered stable
1601        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1602        pub fn as_str_name(&self) -> &'static str {
1603            match self {
1604                Self::Unknown => "EOT_BACKEND_UNKNOWN",
1605                Self::Multimodal => "EOT_BACKEND_MULTIMODAL",
1606                Self::Text => "EOT_BACKEND_TEXT",
1607            }
1608        }
1609        /// Creates an enum from field names used in the ProtoBuf definition.
1610        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1611            match value {
1612                "EOT_BACKEND_UNKNOWN" => Some(Self::Unknown),
1613                "EOT_BACKEND_MULTIMODAL" => Some(Self::Multimodal),
1614                "EOT_BACKEND_TEXT" => Some(Self::Text),
1615                _ => None,
1616            }
1617        }
1618    }
1619}
1620#[derive(Clone, PartialEq, ::prost::Message)]
1621pub struct InterruptionPrediction {
1622    #[prost(bool, tag = "1")]
1623    pub is_interruption: bool,
1624    #[prost(float, repeated, tag = "2")]
1625    pub probabilities: ::prost::alloc::vec::Vec<f32>,
1626    #[prost(message, optional, tag = "3")]
1627    pub inference_stats: ::core::option::Option<InferenceStats>,
1628}
1629#[derive(Clone, PartialEq, ::prost::Message)]
1630pub struct ServerMessage {
1631    #[prost(message, optional, tag = "1")]
1632    pub server_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1633    #[prost(string, optional, tag = "2")]
1634    pub request_id: ::core::option::Option<::prost::alloc::string::String>,
1635    /// echoes the client-side created_at timestamp
1636    #[prost(message, optional, tag = "3")]
1637    pub client_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1638    #[prost(oneof = "server_message::Message", tags = "4, 5, 6, 7, 8, 9, 10")]
1639    pub message: ::core::option::Option<server_message::Message>,
1640}
1641/// Nested message and enum types in `ServerMessage`.
1642pub mod server_message {
1643    #[derive(Clone, PartialEq, ::prost::Oneof)]
1644    pub enum Message {
1645        #[prost(message, tag = "4")]
1646        SessionCreated(super::SessionCreated),
1647        #[prost(message, tag = "5")]
1648        InferenceStarted(super::InferenceStarted),
1649        #[prost(message, tag = "6")]
1650        InferenceStopped(super::InferenceStopped),
1651        #[prost(message, tag = "7")]
1652        SessionClosed(super::SessionClosed),
1653        #[prost(message, tag = "8")]
1654        Error(super::InferenceError),
1655        #[prost(message, tag = "9")]
1656        EotPrediction(super::EotPrediction),
1657        #[prost(message, tag = "10")]
1658        InterruptionPrediction(super::InterruptionPrediction),
1659    }
1660}
1661// --- Shared Types ---
1662
1663#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1664#[repr(i32)]
1665pub enum AudioEncoding {
1666    PcmS16le = 0,
1667    Opus = 1,
1668}
1669impl AudioEncoding {
1670    /// String value of the enum field names used in the ProtoBuf definition.
1671    ///
1672    /// The values are not transformed in any way and thus are considered stable
1673    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1674    pub fn as_str_name(&self) -> &'static str {
1675        match self {
1676            Self::PcmS16le => "AUDIO_ENCODING_PCM_S16LE",
1677            Self::Opus => "AUDIO_ENCODING_OPUS",
1678        }
1679    }
1680    /// Creates an enum from field names used in the ProtoBuf definition.
1681    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1682        match value {
1683            "AUDIO_ENCODING_PCM_S16LE" => Some(Self::PcmS16le),
1684            "AUDIO_ENCODING_OPUS" => Some(Self::Opus),
1685            _ => None,
1686        }
1687    }
1688}
1689include!("livekit.agent.serde.rs");
1690// @@protoc_insertion_point(module)