Skip to main content

nominal_api_proto/proto/
nominal.ai.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct SubmitMessageFeedbackRequest {
4    #[prost(string, tag = "1")]
5    pub conversation_rid: ::prost::alloc::string::String,
6    #[prost(string, tag = "2")]
7    pub message_id: ::prost::alloc::string::String,
8    #[prost(enumeration = "FeedbackVote", tag = "3")]
9    pub vote: i32,
10    #[prost(string, optional, tag = "4")]
11    pub comment: ::core::option::Option<::prost::alloc::string::String>,
12    #[prost(string, repeated, tag = "5")]
13    pub issue_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
14}
15#[derive(Clone, Copy, PartialEq, ::prost::Message)]
16pub struct SubmitMessageFeedbackResponse {}
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct GetSnapshotRidByUserMessageIdRequest {
19    #[prost(string, tag = "1")]
20    pub conversation_rid: ::prost::alloc::string::String,
21    #[prost(string, tag = "2")]
22    pub message_id: ::prost::alloc::string::String,
23}
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct GetSnapshotRidByUserMessageIdResponse {
26    #[prost(
27        oneof = "get_snapshot_rid_by_user_message_id_response::RestorePoint",
28        tags = "1, 2"
29    )]
30    pub restore_point: ::core::option::Option<
31        get_snapshot_rid_by_user_message_id_response::RestorePoint,
32    >,
33}
34/// Nested message and enum types in `GetSnapshotRidByUserMessageIdResponse`.
35pub mod get_snapshot_rid_by_user_message_id_response {
36    #[derive(Clone, PartialEq, ::prost::Oneof)]
37    pub enum RestorePoint {
38        #[prost(string, tag = "1")]
39        SnapshotRid(::prost::alloc::string::String),
40        #[prost(string, tag = "2")]
41        CommitId(::prost::alloc::string::String),
42    }
43}
44#[derive(Clone, Copy, PartialEq, ::prost::Message)]
45pub struct ReadOnlyMode {}
46#[derive(Clone, Copy, PartialEq, ::prost::Message)]
47pub struct EditMode {
48    #[prost(bool, optional, tag = "1")]
49    pub auto_accept: ::core::option::Option<bool>,
50}
51#[derive(Clone, Copy, PartialEq, ::prost::Message)]
52pub struct ConversationMode {
53    #[prost(oneof = "conversation_mode::Mode", tags = "1, 2")]
54    pub mode: ::core::option::Option<conversation_mode::Mode>,
55}
56/// Nested message and enum types in `ConversationMode`.
57pub mod conversation_mode {
58    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
59    pub enum Mode {
60        #[prost(message, tag = "1")]
61        ReadOnly(super::ReadOnlyMode),
62        #[prost(message, tag = "2")]
63        Edit(super::EditMode),
64    }
65}
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct ToolApprovalResult {
68    #[prost(string, tag = "1")]
69    pub tool_call_id: ::prost::alloc::string::String,
70    #[prost(oneof = "tool_approval_result::Response", tags = "2, 3")]
71    pub response: ::core::option::Option<tool_approval_result::Response>,
72}
73/// Nested message and enum types in `ToolApprovalResult`.
74pub mod tool_approval_result {
75    #[derive(Clone, PartialEq, ::prost::Oneof)]
76    pub enum Response {
77        #[prost(message, tag = "2")]
78        Approved(super::ToolApprovedResponse),
79        #[prost(message, tag = "3")]
80        Denied(super::ToolDeniedResponse),
81    }
82}
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct ToolApprovedResponse {
85    #[prost(string, optional, tag = "1")]
86    pub override_args: ::core::option::Option<::prost::alloc::string::String>,
87}
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct ToolDeniedResponse {
90    #[prost(string, tag = "2")]
91    pub denial_reason: ::prost::alloc::string::String,
92}
93#[derive(Clone, Copy, PartialEq, ::prost::Message)]
94pub struct RetryRequest {}
95#[derive(Clone, PartialEq, ::prost::Message)]
96pub struct UserPromptRequest {
97    #[prost(message, optional, tag = "1")]
98    pub message: ::core::option::Option<UserModelMessage>,
99    #[prost(message, repeated, tag = "2")]
100    pub images: ::prost::alloc::vec::Vec<ImagePart>,
101}
102#[derive(Clone, PartialEq, ::prost::Message)]
103pub struct ToolApprovalRequest {
104    #[prost(message, repeated, tag = "1")]
105    pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
106}
107#[derive(Clone, PartialEq, ::prost::Message)]
108pub struct StreamChatRequest {
109    #[prost(string, tag = "1")]
110    pub conversation_rid: ::prost::alloc::string::String,
111    #[deprecated]
112    #[prost(message, optional, tag = "2")]
113    pub message: ::core::option::Option<UserModelMessage>,
114    #[deprecated]
115    #[prost(message, repeated, tag = "3")]
116    pub images: ::prost::alloc::vec::Vec<ImagePart>,
117    #[deprecated]
118    #[prost(message, repeated, tag = "6")]
119    pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
120    #[prost(oneof = "stream_chat_request::RequestType", tags = "7, 8, 9")]
121    pub request_type: ::core::option::Option<stream_chat_request::RequestType>,
122    #[prost(oneof = "stream_chat_request::Context", tags = "4, 5, 10, 11")]
123    pub context: ::core::option::Option<stream_chat_request::Context>,
124}
125/// Nested message and enum types in `StreamChatRequest`.
126pub mod stream_chat_request {
127    #[derive(Clone, PartialEq, ::prost::Oneof)]
128    pub enum RequestType {
129        #[prost(message, tag = "7")]
130        Retry(super::RetryRequest),
131        #[prost(message, tag = "8")]
132        UserPrompt(super::UserPromptRequest),
133        #[prost(message, tag = "9")]
134        ToolApproval(super::ToolApprovalRequest),
135    }
136    #[derive(Clone, PartialEq, ::prost::Oneof)]
137    pub enum Context {
138        #[prost(message, tag = "4")]
139        Workbook(super::WorkbookContext),
140        #[prost(message, tag = "5")]
141        Global(super::GlobalContext),
142        #[prost(message, tag = "10")]
143        Checklist(super::ChecklistContext),
144        #[prost(message, tag = "11")]
145        Template(super::TemplateContext),
146    }
147}
148#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct WorkbookContext {
150    #[prost(string, tag = "1")]
151    pub workbook_rid: ::prost::alloc::string::String,
152    #[deprecated]
153    #[prost(message, optional, tag = "2")]
154    pub user_presence: ::core::option::Option<WorkbookUserPresence>,
155    #[prost(string, optional, tag = "3")]
156    pub active_tab_id: ::core::option::Option<::prost::alloc::string::String>,
157}
158#[derive(Clone, PartialEq, ::prost::Message)]
159pub struct ChecklistContext {
160    #[prost(string, tag = "1")]
161    pub checklist_rid: ::prost::alloc::string::String,
162    #[prost(string, tag = "2")]
163    pub branch_name: ::prost::alloc::string::String,
164    #[prost(oneof = "checklist_context::ReferenceRid", tags = "3, 4")]
165    pub reference_rid: ::core::option::Option<checklist_context::ReferenceRid>,
166}
167/// Nested message and enum types in `ChecklistContext`.
168pub mod checklist_context {
169    #[derive(Clone, PartialEq, ::prost::Oneof)]
170    pub enum ReferenceRid {
171        #[prost(string, tag = "3")]
172        Asset(::prost::alloc::string::String),
173        #[prost(string, tag = "4")]
174        Run(::prost::alloc::string::String),
175    }
176}
177#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct TemplateContext {
179    #[prost(string, tag = "1")]
180    pub template_rid: ::prost::alloc::string::String,
181    #[prost(string, tag = "2")]
182    pub branch_name: ::prost::alloc::string::String,
183    #[prost(oneof = "template_context::ReferenceRid", tags = "3, 4")]
184    pub reference_rid: ::core::option::Option<template_context::ReferenceRid>,
185}
186/// Nested message and enum types in `TemplateContext`.
187pub mod template_context {
188    #[derive(Clone, PartialEq, ::prost::Oneof)]
189    pub enum ReferenceRid {
190        #[prost(string, tag = "3")]
191        Asset(::prost::alloc::string::String),
192        #[prost(string, tag = "4")]
193        Run(::prost::alloc::string::String),
194    }
195}
196#[derive(Clone, Copy, PartialEq, ::prost::Message)]
197pub struct GlobalContext {}
198#[derive(Clone, Copy, PartialEq, ::prost::Message)]
199pub struct WorkbookUserPresence {
200    #[prost(int32, tag = "1")]
201    pub tab_index: i32,
202    #[prost(message, optional, tag = "2")]
203    pub range: ::core::option::Option<TimeRange>,
204}
205#[derive(Clone, PartialEq, ::prost::Message)]
206pub struct CreateConversationRequest {
207    #[prost(string, tag = "1")]
208    pub title: ::prost::alloc::string::String,
209    #[prost(string, tag = "2")]
210    pub workspace_rid: ::prost::alloc::string::String,
211    #[prost(string, optional, tag = "3")]
212    pub old_conversation_rid: ::core::option::Option<::prost::alloc::string::String>,
213    #[prost(string, optional, tag = "4")]
214    pub previous_message_id: ::core::option::Option<::prost::alloc::string::String>,
215    #[prost(message, optional, tag = "5")]
216    pub conversation_mode: ::core::option::Option<ConversationMode>,
217    #[prost(string, optional, tag = "6")]
218    pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
219}
220#[derive(Clone, PartialEq, ::prost::Message)]
221pub struct CreateConversationResponse {
222    #[prost(string, tag = "1")]
223    pub new_conversation_rid: ::prost::alloc::string::String,
224}
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct UpdateConversationMetadataRequest {
227    #[prost(string, optional, tag = "1")]
228    pub title: ::core::option::Option<::prost::alloc::string::String>,
229    #[prost(string, tag = "2")]
230    pub conversation_rid: ::prost::alloc::string::String,
231    #[prost(message, optional, tag = "3")]
232    pub conversation_mode: ::core::option::Option<ConversationMode>,
233}
234#[derive(Clone, Copy, PartialEq, ::prost::Message)]
235pub struct UpdateConversationMetadataResponse {}
236#[derive(Clone, PartialEq, ::prost::Message)]
237pub struct DeleteConversationRequest {
238    #[prost(string, tag = "1")]
239    pub conversation_rid: ::prost::alloc::string::String,
240}
241#[derive(Clone, Copy, PartialEq, ::prost::Message)]
242pub struct DeleteConversationResponse {}
243#[derive(Clone, PartialEq, ::prost::Message)]
244pub struct GetConversationRequest {
245    #[prost(string, tag = "1")]
246    pub conversation_rid: ::prost::alloc::string::String,
247    #[prost(string, optional, tag = "2")]
248    pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
249    #[prost(int32, optional, tag = "3")]
250    pub max_message_count: ::core::option::Option<i32>,
251}
252#[derive(Clone, PartialEq, ::prost::Message)]
253pub struct CompactConversationRequest {
254    #[prost(string, tag = "1")]
255    pub conversation_rid: ::prost::alloc::string::String,
256}
257#[derive(Clone, Copy, PartialEq, ::prost::Message)]
258pub struct CompactConversationResponse {
259    #[prost(message, optional, tag = "1")]
260    pub context: ::core::option::Option<ContextStatus>,
261}
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct ModelMessageWithId {
264    #[prost(string, tag = "3")]
265    pub message_id: ::prost::alloc::string::String,
266    #[prost(message, repeated, tag = "5")]
267    pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
268    #[prost(oneof = "model_message_with_id::Content", tags = "1, 2, 6")]
269    pub content: ::core::option::Option<model_message_with_id::Content>,
270    #[prost(oneof = "model_message_with_id::RestorePoint", tags = "4, 7")]
271    pub restore_point: ::core::option::Option<model_message_with_id::RestorePoint>,
272}
273/// Nested message and enum types in `ModelMessageWithId`.
274pub mod model_message_with_id {
275    #[derive(Clone, PartialEq, ::prost::Oneof)]
276    pub enum Content {
277        #[prost(message, tag = "1")]
278        Message(super::ModelMessage),
279        #[prost(message, tag = "2")]
280        ToolAction(super::ToolAction),
281        #[prost(message, tag = "6")]
282        ToolActionConfirmation(super::ToolActionConfirmation),
283    }
284    #[derive(Clone, PartialEq, ::prost::Oneof)]
285    pub enum RestorePoint {
286        #[prost(string, tag = "4")]
287        SnapshotRid(::prost::alloc::string::String),
288        #[prost(string, tag = "7")]
289        CommitId(::prost::alloc::string::String),
290    }
291}
292#[derive(Clone, PartialEq, ::prost::Message)]
293pub struct GetConversationResponse {
294    #[prost(message, repeated, tag = "1")]
295    pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
296    #[prost(message, optional, tag = "2")]
297    pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
298}
299#[derive(Clone, PartialEq, ::prost::Message)]
300pub struct GetConversationMetadataRequest {
301    #[prost(string, tag = "1")]
302    pub conversation_rid: ::prost::alloc::string::String,
303}
304#[derive(Clone, PartialEq, ::prost::Message)]
305pub struct GetConversationMetadataResponse {
306    #[prost(message, optional, tag = "1")]
307    pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
308}
309#[derive(Clone, PartialEq, ::prost::Message)]
310pub struct GetConversationMessagesRequest {
311    #[prost(string, tag = "1")]
312    pub conversation_rid: ::prost::alloc::string::String,
313    #[prost(string, optional, tag = "2")]
314    pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
315    #[prost(int32, optional, tag = "3")]
316    pub max_message_count: ::core::option::Option<i32>,
317}
318#[derive(Clone, PartialEq, ::prost::Message)]
319pub struct GetConversationMessagesResponse {
320    #[prost(message, repeated, tag = "1")]
321    pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
322    #[prost(string, optional, tag = "2")]
323    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
324}
325#[derive(Clone, PartialEq, ::prost::Message)]
326pub struct ListConversationsRequest {
327    #[prost(string, tag = "1")]
328    pub workspace_rid: ::prost::alloc::string::String,
329    #[prost(string, optional, tag = "2")]
330    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
331    #[prost(int32, optional, tag = "3")]
332    pub page_size: ::core::option::Option<i32>,
333}
334#[derive(Clone, PartialEq, ::prost::Message)]
335pub struct ConversationMetadata {
336    #[prost(string, tag = "1")]
337    pub conversation_rid: ::prost::alloc::string::String,
338    #[prost(string, tag = "2")]
339    pub title: ::prost::alloc::string::String,
340    #[prost(message, optional, tag = "3")]
341    pub created_at: ::core::option::Option<
342        super::super::super::google::protobuf::Timestamp,
343    >,
344    #[prost(message, optional, tag = "4")]
345    pub last_updated_at: ::core::option::Option<
346        super::super::super::google::protobuf::Timestamp,
347    >,
348    #[prost(message, optional, tag = "5")]
349    pub mode: ::core::option::Option<ConversationMode>,
350    #[prost(message, optional, tag = "6")]
351    pub current_context: ::core::option::Option<ContextStatus>,
352    #[prost(string, optional, tag = "7")]
353    pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
354}
355#[derive(Clone, PartialEq, ::prost::Message)]
356pub struct ListConversationsResponse {
357    #[prost(message, repeated, tag = "1")]
358    pub conversations: ::prost::alloc::vec::Vec<ConversationMetadata>,
359    #[prost(string, optional, tag = "2")]
360    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
361}
362#[derive(Clone, Copy, PartialEq, ::prost::Message)]
363pub struct TimeRange {
364    #[prost(message, optional, tag = "1")]
365    pub range_start: ::core::option::Option<Timestamp>,
366    #[prost(message, optional, tag = "2")]
367    pub range_end: ::core::option::Option<Timestamp>,
368}
369#[derive(Clone, Copy, PartialEq, ::prost::Message)]
370pub struct Timestamp {
371    #[prost(int32, tag = "1")]
372    pub seconds: i32,
373    #[prost(int32, tag = "2")]
374    pub nanoseconds: i32,
375}
376#[derive(Clone, PartialEq, ::prost::Message)]
377pub struct ModelMessage {
378    #[prost(oneof = "model_message::Kind", tags = "1, 2")]
379    pub kind: ::core::option::Option<model_message::Kind>,
380}
381/// Nested message and enum types in `ModelMessage`.
382pub mod model_message {
383    #[derive(Clone, PartialEq, ::prost::Oneof)]
384    pub enum Kind {
385        #[prost(message, tag = "1")]
386        User(super::UserModelMessage),
387        #[prost(message, tag = "2")]
388        Assistant(super::AssistantModelMessage),
389    }
390}
391#[derive(Clone, PartialEq, ::prost::Message)]
392pub struct UserModelMessage {
393    #[prost(message, repeated, tag = "1")]
394    pub text: ::prost::alloc::vec::Vec<UserContentPart>,
395}
396#[derive(Clone, PartialEq, ::prost::Message)]
397pub struct AssistantModelMessage {
398    #[prost(message, repeated, tag = "1")]
399    pub content_parts: ::prost::alloc::vec::Vec<AssistantContentPart>,
400}
401#[derive(Clone, PartialEq, ::prost::Message)]
402pub struct UserContentPart {
403    #[prost(oneof = "user_content_part::Part", tags = "1, 2")]
404    pub part: ::core::option::Option<user_content_part::Part>,
405}
406/// Nested message and enum types in `UserContentPart`.
407pub mod user_content_part {
408    #[derive(Clone, PartialEq, ::prost::Oneof)]
409    pub enum Part {
410        #[prost(message, tag = "1")]
411        Text(super::TextPart),
412        #[prost(message, tag = "2")]
413        Image(super::ImagePart),
414    }
415}
416#[derive(Clone, PartialEq, ::prost::Message)]
417pub struct AssistantContentPart {
418    #[prost(oneof = "assistant_content_part::Part", tags = "1, 2")]
419    pub part: ::core::option::Option<assistant_content_part::Part>,
420}
421/// Nested message and enum types in `AssistantContentPart`.
422pub mod assistant_content_part {
423    #[derive(Clone, PartialEq, ::prost::Oneof)]
424    pub enum Part {
425        #[prost(message, tag = "1")]
426        Text(super::TextPart),
427        #[prost(message, tag = "2")]
428        Reasoning(super::ReasoningPart),
429    }
430}
431#[derive(Clone, PartialEq, ::prost::Message)]
432pub struct TextPart {
433    #[prost(string, tag = "1")]
434    pub text: ::prost::alloc::string::String,
435}
436#[derive(Clone, PartialEq, ::prost::Message)]
437pub struct ImagePart {
438    #[prost(string, tag = "2")]
439    pub media_type: ::prost::alloc::string::String,
440    #[prost(string, tag = "4")]
441    pub attachment_rid: ::prost::alloc::string::String,
442}
443#[derive(Clone, PartialEq, ::prost::Message)]
444pub struct ReasoningPart {
445    #[prost(string, tag = "1")]
446    pub reasoning: ::prost::alloc::string::String,
447    #[prost(double, optional, tag = "2")]
448    pub duration_s: ::core::option::Option<f64>,
449}
450#[derive(Clone, PartialEq, ::prost::Message)]
451pub struct StreamChatResponse {
452    #[prost(
453        oneof = "stream_chat_response::Response",
454        tags = "1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15"
455    )]
456    pub response: ::core::option::Option<stream_chat_response::Response>,
457}
458/// Nested message and enum types in `StreamChatResponse`.
459pub mod stream_chat_response {
460    #[derive(Clone, PartialEq, ::prost::Oneof)]
461    pub enum Response {
462        #[prost(message, tag = "1")]
463        Finish(super::Finish),
464        #[prost(message, tag = "2")]
465        Error(super::Error),
466        #[prost(message, tag = "3")]
467        TextStart(super::TextStart),
468        #[prost(message, tag = "4")]
469        TextDelta(super::TextDelta),
470        #[prost(message, tag = "5")]
471        TextEnd(super::TextEnd),
472        #[prost(message, tag = "6")]
473        ReasoningStart(super::ReasoningStart),
474        #[prost(message, tag = "7")]
475        ReasoningDelta(super::ReasoningDelta),
476        #[prost(message, tag = "8")]
477        ReasoningEnd(super::ReasoningEnd),
478        #[prost(message, tag = "10")]
479        ToolAction(super::ToolAction),
480        #[prost(message, tag = "11")]
481        ToolActionConfirmation(super::ToolActionConfirmation),
482        #[prost(message, tag = "12")]
483        StepStart(super::StepStart),
484        #[prost(message, tag = "13")]
485        StepEnd(super::StepEnd),
486        #[prost(message, tag = "14")]
487        ClientDirective(super::ClientDirective),
488        #[prost(message, tag = "15")]
489        CompactionNotice(super::CompactionNotice),
490    }
491}
492#[derive(Clone, Copy, PartialEq, ::prost::Message)]
493pub struct StepStart {}
494#[derive(Clone, Copy, PartialEq, ::prost::Message)]
495pub struct StepEnd {}
496#[derive(Clone, Copy, PartialEq, ::prost::Message)]
497pub struct CompactionNotice {
498    #[prost(int32, tag = "1")]
499    pub tokens_before: i32,
500    #[prost(int32, tag = "2")]
501    pub estimated_checkpoint_tokens: i32,
502    #[prost(enumeration = "compaction_notice::Trigger", tag = "3")]
503    pub trigger: i32,
504}
505/// Nested message and enum types in `CompactionNotice`.
506pub mod compaction_notice {
507    #[derive(
508        Clone,
509        Copy,
510        Debug,
511        PartialEq,
512        Eq,
513        Hash,
514        PartialOrd,
515        Ord,
516        ::prost::Enumeration
517    )]
518    #[repr(i32)]
519    pub enum Trigger {
520        Unspecified = 0,
521        PreTurn = 1,
522        MidRun = 2,
523    }
524    impl Trigger {
525        /// String value of the enum field names used in the ProtoBuf definition.
526        ///
527        /// The values are not transformed in any way and thus are considered stable
528        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
529        pub fn as_str_name(&self) -> &'static str {
530            match self {
531                Self::Unspecified => "TRIGGER_UNSPECIFIED",
532                Self::PreTurn => "TRIGGER_PRE_TURN",
533                Self::MidRun => "TRIGGER_MID_RUN",
534            }
535        }
536        /// Creates an enum from field names used in the ProtoBuf definition.
537        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
538            match value {
539                "TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
540                "TRIGGER_PRE_TURN" => Some(Self::PreTurn),
541                "TRIGGER_MID_RUN" => Some(Self::MidRun),
542                _ => None,
543            }
544        }
545    }
546}
547#[derive(Clone, PartialEq, ::prost::Message)]
548pub struct ToolCallDescription {
549    #[prost(string, tag = "1")]
550    pub tool_call_id: ::prost::alloc::string::String,
551    #[prost(string, tag = "2")]
552    pub tool_name: ::prost::alloc::string::String,
553    #[prost(string, tag = "3")]
554    pub tool_args_json_string: ::prost::alloc::string::String,
555    #[prost(enumeration = "ToolCallStatus", tag = "4")]
556    pub status: i32,
557}
558#[derive(Clone, PartialEq, ::prost::Message)]
559pub struct Finish {
560    #[prost(string, repeated, tag = "1")]
561    pub ordered_message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
562    #[prost(string, optional, tag = "2")]
563    pub new_title: ::core::option::Option<::prost::alloc::string::String>,
564    #[prost(message, repeated, tag = "3")]
565    pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
566    #[prost(message, optional, tag = "4")]
567    pub updated_context: ::core::option::Option<ContextStatus>,
568    #[prost(string, optional, tag = "5")]
569    pub turn_rid: ::core::option::Option<::prost::alloc::string::String>,
570}
571#[derive(Clone, PartialEq, ::prost::Message)]
572pub struct Error {
573    #[prost(string, tag = "1")]
574    pub message: ::prost::alloc::string::String,
575}
576#[derive(Clone, PartialEq, ::prost::Message)]
577pub struct TextStart {
578    #[prost(string, tag = "1")]
579    pub id: ::prost::alloc::string::String,
580}
581#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct TextDelta {
583    #[prost(string, tag = "1")]
584    pub id: ::prost::alloc::string::String,
585    #[prost(string, tag = "2")]
586    pub delta: ::prost::alloc::string::String,
587}
588#[derive(Clone, PartialEq, ::prost::Message)]
589pub struct TextEnd {
590    #[prost(string, tag = "1")]
591    pub id: ::prost::alloc::string::String,
592}
593#[derive(Clone, PartialEq, ::prost::Message)]
594pub struct ReasoningStart {
595    #[prost(string, tag = "1")]
596    pub id: ::prost::alloc::string::String,
597}
598#[derive(Clone, PartialEq, ::prost::Message)]
599pub struct ReasoningDelta {
600    #[prost(string, tag = "1")]
601    pub id: ::prost::alloc::string::String,
602    #[prost(string, tag = "2")]
603    pub delta: ::prost::alloc::string::String,
604}
605#[derive(Clone, PartialEq, ::prost::Message)]
606pub struct ReasoningEnd {
607    #[prost(string, tag = "1")]
608    pub id: ::prost::alloc::string::String,
609    #[prost(double, tag = "2")]
610    pub duration_s: f64,
611}
612#[derive(Clone, PartialEq, ::prost::Message)]
613pub struct ToolAction {
614    #[prost(string, tag = "2")]
615    pub tool_action_verb: ::prost::alloc::string::String,
616    #[prost(string, optional, tag = "3")]
617    pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
618    #[prost(message, optional, tag = "5")]
619    pub tool_call_description: ::core::option::Option<ToolCallDescription>,
620    #[deprecated]
621    #[prost(string, tag = "1")]
622    pub id: ::prost::alloc::string::String,
623    #[deprecated]
624    #[prost(string, tag = "4")]
625    pub tool_name: ::prost::alloc::string::String,
626}
627#[derive(Clone, PartialEq, ::prost::Message)]
628pub struct ToolActionConfirmation {
629    #[prost(string, tag = "1")]
630    pub id: ::prost::alloc::string::String,
631    #[prost(double, optional, tag = "4")]
632    pub duration_s: ::core::option::Option<f64>,
633    #[prost(oneof = "tool_action_confirmation::Outcome", tags = "2, 3")]
634    pub outcome: ::core::option::Option<tool_action_confirmation::Outcome>,
635}
636/// Nested message and enum types in `ToolActionConfirmation`.
637pub mod tool_action_confirmation {
638    #[derive(Clone, PartialEq, ::prost::Oneof)]
639    pub enum Outcome {
640        #[prost(message, tag = "2")]
641        Success(super::ToolActionSuccess),
642        #[prost(message, tag = "3")]
643        Failure(super::ToolActionFailure),
644    }
645}
646#[derive(Clone, PartialEq, ::prost::Message)]
647pub struct ToolActionSuccess {
648    #[prost(string, tag = "1")]
649    pub tool_success_message: ::prost::alloc::string::String,
650}
651#[derive(Clone, PartialEq, ::prost::Message)]
652pub struct ToolActionFailure {
653    #[prost(string, tag = "1")]
654    pub tool_error_message: ::prost::alloc::string::String,
655}
656#[derive(Clone, PartialEq, ::prost::Message)]
657pub struct ClientDirective {
658    #[prost(oneof = "client_directive::Version", tags = "1")]
659    pub version: ::core::option::Option<client_directive::Version>,
660}
661/// Nested message and enum types in `ClientDirective`.
662pub mod client_directive {
663    #[derive(Clone, PartialEq, ::prost::Oneof)]
664    pub enum Version {
665        #[prost(message, tag = "1")]
666        V1(super::ClientDirectiveV1),
667    }
668}
669#[derive(Clone, PartialEq, ::prost::Message)]
670pub struct ClientDirectiveV1 {
671    #[prost(string, tag = "1")]
672    pub id: ::prost::alloc::string::String,
673    #[prost(oneof = "client_directive_v1::Kind", tags = "2, 3")]
674    pub kind: ::core::option::Option<client_directive_v1::Kind>,
675}
676/// Nested message and enum types in `ClientDirectiveV1`.
677pub mod client_directive_v1 {
678    #[derive(Clone, PartialEq, ::prost::Oneof)]
679    pub enum Kind {
680        #[prost(message, tag = "2")]
681        ResourceEdited(super::ResourceEditedDirective),
682        #[prost(message, tag = "3")]
683        SetTimeRange(super::SetTimeRangeDirective),
684    }
685}
686#[derive(Clone, PartialEq, ::prost::Message)]
687pub struct ResourceEditedDirective {
688    #[prost(oneof = "resource_edited_directive::Resource", tags = "1, 2")]
689    pub resource: ::core::option::Option<resource_edited_directive::Resource>,
690}
691/// Nested message and enum types in `ResourceEditedDirective`.
692pub mod resource_edited_directive {
693    #[derive(Clone, PartialEq, ::prost::Oneof)]
694    pub enum Resource {
695        #[prost(message, tag = "1")]
696        Checklist(super::ChecklistEdited),
697        #[prost(message, tag = "2")]
698        Template(super::TemplateEdited),
699    }
700}
701#[derive(Clone, PartialEq, ::prost::Message)]
702pub struct ChecklistEdited {
703    #[prost(string, tag = "1")]
704    pub checklist_rid: ::prost::alloc::string::String,
705    #[prost(string, tag = "2")]
706    pub branch_name: ::prost::alloc::string::String,
707    #[prost(string, optional, tag = "3")]
708    pub check_id: ::core::option::Option<::prost::alloc::string::String>,
709    #[prost(string, optional, tag = "4")]
710    pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
711    #[prost(message, optional, tag = "5")]
712    pub committed_at: ::core::option::Option<
713        super::super::super::google::protobuf::Timestamp,
714    >,
715}
716#[derive(Clone, PartialEq, ::prost::Message)]
717pub struct TemplateEdited {
718    #[prost(string, tag = "1")]
719    pub template_rid: ::prost::alloc::string::String,
720    #[prost(string, tag = "2")]
721    pub branch_name: ::prost::alloc::string::String,
722    #[prost(string, optional, tag = "3")]
723    pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
724    #[prost(message, optional, tag = "4")]
725    pub committed_at: ::core::option::Option<
726        super::super::super::google::protobuf::Timestamp,
727    >,
728}
729#[derive(Clone, PartialEq, ::prost::Message)]
730pub struct SetTimeRangeDirective {
731    #[prost(string, tag = "1")]
732    pub workbook_rid: ::prost::alloc::string::String,
733    #[prost(message, optional, tag = "2")]
734    pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
735    #[prost(message, optional, tag = "3")]
736    pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
737    #[prost(enumeration = "TimeRangeType", tag = "4")]
738    pub time_range_type: i32,
739}
740#[derive(Clone, PartialEq, ::prost::Message)]
741pub struct ResourceMarkup {
742    #[prost(oneof = "resource_markup::Kind", tags = "1, 2")]
743    pub kind: ::core::option::Option<resource_markup::Kind>,
744}
745/// Nested message and enum types in `ResourceMarkup`.
746pub mod resource_markup {
747    #[derive(Clone, PartialEq, ::prost::Oneof)]
748    pub enum Kind {
749        #[prost(message, tag = "1")]
750        Rid(super::RidResourceMarkup),
751        #[prost(message, tag = "2")]
752        RidList(super::RidListResourceMarkup),
753    }
754}
755#[derive(Clone, PartialEq, ::prost::Message)]
756pub struct RidResourceMarkup {
757    #[prost(string, tag = "1")]
758    pub rid: ::prost::alloc::string::String,
759    #[prost(string, optional, tag = "2")]
760    pub label: ::core::option::Option<::prost::alloc::string::String>,
761}
762#[derive(Clone, PartialEq, ::prost::Message)]
763pub struct RidListResourceMarkup {
764    #[prost(string, repeated, tag = "1")]
765    pub rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
766    #[prost(string, optional, tag = "2")]
767    pub label: ::core::option::Option<::prost::alloc::string::String>,
768}
769#[derive(Clone, Copy, PartialEq, ::prost::Message)]
770pub struct ContextStatus {
771    #[prost(int32, tag = "1")]
772    pub curr_token_count: i32,
773    #[prost(int32, tag = "2")]
774    pub model_context_limit: i32,
775}
776#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
777#[repr(i32)]
778pub enum FeedbackVote {
779    Unspecified = 0,
780    ThumbsUp = 1,
781    ThumbsDown = 2,
782}
783impl FeedbackVote {
784    /// String value of the enum field names used in the ProtoBuf definition.
785    ///
786    /// The values are not transformed in any way and thus are considered stable
787    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
788    pub fn as_str_name(&self) -> &'static str {
789        match self {
790            Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
791            Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
792            Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
793        }
794    }
795    /// Creates an enum from field names used in the ProtoBuf definition.
796    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
797        match value {
798            "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
799            "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
800            "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
801            _ => None,
802        }
803    }
804}
805#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
806#[repr(i32)]
807pub enum ToolCallStatus {
808    Unspecified = 0,
809    Approved = 1,
810    Denied = 2,
811    AwaitingApproval = 3,
812}
813impl ToolCallStatus {
814    /// String value of the enum field names used in the ProtoBuf definition.
815    ///
816    /// The values are not transformed in any way and thus are considered stable
817    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
818    pub fn as_str_name(&self) -> &'static str {
819        match self {
820            Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
821            Self::Approved => "TOOL_CALL_STATUS_APPROVED",
822            Self::Denied => "TOOL_CALL_STATUS_DENIED",
823            Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
824        }
825    }
826    /// Creates an enum from field names used in the ProtoBuf definition.
827    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
828        match value {
829            "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
830            "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
831            "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
832            "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
833            _ => None,
834        }
835    }
836}
837#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
838#[repr(i32)]
839pub enum TimeRangeType {
840    Unspecified = 0,
841    Absolute = 1,
842    Relative = 2,
843}
844impl TimeRangeType {
845    /// String value of the enum field names used in the ProtoBuf definition.
846    ///
847    /// The values are not transformed in any way and thus are considered stable
848    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
849    pub fn as_str_name(&self) -> &'static str {
850        match self {
851            Self::Unspecified => "TIME_RANGE_TYPE_UNSPECIFIED",
852            Self::Absolute => "TIME_RANGE_TYPE_ABSOLUTE",
853            Self::Relative => "TIME_RANGE_TYPE_RELATIVE",
854        }
855    }
856    /// Creates an enum from field names used in the ProtoBuf definition.
857    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
858        match value {
859            "TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
860            "TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
861            "TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
862            _ => None,
863        }
864    }
865}
866/// Generated client implementations.
867pub mod ai_agent_service_client {
868    #![allow(
869        unused_variables,
870        dead_code,
871        missing_docs,
872        clippy::wildcard_imports,
873        clippy::let_unit_value,
874    )]
875    use tonic::codegen::*;
876    use tonic::codegen::http::Uri;
877    #[derive(Debug, Clone)]
878    pub struct AiAgentServiceClient<T> {
879        inner: tonic::client::Grpc<T>,
880    }
881    impl AiAgentServiceClient<tonic::transport::Channel> {
882        /// Attempt to create a new client by connecting to a given endpoint.
883        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
884        where
885            D: TryInto<tonic::transport::Endpoint>,
886            D::Error: Into<StdError>,
887        {
888            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
889            Ok(Self::new(conn))
890        }
891    }
892    impl<T> AiAgentServiceClient<T>
893    where
894        T: tonic::client::GrpcService<tonic::body::Body>,
895        T::Error: Into<StdError>,
896        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
897        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
898    {
899        pub fn new(inner: T) -> Self {
900            let inner = tonic::client::Grpc::new(inner);
901            Self { inner }
902        }
903        pub fn with_origin(inner: T, origin: Uri) -> Self {
904            let inner = tonic::client::Grpc::with_origin(inner, origin);
905            Self { inner }
906        }
907        pub fn with_interceptor<F>(
908            inner: T,
909            interceptor: F,
910        ) -> AiAgentServiceClient<InterceptedService<T, F>>
911        where
912            F: tonic::service::Interceptor,
913            T::ResponseBody: Default,
914            T: tonic::codegen::Service<
915                http::Request<tonic::body::Body>,
916                Response = http::Response<
917                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
918                >,
919            >,
920            <T as tonic::codegen::Service<
921                http::Request<tonic::body::Body>,
922            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
923        {
924            AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
925        }
926        /// Compress requests with the given encoding.
927        ///
928        /// This requires the server to support it otherwise it might respond with an
929        /// error.
930        #[must_use]
931        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
932            self.inner = self.inner.send_compressed(encoding);
933            self
934        }
935        /// Enable decompressing responses.
936        #[must_use]
937        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
938            self.inner = self.inner.accept_compressed(encoding);
939            self
940        }
941        /// Limits the maximum size of a decoded message.
942        ///
943        /// Default: `4MB`
944        #[must_use]
945        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
946            self.inner = self.inner.max_decoding_message_size(limit);
947            self
948        }
949        /// Limits the maximum size of an encoded message.
950        ///
951        /// Default: `usize::MAX`
952        #[must_use]
953        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
954            self.inner = self.inner.max_encoding_message_size(limit);
955            self
956        }
957        pub async fn stream_chat(
958            &mut self,
959            request: impl tonic::IntoRequest<super::StreamChatRequest>,
960        ) -> std::result::Result<
961            tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
962            tonic::Status,
963        > {
964            self.inner
965                .ready()
966                .await
967                .map_err(|e| {
968                    tonic::Status::unknown(
969                        format!("Service was not ready: {}", e.into()),
970                    )
971                })?;
972            let codec = tonic::codec::ProstCodec::default();
973            let path = http::uri::PathAndQuery::from_static(
974                "/nominal.ai.v1.AIAgentService/StreamChat",
975            );
976            let mut req = request.into_request();
977            req.extensions_mut()
978                .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
979            self.inner.server_streaming(req, path, codec).await
980        }
981        #[deprecated]
982        pub async fn get_conversation(
983            &mut self,
984            request: impl tonic::IntoRequest<super::GetConversationRequest>,
985        ) -> std::result::Result<
986            tonic::Response<super::GetConversationResponse>,
987            tonic::Status,
988        > {
989            self.inner
990                .ready()
991                .await
992                .map_err(|e| {
993                    tonic::Status::unknown(
994                        format!("Service was not ready: {}", e.into()),
995                    )
996                })?;
997            let codec = tonic::codec::ProstCodec::default();
998            let path = http::uri::PathAndQuery::from_static(
999                "/nominal.ai.v1.AIAgentService/GetConversation",
1000            );
1001            let mut req = request.into_request();
1002            req.extensions_mut()
1003                .insert(
1004                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
1005                );
1006            self.inner.unary(req, path, codec).await
1007        }
1008        pub async fn get_conversation_metadata(
1009            &mut self,
1010            request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
1011        ) -> std::result::Result<
1012            tonic::Response<super::GetConversationMetadataResponse>,
1013            tonic::Status,
1014        > {
1015            self.inner
1016                .ready()
1017                .await
1018                .map_err(|e| {
1019                    tonic::Status::unknown(
1020                        format!("Service was not ready: {}", e.into()),
1021                    )
1022                })?;
1023            let codec = tonic::codec::ProstCodec::default();
1024            let path = http::uri::PathAndQuery::from_static(
1025                "/nominal.ai.v1.AIAgentService/GetConversationMetadata",
1026            );
1027            let mut req = request.into_request();
1028            req.extensions_mut()
1029                .insert(
1030                    GrpcMethod::new(
1031                        "nominal.ai.v1.AIAgentService",
1032                        "GetConversationMetadata",
1033                    ),
1034                );
1035            self.inner.unary(req, path, codec).await
1036        }
1037        pub async fn get_conversation_messages(
1038            &mut self,
1039            request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
1040        ) -> std::result::Result<
1041            tonic::Response<super::GetConversationMessagesResponse>,
1042            tonic::Status,
1043        > {
1044            self.inner
1045                .ready()
1046                .await
1047                .map_err(|e| {
1048                    tonic::Status::unknown(
1049                        format!("Service was not ready: {}", e.into()),
1050                    )
1051                })?;
1052            let codec = tonic::codec::ProstCodec::default();
1053            let path = http::uri::PathAndQuery::from_static(
1054                "/nominal.ai.v1.AIAgentService/GetConversationMessages",
1055            );
1056            let mut req = request.into_request();
1057            req.extensions_mut()
1058                .insert(
1059                    GrpcMethod::new(
1060                        "nominal.ai.v1.AIAgentService",
1061                        "GetConversationMessages",
1062                    ),
1063                );
1064            self.inner.unary(req, path, codec).await
1065        }
1066        pub async fn list_conversations(
1067            &mut self,
1068            request: impl tonic::IntoRequest<super::ListConversationsRequest>,
1069        ) -> std::result::Result<
1070            tonic::Response<super::ListConversationsResponse>,
1071            tonic::Status,
1072        > {
1073            self.inner
1074                .ready()
1075                .await
1076                .map_err(|e| {
1077                    tonic::Status::unknown(
1078                        format!("Service was not ready: {}", e.into()),
1079                    )
1080                })?;
1081            let codec = tonic::codec::ProstCodec::default();
1082            let path = http::uri::PathAndQuery::from_static(
1083                "/nominal.ai.v1.AIAgentService/ListConversations",
1084            );
1085            let mut req = request.into_request();
1086            req.extensions_mut()
1087                .insert(
1088                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
1089                );
1090            self.inner.unary(req, path, codec).await
1091        }
1092        pub async fn create_conversation(
1093            &mut self,
1094            request: impl tonic::IntoRequest<super::CreateConversationRequest>,
1095        ) -> std::result::Result<
1096            tonic::Response<super::CreateConversationResponse>,
1097            tonic::Status,
1098        > {
1099            self.inner
1100                .ready()
1101                .await
1102                .map_err(|e| {
1103                    tonic::Status::unknown(
1104                        format!("Service was not ready: {}", e.into()),
1105                    )
1106                })?;
1107            let codec = tonic::codec::ProstCodec::default();
1108            let path = http::uri::PathAndQuery::from_static(
1109                "/nominal.ai.v1.AIAgentService/CreateConversation",
1110            );
1111            let mut req = request.into_request();
1112            req.extensions_mut()
1113                .insert(
1114                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
1115                );
1116            self.inner.unary(req, path, codec).await
1117        }
1118        pub async fn update_conversation_metadata(
1119            &mut self,
1120            request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
1121        ) -> std::result::Result<
1122            tonic::Response<super::UpdateConversationMetadataResponse>,
1123            tonic::Status,
1124        > {
1125            self.inner
1126                .ready()
1127                .await
1128                .map_err(|e| {
1129                    tonic::Status::unknown(
1130                        format!("Service was not ready: {}", e.into()),
1131                    )
1132                })?;
1133            let codec = tonic::codec::ProstCodec::default();
1134            let path = http::uri::PathAndQuery::from_static(
1135                "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
1136            );
1137            let mut req = request.into_request();
1138            req.extensions_mut()
1139                .insert(
1140                    GrpcMethod::new(
1141                        "nominal.ai.v1.AIAgentService",
1142                        "UpdateConversationMetadata",
1143                    ),
1144                );
1145            self.inner.unary(req, path, codec).await
1146        }
1147        pub async fn delete_conversation(
1148            &mut self,
1149            request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
1150        ) -> std::result::Result<
1151            tonic::Response<super::DeleteConversationResponse>,
1152            tonic::Status,
1153        > {
1154            self.inner
1155                .ready()
1156                .await
1157                .map_err(|e| {
1158                    tonic::Status::unknown(
1159                        format!("Service was not ready: {}", e.into()),
1160                    )
1161                })?;
1162            let codec = tonic::codec::ProstCodec::default();
1163            let path = http::uri::PathAndQuery::from_static(
1164                "/nominal.ai.v1.AIAgentService/DeleteConversation",
1165            );
1166            let mut req = request.into_request();
1167            req.extensions_mut()
1168                .insert(
1169                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
1170                );
1171            self.inner.unary(req, path, codec).await
1172        }
1173        pub async fn get_snapshot_rid_by_user_message_id(
1174            &mut self,
1175            request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
1176        ) -> std::result::Result<
1177            tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
1178            tonic::Status,
1179        > {
1180            self.inner
1181                .ready()
1182                .await
1183                .map_err(|e| {
1184                    tonic::Status::unknown(
1185                        format!("Service was not ready: {}", e.into()),
1186                    )
1187                })?;
1188            let codec = tonic::codec::ProstCodec::default();
1189            let path = http::uri::PathAndQuery::from_static(
1190                "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
1191            );
1192            let mut req = request.into_request();
1193            req.extensions_mut()
1194                .insert(
1195                    GrpcMethod::new(
1196                        "nominal.ai.v1.AIAgentService",
1197                        "GetSnapshotRidByUserMessageId",
1198                    ),
1199                );
1200            self.inner.unary(req, path, codec).await
1201        }
1202        pub async fn compact_conversation(
1203            &mut self,
1204            request: impl tonic::IntoRequest<super::CompactConversationRequest>,
1205        ) -> std::result::Result<
1206            tonic::Response<super::CompactConversationResponse>,
1207            tonic::Status,
1208        > {
1209            self.inner
1210                .ready()
1211                .await
1212                .map_err(|e| {
1213                    tonic::Status::unknown(
1214                        format!("Service was not ready: {}", e.into()),
1215                    )
1216                })?;
1217            let codec = tonic::codec::ProstCodec::default();
1218            let path = http::uri::PathAndQuery::from_static(
1219                "/nominal.ai.v1.AIAgentService/CompactConversation",
1220            );
1221            let mut req = request.into_request();
1222            req.extensions_mut()
1223                .insert(
1224                    GrpcMethod::new(
1225                        "nominal.ai.v1.AIAgentService",
1226                        "CompactConversation",
1227                    ),
1228                );
1229            self.inner.unary(req, path, codec).await
1230        }
1231        pub async fn submit_message_feedback(
1232            &mut self,
1233            request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1234        ) -> std::result::Result<
1235            tonic::Response<super::SubmitMessageFeedbackResponse>,
1236            tonic::Status,
1237        > {
1238            self.inner
1239                .ready()
1240                .await
1241                .map_err(|e| {
1242                    tonic::Status::unknown(
1243                        format!("Service was not ready: {}", e.into()),
1244                    )
1245                })?;
1246            let codec = tonic::codec::ProstCodec::default();
1247            let path = http::uri::PathAndQuery::from_static(
1248                "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
1249            );
1250            let mut req = request.into_request();
1251            req.extensions_mut()
1252                .insert(
1253                    GrpcMethod::new(
1254                        "nominal.ai.v1.AIAgentService",
1255                        "SubmitMessageFeedback",
1256                    ),
1257                );
1258            self.inner.unary(req, path, codec).await
1259        }
1260    }
1261}
1262#[derive(Clone, PartialEq, ::prost::Message)]
1263pub struct ClassifyErrorRequest {
1264    #[prost(string, tag = "1")]
1265    pub error_message: ::prost::alloc::string::String,
1266}
1267#[derive(Clone, PartialEq, ::prost::Message)]
1268pub struct ClassifyErrorResponse {
1269    #[prost(enumeration = "ErrorClassification", tag = "1")]
1270    pub classification: i32,
1271    #[prost(string, tag = "2")]
1272    pub reason: ::prost::alloc::string::String,
1273}
1274#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1275#[repr(i32)]
1276pub enum ErrorClassification {
1277    Unspecified = 0,
1278    Client = 1,
1279    Server = 2,
1280}
1281impl ErrorClassification {
1282    /// String value of the enum field names used in the ProtoBuf definition.
1283    ///
1284    /// The values are not transformed in any way and thus are considered stable
1285    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1286    pub fn as_str_name(&self) -> &'static str {
1287        match self {
1288            Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
1289            Self::Client => "ERROR_CLASSIFICATION_CLIENT",
1290            Self::Server => "ERROR_CLASSIFICATION_SERVER",
1291        }
1292    }
1293    /// Creates an enum from field names used in the ProtoBuf definition.
1294    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1295        match value {
1296            "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
1297            "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
1298            "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
1299            _ => None,
1300        }
1301    }
1302}
1303/// Generated client implementations.
1304pub mod data_ingestion_error_classifier_service_client {
1305    #![allow(
1306        unused_variables,
1307        dead_code,
1308        missing_docs,
1309        clippy::wildcard_imports,
1310        clippy::let_unit_value,
1311    )]
1312    use tonic::codegen::*;
1313    use tonic::codegen::http::Uri;
1314    #[derive(Debug, Clone)]
1315    pub struct DataIngestionErrorClassifierServiceClient<T> {
1316        inner: tonic::client::Grpc<T>,
1317    }
1318    impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
1319        /// Attempt to create a new client by connecting to a given endpoint.
1320        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1321        where
1322            D: TryInto<tonic::transport::Endpoint>,
1323            D::Error: Into<StdError>,
1324        {
1325            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1326            Ok(Self::new(conn))
1327        }
1328    }
1329    impl<T> DataIngestionErrorClassifierServiceClient<T>
1330    where
1331        T: tonic::client::GrpcService<tonic::body::Body>,
1332        T::Error: Into<StdError>,
1333        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1334        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1335    {
1336        pub fn new(inner: T) -> Self {
1337            let inner = tonic::client::Grpc::new(inner);
1338            Self { inner }
1339        }
1340        pub fn with_origin(inner: T, origin: Uri) -> Self {
1341            let inner = tonic::client::Grpc::with_origin(inner, origin);
1342            Self { inner }
1343        }
1344        pub fn with_interceptor<F>(
1345            inner: T,
1346            interceptor: F,
1347        ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
1348        where
1349            F: tonic::service::Interceptor,
1350            T::ResponseBody: Default,
1351            T: tonic::codegen::Service<
1352                http::Request<tonic::body::Body>,
1353                Response = http::Response<
1354                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1355                >,
1356            >,
1357            <T as tonic::codegen::Service<
1358                http::Request<tonic::body::Body>,
1359            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1360        {
1361            DataIngestionErrorClassifierServiceClient::new(
1362                InterceptedService::new(inner, interceptor),
1363            )
1364        }
1365        /// Compress requests with the given encoding.
1366        ///
1367        /// This requires the server to support it otherwise it might respond with an
1368        /// error.
1369        #[must_use]
1370        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1371            self.inner = self.inner.send_compressed(encoding);
1372            self
1373        }
1374        /// Enable decompressing responses.
1375        #[must_use]
1376        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1377            self.inner = self.inner.accept_compressed(encoding);
1378            self
1379        }
1380        /// Limits the maximum size of a decoded message.
1381        ///
1382        /// Default: `4MB`
1383        #[must_use]
1384        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1385            self.inner = self.inner.max_decoding_message_size(limit);
1386            self
1387        }
1388        /// Limits the maximum size of an encoded message.
1389        ///
1390        /// Default: `usize::MAX`
1391        #[must_use]
1392        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1393            self.inner = self.inner.max_encoding_message_size(limit);
1394            self
1395        }
1396        pub async fn classify_error(
1397            &mut self,
1398            request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
1399        ) -> std::result::Result<
1400            tonic::Response<super::ClassifyErrorResponse>,
1401            tonic::Status,
1402        > {
1403            self.inner
1404                .ready()
1405                .await
1406                .map_err(|e| {
1407                    tonic::Status::unknown(
1408                        format!("Service was not ready: {}", e.into()),
1409                    )
1410                })?;
1411            let codec = tonic::codec::ProstCodec::default();
1412            let path = http::uri::PathAndQuery::from_static(
1413                "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
1414            );
1415            let mut req = request.into_request();
1416            req.extensions_mut()
1417                .insert(
1418                    GrpcMethod::new(
1419                        "nominal.ai.v1.DataIngestionErrorClassifierService",
1420                        "ClassifyError",
1421                    ),
1422                );
1423            self.inner.unary(req, path, codec).await
1424        }
1425    }
1426}
1427#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1428pub struct GetProviderStatusRequest {}
1429#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1430pub struct GetProviderStatusResponse {
1431    #[prost(message, optional, tag = "1")]
1432    pub timestamp: ::core::option::Option<
1433        super::super::super::google::protobuf::Timestamp,
1434    >,
1435    #[prost(message, optional, tag = "2")]
1436    pub last_status: ::core::option::Option<ProviderStatus>,
1437    #[deprecated]
1438    #[prost(message, optional, tag = "3")]
1439    pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
1440    #[prost(message, optional, tag = "4")]
1441    pub aggregated_status: ::core::option::Option<ProviderStatus>,
1442}
1443#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1444pub struct ProviderStatus {
1445    #[prost(oneof = "provider_status::Status", tags = "1, 2")]
1446    pub status: ::core::option::Option<provider_status::Status>,
1447}
1448/// Nested message and enum types in `ProviderStatus`.
1449pub mod provider_status {
1450    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1451    pub enum Status {
1452        #[prost(message, tag = "1")]
1453        Healthy(super::Healthy),
1454        #[prost(message, tag = "2")]
1455        Degraded(super::Degraded),
1456    }
1457}
1458#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1459pub struct Healthy {}
1460#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1461pub struct Degraded {
1462    #[prost(enumeration = "DegradationReason", tag = "1")]
1463    pub reason: i32,
1464}
1465#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1466pub struct ProviderMetrics {
1467    #[prost(int32, tag = "1")]
1468    pub time_to_first_token_ms: i32,
1469    #[prost(int32, tag = "2")]
1470    pub total_time_ms: i32,
1471}
1472#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1473#[repr(i32)]
1474pub enum DegradationReason {
1475    Unspecified = 0,
1476    HighLatency = 1,
1477    Failures = 2,
1478    HighLatencyAndFailures = 3,
1479    Unavailable = 4,
1480}
1481impl DegradationReason {
1482    /// String value of the enum field names used in the ProtoBuf definition.
1483    ///
1484    /// The values are not transformed in any way and thus are considered stable
1485    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1486    pub fn as_str_name(&self) -> &'static str {
1487        match self {
1488            Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
1489            Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
1490            Self::Failures => "DEGRADATION_REASON_FAILURES",
1491            Self::HighLatencyAndFailures => {
1492                "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
1493            }
1494            Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
1495        }
1496    }
1497    /// Creates an enum from field names used in the ProtoBuf definition.
1498    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1499        match value {
1500            "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1501            "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
1502            "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
1503            "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
1504                Some(Self::HighLatencyAndFailures)
1505            }
1506            "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
1507            _ => None,
1508        }
1509    }
1510}
1511/// Generated client implementations.
1512pub mod model_provider_health_service_client {
1513    #![allow(
1514        unused_variables,
1515        dead_code,
1516        missing_docs,
1517        clippy::wildcard_imports,
1518        clippy::let_unit_value,
1519    )]
1520    use tonic::codegen::*;
1521    use tonic::codegen::http::Uri;
1522    #[derive(Debug, Clone)]
1523    pub struct ModelProviderHealthServiceClient<T> {
1524        inner: tonic::client::Grpc<T>,
1525    }
1526    impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
1527        /// Attempt to create a new client by connecting to a given endpoint.
1528        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1529        where
1530            D: TryInto<tonic::transport::Endpoint>,
1531            D::Error: Into<StdError>,
1532        {
1533            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1534            Ok(Self::new(conn))
1535        }
1536    }
1537    impl<T> ModelProviderHealthServiceClient<T>
1538    where
1539        T: tonic::client::GrpcService<tonic::body::Body>,
1540        T::Error: Into<StdError>,
1541        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1542        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1543    {
1544        pub fn new(inner: T) -> Self {
1545            let inner = tonic::client::Grpc::new(inner);
1546            Self { inner }
1547        }
1548        pub fn with_origin(inner: T, origin: Uri) -> Self {
1549            let inner = tonic::client::Grpc::with_origin(inner, origin);
1550            Self { inner }
1551        }
1552        pub fn with_interceptor<F>(
1553            inner: T,
1554            interceptor: F,
1555        ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
1556        where
1557            F: tonic::service::Interceptor,
1558            T::ResponseBody: Default,
1559            T: tonic::codegen::Service<
1560                http::Request<tonic::body::Body>,
1561                Response = http::Response<
1562                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1563                >,
1564            >,
1565            <T as tonic::codegen::Service<
1566                http::Request<tonic::body::Body>,
1567            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1568        {
1569            ModelProviderHealthServiceClient::new(
1570                InterceptedService::new(inner, interceptor),
1571            )
1572        }
1573        /// Compress requests with the given encoding.
1574        ///
1575        /// This requires the server to support it otherwise it might respond with an
1576        /// error.
1577        #[must_use]
1578        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1579            self.inner = self.inner.send_compressed(encoding);
1580            self
1581        }
1582        /// Enable decompressing responses.
1583        #[must_use]
1584        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1585            self.inner = self.inner.accept_compressed(encoding);
1586            self
1587        }
1588        /// Limits the maximum size of a decoded message.
1589        ///
1590        /// Default: `4MB`
1591        #[must_use]
1592        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1593            self.inner = self.inner.max_decoding_message_size(limit);
1594            self
1595        }
1596        /// Limits the maximum size of an encoded message.
1597        ///
1598        /// Default: `usize::MAX`
1599        #[must_use]
1600        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1601            self.inner = self.inner.max_encoding_message_size(limit);
1602            self
1603        }
1604        pub async fn get_provider_status(
1605            &mut self,
1606            request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
1607        ) -> std::result::Result<
1608            tonic::Response<super::GetProviderStatusResponse>,
1609            tonic::Status,
1610        > {
1611            self.inner
1612                .ready()
1613                .await
1614                .map_err(|e| {
1615                    tonic::Status::unknown(
1616                        format!("Service was not ready: {}", e.into()),
1617                    )
1618                })?;
1619            let codec = tonic::codec::ProstCodec::default();
1620            let path = http::uri::PathAndQuery::from_static(
1621                "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
1622            );
1623            let mut req = request.into_request();
1624            req.extensions_mut()
1625                .insert(
1626                    GrpcMethod::new(
1627                        "nominal.ai.v1.ModelProviderHealthService",
1628                        "GetProviderStatus",
1629                    ),
1630                );
1631            self.inner.unary(req, path, codec).await
1632        }
1633    }
1634}