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, 24, 25")]
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        #[prost(uint32, tag = "6")]
404        pub turn_id: u32,
405        /// The stage after this prediction. Never AMD_WAIT.
406        #[prost(enumeration = "super::AmdCategory", tag = "7")]
407        pub stage: i32,
408        /// Unset when the turn ran no inference.
409        #[prost(message, optional, tag = "8")]
410        pub inference_duration: ::core::option::Option<::pbjson_types::Duration>,
411    }
412    /// Once per AMD run.
413    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
414    pub struct AmdCompleted {
415        #[prost(enumeration = "super::AmdCategory", tag = "1")]
416        pub category: i32,
417        #[prost(string, tag = "2")]
418        pub reason: ::prost::alloc::string::String,
419        #[prost(bool, tag = "3")]
420        pub voicemail_message_played: bool,
421        /// Unset when the run ended before any prediction.
422        #[prost(message, optional, tag = "4")]
423        pub prediction: ::core::option::Option<AmdPrediction>,
424    }
425    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
426    pub struct EotPrediction {
427        #[prost(float, tag = "1")]
428        pub probability: f32,
429        #[prost(float, tag = "2")]
430        pub threshold: f32,
431        #[prost(message, optional, tag = "3")]
432        pub inference_duration: ::core::option::Option<::pbjson_types::Duration>,
433        #[prost(message, optional, tag = "4")]
434        pub delay: ::core::option::Option<::pbjson_types::Duration>,
435    }
436    #[derive(Clone, PartialEq, ::prost::Message)]
437    pub struct SessionUsageUpdated {
438        #[prost(message, optional, tag = "1")]
439        pub usage: ::core::option::Option<super::AgentSessionUsage>,
440    }
441    /// Per-call tool lifecycle. One flat update per occurrence: a call started ->
442    /// progress updates while it runs (CallUpdated) -> the single terminal entry (Ended),
443    /// with the deferred reply voicing buffered updates advancing separately (ReplyUpdated).
444    #[derive(Clone, PartialEq, ::prost::Message)]
445    pub struct ToolExecutionUpdated {
446        #[prost(oneof = "tool_execution_updated::Update", tags = "1, 2, 3, 4")]
447        pub update: ::core::option::Option<tool_execution_updated::Update>,
448    }
449    /// Nested message and enum types in `ToolExecutionUpdated`.
450    pub mod tool_execution_updated {
451        #[derive(Clone, PartialEq, ::prost::Message)]
452        pub struct Started {
453            #[prost(message, optional, tag = "1")]
454            pub function_call: ::core::option::Option<super::super::FunctionCall>,
455        }
456        /// a progress update emitted via ctx.update() while the call runs
457        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
458        pub struct CallUpdated {
459            /// synthetic id: call_id (inline) or call_id_update_N
460            #[prost(string, tag = "1")]
461            pub id: ::prost::alloc::string::String,
462            #[prost(string, tag = "2")]
463            pub call_id: ::prost::alloc::string::String,
464            #[prost(string, tag = "3")]
465            pub message: ::prost::alloc::string::String,
466        }
467        /// the call's single terminal entry
468        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
469        pub struct Ended {
470            /// synthetic id: call_id (inline) or call_id_final (deferred)
471            #[prost(string, tag = "1")]
472            pub id: ::prost::alloc::string::String,
473            #[prost(string, tag = "2")]
474            pub call_id: ::prost::alloc::string::String,
475            /// result text or error message; unset for cancelled / empty returns
476            #[prost(string, optional, tag = "3")]
477            pub message: ::core::option::Option<::prost::alloc::string::String>,
478            /// TC_DONE, TC_ERROR, or TC_CANCELLED
479            #[prost(enumeration = "super::super::ToolCallStatus", tag = "4")]
480            pub status: i32,
481        }
482        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
483        pub struct ReplyUpdated {
484            /// buffered update ids covered by this reply; one reply can span calls
485            #[prost(string, repeated, tag = "1")]
486            pub update_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
487            #[prost(enumeration = "super::super::ToolReplyStatus", tag = "2")]
488            pub status: i32,
489            /// id of the speech that voices this reply
490            #[prost(string, tag = "3")]
491            pub speech_id: ::prost::alloc::string::String,
492        }
493        #[derive(Clone, PartialEq, ::prost::Oneof)]
494        pub enum Update {
495            #[prost(message, tag = "1")]
496            Started(Started),
497            #[prost(message, tag = "2")]
498            CallUpdated(CallUpdated),
499            #[prost(message, tag = "3")]
500            ReplyUpdated(ReplyUpdated),
501            #[prost(message, tag = "4")]
502            Ended(Ended),
503        }
504    }
505    /// The agent session closed: the call is over even if the agent is still in the room.
506    /// No further session events follow, and session requests are no longer answered;
507    /// finalize_simulation may still be.
508    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
509    pub struct SessionClosed {
510        #[prost(enumeration = "super::CloseReason", tag = "1")]
511        pub reason: i32,
512        #[prost(string, optional, tag = "2")]
513        pub error: ::core::option::Option<::prost::alloc::string::String>,
514    }
515    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
516    pub struct AgentFalseInterruption {
517        /// Agent paused its own speech for what turned out not to be a real interruption (a backchannel, brief noise, etc.).
518        #[prost(bool, tag = "1")]
519        pub resumed: bool,
520    }
521    #[derive(Clone, PartialEq, ::prost::Oneof)]
522    pub enum Event {
523        #[prost(message, tag = "10")]
524        AgentStateChanged(AgentStateChanged),
525        #[prost(message, tag = "11")]
526        UserStateChanged(UserStateChanged),
527        #[prost(message, tag = "12")]
528        ConversationItemAdded(ConversationItemAdded),
529        #[prost(message, tag = "13")]
530        UserInputTranscribed(UserInputTranscribed),
531        #[prost(message, tag = "14")]
532        FunctionToolsExecuted(FunctionToolsExecuted),
533        #[prost(message, tag = "15")]
534        Error(Error),
535        #[prost(message, tag = "16")]
536        OverlappingSpeech(OverlappingSpeech),
537        #[prost(message, tag = "17")]
538        SessionUsageUpdated(SessionUsageUpdated),
539        #[prost(message, tag = "18")]
540        AmdPrediction(AmdPrediction),
541        #[prost(message, tag = "19")]
542        EotPrediction(EotPrediction),
543        #[prost(message, tag = "20")]
544        FunctionToolsStarted(FunctionToolsStarted),
545        #[prost(message, tag = "21")]
546        DebugMessage(super::DebugMessage),
547        #[prost(message, tag = "22")]
548        ToolExecutionUpdated(ToolExecutionUpdated),
549        #[prost(message, tag = "23")]
550        AgentFalseInterruption(AgentFalseInterruption),
551        #[prost(message, tag = "24")]
552        AmdCompleted(AmdCompleted),
553        #[prost(message, tag = "25")]
554        SessionClosed(SessionClosed),
555    }
556}
557#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
558pub struct SessionRequest {
559    #[prost(string, tag = "1")]
560    pub request_id: ::prost::alloc::string::String,
561    #[prost(oneof = "session_request::Request", tags = "2, 4, 5, 6, 7, 8, 9, 10, 11, 12")]
562    pub request: ::core::option::Option<session_request::Request>,
563}
564/// Nested message and enum types in `SessionRequest`.
565pub mod session_request {
566    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
567    pub struct Ping {
568    }
569    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
570    pub struct GetChatHistory {
571    }
572    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
573    pub struct RunInput {
574        #[prost(string, tag = "1")]
575        pub text: ::prost::alloc::string::String,
576    }
577    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
578    pub struct GetAgentInfo {
579    }
580    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
581    pub struct GetSessionState {
582    }
583    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
584    pub struct GetRtcStats {
585    }
586    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
587    pub struct GetSessionUsage {
588    }
589    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
590    pub struct GetFrameworkInfo {
591    }
592    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
593    pub struct UpdateIo {
594        #[prost(message, optional, tag = "1")]
595        pub input: ::core::option::Option<update_io::Input>,
596        #[prost(message, optional, tag = "2")]
597        pub output: ::core::option::Option<update_io::Output>,
598    }
599    /// Nested message and enum types in `UpdateIO`.
600    pub mod update_io {
601        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
602        pub struct Input {
603            #[prost(bool, optional, tag = "1")]
604            pub audio_enabled: ::core::option::Option<bool>,
605            #[prost(bool, optional, tag = "2")]
606            pub video_enabled: ::core::option::Option<bool>,
607        }
608        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
609        pub struct Output {
610            #[prost(bool, optional, tag = "1")]
611            pub audio_enabled: ::core::option::Option<bool>,
612            #[prost(bool, optional, tag = "2")]
613            pub video_enabled: ::core::option::Option<bool>,
614            #[prost(bool, optional, tag = "3")]
615            pub transcription_enabled: ::core::option::Option<bool>,
616        }
617    }
618    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
619    pub struct FinalizeSimulation {
620        #[prost(bool, tag = "1")]
621        pub provisional_success: bool,
622        #[prost(string, tag = "2")]
623        pub provisional_reason: ::prost::alloc::string::String,
624    }
625    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
626    pub enum Request {
627        #[prost(message, tag = "2")]
628        Ping(Ping),
629        #[prost(message, tag = "4")]
630        GetChatHistory(GetChatHistory),
631        #[prost(message, tag = "5")]
632        RunInput(RunInput),
633        #[prost(message, tag = "6")]
634        GetAgentInfo(GetAgentInfo),
635        #[prost(message, tag = "7")]
636        GetSessionState(GetSessionState),
637        #[prost(message, tag = "8")]
638        GetRtcStats(GetRtcStats),
639        #[prost(message, tag = "9")]
640        GetSessionUsage(GetSessionUsage),
641        #[prost(message, tag = "10")]
642        GetFrameworkInfo(GetFrameworkInfo),
643        #[prost(message, tag = "11")]
644        UpdateIo(UpdateIo),
645        #[prost(message, tag = "12")]
646        FinalizeSimulation(FinalizeSimulation),
647    }
648}
649#[derive(Clone, PartialEq, ::prost::Message)]
650pub struct SessionResponse {
651    #[prost(string, tag = "1")]
652    pub request_id: ::prost::alloc::string::String,
653    #[prost(string, optional, tag = "2")]
654    pub error: ::core::option::Option<::prost::alloc::string::String>,
655    #[prost(oneof = "session_response::Response", tags = "3, 5, 6, 7, 8, 9, 10, 11, 12, 13")]
656    pub response: ::core::option::Option<session_response::Response>,
657}
658/// Nested message and enum types in `SessionResponse`.
659pub mod session_response {
660    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
661    pub struct Pong {
662    }
663    #[derive(Clone, PartialEq, ::prost::Message)]
664    pub struct GetChatHistoryResponse {
665        #[prost(message, repeated, tag = "1")]
666        pub items: ::prost::alloc::vec::Vec<super::chat_context::ChatItem>,
667    }
668    #[derive(Clone, PartialEq, ::prost::Message)]
669    pub struct GetAgentInfoResponse {
670        #[prost(string, tag = "1")]
671        pub id: ::prost::alloc::string::String,
672        #[prost(string, optional, tag = "2")]
673        pub instructions: ::core::option::Option<::prost::alloc::string::String>,
674        #[prost(string, repeated, tag = "3")]
675        pub tools: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
676        #[prost(message, repeated, tag = "4")]
677        pub chat_ctx: ::prost::alloc::vec::Vec<super::chat_context::ChatItem>,
678    }
679    #[derive(Clone, PartialEq, ::prost::Message)]
680    pub struct RunInputResponse {
681        #[prost(message, repeated, tag = "1")]
682        pub items: ::prost::alloc::vec::Vec<super::chat_context::ChatItem>,
683    }
684    #[derive(Clone, PartialEq, ::prost::Message)]
685    pub struct GetSessionStateResponse {
686        #[prost(enumeration = "super::AgentState", tag = "1")]
687        pub agent_state: i32,
688        #[prost(enumeration = "super::UserState", tag = "2")]
689        pub user_state: i32,
690        #[prost(string, tag = "3")]
691        pub agent_id: ::prost::alloc::string::String,
692        #[prost(map = "string, string", tag = "4")]
693        pub options: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
694        #[prost(message, optional, tag = "5")]
695        pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
696    }
697    #[derive(Clone, PartialEq, ::prost::Message)]
698    pub struct GetRtcStatsResponse {
699        #[prost(message, repeated, tag = "1")]
700        pub publisher_stats: ::prost::alloc::vec::Vec<::pbjson_types::Struct>,
701        #[prost(message, repeated, tag = "2")]
702        pub subscriber_stats: ::prost::alloc::vec::Vec<::pbjson_types::Struct>,
703    }
704    #[derive(Clone, PartialEq, ::prost::Message)]
705    pub struct GetSessionUsageResponse {
706        #[prost(message, optional, tag = "1")]
707        pub usage: ::core::option::Option<super::AgentSessionUsage>,
708        #[prost(message, optional, tag = "2")]
709        pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
710    }
711    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
712    pub struct GetFrameworkInfoResponse {
713        #[prost(string, tag = "1")]
714        pub sdk: ::prost::alloc::string::String,
715        #[prost(string, tag = "2")]
716        pub sdk_version: ::prost::alloc::string::String,
717    }
718    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
719    pub struct UpdateIoResponse {
720    }
721    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
722    pub struct FinalizeSimulationResponse {
723        #[prost(message, optional, tag = "1")]
724        pub user_verdict: ::core::option::Option<finalize_simulation_response::SimulationVerdict>,
725    }
726    /// Nested message and enum types in `FinalizeSimulationResponse`.
727    pub mod finalize_simulation_response {
728        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
729        pub struct SimulationVerdict {
730            #[prost(bool, tag = "1")]
731            pub success: bool,
732            #[prost(string, tag = "2")]
733            pub reason: ::prost::alloc::string::String,
734        }
735    }
736    #[derive(Clone, PartialEq, ::prost::Oneof)]
737    pub enum Response {
738        #[prost(message, tag = "3")]
739        Pong(Pong),
740        #[prost(message, tag = "5")]
741        GetChatHistory(GetChatHistoryResponse),
742        #[prost(message, tag = "6")]
743        RunInput(RunInputResponse),
744        #[prost(message, tag = "7")]
745        GetAgentInfo(GetAgentInfoResponse),
746        #[prost(message, tag = "8")]
747        GetSessionState(GetSessionStateResponse),
748        #[prost(message, tag = "9")]
749        GetRtcStats(GetRtcStatsResponse),
750        #[prost(message, tag = "10")]
751        GetSessionUsage(GetSessionUsageResponse),
752        #[prost(message, tag = "11")]
753        GetFrameworkInfo(GetFrameworkInfoResponse),
754        #[prost(message, tag = "12")]
755        UpdateIo(UpdateIoResponse),
756        #[prost(message, tag = "13")]
757        FinalizeSimulation(FinalizeSimulationResponse),
758    }
759}
760#[derive(Clone, PartialEq, ::prost::Message)]
761pub struct AgentSessionMessage {
762    #[prost(oneof = "agent_session_message::Message", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
763    pub message: ::core::option::Option<agent_session_message::Message>,
764}
765/// Nested message and enum types in `AgentSessionMessage`.
766pub mod agent_session_message {
767    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
768    pub struct ConsoleIo {
769    }
770    /// Nested message and enum types in `ConsoleIO`.
771    pub mod console_io {
772        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
773        pub struct AudioFrame {
774            #[prost(bytes = "vec", tag = "1")]
775            pub data: ::prost::alloc::vec::Vec<u8>,
776            #[prost(uint32, tag = "2")]
777            pub sample_rate: u32,
778            #[prost(uint32, tag = "3")]
779            pub num_channels: u32,
780            #[prost(uint32, tag = "4")]
781            pub samples_per_channel: u32,
782        }
783        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
784        pub struct AudioPlaybackFlush {
785        }
786        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
787        pub struct AudioPlaybackClear {
788        }
789        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
790        pub struct AudioPlaybackFinished {
791        }
792    }
793    #[derive(Clone, PartialEq, ::prost::Oneof)]
794    pub enum Message {
795        #[prost(message, tag = "1")]
796        AudioInput(console_io::AudioFrame),
797        #[prost(message, tag = "2")]
798        AudioOutput(console_io::AudioFrame),
799        #[prost(message, tag = "3")]
800        Event(super::AgentSessionEvent),
801        #[prost(message, tag = "4")]
802        Request(super::SessionRequest),
803        #[prost(message, tag = "5")]
804        Response(super::SessionResponse),
805        #[prost(message, tag = "6")]
806        AudioPlaybackFlush(console_io::AudioPlaybackFlush),
807        #[prost(message, tag = "7")]
808        AudioPlaybackClear(console_io::AudioPlaybackClear),
809        #[prost(message, tag = "8")]
810        AudioPlaybackFinished(console_io::AudioPlaybackFinished),
811    }
812}
813#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
814#[repr(i32)]
815pub enum ChatRole {
816    Developer = 0,
817    System = 1,
818    User = 2,
819    Assistant = 3,
820}
821impl ChatRole {
822    /// String value of the enum field names used in the ProtoBuf definition.
823    ///
824    /// The values are not transformed in any way and thus are considered stable
825    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
826    pub fn as_str_name(&self) -> &'static str {
827        match self {
828            Self::Developer => "DEVELOPER",
829            Self::System => "SYSTEM",
830            Self::User => "USER",
831            Self::Assistant => "ASSISTANT",
832        }
833    }
834    /// Creates an enum from field names used in the ProtoBuf definition.
835    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
836        match value {
837            "DEVELOPER" => Some(Self::Developer),
838            "SYSTEM" => Some(Self::System),
839            "USER" => Some(Self::User),
840            "ASSISTANT" => Some(Self::Assistant),
841            _ => None,
842        }
843    }
844}
845#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
846#[repr(i32)]
847pub enum AgentState {
848    AsInitializing = 0,
849    AsIdle = 1,
850    AsListening = 2,
851    AsThinking = 3,
852    AsSpeaking = 4,
853}
854impl AgentState {
855    /// String value of the enum field names used in the ProtoBuf definition.
856    ///
857    /// The values are not transformed in any way and thus are considered stable
858    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
859    pub fn as_str_name(&self) -> &'static str {
860        match self {
861            Self::AsInitializing => "AS_INITIALIZING",
862            Self::AsIdle => "AS_IDLE",
863            Self::AsListening => "AS_LISTENING",
864            Self::AsThinking => "AS_THINKING",
865            Self::AsSpeaking => "AS_SPEAKING",
866        }
867    }
868    /// Creates an enum from field names used in the ProtoBuf definition.
869    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
870        match value {
871            "AS_INITIALIZING" => Some(Self::AsInitializing),
872            "AS_IDLE" => Some(Self::AsIdle),
873            "AS_LISTENING" => Some(Self::AsListening),
874            "AS_THINKING" => Some(Self::AsThinking),
875            "AS_SPEAKING" => Some(Self::AsSpeaking),
876            _ => None,
877        }
878    }
879}
880#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
881#[repr(i32)]
882pub enum UserState {
883    UsSpeaking = 0,
884    UsListening = 1,
885    UsAway = 2,
886}
887impl UserState {
888    /// String value of the enum field names used in the ProtoBuf definition.
889    ///
890    /// The values are not transformed in any way and thus are considered stable
891    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
892    pub fn as_str_name(&self) -> &'static str {
893        match self {
894            Self::UsSpeaking => "US_SPEAKING",
895            Self::UsListening => "US_LISTENING",
896            Self::UsAway => "US_AWAY",
897        }
898    }
899    /// Creates an enum from field names used in the ProtoBuf definition.
900    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
901        match value {
902            "US_SPEAKING" => Some(Self::UsSpeaking),
903            "US_LISTENING" => Some(Self::UsListening),
904            "US_AWAY" => Some(Self::UsAway),
905            _ => None,
906        }
907    }
908}
909#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
910#[repr(i32)]
911pub enum ToolCallStatus {
912    TcRunning = 0,
913    TcDone = 1,
914    TcError = 2,
915    TcCancelled = 3,
916}
917impl ToolCallStatus {
918    /// String value of the enum field names used in the ProtoBuf definition.
919    ///
920    /// The values are not transformed in any way and thus are considered stable
921    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
922    pub fn as_str_name(&self) -> &'static str {
923        match self {
924            Self::TcRunning => "TC_RUNNING",
925            Self::TcDone => "TC_DONE",
926            Self::TcError => "TC_ERROR",
927            Self::TcCancelled => "TC_CANCELLED",
928        }
929    }
930    /// Creates an enum from field names used in the ProtoBuf definition.
931    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
932        match value {
933            "TC_RUNNING" => Some(Self::TcRunning),
934            "TC_DONE" => Some(Self::TcDone),
935            "TC_ERROR" => Some(Self::TcError),
936            "TC_CANCELLED" => Some(Self::TcCancelled),
937            _ => None,
938        }
939    }
940}
941#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
942#[repr(i32)]
943pub enum ToolReplyStatus {
944    TrScheduled = 0,
945    TrCompleted = 1,
946    TrInterrupted = 2,
947    TrSkipped = 3,
948}
949impl ToolReplyStatus {
950    /// String value of the enum field names used in the ProtoBuf definition.
951    ///
952    /// The values are not transformed in any way and thus are considered stable
953    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
954    pub fn as_str_name(&self) -> &'static str {
955        match self {
956            Self::TrScheduled => "TR_SCHEDULED",
957            Self::TrCompleted => "TR_COMPLETED",
958            Self::TrInterrupted => "TR_INTERRUPTED",
959            Self::TrSkipped => "TR_SKIPPED",
960        }
961    }
962    /// Creates an enum from field names used in the ProtoBuf definition.
963    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
964        match value {
965            "TR_SCHEDULED" => Some(Self::TrScheduled),
966            "TR_COMPLETED" => Some(Self::TrCompleted),
967            "TR_INTERRUPTED" => Some(Self::TrInterrupted),
968            "TR_SKIPPED" => Some(Self::TrSkipped),
969            _ => None,
970        }
971    }
972}
973/// Why an agent session closed. Agent evals read it from the recording upload's session
974/// summary (MetricsRecordingHeader.session_summary), as the value name.
975#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
976#[repr(i32)]
977pub enum CloseReason {
978    /// not reported, or an SDK-specific reason
979    CrUnknown = 0,
980    CrError = 1,
981    CrJobShutdown = 2,
982    CrParticipantDisconnected = 3,
983    CrUserInitiated = 4,
984    CrCompleted = 5,
985}
986impl CloseReason {
987    /// String value of the enum field names used in the ProtoBuf definition.
988    ///
989    /// The values are not transformed in any way and thus are considered stable
990    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
991    pub fn as_str_name(&self) -> &'static str {
992        match self {
993            Self::CrUnknown => "CR_UNKNOWN",
994            Self::CrError => "CR_ERROR",
995            Self::CrJobShutdown => "CR_JOB_SHUTDOWN",
996            Self::CrParticipantDisconnected => "CR_PARTICIPANT_DISCONNECTED",
997            Self::CrUserInitiated => "CR_USER_INITIATED",
998            Self::CrCompleted => "CR_COMPLETED",
999        }
1000    }
1001    /// Creates an enum from field names used in the ProtoBuf definition.
1002    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1003        match value {
1004            "CR_UNKNOWN" => Some(Self::CrUnknown),
1005            "CR_ERROR" => Some(Self::CrError),
1006            "CR_JOB_SHUTDOWN" => Some(Self::CrJobShutdown),
1007            "CR_PARTICIPANT_DISCONNECTED" => Some(Self::CrParticipantDisconnected),
1008            "CR_USER_INITIATED" => Some(Self::CrUserInitiated),
1009            "CR_COMPLETED" => Some(Self::CrCompleted),
1010            _ => None,
1011        }
1012    }
1013}
1014#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1015#[repr(i32)]
1016pub enum AmdCategory {
1017    AmdUnknown = 0,
1018    AmdHuman = 1,
1019    AmdMachineIvr = 2,
1020    AmdMachineVm = 3,
1021    AmdMachineUnavailable = 4,
1022    AmdUncertain = 5,
1023    AmdMachineScreening = 6,
1024    /// A prediction only: the turn's reply is held, and the stage does not change.
1025    AmdWait = 7,
1026}
1027impl AmdCategory {
1028    /// String value of the enum field names used in the ProtoBuf definition.
1029    ///
1030    /// The values are not transformed in any way and thus are considered stable
1031    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1032    pub fn as_str_name(&self) -> &'static str {
1033        match self {
1034            Self::AmdUnknown => "AMD_UNKNOWN",
1035            Self::AmdHuman => "AMD_HUMAN",
1036            Self::AmdMachineIvr => "AMD_MACHINE_IVR",
1037            Self::AmdMachineVm => "AMD_MACHINE_VM",
1038            Self::AmdMachineUnavailable => "AMD_MACHINE_UNAVAILABLE",
1039            Self::AmdUncertain => "AMD_UNCERTAIN",
1040            Self::AmdMachineScreening => "AMD_MACHINE_SCREENING",
1041            Self::AmdWait => "AMD_WAIT",
1042        }
1043    }
1044    /// Creates an enum from field names used in the ProtoBuf definition.
1045    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1046        match value {
1047            "AMD_UNKNOWN" => Some(Self::AmdUnknown),
1048            "AMD_HUMAN" => Some(Self::AmdHuman),
1049            "AMD_MACHINE_IVR" => Some(Self::AmdMachineIvr),
1050            "AMD_MACHINE_VM" => Some(Self::AmdMachineVm),
1051            "AMD_MACHINE_UNAVAILABLE" => Some(Self::AmdMachineUnavailable),
1052            "AMD_UNCERTAIN" => Some(Self::AmdUncertain),
1053            "AMD_MACHINE_SCREENING" => Some(Self::AmdMachineScreening),
1054            "AMD_WAIT" => Some(Self::AmdWait),
1055            _ => None,
1056        }
1057    }
1058}
1059/// Request to send a text message to an agent.
1060#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1061pub struct TextMessageRequest {
1062    #[prost(string, tag = "1")]
1063    pub text: ::prost::alloc::string::String,
1064    #[prost(string, tag = "2")]
1065    pub message_id: ::prost::alloc::string::String,
1066    #[prost(string, tag = "3")]
1067    pub session_id: ::prost::alloc::string::String,
1068    #[prost(string, tag = "4")]
1069    pub agent_name: ::prost::alloc::string::String,
1070    #[prost(string, tag = "5")]
1071    pub metadata: ::prost::alloc::string::String,
1072    #[prost(message, optional, tag = "6")]
1073    pub session_state: ::core::option::Option<AgentSessionState>,
1074}
1075/// Response to a text message request, multiple responses may be sent for a single request until it is complete.
1076#[derive(Clone, PartialEq, ::prost::Message)]
1077pub struct TextMessageResponse {
1078    #[prost(string, tag = "1")]
1079    pub message_id: ::prost::alloc::string::String,
1080    #[prost(string, tag = "2")]
1081    pub session_id: ::prost::alloc::string::String,
1082    #[prost(oneof = "text_message_response::Event", tags = "3, 4, 5, 6, 7")]
1083    pub event: ::core::option::Option<text_message_response::Event>,
1084}
1085/// Nested message and enum types in `TextMessageResponse`.
1086pub mod text_message_response {
1087    #[derive(Clone, PartialEq, ::prost::Oneof)]
1088    pub enum Event {
1089        #[prost(message, tag = "3")]
1090        Message(super::ChatMessage),
1091        #[prost(message, tag = "4")]
1092        FunctionCall(super::FunctionCall),
1093        #[prost(message, tag = "5")]
1094        FunctionCallOutput(super::FunctionCallOutput),
1095        #[prost(message, tag = "6")]
1096        AgentHandoff(super::AgentHandoff),
1097        #[prost(message, tag = "7")]
1098        Complete(super::TextMessageComplete),
1099    }
1100}
1101/// Indicates the text message session is complete.
1102#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1103pub struct TextMessageComplete {
1104    #[prost(oneof = "text_message_complete::Result", tags = "1, 2")]
1105    pub result: ::core::option::Option<text_message_complete::Result>,
1106}
1107/// Nested message and enum types in `TextMessageComplete`.
1108pub mod text_message_complete {
1109    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1110    pub enum Result {
1111        #[prost(message, tag = "1")]
1112        SessionState(super::AgentSessionState),
1113        #[prost(message, tag = "2")]
1114        Error(super::TextMessageError),
1115    }
1116}
1117#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1118pub struct AgentSessionState {
1119    #[prost(uint64, tag = "1")]
1120    pub version: u64,
1121    #[prost(oneof = "agent_session_state::Data", tags = "2, 3")]
1122    pub data: ::core::option::Option<agent_session_state::Data>,
1123}
1124/// Nested message and enum types in `AgentSessionState`.
1125pub mod agent_session_state {
1126    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1127    pub enum Data {
1128        #[prost(bytes, tag = "2")]
1129        Snapshot(::prost::alloc::vec::Vec<u8>),
1130        #[prost(bytes, tag = "3")]
1131        Delta(::prost::alloc::vec::Vec<u8>),
1132    }
1133}
1134#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1135pub struct TextMessageError {
1136    #[prost(string, tag = "1")]
1137    pub message: ::prost::alloc::string::String,
1138    #[prost(enumeration = "TextMessageErrorCode", tag = "2")]
1139    pub code: i32,
1140}
1141#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1142#[repr(i32)]
1143pub enum TextMessageErrorCode {
1144    /// Unexpected internal error
1145    InternalError = 0,
1146    /// Session state not found in cache or version mismatch
1147    SessionStateNotFound = 1,
1148    /// An exception was raised inside the user's text handler
1149    TextHandlerError = 2,
1150    /// The worker process exited before the text session completed
1151    ProcessClosed = 3,
1152}
1153impl TextMessageErrorCode {
1154    /// String value of the enum field names used in the ProtoBuf definition.
1155    ///
1156    /// The values are not transformed in any way and thus are considered stable
1157    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1158    pub fn as_str_name(&self) -> &'static str {
1159        match self {
1160            Self::InternalError => "INTERNAL_ERROR",
1161            Self::SessionStateNotFound => "SESSION_STATE_NOT_FOUND",
1162            Self::TextHandlerError => "TEXT_HANDLER_ERROR",
1163            Self::ProcessClosed => "PROCESS_CLOSED",
1164        }
1165    }
1166    /// Creates an enum from field names used in the ProtoBuf definition.
1167    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1168        match value {
1169            "INTERNAL_ERROR" => Some(Self::InternalError),
1170            "SESSION_STATE_NOT_FOUND" => Some(Self::SessionStateNotFound),
1171            "TEXT_HANDLER_ERROR" => Some(Self::TextHandlerError),
1172            "PROCESS_CLOSED" => Some(Self::ProcessClosed),
1173            _ => None,
1174        }
1175    }
1176}
1177#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1178pub struct AgentThread {
1179}
1180/// Nested message and enum types in `AgentThread`.
1181pub mod agent_thread {
1182    #[derive(Clone, PartialEq, ::prost::Message)]
1183    pub struct CreateRequest {
1184        /// Groups threads, e.g. by user: an application-defined value, typically the
1185        /// user's identity. An AgentThreadGrant is scoped by it.
1186        #[prost(string, tag = "1")]
1187        pub scope: ::prost::alloc::string::String,
1188        #[prost(map = "string, string", tag = "2")]
1189        pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
1190        /// Unset takes the server default.
1191        #[prost(message, optional, tag = "3")]
1192        pub idle_ttl: ::core::option::Option<::pbjson_types::Duration>,
1193    }
1194    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1195    pub struct GetRequest {
1196        #[prost(string, tag = "1")]
1197        pub thread_id: ::prost::alloc::string::String,
1198    }
1199    /// The threads of one scope, newest first.
1200    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1201    pub struct ListRequest {
1202        #[prost(string, tag = "1")]
1203        pub scope: ::prost::alloc::string::String,
1204        /// next_page_token of the previous ListResponse; empty for the first page.
1205        #[prost(string, tag = "2")]
1206        pub page_token: ::prost::alloc::string::String,
1207        #[prost(int32, tag = "3")]
1208        pub limit: i32,
1209    }
1210    #[derive(Clone, PartialEq, ::prost::Message)]
1211    pub struct ListResponse {
1212        #[prost(message, repeated, tag = "1")]
1213        pub threads: ::prost::alloc::vec::Vec<Thread>,
1214        /// Empty when exhausted.
1215        #[prost(string, tag = "2")]
1216        pub next_page_token: ::prost::alloc::string::String,
1217    }
1218    #[derive(Clone, PartialEq, ::prost::Message)]
1219    pub struct UpdateRequest {
1220        #[prost(string, tag = "1")]
1221        pub thread_id: ::prost::alloc::string::String,
1222        /// Added to the existing attributes; an empty value deletes the entry.
1223        #[prost(map = "string, string", tag = "2")]
1224        pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
1225        /// Every update counts as activity and pushes expires_at out by idle_ttl.
1226        #[prost(message, optional, tag = "3")]
1227        pub idle_ttl: ::core::option::Option<::pbjson_types::Duration>,
1228    }
1229    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1230    pub struct DeleteRequest {
1231        #[prost(string, tag = "1")]
1232        pub thread_id: ::prost::alloc::string::String,
1233    }
1234    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1235    pub struct DeleteResponse {
1236    }
1237    /// The thread's chat items, oldest first unless sort_order says otherwise.
1238    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1239    pub struct GetItemsRequest {
1240        #[prost(string, tag = "1")]
1241        pub thread_id: ::prost::alloc::string::String,
1242        /// One agent's items; empty for every agent's.
1243        #[prost(string, tag = "2")]
1244        pub agent: ::prost::alloc::string::String,
1245        /// next_page_token of the previous GetItemsResponse; empty for the first page.
1246        #[prost(string, tag = "3")]
1247        pub page_token: ::prost::alloc::string::String,
1248        #[prost(int32, tag = "4")]
1249        pub limit: i32,
1250        /// Unset or ASC is oldest first. DESC starts from the latest item and each
1251        /// next_page_token walks back through older ones.
1252        #[prost(enumeration = "SortOrder", tag = "5")]
1253        pub sort_order: i32,
1254    }
1255    #[derive(Clone, PartialEq, ::prost::Message)]
1256    pub struct GetItemsResponse {
1257        #[prost(message, repeated, tag = "1")]
1258        pub items: ::prost::alloc::vec::Vec<Item>,
1259        /// Empty when exhausted.
1260        #[prost(string, tag = "2")]
1261        pub next_page_token: ::prost::alloc::string::String,
1262    }
1263    /// One chat item of an agent. Stored as the JSON of
1264    /// ChatContext.ChatItem (items.payload in thread_schema_v1.sql).
1265    #[derive(Clone, PartialEq, ::prost::Message)]
1266    pub struct Item {
1267        #[prost(string, tag = "1")]
1268        pub agent: ::prost::alloc::string::String,
1269        /// Position in the agent's history.
1270        #[prost(int64, tag = "2")]
1271        pub seq: i64,
1272        /// The A2A message the item came from.
1273        #[prost(string, tag = "3")]
1274        pub message_id: ::prost::alloc::string::String,
1275        #[prost(message, optional, tag = "4")]
1276        pub item: ::core::option::Option<super::chat_context::ChatItem>,
1277    }
1278    #[derive(Clone, PartialEq, ::prost::Message)]
1279    pub struct Thread {
1280        #[prost(string, tag = "1")]
1281        pub thread_id: ::prost::alloc::string::String,
1282        #[prost(string, tag = "2")]
1283        pub scope: ::prost::alloc::string::String,
1284        #[prost(map = "string, string", tag = "3")]
1285        pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
1286        #[prost(message, optional, tag = "4")]
1287        pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1288        #[prost(message, optional, tag = "5")]
1289        pub last_active: ::core::option::Option<::pbjson_types::Timestamp>,
1290        /// last_active + idle_ttl; every update pushes it out. The thread and its
1291        /// database are deleted once it passes.
1292        #[prost(message, optional, tag = "6")]
1293        pub expires_at: ::core::option::Option<::pbjson_types::Timestamp>,
1294        #[prost(message, optional, tag = "7")]
1295        pub idle_ttl: ::core::option::Option<::pbjson_types::Duration>,
1296    }
1297    /// Direction of a listing. Each request documents what unset means.
1298    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1299    #[repr(i32)]
1300    pub enum SortOrder {
1301        Unspecified = 0,
1302        Asc = 1,
1303        Desc = 2,
1304    }
1305    impl SortOrder {
1306        /// String value of the enum field names used in the ProtoBuf definition.
1307        ///
1308        /// The values are not transformed in any way and thus are considered stable
1309        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1310        pub fn as_str_name(&self) -> &'static str {
1311            match self {
1312                Self::Unspecified => "SORT_ORDER_UNSPECIFIED",
1313                Self::Asc => "SORT_ORDER_ASC",
1314                Self::Desc => "SORT_ORDER_DESC",
1315            }
1316        }
1317        /// Creates an enum from field names used in the ProtoBuf definition.
1318        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1319            match value {
1320                "SORT_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
1321                "SORT_ORDER_ASC" => Some(Self::Asc),
1322                "SORT_ORDER_DESC" => Some(Self::Desc),
1323                _ => None,
1324            }
1325        }
1326    }
1327}
1328/// AgentTask: background work an agent runs within a thread, such as a booking
1329/// that takes minutes.
1330#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1331pub struct AgentTask {
1332}
1333/// Nested message and enum types in `AgentTask`.
1334pub mod agent_task {
1335    /// A thread's tasks, oldest first.
1336    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1337    pub struct GetTasksRequest {
1338        #[prost(string, tag = "1")]
1339        pub thread_id: ::prost::alloc::string::String,
1340        /// Unset for every status.
1341        #[prost(enumeration = "Status", optional, tag = "2")]
1342        pub status: ::core::option::Option<i32>,
1343        /// next_page_token of the previous GetTasksResponse; empty for the first page.
1344        #[prost(string, tag = "3")]
1345        pub page_token: ::prost::alloc::string::String,
1346        #[prost(int32, tag = "4")]
1347        pub limit: i32,
1348    }
1349    #[derive(Clone, PartialEq, ::prost::Message)]
1350    pub struct GetTasksResponse {
1351        #[prost(message, repeated, tag = "1")]
1352        pub tasks: ::prost::alloc::vec::Vec<Task>,
1353        /// Empty when exhausted.
1354        #[prost(string, tag = "2")]
1355        pub next_page_token: ::prost::alloc::string::String,
1356    }
1357    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1358    pub struct Task {
1359        #[prost(string, tag = "1")]
1360        pub task_id: ::prost::alloc::string::String,
1361        #[prost(string, tag = "2")]
1362        pub thread_id: ::prost::alloc::string::String,
1363        /// The task's name, as the agent defines it.
1364        #[prost(string, tag = "3")]
1365        pub name: ::prost::alloc::string::String,
1366        #[prost(enumeration = "Status", tag = "4")]
1367        pub status: i32,
1368        #[prost(message, optional, tag = "5")]
1369        pub updated_at: ::core::option::Option<::pbjson_types::Timestamp>,
1370    }
1371    /// A task is never UNSPECIFIED.
1372    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1373    #[repr(i32)]
1374    pub enum Status {
1375        Unspecified = 0,
1376        Running = 1,
1377        Completed = 2,
1378        Failed = 3,
1379        Canceled = 4,
1380    }
1381    impl Status {
1382        /// String value of the enum field names used in the ProtoBuf definition.
1383        ///
1384        /// The values are not transformed in any way and thus are considered stable
1385        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1386        pub fn as_str_name(&self) -> &'static str {
1387            match self {
1388                Self::Unspecified => "UNSPECIFIED",
1389                Self::Running => "RUNNING",
1390                Self::Completed => "COMPLETED",
1391                Self::Failed => "FAILED",
1392                Self::Canceled => "CANCELED",
1393            }
1394        }
1395        /// Creates an enum from field names used in the ProtoBuf definition.
1396        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1397            match value {
1398                "UNSPECIFIED" => Some(Self::Unspecified),
1399                "RUNNING" => Some(Self::Running),
1400                "COMPLETED" => Some(Self::Completed),
1401                "FAILED" => Some(Self::Failed),
1402                "CANCELED" => Some(Self::Canceled),
1403                _ => None,
1404            }
1405        }
1406    }
1407}
1408#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1409pub struct SessionSettings {
1410    #[prost(uint32, tag = "1")]
1411    pub sample_rate: u32,
1412    #[prost(enumeration = "AudioEncoding", tag = "2")]
1413    pub encoding: i32,
1414    #[prost(oneof = "session_settings::TypeSettings", tags = "3, 4")]
1415    pub type_settings: ::core::option::Option<session_settings::TypeSettings>,
1416}
1417/// Nested message and enum types in `SessionSettings`.
1418pub mod session_settings {
1419    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1420    pub enum TypeSettings {
1421        #[prost(message, tag = "3")]
1422        EotSettings(super::EotSettings),
1423        #[prost(message, tag = "4")]
1424        InterruptionSettings(super::InterruptionSettings),
1425    }
1426}
1427#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1428pub struct InferenceError {
1429    #[prost(string, tag = "1")]
1430    pub message: ::prost::alloc::string::String,
1431    /// error code follows the HTTP status code convention
1432    /// 4xx for client errors
1433    /// 5xx for server errors
1434    #[prost(uint32, tag = "2")]
1435    pub code: u32,
1436}
1437// --- End of Turn (EOT) Settings ---
1438
1439#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1440pub struct EotSettings {
1441    #[prost(message, optional, tag = "1")]
1442    pub detection_interval: ::core::option::Option<::pbjson_types::Duration>,
1443}
1444// --- Interruption Settings ---
1445
1446#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1447pub struct InterruptionSettings {
1448    /// detection threshold in range \[0.0, 1.0\]; higher values are less sensitive
1449    #[prost(float, tag = "1")]
1450    pub threshold: f32,
1451    /// minimum number of frames with probability greater than threshold to trigger an interruption
1452    #[prost(uint32, tag = "2")]
1453    pub min_frames: u32,
1454    #[prost(message, optional, tag = "3")]
1455    pub max_audio_duration: ::core::option::Option<::pbjson_types::Duration>,
1456    #[prost(message, optional, tag = "4")]
1457    pub audio_prefix_duration: ::core::option::Option<::pbjson_types::Duration>,
1458    #[prost(message, optional, tag = "5")]
1459    pub detection_interval: ::core::option::Option<::pbjson_types::Duration>,
1460}
1461// --- Client -> Server ---
1462
1463#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1464pub struct SessionCreate {
1465    #[prost(message, optional, tag = "1")]
1466    pub settings: ::core::option::Option<SessionSettings>,
1467}
1468#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1469pub struct InputAudio {
1470    #[prost(bytes = "vec", tag = "1")]
1471    pub audio: ::prost::alloc::vec::Vec<u8>,
1472    #[prost(message, optional, tag = "2")]
1473    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1474    #[prost(uint32, tag = "3")]
1475    pub num_samples: u32,
1476}
1477#[derive(Clone, PartialEq, ::prost::Message)]
1478pub struct EotInputChatContext {
1479    #[prost(message, repeated, tag = "1")]
1480    pub messages: ::prost::alloc::vec::Vec<ChatMessage>,
1481}
1482#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1483pub struct SessionFlush {
1484}
1485#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1486pub struct SessionClose {
1487}
1488#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1489pub struct InferenceStart {
1490    #[prost(string, tag = "1")]
1491    pub request_id: ::prost::alloc::string::String,
1492    /// Length of the current user turn, in samples at the session sample rate.
1493    /// Count from the start of the user turn, or from the last session_flush when
1494    /// the start is unknown, through the last input_audio sent before this
1495    /// message. The end-of-turn model reads it as the turn duration, which can be
1496    /// longer than the audio window it scores. 0 means unknown.
1497    #[prost(uint32, tag = "2")]
1498    pub turn_samples: u32,
1499}
1500#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1501pub struct InferenceStop {
1502    #[prost(string, tag = "1")]
1503    pub request_id: ::prost::alloc::string::String,
1504}
1505/// audio buffer sentinel messages
1506#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1507pub struct BufferStart {
1508}
1509#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1510pub struct BufferStop {
1511}
1512#[derive(Clone, PartialEq, ::prost::Message)]
1513pub struct ClientMessage {
1514    #[prost(message, optional, tag = "1")]
1515    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1516    #[prost(oneof = "client_message::Message", tags = "2, 3, 4, 5, 6, 7, 8, 9, 10")]
1517    pub message: ::core::option::Option<client_message::Message>,
1518}
1519/// Nested message and enum types in `ClientMessage`.
1520pub mod client_message {
1521    #[derive(Clone, PartialEq, ::prost::Oneof)]
1522    pub enum Message {
1523        #[prost(message, tag = "2")]
1524        SessionCreate(super::SessionCreate),
1525        #[prost(message, tag = "3")]
1526        InputAudio(super::InputAudio),
1527        #[prost(message, tag = "4")]
1528        SessionFlush(super::SessionFlush),
1529        #[prost(message, tag = "5")]
1530        SessionClose(super::SessionClose),
1531        #[prost(message, tag = "6")]
1532        InferenceStart(super::InferenceStart),
1533        #[prost(message, tag = "7")]
1534        InferenceStop(super::InferenceStop),
1535        #[prost(message, tag = "8")]
1536        BufferStart(super::BufferStart),
1537        #[prost(message, tag = "9")]
1538        BufferStop(super::BufferStop),
1539        /// only for end of turn
1540        #[prost(message, tag = "10")]
1541        EotInputChatContext(super::EotInputChatContext),
1542    }
1543}
1544// --- Server -> Model ---
1545//
1546// NOTE: these messages are not currently used on the wire between the model
1547// server (infserve) and the gateway; that communication is presently done via
1548// JSON requests and responses. They are kept here for reference and future use.
1549
1550#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1551pub struct EotInferenceRequest {
1552    #[prost(bytes = "vec", tag = "1")]
1553    pub audio: ::prost::alloc::vec::Vec<u8>,
1554    #[prost(string, tag = "2")]
1555    pub assistant_text: ::prost::alloc::string::String,
1556    #[prost(enumeration = "AudioEncoding", tag = "3")]
1557    pub encoding: i32,
1558    #[prost(uint32, tag = "4")]
1559    pub sample_rate: u32,
1560}
1561#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1562pub struct InterruptionInferenceRequest {
1563    #[prost(bytes = "vec", tag = "1")]
1564    pub audio: ::prost::alloc::vec::Vec<u8>,
1565    #[prost(enumeration = "AudioEncoding", tag = "2")]
1566    pub encoding: i32,
1567    #[prost(uint32, tag = "3")]
1568    pub sample_rate: u32,
1569}
1570#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1571pub struct InferenceRequest {
1572    #[prost(oneof = "inference_request::Request", tags = "1, 2")]
1573    pub request: ::core::option::Option<inference_request::Request>,
1574}
1575/// Nested message and enum types in `InferenceRequest`.
1576pub mod inference_request {
1577    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1578    pub enum Request {
1579        #[prost(message, tag = "1")]
1580        EotInferenceRequest(super::EotInferenceRequest),
1581        #[prost(message, tag = "2")]
1582        InterruptionInferenceRequest(super::InterruptionInferenceRequest),
1583    }
1584}
1585#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1586pub struct InferenceStats {
1587    /// proxy -> model: audio window timestamps
1588    #[prost(message, optional, tag = "1")]
1589    pub earliest_client_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1590    #[prost(message, optional, tag = "2")]
1591    pub latest_client_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1592    /// proxy side e2e latency (proxy send -> proxy receive)
1593    #[prost(message, optional, tag = "3")]
1594    pub client_e2e_latency: ::core::option::Option<::pbjson_types::Duration>,
1595    /// model side e2e latency (model endpoint receive -> model endpoint return)
1596    #[prost(message, optional, tag = "4")]
1597    pub server_e2e_latency: ::core::option::Option<::pbjson_types::Duration>,
1598    /// model side inference stats
1599    #[prost(message, optional, tag = "5")]
1600    pub preprocessing_duration: ::core::option::Option<::pbjson_types::Duration>,
1601    #[prost(message, optional, tag = "6")]
1602    pub inference_duration: ::core::option::Option<::pbjson_types::Duration>,
1603}
1604#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1605pub struct EotInferenceResponse {
1606    #[prost(float, tag = "1")]
1607    pub probability: f32,
1608    #[prost(message, optional, tag = "2")]
1609    pub stats: ::core::option::Option<InferenceStats>,
1610}
1611#[derive(Clone, PartialEq, ::prost::Message)]
1612pub struct InterruptionInferenceResponse {
1613    #[prost(bool, tag = "1")]
1614    pub is_interruption: bool,
1615    /// per frame probabilities
1616    #[prost(float, repeated, tag = "2")]
1617    pub probabilities: ::prost::alloc::vec::Vec<f32>,
1618    #[prost(message, optional, tag = "3")]
1619    pub stats: ::core::option::Option<InferenceStats>,
1620}
1621#[derive(Clone, PartialEq, ::prost::Message)]
1622pub struct InferenceResponse {
1623    #[prost(oneof = "inference_response::Response", tags = "1, 2")]
1624    pub response: ::core::option::Option<inference_response::Response>,
1625}
1626/// Nested message and enum types in `InferenceResponse`.
1627pub mod inference_response {
1628    #[derive(Clone, PartialEq, ::prost::Oneof)]
1629    pub enum Response {
1630        #[prost(message, tag = "1")]
1631        EotInferenceResponse(super::EotInferenceResponse),
1632        #[prost(message, tag = "2")]
1633        InterruptionInferenceResponse(super::InterruptionInferenceResponse),
1634    }
1635}
1636// --- Server -> Client ---
1637
1638#[derive(Clone, PartialEq, ::prost::Message)]
1639pub struct SessionCreated {
1640    /// Server-recommended default detection thresholds keyed by language code
1641    /// (e.g. "en", "es"). The threshold semantics match the session type: EOT
1642    /// probability threshold for EOT sessions, interruption threshold for
1643    /// barge-in sessions.
1644    #[prost(map = "string, float", tag = "1")]
1645    pub default_thresholds: ::std::collections::HashMap<::prost::alloc::string::String, f32>,
1646    /// Catch-all default applied to languages not present in default_thresholds.
1647    #[prost(float, tag = "2")]
1648    pub default_threshold: f32,
1649    /// same structure, but for backchannel
1650    #[prost(map = "string, float", tag = "3")]
1651    pub default_backchannel_thresholds: ::std::collections::HashMap<::prost::alloc::string::String, f32>,
1652    #[prost(float, tag = "4")]
1653    pub default_backchannel_threshold: f32,
1654}
1655#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1656pub struct InferenceStarted {
1657}
1658#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1659pub struct InferenceStopped {
1660}
1661#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1662pub struct SessionClosed {
1663}
1664#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1665pub struct EotPrediction {
1666    #[prost(float, tag = "1")]
1667    pub probability: f32,
1668    #[prost(message, optional, tag = "2")]
1669    pub inference_stats: ::core::option::Option<InferenceStats>,
1670    #[prost(enumeration = "eot_prediction::EotBackend", tag = "3")]
1671    pub backend: i32,
1672    #[prost(float, tag = "4")]
1673    pub backchannel_probability: f32,
1674}
1675/// Nested message and enum types in `EotPrediction`.
1676pub mod eot_prediction {
1677    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1678    #[repr(i32)]
1679    pub enum EotBackend {
1680        Unknown = 0,
1681        Multimodal = 1,
1682        Text = 2,
1683    }
1684    impl EotBackend {
1685        /// String value of the enum field names used in the ProtoBuf definition.
1686        ///
1687        /// The values are not transformed in any way and thus are considered stable
1688        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1689        pub fn as_str_name(&self) -> &'static str {
1690            match self {
1691                Self::Unknown => "EOT_BACKEND_UNKNOWN",
1692                Self::Multimodal => "EOT_BACKEND_MULTIMODAL",
1693                Self::Text => "EOT_BACKEND_TEXT",
1694            }
1695        }
1696        /// Creates an enum from field names used in the ProtoBuf definition.
1697        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1698            match value {
1699                "EOT_BACKEND_UNKNOWN" => Some(Self::Unknown),
1700                "EOT_BACKEND_MULTIMODAL" => Some(Self::Multimodal),
1701                "EOT_BACKEND_TEXT" => Some(Self::Text),
1702                _ => None,
1703            }
1704        }
1705    }
1706}
1707#[derive(Clone, PartialEq, ::prost::Message)]
1708pub struct InterruptionPrediction {
1709    #[prost(bool, tag = "1")]
1710    pub is_interruption: bool,
1711    #[prost(float, repeated, tag = "2")]
1712    pub probabilities: ::prost::alloc::vec::Vec<f32>,
1713    #[prost(message, optional, tag = "3")]
1714    pub inference_stats: ::core::option::Option<InferenceStats>,
1715}
1716#[derive(Clone, PartialEq, ::prost::Message)]
1717pub struct ServerMessage {
1718    #[prost(message, optional, tag = "1")]
1719    pub server_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1720    #[prost(string, optional, tag = "2")]
1721    pub request_id: ::core::option::Option<::prost::alloc::string::String>,
1722    /// echoes the client-side created_at timestamp
1723    #[prost(message, optional, tag = "3")]
1724    pub client_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
1725    #[prost(oneof = "server_message::Message", tags = "4, 5, 6, 7, 8, 9, 10")]
1726    pub message: ::core::option::Option<server_message::Message>,
1727}
1728/// Nested message and enum types in `ServerMessage`.
1729pub mod server_message {
1730    #[derive(Clone, PartialEq, ::prost::Oneof)]
1731    pub enum Message {
1732        #[prost(message, tag = "4")]
1733        SessionCreated(super::SessionCreated),
1734        #[prost(message, tag = "5")]
1735        InferenceStarted(super::InferenceStarted),
1736        #[prost(message, tag = "6")]
1737        InferenceStopped(super::InferenceStopped),
1738        #[prost(message, tag = "7")]
1739        SessionClosed(super::SessionClosed),
1740        #[prost(message, tag = "8")]
1741        Error(super::InferenceError),
1742        #[prost(message, tag = "9")]
1743        EotPrediction(super::EotPrediction),
1744        #[prost(message, tag = "10")]
1745        InterruptionPrediction(super::InterruptionPrediction),
1746    }
1747}
1748// --- Shared Types ---
1749
1750#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1751#[repr(i32)]
1752pub enum AudioEncoding {
1753    PcmS16le = 0,
1754    Opus = 1,
1755}
1756impl AudioEncoding {
1757    /// String value of the enum field names used in the ProtoBuf definition.
1758    ///
1759    /// The values are not transformed in any way and thus are considered stable
1760    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1761    pub fn as_str_name(&self) -> &'static str {
1762        match self {
1763            Self::PcmS16le => "AUDIO_ENCODING_PCM_S16LE",
1764            Self::Opus => "AUDIO_ENCODING_OPUS",
1765        }
1766    }
1767    /// Creates an enum from field names used in the ProtoBuf definition.
1768    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1769        match value {
1770            "AUDIO_ENCODING_PCM_S16LE" => Some(Self::PcmS16le),
1771            "AUDIO_ENCODING_OPUS" => Some(Self::Opus),
1772            _ => None,
1773        }
1774    }
1775}
1776include!("livekit.agent.serde.rs");
1777// @@protoc_insertion_point(module)