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