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(oneof = "tool_action_confirmation::Outcome", tags = "2, 3")]
632    pub outcome: ::core::option::Option<tool_action_confirmation::Outcome>,
633}
634/// Nested message and enum types in `ToolActionConfirmation`.
635pub mod tool_action_confirmation {
636    #[derive(Clone, PartialEq, ::prost::Oneof)]
637    pub enum Outcome {
638        #[prost(message, tag = "2")]
639        Success(super::ToolActionSuccess),
640        #[prost(message, tag = "3")]
641        Failure(super::ToolActionFailure),
642    }
643}
644#[derive(Clone, PartialEq, ::prost::Message)]
645pub struct ToolActionSuccess {
646    #[prost(string, tag = "1")]
647    pub tool_success_message: ::prost::alloc::string::String,
648}
649#[derive(Clone, PartialEq, ::prost::Message)]
650pub struct ToolActionFailure {
651    #[prost(string, tag = "1")]
652    pub tool_error_message: ::prost::alloc::string::String,
653}
654#[derive(Clone, PartialEq, ::prost::Message)]
655pub struct ClientDirective {
656    #[prost(oneof = "client_directive::Version", tags = "1")]
657    pub version: ::core::option::Option<client_directive::Version>,
658}
659/// Nested message and enum types in `ClientDirective`.
660pub mod client_directive {
661    #[derive(Clone, PartialEq, ::prost::Oneof)]
662    pub enum Version {
663        #[prost(message, tag = "1")]
664        V1(super::ClientDirectiveV1),
665    }
666}
667#[derive(Clone, PartialEq, ::prost::Message)]
668pub struct ClientDirectiveV1 {
669    #[prost(string, tag = "1")]
670    pub id: ::prost::alloc::string::String,
671    #[prost(oneof = "client_directive_v1::Kind", tags = "2, 3")]
672    pub kind: ::core::option::Option<client_directive_v1::Kind>,
673}
674/// Nested message and enum types in `ClientDirectiveV1`.
675pub mod client_directive_v1 {
676    #[derive(Clone, PartialEq, ::prost::Oneof)]
677    pub enum Kind {
678        #[prost(message, tag = "2")]
679        ResourceEdited(super::ResourceEditedDirective),
680        #[prost(message, tag = "3")]
681        SetTimeRange(super::SetTimeRangeDirective),
682    }
683}
684#[derive(Clone, PartialEq, ::prost::Message)]
685pub struct ResourceEditedDirective {
686    #[prost(oneof = "resource_edited_directive::Resource", tags = "1, 2")]
687    pub resource: ::core::option::Option<resource_edited_directive::Resource>,
688}
689/// Nested message and enum types in `ResourceEditedDirective`.
690pub mod resource_edited_directive {
691    #[derive(Clone, PartialEq, ::prost::Oneof)]
692    pub enum Resource {
693        #[prost(message, tag = "1")]
694        Checklist(super::ChecklistEdited),
695        #[prost(message, tag = "2")]
696        Template(super::TemplateEdited),
697    }
698}
699#[derive(Clone, PartialEq, ::prost::Message)]
700pub struct ChecklistEdited {
701    #[prost(string, tag = "1")]
702    pub checklist_rid: ::prost::alloc::string::String,
703    #[prost(string, tag = "2")]
704    pub branch_name: ::prost::alloc::string::String,
705    #[prost(string, optional, tag = "3")]
706    pub check_id: ::core::option::Option<::prost::alloc::string::String>,
707    #[prost(string, optional, tag = "4")]
708    pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
709    #[prost(message, optional, tag = "5")]
710    pub committed_at: ::core::option::Option<
711        super::super::super::google::protobuf::Timestamp,
712    >,
713}
714#[derive(Clone, PartialEq, ::prost::Message)]
715pub struct TemplateEdited {
716    #[prost(string, tag = "1")]
717    pub template_rid: ::prost::alloc::string::String,
718    #[prost(string, tag = "2")]
719    pub branch_name: ::prost::alloc::string::String,
720    #[prost(string, optional, tag = "3")]
721    pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
722    #[prost(message, optional, tag = "4")]
723    pub committed_at: ::core::option::Option<
724        super::super::super::google::protobuf::Timestamp,
725    >,
726}
727#[derive(Clone, PartialEq, ::prost::Message)]
728pub struct SetTimeRangeDirective {
729    #[prost(string, tag = "1")]
730    pub workbook_rid: ::prost::alloc::string::String,
731    #[prost(message, optional, tag = "2")]
732    pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
733    #[prost(message, optional, tag = "3")]
734    pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
735    #[prost(enumeration = "TimeRangeType", tag = "4")]
736    pub time_range_type: i32,
737}
738#[derive(Clone, PartialEq, ::prost::Message)]
739pub struct ResourceMarkup {
740    #[prost(oneof = "resource_markup::Kind", tags = "1, 2")]
741    pub kind: ::core::option::Option<resource_markup::Kind>,
742}
743/// Nested message and enum types in `ResourceMarkup`.
744pub mod resource_markup {
745    #[derive(Clone, PartialEq, ::prost::Oneof)]
746    pub enum Kind {
747        #[prost(message, tag = "1")]
748        Rid(super::RidResourceMarkup),
749        #[prost(message, tag = "2")]
750        RidList(super::RidListResourceMarkup),
751    }
752}
753#[derive(Clone, PartialEq, ::prost::Message)]
754pub struct RidResourceMarkup {
755    #[prost(string, tag = "1")]
756    pub rid: ::prost::alloc::string::String,
757    #[prost(string, optional, tag = "2")]
758    pub label: ::core::option::Option<::prost::alloc::string::String>,
759}
760#[derive(Clone, PartialEq, ::prost::Message)]
761pub struct RidListResourceMarkup {
762    #[prost(string, repeated, tag = "1")]
763    pub rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
764    #[prost(string, optional, tag = "2")]
765    pub label: ::core::option::Option<::prost::alloc::string::String>,
766}
767#[derive(Clone, Copy, PartialEq, ::prost::Message)]
768pub struct ContextStatus {
769    #[prost(int32, tag = "1")]
770    pub curr_token_count: i32,
771    #[prost(int32, tag = "2")]
772    pub model_context_limit: i32,
773}
774#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
775#[repr(i32)]
776pub enum FeedbackVote {
777    Unspecified = 0,
778    ThumbsUp = 1,
779    ThumbsDown = 2,
780}
781impl FeedbackVote {
782    /// String value of the enum field names used in the ProtoBuf definition.
783    ///
784    /// The values are not transformed in any way and thus are considered stable
785    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
786    pub fn as_str_name(&self) -> &'static str {
787        match self {
788            Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
789            Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
790            Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
791        }
792    }
793    /// Creates an enum from field names used in the ProtoBuf definition.
794    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
795        match value {
796            "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
797            "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
798            "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
799            _ => None,
800        }
801    }
802}
803#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
804#[repr(i32)]
805pub enum ToolCallStatus {
806    Unspecified = 0,
807    Approved = 1,
808    Denied = 2,
809    AwaitingApproval = 3,
810}
811impl ToolCallStatus {
812    /// String value of the enum field names used in the ProtoBuf definition.
813    ///
814    /// The values are not transformed in any way and thus are considered stable
815    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
816    pub fn as_str_name(&self) -> &'static str {
817        match self {
818            Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
819            Self::Approved => "TOOL_CALL_STATUS_APPROVED",
820            Self::Denied => "TOOL_CALL_STATUS_DENIED",
821            Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
822        }
823    }
824    /// Creates an enum from field names used in the ProtoBuf definition.
825    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
826        match value {
827            "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
828            "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
829            "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
830            "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
831            _ => None,
832        }
833    }
834}
835#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
836#[repr(i32)]
837pub enum TimeRangeType {
838    Unspecified = 0,
839    Absolute = 1,
840    Relative = 2,
841}
842impl TimeRangeType {
843    /// String value of the enum field names used in the ProtoBuf definition.
844    ///
845    /// The values are not transformed in any way and thus are considered stable
846    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
847    pub fn as_str_name(&self) -> &'static str {
848        match self {
849            Self::Unspecified => "TIME_RANGE_TYPE_UNSPECIFIED",
850            Self::Absolute => "TIME_RANGE_TYPE_ABSOLUTE",
851            Self::Relative => "TIME_RANGE_TYPE_RELATIVE",
852        }
853    }
854    /// Creates an enum from field names used in the ProtoBuf definition.
855    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
856        match value {
857            "TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
858            "TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
859            "TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
860            _ => None,
861        }
862    }
863}
864/// Generated client implementations.
865pub mod ai_agent_service_client {
866    #![allow(
867        unused_variables,
868        dead_code,
869        missing_docs,
870        clippy::wildcard_imports,
871        clippy::let_unit_value,
872    )]
873    use tonic::codegen::*;
874    use tonic::codegen::http::Uri;
875    #[derive(Debug, Clone)]
876    pub struct AiAgentServiceClient<T> {
877        inner: tonic::client::Grpc<T>,
878    }
879    impl AiAgentServiceClient<tonic::transport::Channel> {
880        /// Attempt to create a new client by connecting to a given endpoint.
881        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
882        where
883            D: TryInto<tonic::transport::Endpoint>,
884            D::Error: Into<StdError>,
885        {
886            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
887            Ok(Self::new(conn))
888        }
889    }
890    impl<T> AiAgentServiceClient<T>
891    where
892        T: tonic::client::GrpcService<tonic::body::Body>,
893        T::Error: Into<StdError>,
894        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
895        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
896    {
897        pub fn new(inner: T) -> Self {
898            let inner = tonic::client::Grpc::new(inner);
899            Self { inner }
900        }
901        pub fn with_origin(inner: T, origin: Uri) -> Self {
902            let inner = tonic::client::Grpc::with_origin(inner, origin);
903            Self { inner }
904        }
905        pub fn with_interceptor<F>(
906            inner: T,
907            interceptor: F,
908        ) -> AiAgentServiceClient<InterceptedService<T, F>>
909        where
910            F: tonic::service::Interceptor,
911            T::ResponseBody: Default,
912            T: tonic::codegen::Service<
913                http::Request<tonic::body::Body>,
914                Response = http::Response<
915                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
916                >,
917            >,
918            <T as tonic::codegen::Service<
919                http::Request<tonic::body::Body>,
920            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
921        {
922            AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
923        }
924        /// Compress requests with the given encoding.
925        ///
926        /// This requires the server to support it otherwise it might respond with an
927        /// error.
928        #[must_use]
929        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
930            self.inner = self.inner.send_compressed(encoding);
931            self
932        }
933        /// Enable decompressing responses.
934        #[must_use]
935        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
936            self.inner = self.inner.accept_compressed(encoding);
937            self
938        }
939        /// Limits the maximum size of a decoded message.
940        ///
941        /// Default: `4MB`
942        #[must_use]
943        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
944            self.inner = self.inner.max_decoding_message_size(limit);
945            self
946        }
947        /// Limits the maximum size of an encoded message.
948        ///
949        /// Default: `usize::MAX`
950        #[must_use]
951        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
952            self.inner = self.inner.max_encoding_message_size(limit);
953            self
954        }
955        pub async fn stream_chat(
956            &mut self,
957            request: impl tonic::IntoRequest<super::StreamChatRequest>,
958        ) -> std::result::Result<
959            tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
960            tonic::Status,
961        > {
962            self.inner
963                .ready()
964                .await
965                .map_err(|e| {
966                    tonic::Status::unknown(
967                        format!("Service was not ready: {}", e.into()),
968                    )
969                })?;
970            let codec = tonic::codec::ProstCodec::default();
971            let path = http::uri::PathAndQuery::from_static(
972                "/nominal.ai.v1.AIAgentService/StreamChat",
973            );
974            let mut req = request.into_request();
975            req.extensions_mut()
976                .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
977            self.inner.server_streaming(req, path, codec).await
978        }
979        #[deprecated]
980        pub async fn get_conversation(
981            &mut self,
982            request: impl tonic::IntoRequest<super::GetConversationRequest>,
983        ) -> std::result::Result<
984            tonic::Response<super::GetConversationResponse>,
985            tonic::Status,
986        > {
987            self.inner
988                .ready()
989                .await
990                .map_err(|e| {
991                    tonic::Status::unknown(
992                        format!("Service was not ready: {}", e.into()),
993                    )
994                })?;
995            let codec = tonic::codec::ProstCodec::default();
996            let path = http::uri::PathAndQuery::from_static(
997                "/nominal.ai.v1.AIAgentService/GetConversation",
998            );
999            let mut req = request.into_request();
1000            req.extensions_mut()
1001                .insert(
1002                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
1003                );
1004            self.inner.unary(req, path, codec).await
1005        }
1006        pub async fn get_conversation_metadata(
1007            &mut self,
1008            request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
1009        ) -> std::result::Result<
1010            tonic::Response<super::GetConversationMetadataResponse>,
1011            tonic::Status,
1012        > {
1013            self.inner
1014                .ready()
1015                .await
1016                .map_err(|e| {
1017                    tonic::Status::unknown(
1018                        format!("Service was not ready: {}", e.into()),
1019                    )
1020                })?;
1021            let codec = tonic::codec::ProstCodec::default();
1022            let path = http::uri::PathAndQuery::from_static(
1023                "/nominal.ai.v1.AIAgentService/GetConversationMetadata",
1024            );
1025            let mut req = request.into_request();
1026            req.extensions_mut()
1027                .insert(
1028                    GrpcMethod::new(
1029                        "nominal.ai.v1.AIAgentService",
1030                        "GetConversationMetadata",
1031                    ),
1032                );
1033            self.inner.unary(req, path, codec).await
1034        }
1035        pub async fn get_conversation_messages(
1036            &mut self,
1037            request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
1038        ) -> std::result::Result<
1039            tonic::Response<super::GetConversationMessagesResponse>,
1040            tonic::Status,
1041        > {
1042            self.inner
1043                .ready()
1044                .await
1045                .map_err(|e| {
1046                    tonic::Status::unknown(
1047                        format!("Service was not ready: {}", e.into()),
1048                    )
1049                })?;
1050            let codec = tonic::codec::ProstCodec::default();
1051            let path = http::uri::PathAndQuery::from_static(
1052                "/nominal.ai.v1.AIAgentService/GetConversationMessages",
1053            );
1054            let mut req = request.into_request();
1055            req.extensions_mut()
1056                .insert(
1057                    GrpcMethod::new(
1058                        "nominal.ai.v1.AIAgentService",
1059                        "GetConversationMessages",
1060                    ),
1061                );
1062            self.inner.unary(req, path, codec).await
1063        }
1064        pub async fn list_conversations(
1065            &mut self,
1066            request: impl tonic::IntoRequest<super::ListConversationsRequest>,
1067        ) -> std::result::Result<
1068            tonic::Response<super::ListConversationsResponse>,
1069            tonic::Status,
1070        > {
1071            self.inner
1072                .ready()
1073                .await
1074                .map_err(|e| {
1075                    tonic::Status::unknown(
1076                        format!("Service was not ready: {}", e.into()),
1077                    )
1078                })?;
1079            let codec = tonic::codec::ProstCodec::default();
1080            let path = http::uri::PathAndQuery::from_static(
1081                "/nominal.ai.v1.AIAgentService/ListConversations",
1082            );
1083            let mut req = request.into_request();
1084            req.extensions_mut()
1085                .insert(
1086                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
1087                );
1088            self.inner.unary(req, path, codec).await
1089        }
1090        pub async fn create_conversation(
1091            &mut self,
1092            request: impl tonic::IntoRequest<super::CreateConversationRequest>,
1093        ) -> std::result::Result<
1094            tonic::Response<super::CreateConversationResponse>,
1095            tonic::Status,
1096        > {
1097            self.inner
1098                .ready()
1099                .await
1100                .map_err(|e| {
1101                    tonic::Status::unknown(
1102                        format!("Service was not ready: {}", e.into()),
1103                    )
1104                })?;
1105            let codec = tonic::codec::ProstCodec::default();
1106            let path = http::uri::PathAndQuery::from_static(
1107                "/nominal.ai.v1.AIAgentService/CreateConversation",
1108            );
1109            let mut req = request.into_request();
1110            req.extensions_mut()
1111                .insert(
1112                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
1113                );
1114            self.inner.unary(req, path, codec).await
1115        }
1116        pub async fn update_conversation_metadata(
1117            &mut self,
1118            request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
1119        ) -> std::result::Result<
1120            tonic::Response<super::UpdateConversationMetadataResponse>,
1121            tonic::Status,
1122        > {
1123            self.inner
1124                .ready()
1125                .await
1126                .map_err(|e| {
1127                    tonic::Status::unknown(
1128                        format!("Service was not ready: {}", e.into()),
1129                    )
1130                })?;
1131            let codec = tonic::codec::ProstCodec::default();
1132            let path = http::uri::PathAndQuery::from_static(
1133                "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
1134            );
1135            let mut req = request.into_request();
1136            req.extensions_mut()
1137                .insert(
1138                    GrpcMethod::new(
1139                        "nominal.ai.v1.AIAgentService",
1140                        "UpdateConversationMetadata",
1141                    ),
1142                );
1143            self.inner.unary(req, path, codec).await
1144        }
1145        pub async fn delete_conversation(
1146            &mut self,
1147            request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
1148        ) -> std::result::Result<
1149            tonic::Response<super::DeleteConversationResponse>,
1150            tonic::Status,
1151        > {
1152            self.inner
1153                .ready()
1154                .await
1155                .map_err(|e| {
1156                    tonic::Status::unknown(
1157                        format!("Service was not ready: {}", e.into()),
1158                    )
1159                })?;
1160            let codec = tonic::codec::ProstCodec::default();
1161            let path = http::uri::PathAndQuery::from_static(
1162                "/nominal.ai.v1.AIAgentService/DeleteConversation",
1163            );
1164            let mut req = request.into_request();
1165            req.extensions_mut()
1166                .insert(
1167                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
1168                );
1169            self.inner.unary(req, path, codec).await
1170        }
1171        pub async fn get_snapshot_rid_by_user_message_id(
1172            &mut self,
1173            request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
1174        ) -> std::result::Result<
1175            tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
1176            tonic::Status,
1177        > {
1178            self.inner
1179                .ready()
1180                .await
1181                .map_err(|e| {
1182                    tonic::Status::unknown(
1183                        format!("Service was not ready: {}", e.into()),
1184                    )
1185                })?;
1186            let codec = tonic::codec::ProstCodec::default();
1187            let path = http::uri::PathAndQuery::from_static(
1188                "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
1189            );
1190            let mut req = request.into_request();
1191            req.extensions_mut()
1192                .insert(
1193                    GrpcMethod::new(
1194                        "nominal.ai.v1.AIAgentService",
1195                        "GetSnapshotRidByUserMessageId",
1196                    ),
1197                );
1198            self.inner.unary(req, path, codec).await
1199        }
1200        pub async fn compact_conversation(
1201            &mut self,
1202            request: impl tonic::IntoRequest<super::CompactConversationRequest>,
1203        ) -> std::result::Result<
1204            tonic::Response<super::CompactConversationResponse>,
1205            tonic::Status,
1206        > {
1207            self.inner
1208                .ready()
1209                .await
1210                .map_err(|e| {
1211                    tonic::Status::unknown(
1212                        format!("Service was not ready: {}", e.into()),
1213                    )
1214                })?;
1215            let codec = tonic::codec::ProstCodec::default();
1216            let path = http::uri::PathAndQuery::from_static(
1217                "/nominal.ai.v1.AIAgentService/CompactConversation",
1218            );
1219            let mut req = request.into_request();
1220            req.extensions_mut()
1221                .insert(
1222                    GrpcMethod::new(
1223                        "nominal.ai.v1.AIAgentService",
1224                        "CompactConversation",
1225                    ),
1226                );
1227            self.inner.unary(req, path, codec).await
1228        }
1229        pub async fn submit_message_feedback(
1230            &mut self,
1231            request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1232        ) -> std::result::Result<
1233            tonic::Response<super::SubmitMessageFeedbackResponse>,
1234            tonic::Status,
1235        > {
1236            self.inner
1237                .ready()
1238                .await
1239                .map_err(|e| {
1240                    tonic::Status::unknown(
1241                        format!("Service was not ready: {}", e.into()),
1242                    )
1243                })?;
1244            let codec = tonic::codec::ProstCodec::default();
1245            let path = http::uri::PathAndQuery::from_static(
1246                "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
1247            );
1248            let mut req = request.into_request();
1249            req.extensions_mut()
1250                .insert(
1251                    GrpcMethod::new(
1252                        "nominal.ai.v1.AIAgentService",
1253                        "SubmitMessageFeedback",
1254                    ),
1255                );
1256            self.inner.unary(req, path, codec).await
1257        }
1258    }
1259}
1260#[derive(Clone, PartialEq, ::prost::Message)]
1261pub struct ClassifyErrorRequest {
1262    #[prost(string, tag = "1")]
1263    pub error_message: ::prost::alloc::string::String,
1264}
1265#[derive(Clone, PartialEq, ::prost::Message)]
1266pub struct ClassifyErrorResponse {
1267    #[prost(enumeration = "ErrorClassification", tag = "1")]
1268    pub classification: i32,
1269    #[prost(string, tag = "2")]
1270    pub reason: ::prost::alloc::string::String,
1271}
1272#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1273#[repr(i32)]
1274pub enum ErrorClassification {
1275    Unspecified = 0,
1276    Client = 1,
1277    Server = 2,
1278}
1279impl ErrorClassification {
1280    /// String value of the enum field names used in the ProtoBuf definition.
1281    ///
1282    /// The values are not transformed in any way and thus are considered stable
1283    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1284    pub fn as_str_name(&self) -> &'static str {
1285        match self {
1286            Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
1287            Self::Client => "ERROR_CLASSIFICATION_CLIENT",
1288            Self::Server => "ERROR_CLASSIFICATION_SERVER",
1289        }
1290    }
1291    /// Creates an enum from field names used in the ProtoBuf definition.
1292    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1293        match value {
1294            "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
1295            "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
1296            "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
1297            _ => None,
1298        }
1299    }
1300}
1301/// Generated client implementations.
1302pub mod data_ingestion_error_classifier_service_client {
1303    #![allow(
1304        unused_variables,
1305        dead_code,
1306        missing_docs,
1307        clippy::wildcard_imports,
1308        clippy::let_unit_value,
1309    )]
1310    use tonic::codegen::*;
1311    use tonic::codegen::http::Uri;
1312    #[derive(Debug, Clone)]
1313    pub struct DataIngestionErrorClassifierServiceClient<T> {
1314        inner: tonic::client::Grpc<T>,
1315    }
1316    impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
1317        /// Attempt to create a new client by connecting to a given endpoint.
1318        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1319        where
1320            D: TryInto<tonic::transport::Endpoint>,
1321            D::Error: Into<StdError>,
1322        {
1323            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1324            Ok(Self::new(conn))
1325        }
1326    }
1327    impl<T> DataIngestionErrorClassifierServiceClient<T>
1328    where
1329        T: tonic::client::GrpcService<tonic::body::Body>,
1330        T::Error: Into<StdError>,
1331        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1332        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1333    {
1334        pub fn new(inner: T) -> Self {
1335            let inner = tonic::client::Grpc::new(inner);
1336            Self { inner }
1337        }
1338        pub fn with_origin(inner: T, origin: Uri) -> Self {
1339            let inner = tonic::client::Grpc::with_origin(inner, origin);
1340            Self { inner }
1341        }
1342        pub fn with_interceptor<F>(
1343            inner: T,
1344            interceptor: F,
1345        ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
1346        where
1347            F: tonic::service::Interceptor,
1348            T::ResponseBody: Default,
1349            T: tonic::codegen::Service<
1350                http::Request<tonic::body::Body>,
1351                Response = http::Response<
1352                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1353                >,
1354            >,
1355            <T as tonic::codegen::Service<
1356                http::Request<tonic::body::Body>,
1357            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1358        {
1359            DataIngestionErrorClassifierServiceClient::new(
1360                InterceptedService::new(inner, interceptor),
1361            )
1362        }
1363        /// Compress requests with the given encoding.
1364        ///
1365        /// This requires the server to support it otherwise it might respond with an
1366        /// error.
1367        #[must_use]
1368        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1369            self.inner = self.inner.send_compressed(encoding);
1370            self
1371        }
1372        /// Enable decompressing responses.
1373        #[must_use]
1374        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1375            self.inner = self.inner.accept_compressed(encoding);
1376            self
1377        }
1378        /// Limits the maximum size of a decoded message.
1379        ///
1380        /// Default: `4MB`
1381        #[must_use]
1382        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1383            self.inner = self.inner.max_decoding_message_size(limit);
1384            self
1385        }
1386        /// Limits the maximum size of an encoded message.
1387        ///
1388        /// Default: `usize::MAX`
1389        #[must_use]
1390        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1391            self.inner = self.inner.max_encoding_message_size(limit);
1392            self
1393        }
1394        pub async fn classify_error(
1395            &mut self,
1396            request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
1397        ) -> std::result::Result<
1398            tonic::Response<super::ClassifyErrorResponse>,
1399            tonic::Status,
1400        > {
1401            self.inner
1402                .ready()
1403                .await
1404                .map_err(|e| {
1405                    tonic::Status::unknown(
1406                        format!("Service was not ready: {}", e.into()),
1407                    )
1408                })?;
1409            let codec = tonic::codec::ProstCodec::default();
1410            let path = http::uri::PathAndQuery::from_static(
1411                "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
1412            );
1413            let mut req = request.into_request();
1414            req.extensions_mut()
1415                .insert(
1416                    GrpcMethod::new(
1417                        "nominal.ai.v1.DataIngestionErrorClassifierService",
1418                        "ClassifyError",
1419                    ),
1420                );
1421            self.inner.unary(req, path, codec).await
1422        }
1423    }
1424}
1425#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1426pub struct GetProviderStatusRequest {}
1427#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1428pub struct GetProviderStatusResponse {
1429    #[prost(message, optional, tag = "1")]
1430    pub timestamp: ::core::option::Option<
1431        super::super::super::google::protobuf::Timestamp,
1432    >,
1433    #[prost(message, optional, tag = "2")]
1434    pub last_status: ::core::option::Option<ProviderStatus>,
1435    #[deprecated]
1436    #[prost(message, optional, tag = "3")]
1437    pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
1438    #[prost(message, optional, tag = "4")]
1439    pub aggregated_status: ::core::option::Option<ProviderStatus>,
1440}
1441#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1442pub struct ProviderStatus {
1443    #[prost(oneof = "provider_status::Status", tags = "1, 2")]
1444    pub status: ::core::option::Option<provider_status::Status>,
1445}
1446/// Nested message and enum types in `ProviderStatus`.
1447pub mod provider_status {
1448    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1449    pub enum Status {
1450        #[prost(message, tag = "1")]
1451        Healthy(super::Healthy),
1452        #[prost(message, tag = "2")]
1453        Degraded(super::Degraded),
1454    }
1455}
1456#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1457pub struct Healthy {}
1458#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1459pub struct Degraded {
1460    #[prost(enumeration = "DegradationReason", tag = "1")]
1461    pub reason: i32,
1462}
1463#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1464pub struct ProviderMetrics {
1465    #[prost(int32, tag = "1")]
1466    pub time_to_first_token_ms: i32,
1467    #[prost(int32, tag = "2")]
1468    pub total_time_ms: i32,
1469}
1470#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1471#[repr(i32)]
1472pub enum DegradationReason {
1473    Unspecified = 0,
1474    HighLatency = 1,
1475    Failures = 2,
1476    HighLatencyAndFailures = 3,
1477    Unavailable = 4,
1478}
1479impl DegradationReason {
1480    /// String value of the enum field names used in the ProtoBuf definition.
1481    ///
1482    /// The values are not transformed in any way and thus are considered stable
1483    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1484    pub fn as_str_name(&self) -> &'static str {
1485        match self {
1486            Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
1487            Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
1488            Self::Failures => "DEGRADATION_REASON_FAILURES",
1489            Self::HighLatencyAndFailures => {
1490                "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
1491            }
1492            Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
1493        }
1494    }
1495    /// Creates an enum from field names used in the ProtoBuf definition.
1496    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1497        match value {
1498            "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1499            "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
1500            "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
1501            "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
1502                Some(Self::HighLatencyAndFailures)
1503            }
1504            "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
1505            _ => None,
1506        }
1507    }
1508}
1509/// Generated client implementations.
1510pub mod model_provider_health_service_client {
1511    #![allow(
1512        unused_variables,
1513        dead_code,
1514        missing_docs,
1515        clippy::wildcard_imports,
1516        clippy::let_unit_value,
1517    )]
1518    use tonic::codegen::*;
1519    use tonic::codegen::http::Uri;
1520    #[derive(Debug, Clone)]
1521    pub struct ModelProviderHealthServiceClient<T> {
1522        inner: tonic::client::Grpc<T>,
1523    }
1524    impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
1525        /// Attempt to create a new client by connecting to a given endpoint.
1526        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1527        where
1528            D: TryInto<tonic::transport::Endpoint>,
1529            D::Error: Into<StdError>,
1530        {
1531            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1532            Ok(Self::new(conn))
1533        }
1534    }
1535    impl<T> ModelProviderHealthServiceClient<T>
1536    where
1537        T: tonic::client::GrpcService<tonic::body::Body>,
1538        T::Error: Into<StdError>,
1539        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1540        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1541    {
1542        pub fn new(inner: T) -> Self {
1543            let inner = tonic::client::Grpc::new(inner);
1544            Self { inner }
1545        }
1546        pub fn with_origin(inner: T, origin: Uri) -> Self {
1547            let inner = tonic::client::Grpc::with_origin(inner, origin);
1548            Self { inner }
1549        }
1550        pub fn with_interceptor<F>(
1551            inner: T,
1552            interceptor: F,
1553        ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
1554        where
1555            F: tonic::service::Interceptor,
1556            T::ResponseBody: Default,
1557            T: tonic::codegen::Service<
1558                http::Request<tonic::body::Body>,
1559                Response = http::Response<
1560                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1561                >,
1562            >,
1563            <T as tonic::codegen::Service<
1564                http::Request<tonic::body::Body>,
1565            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1566        {
1567            ModelProviderHealthServiceClient::new(
1568                InterceptedService::new(inner, interceptor),
1569            )
1570        }
1571        /// Compress requests with the given encoding.
1572        ///
1573        /// This requires the server to support it otherwise it might respond with an
1574        /// error.
1575        #[must_use]
1576        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1577            self.inner = self.inner.send_compressed(encoding);
1578            self
1579        }
1580        /// Enable decompressing responses.
1581        #[must_use]
1582        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1583            self.inner = self.inner.accept_compressed(encoding);
1584            self
1585        }
1586        /// Limits the maximum size of a decoded message.
1587        ///
1588        /// Default: `4MB`
1589        #[must_use]
1590        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1591            self.inner = self.inner.max_decoding_message_size(limit);
1592            self
1593        }
1594        /// Limits the maximum size of an encoded message.
1595        ///
1596        /// Default: `usize::MAX`
1597        #[must_use]
1598        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1599            self.inner = self.inner.max_encoding_message_size(limit);
1600            self
1601        }
1602        pub async fn get_provider_status(
1603            &mut self,
1604            request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
1605        ) -> std::result::Result<
1606            tonic::Response<super::GetProviderStatusResponse>,
1607            tonic::Status,
1608        > {
1609            self.inner
1610                .ready()
1611                .await
1612                .map_err(|e| {
1613                    tonic::Status::unknown(
1614                        format!("Service was not ready: {}", e.into()),
1615                    )
1616                })?;
1617            let codec = tonic::codec::ProstCodec::default();
1618            let path = http::uri::PathAndQuery::from_static(
1619                "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
1620            );
1621            let mut req = request.into_request();
1622            req.extensions_mut()
1623                .insert(
1624                    GrpcMethod::new(
1625                        "nominal.ai.v1.ModelProviderHealthService",
1626                        "GetProviderStatus",
1627                    ),
1628                );
1629            self.inner.unary(req, path, codec).await
1630        }
1631    }
1632}