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}
446#[derive(Clone, PartialEq, ::prost::Message)]
447pub struct StreamChatResponse {
448 #[prost(
449 oneof = "stream_chat_response::Response",
450 tags = "1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15"
451 )]
452 pub response: ::core::option::Option<stream_chat_response::Response>,
453}
454pub mod stream_chat_response {
456 #[derive(Clone, PartialEq, ::prost::Oneof)]
457 pub enum Response {
458 #[prost(message, tag = "1")]
459 Finish(super::Finish),
460 #[prost(message, tag = "2")]
461 Error(super::Error),
462 #[prost(message, tag = "3")]
463 TextStart(super::TextStart),
464 #[prost(message, tag = "4")]
465 TextDelta(super::TextDelta),
466 #[prost(message, tag = "5")]
467 TextEnd(super::TextEnd),
468 #[prost(message, tag = "6")]
469 ReasoningStart(super::ReasoningStart),
470 #[prost(message, tag = "7")]
471 ReasoningDelta(super::ReasoningDelta),
472 #[prost(message, tag = "8")]
473 ReasoningEnd(super::ReasoningEnd),
474 #[prost(message, tag = "10")]
475 ToolAction(super::ToolAction),
476 #[prost(message, tag = "11")]
477 ToolActionConfirmation(super::ToolActionConfirmation),
478 #[prost(message, tag = "12")]
479 StepStart(super::StepStart),
480 #[prost(message, tag = "13")]
481 StepEnd(super::StepEnd),
482 #[prost(message, tag = "14")]
483 ClientDirective(super::ClientDirective),
484 #[prost(message, tag = "15")]
485 CompactionNotice(super::CompactionNotice),
486 }
487}
488#[derive(Clone, Copy, PartialEq, ::prost::Message)]
489pub struct StepStart {}
490#[derive(Clone, Copy, PartialEq, ::prost::Message)]
491pub struct StepEnd {}
492#[derive(Clone, Copy, PartialEq, ::prost::Message)]
493pub struct CompactionNotice {
494 #[prost(int32, tag = "1")]
495 pub tokens_before: i32,
496 #[prost(int32, tag = "2")]
497 pub estimated_checkpoint_tokens: i32,
498 #[prost(enumeration = "compaction_notice::Trigger", tag = "3")]
499 pub trigger: i32,
500}
501pub mod compaction_notice {
503 #[derive(
504 Clone,
505 Copy,
506 Debug,
507 PartialEq,
508 Eq,
509 Hash,
510 PartialOrd,
511 Ord,
512 ::prost::Enumeration
513 )]
514 #[repr(i32)]
515 pub enum Trigger {
516 Unspecified = 0,
517 PreTurn = 1,
518 MidRun = 2,
519 }
520 impl Trigger {
521 pub fn as_str_name(&self) -> &'static str {
526 match self {
527 Self::Unspecified => "TRIGGER_UNSPECIFIED",
528 Self::PreTurn => "TRIGGER_PRE_TURN",
529 Self::MidRun => "TRIGGER_MID_RUN",
530 }
531 }
532 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
534 match value {
535 "TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
536 "TRIGGER_PRE_TURN" => Some(Self::PreTurn),
537 "TRIGGER_MID_RUN" => Some(Self::MidRun),
538 _ => None,
539 }
540 }
541 }
542}
543#[derive(Clone, PartialEq, ::prost::Message)]
544pub struct ToolCallDescription {
545 #[prost(string, tag = "1")]
546 pub tool_call_id: ::prost::alloc::string::String,
547 #[prost(string, tag = "2")]
548 pub tool_name: ::prost::alloc::string::String,
549 #[prost(string, tag = "3")]
550 pub tool_args_json_string: ::prost::alloc::string::String,
551 #[prost(enumeration = "ToolCallStatus", tag = "4")]
552 pub status: i32,
553}
554#[derive(Clone, PartialEq, ::prost::Message)]
555pub struct Finish {
556 #[prost(string, repeated, tag = "1")]
557 pub ordered_message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
558 #[prost(string, optional, tag = "2")]
559 pub new_title: ::core::option::Option<::prost::alloc::string::String>,
560 #[prost(message, repeated, tag = "3")]
561 pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
562 #[prost(message, optional, tag = "4")]
563 pub updated_context: ::core::option::Option<ContextStatus>,
564}
565#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct Error {
567 #[prost(string, tag = "1")]
568 pub message: ::prost::alloc::string::String,
569}
570#[derive(Clone, PartialEq, ::prost::Message)]
571pub struct TextStart {
572 #[prost(string, tag = "1")]
573 pub id: ::prost::alloc::string::String,
574}
575#[derive(Clone, PartialEq, ::prost::Message)]
576pub struct TextDelta {
577 #[prost(string, tag = "1")]
578 pub id: ::prost::alloc::string::String,
579 #[prost(string, tag = "2")]
580 pub delta: ::prost::alloc::string::String,
581}
582#[derive(Clone, PartialEq, ::prost::Message)]
583pub struct TextEnd {
584 #[prost(string, tag = "1")]
585 pub id: ::prost::alloc::string::String,
586}
587#[derive(Clone, PartialEq, ::prost::Message)]
588pub struct ReasoningStart {
589 #[prost(string, tag = "1")]
590 pub id: ::prost::alloc::string::String,
591}
592#[derive(Clone, PartialEq, ::prost::Message)]
593pub struct ReasoningDelta {
594 #[prost(string, tag = "1")]
595 pub id: ::prost::alloc::string::String,
596 #[prost(string, tag = "2")]
597 pub delta: ::prost::alloc::string::String,
598}
599#[derive(Clone, PartialEq, ::prost::Message)]
600pub struct ReasoningEnd {
601 #[prost(string, tag = "1")]
602 pub id: ::prost::alloc::string::String,
603}
604#[derive(Clone, PartialEq, ::prost::Message)]
605pub struct ToolAction {
606 #[prost(string, tag = "2")]
607 pub tool_action_verb: ::prost::alloc::string::String,
608 #[prost(string, optional, tag = "3")]
609 pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
610 #[prost(message, optional, tag = "5")]
611 pub tool_call_description: ::core::option::Option<ToolCallDescription>,
612 #[deprecated]
613 #[prost(string, tag = "1")]
614 pub id: ::prost::alloc::string::String,
615 #[deprecated]
616 #[prost(string, tag = "4")]
617 pub tool_name: ::prost::alloc::string::String,
618}
619#[derive(Clone, PartialEq, ::prost::Message)]
620pub struct ToolActionConfirmation {
621 #[prost(string, tag = "1")]
622 pub id: ::prost::alloc::string::String,
623 #[prost(oneof = "tool_action_confirmation::Outcome", tags = "2, 3")]
624 pub outcome: ::core::option::Option<tool_action_confirmation::Outcome>,
625}
626pub mod tool_action_confirmation {
628 #[derive(Clone, PartialEq, ::prost::Oneof)]
629 pub enum Outcome {
630 #[prost(message, tag = "2")]
631 Success(super::ToolActionSuccess),
632 #[prost(message, tag = "3")]
633 Failure(super::ToolActionFailure),
634 }
635}
636#[derive(Clone, PartialEq, ::prost::Message)]
637pub struct ToolActionSuccess {
638 #[prost(string, tag = "1")]
639 pub tool_success_message: ::prost::alloc::string::String,
640}
641#[derive(Clone, PartialEq, ::prost::Message)]
642pub struct ToolActionFailure {
643 #[prost(string, tag = "1")]
644 pub tool_error_message: ::prost::alloc::string::String,
645}
646#[derive(Clone, PartialEq, ::prost::Message)]
647pub struct ClientDirective {
648 #[prost(oneof = "client_directive::Version", tags = "1")]
649 pub version: ::core::option::Option<client_directive::Version>,
650}
651pub mod client_directive {
653 #[derive(Clone, PartialEq, ::prost::Oneof)]
654 pub enum Version {
655 #[prost(message, tag = "1")]
656 V1(super::ClientDirectiveV1),
657 }
658}
659#[derive(Clone, PartialEq, ::prost::Message)]
660pub struct ClientDirectiveV1 {
661 #[prost(string, tag = "1")]
662 pub id: ::prost::alloc::string::String,
663 #[prost(oneof = "client_directive_v1::Kind", tags = "2, 3")]
664 pub kind: ::core::option::Option<client_directive_v1::Kind>,
665}
666pub mod client_directive_v1 {
668 #[derive(Clone, PartialEq, ::prost::Oneof)]
669 pub enum Kind {
670 #[prost(message, tag = "2")]
671 ResourceEdited(super::ResourceEditedDirective),
672 #[prost(message, tag = "3")]
673 SetTimeRange(super::SetTimeRangeDirective),
674 }
675}
676#[derive(Clone, PartialEq, ::prost::Message)]
677pub struct ResourceEditedDirective {
678 #[prost(oneof = "resource_edited_directive::Resource", tags = "1, 2")]
679 pub resource: ::core::option::Option<resource_edited_directive::Resource>,
680}
681pub mod resource_edited_directive {
683 #[derive(Clone, PartialEq, ::prost::Oneof)]
684 pub enum Resource {
685 #[prost(message, tag = "1")]
686 Checklist(super::ChecklistEdited),
687 #[prost(message, tag = "2")]
688 Template(super::TemplateEdited),
689 }
690}
691#[derive(Clone, PartialEq, ::prost::Message)]
692pub struct ChecklistEdited {
693 #[prost(string, tag = "1")]
694 pub checklist_rid: ::prost::alloc::string::String,
695 #[prost(string, tag = "2")]
696 pub branch_name: ::prost::alloc::string::String,
697 #[prost(string, optional, tag = "3")]
698 pub check_id: ::core::option::Option<::prost::alloc::string::String>,
699 #[prost(string, optional, tag = "4")]
700 pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
701 #[prost(message, optional, tag = "5")]
702 pub committed_at: ::core::option::Option<
703 super::super::super::google::protobuf::Timestamp,
704 >,
705}
706#[derive(Clone, PartialEq, ::prost::Message)]
707pub struct TemplateEdited {
708 #[prost(string, tag = "1")]
709 pub template_rid: ::prost::alloc::string::String,
710 #[prost(string, tag = "2")]
711 pub branch_name: ::prost::alloc::string::String,
712 #[prost(string, optional, tag = "3")]
713 pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
714 #[prost(message, optional, tag = "4")]
715 pub committed_at: ::core::option::Option<
716 super::super::super::google::protobuf::Timestamp,
717 >,
718}
719#[derive(Clone, PartialEq, ::prost::Message)]
720pub struct SetTimeRangeDirective {
721 #[prost(string, tag = "1")]
722 pub workbook_rid: ::prost::alloc::string::String,
723 #[prost(message, optional, tag = "2")]
724 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
725 #[prost(message, optional, tag = "3")]
726 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
727 #[prost(enumeration = "TimeRangeType", tag = "4")]
728 pub time_range_type: i32,
729}
730#[derive(Clone, Copy, PartialEq, ::prost::Message)]
731pub struct ContextStatus {
732 #[prost(int32, tag = "1")]
733 pub curr_token_count: i32,
734 #[prost(int32, tag = "2")]
735 pub model_context_limit: i32,
736}
737#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
738#[repr(i32)]
739pub enum FeedbackVote {
740 Unspecified = 0,
741 ThumbsUp = 1,
742 ThumbsDown = 2,
743}
744impl FeedbackVote {
745 pub fn as_str_name(&self) -> &'static str {
750 match self {
751 Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
752 Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
753 Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
754 }
755 }
756 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
758 match value {
759 "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
760 "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
761 "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
762 _ => None,
763 }
764 }
765}
766#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
767#[repr(i32)]
768pub enum ToolCallStatus {
769 Unspecified = 0,
770 Approved = 1,
771 Denied = 2,
772 AwaitingApproval = 3,
773}
774impl ToolCallStatus {
775 pub fn as_str_name(&self) -> &'static str {
780 match self {
781 Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
782 Self::Approved => "TOOL_CALL_STATUS_APPROVED",
783 Self::Denied => "TOOL_CALL_STATUS_DENIED",
784 Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
785 }
786 }
787 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
789 match value {
790 "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
791 "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
792 "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
793 "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
794 _ => None,
795 }
796 }
797}
798#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
799#[repr(i32)]
800pub enum TimeRangeType {
801 Unspecified = 0,
802 Absolute = 1,
803 Relative = 2,
804}
805impl TimeRangeType {
806 pub fn as_str_name(&self) -> &'static str {
811 match self {
812 Self::Unspecified => "TIME_RANGE_TYPE_UNSPECIFIED",
813 Self::Absolute => "TIME_RANGE_TYPE_ABSOLUTE",
814 Self::Relative => "TIME_RANGE_TYPE_RELATIVE",
815 }
816 }
817 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
819 match value {
820 "TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
821 "TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
822 "TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
823 _ => None,
824 }
825 }
826}
827pub mod ai_agent_service_client {
829 #![allow(
830 unused_variables,
831 dead_code,
832 missing_docs,
833 clippy::wildcard_imports,
834 clippy::let_unit_value,
835 )]
836 use tonic::codegen::*;
837 use tonic::codegen::http::Uri;
838 #[derive(Debug, Clone)]
839 pub struct AiAgentServiceClient<T> {
840 inner: tonic::client::Grpc<T>,
841 }
842 impl AiAgentServiceClient<tonic::transport::Channel> {
843 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
845 where
846 D: TryInto<tonic::transport::Endpoint>,
847 D::Error: Into<StdError>,
848 {
849 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
850 Ok(Self::new(conn))
851 }
852 }
853 impl<T> AiAgentServiceClient<T>
854 where
855 T: tonic::client::GrpcService<tonic::body::Body>,
856 T::Error: Into<StdError>,
857 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
858 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
859 {
860 pub fn new(inner: T) -> Self {
861 let inner = tonic::client::Grpc::new(inner);
862 Self { inner }
863 }
864 pub fn with_origin(inner: T, origin: Uri) -> Self {
865 let inner = tonic::client::Grpc::with_origin(inner, origin);
866 Self { inner }
867 }
868 pub fn with_interceptor<F>(
869 inner: T,
870 interceptor: F,
871 ) -> AiAgentServiceClient<InterceptedService<T, F>>
872 where
873 F: tonic::service::Interceptor,
874 T::ResponseBody: Default,
875 T: tonic::codegen::Service<
876 http::Request<tonic::body::Body>,
877 Response = http::Response<
878 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
879 >,
880 >,
881 <T as tonic::codegen::Service<
882 http::Request<tonic::body::Body>,
883 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
884 {
885 AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
886 }
887 #[must_use]
892 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
893 self.inner = self.inner.send_compressed(encoding);
894 self
895 }
896 #[must_use]
898 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
899 self.inner = self.inner.accept_compressed(encoding);
900 self
901 }
902 #[must_use]
906 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
907 self.inner = self.inner.max_decoding_message_size(limit);
908 self
909 }
910 #[must_use]
914 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
915 self.inner = self.inner.max_encoding_message_size(limit);
916 self
917 }
918 pub async fn stream_chat(
919 &mut self,
920 request: impl tonic::IntoRequest<super::StreamChatRequest>,
921 ) -> std::result::Result<
922 tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
923 tonic::Status,
924 > {
925 self.inner
926 .ready()
927 .await
928 .map_err(|e| {
929 tonic::Status::unknown(
930 format!("Service was not ready: {}", e.into()),
931 )
932 })?;
933 let codec = tonic::codec::ProstCodec::default();
934 let path = http::uri::PathAndQuery::from_static(
935 "/nominal.ai.v1.AIAgentService/StreamChat",
936 );
937 let mut req = request.into_request();
938 req.extensions_mut()
939 .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
940 self.inner.server_streaming(req, path, codec).await
941 }
942 #[deprecated]
943 pub async fn get_conversation(
944 &mut self,
945 request: impl tonic::IntoRequest<super::GetConversationRequest>,
946 ) -> std::result::Result<
947 tonic::Response<super::GetConversationResponse>,
948 tonic::Status,
949 > {
950 self.inner
951 .ready()
952 .await
953 .map_err(|e| {
954 tonic::Status::unknown(
955 format!("Service was not ready: {}", e.into()),
956 )
957 })?;
958 let codec = tonic::codec::ProstCodec::default();
959 let path = http::uri::PathAndQuery::from_static(
960 "/nominal.ai.v1.AIAgentService/GetConversation",
961 );
962 let mut req = request.into_request();
963 req.extensions_mut()
964 .insert(
965 GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
966 );
967 self.inner.unary(req, path, codec).await
968 }
969 pub async fn get_conversation_metadata(
970 &mut self,
971 request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
972 ) -> std::result::Result<
973 tonic::Response<super::GetConversationMetadataResponse>,
974 tonic::Status,
975 > {
976 self.inner
977 .ready()
978 .await
979 .map_err(|e| {
980 tonic::Status::unknown(
981 format!("Service was not ready: {}", e.into()),
982 )
983 })?;
984 let codec = tonic::codec::ProstCodec::default();
985 let path = http::uri::PathAndQuery::from_static(
986 "/nominal.ai.v1.AIAgentService/GetConversationMetadata",
987 );
988 let mut req = request.into_request();
989 req.extensions_mut()
990 .insert(
991 GrpcMethod::new(
992 "nominal.ai.v1.AIAgentService",
993 "GetConversationMetadata",
994 ),
995 );
996 self.inner.unary(req, path, codec).await
997 }
998 pub async fn get_conversation_messages(
999 &mut self,
1000 request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
1001 ) -> std::result::Result<
1002 tonic::Response<super::GetConversationMessagesResponse>,
1003 tonic::Status,
1004 > {
1005 self.inner
1006 .ready()
1007 .await
1008 .map_err(|e| {
1009 tonic::Status::unknown(
1010 format!("Service was not ready: {}", e.into()),
1011 )
1012 })?;
1013 let codec = tonic::codec::ProstCodec::default();
1014 let path = http::uri::PathAndQuery::from_static(
1015 "/nominal.ai.v1.AIAgentService/GetConversationMessages",
1016 );
1017 let mut req = request.into_request();
1018 req.extensions_mut()
1019 .insert(
1020 GrpcMethod::new(
1021 "nominal.ai.v1.AIAgentService",
1022 "GetConversationMessages",
1023 ),
1024 );
1025 self.inner.unary(req, path, codec).await
1026 }
1027 pub async fn list_conversations(
1028 &mut self,
1029 request: impl tonic::IntoRequest<super::ListConversationsRequest>,
1030 ) -> std::result::Result<
1031 tonic::Response<super::ListConversationsResponse>,
1032 tonic::Status,
1033 > {
1034 self.inner
1035 .ready()
1036 .await
1037 .map_err(|e| {
1038 tonic::Status::unknown(
1039 format!("Service was not ready: {}", e.into()),
1040 )
1041 })?;
1042 let codec = tonic::codec::ProstCodec::default();
1043 let path = http::uri::PathAndQuery::from_static(
1044 "/nominal.ai.v1.AIAgentService/ListConversations",
1045 );
1046 let mut req = request.into_request();
1047 req.extensions_mut()
1048 .insert(
1049 GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
1050 );
1051 self.inner.unary(req, path, codec).await
1052 }
1053 pub async fn create_conversation(
1054 &mut self,
1055 request: impl tonic::IntoRequest<super::CreateConversationRequest>,
1056 ) -> std::result::Result<
1057 tonic::Response<super::CreateConversationResponse>,
1058 tonic::Status,
1059 > {
1060 self.inner
1061 .ready()
1062 .await
1063 .map_err(|e| {
1064 tonic::Status::unknown(
1065 format!("Service was not ready: {}", e.into()),
1066 )
1067 })?;
1068 let codec = tonic::codec::ProstCodec::default();
1069 let path = http::uri::PathAndQuery::from_static(
1070 "/nominal.ai.v1.AIAgentService/CreateConversation",
1071 );
1072 let mut req = request.into_request();
1073 req.extensions_mut()
1074 .insert(
1075 GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
1076 );
1077 self.inner.unary(req, path, codec).await
1078 }
1079 pub async fn update_conversation_metadata(
1080 &mut self,
1081 request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
1082 ) -> std::result::Result<
1083 tonic::Response<super::UpdateConversationMetadataResponse>,
1084 tonic::Status,
1085 > {
1086 self.inner
1087 .ready()
1088 .await
1089 .map_err(|e| {
1090 tonic::Status::unknown(
1091 format!("Service was not ready: {}", e.into()),
1092 )
1093 })?;
1094 let codec = tonic::codec::ProstCodec::default();
1095 let path = http::uri::PathAndQuery::from_static(
1096 "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
1097 );
1098 let mut req = request.into_request();
1099 req.extensions_mut()
1100 .insert(
1101 GrpcMethod::new(
1102 "nominal.ai.v1.AIAgentService",
1103 "UpdateConversationMetadata",
1104 ),
1105 );
1106 self.inner.unary(req, path, codec).await
1107 }
1108 pub async fn delete_conversation(
1109 &mut self,
1110 request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
1111 ) -> std::result::Result<
1112 tonic::Response<super::DeleteConversationResponse>,
1113 tonic::Status,
1114 > {
1115 self.inner
1116 .ready()
1117 .await
1118 .map_err(|e| {
1119 tonic::Status::unknown(
1120 format!("Service was not ready: {}", e.into()),
1121 )
1122 })?;
1123 let codec = tonic::codec::ProstCodec::default();
1124 let path = http::uri::PathAndQuery::from_static(
1125 "/nominal.ai.v1.AIAgentService/DeleteConversation",
1126 );
1127 let mut req = request.into_request();
1128 req.extensions_mut()
1129 .insert(
1130 GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
1131 );
1132 self.inner.unary(req, path, codec).await
1133 }
1134 pub async fn get_snapshot_rid_by_user_message_id(
1135 &mut self,
1136 request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
1137 ) -> std::result::Result<
1138 tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
1139 tonic::Status,
1140 > {
1141 self.inner
1142 .ready()
1143 .await
1144 .map_err(|e| {
1145 tonic::Status::unknown(
1146 format!("Service was not ready: {}", e.into()),
1147 )
1148 })?;
1149 let codec = tonic::codec::ProstCodec::default();
1150 let path = http::uri::PathAndQuery::from_static(
1151 "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
1152 );
1153 let mut req = request.into_request();
1154 req.extensions_mut()
1155 .insert(
1156 GrpcMethod::new(
1157 "nominal.ai.v1.AIAgentService",
1158 "GetSnapshotRidByUserMessageId",
1159 ),
1160 );
1161 self.inner.unary(req, path, codec).await
1162 }
1163 pub async fn compact_conversation(
1164 &mut self,
1165 request: impl tonic::IntoRequest<super::CompactConversationRequest>,
1166 ) -> std::result::Result<
1167 tonic::Response<super::CompactConversationResponse>,
1168 tonic::Status,
1169 > {
1170 self.inner
1171 .ready()
1172 .await
1173 .map_err(|e| {
1174 tonic::Status::unknown(
1175 format!("Service was not ready: {}", e.into()),
1176 )
1177 })?;
1178 let codec = tonic::codec::ProstCodec::default();
1179 let path = http::uri::PathAndQuery::from_static(
1180 "/nominal.ai.v1.AIAgentService/CompactConversation",
1181 );
1182 let mut req = request.into_request();
1183 req.extensions_mut()
1184 .insert(
1185 GrpcMethod::new(
1186 "nominal.ai.v1.AIAgentService",
1187 "CompactConversation",
1188 ),
1189 );
1190 self.inner.unary(req, path, codec).await
1191 }
1192 pub async fn submit_message_feedback(
1193 &mut self,
1194 request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1195 ) -> std::result::Result<
1196 tonic::Response<super::SubmitMessageFeedbackResponse>,
1197 tonic::Status,
1198 > {
1199 self.inner
1200 .ready()
1201 .await
1202 .map_err(|e| {
1203 tonic::Status::unknown(
1204 format!("Service was not ready: {}", e.into()),
1205 )
1206 })?;
1207 let codec = tonic::codec::ProstCodec::default();
1208 let path = http::uri::PathAndQuery::from_static(
1209 "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
1210 );
1211 let mut req = request.into_request();
1212 req.extensions_mut()
1213 .insert(
1214 GrpcMethod::new(
1215 "nominal.ai.v1.AIAgentService",
1216 "SubmitMessageFeedback",
1217 ),
1218 );
1219 self.inner.unary(req, path, codec).await
1220 }
1221 }
1222}
1223#[derive(Clone, PartialEq, ::prost::Message)]
1224pub struct ClassifyErrorRequest {
1225 #[prost(string, tag = "1")]
1226 pub error_message: ::prost::alloc::string::String,
1227}
1228#[derive(Clone, PartialEq, ::prost::Message)]
1229pub struct ClassifyErrorResponse {
1230 #[prost(enumeration = "ErrorClassification", tag = "1")]
1231 pub classification: i32,
1232 #[prost(string, tag = "2")]
1233 pub reason: ::prost::alloc::string::String,
1234}
1235#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1236#[repr(i32)]
1237pub enum ErrorClassification {
1238 Unspecified = 0,
1239 Client = 1,
1240 Server = 2,
1241}
1242impl ErrorClassification {
1243 pub fn as_str_name(&self) -> &'static str {
1248 match self {
1249 Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
1250 Self::Client => "ERROR_CLASSIFICATION_CLIENT",
1251 Self::Server => "ERROR_CLASSIFICATION_SERVER",
1252 }
1253 }
1254 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1256 match value {
1257 "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
1258 "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
1259 "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
1260 _ => None,
1261 }
1262 }
1263}
1264pub mod data_ingestion_error_classifier_service_client {
1266 #![allow(
1267 unused_variables,
1268 dead_code,
1269 missing_docs,
1270 clippy::wildcard_imports,
1271 clippy::let_unit_value,
1272 )]
1273 use tonic::codegen::*;
1274 use tonic::codegen::http::Uri;
1275 #[derive(Debug, Clone)]
1276 pub struct DataIngestionErrorClassifierServiceClient<T> {
1277 inner: tonic::client::Grpc<T>,
1278 }
1279 impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
1280 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1282 where
1283 D: TryInto<tonic::transport::Endpoint>,
1284 D::Error: Into<StdError>,
1285 {
1286 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1287 Ok(Self::new(conn))
1288 }
1289 }
1290 impl<T> DataIngestionErrorClassifierServiceClient<T>
1291 where
1292 T: tonic::client::GrpcService<tonic::body::Body>,
1293 T::Error: Into<StdError>,
1294 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1295 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1296 {
1297 pub fn new(inner: T) -> Self {
1298 let inner = tonic::client::Grpc::new(inner);
1299 Self { inner }
1300 }
1301 pub fn with_origin(inner: T, origin: Uri) -> Self {
1302 let inner = tonic::client::Grpc::with_origin(inner, origin);
1303 Self { inner }
1304 }
1305 pub fn with_interceptor<F>(
1306 inner: T,
1307 interceptor: F,
1308 ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
1309 where
1310 F: tonic::service::Interceptor,
1311 T::ResponseBody: Default,
1312 T: tonic::codegen::Service<
1313 http::Request<tonic::body::Body>,
1314 Response = http::Response<
1315 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1316 >,
1317 >,
1318 <T as tonic::codegen::Service<
1319 http::Request<tonic::body::Body>,
1320 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1321 {
1322 DataIngestionErrorClassifierServiceClient::new(
1323 InterceptedService::new(inner, interceptor),
1324 )
1325 }
1326 #[must_use]
1331 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1332 self.inner = self.inner.send_compressed(encoding);
1333 self
1334 }
1335 #[must_use]
1337 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1338 self.inner = self.inner.accept_compressed(encoding);
1339 self
1340 }
1341 #[must_use]
1345 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1346 self.inner = self.inner.max_decoding_message_size(limit);
1347 self
1348 }
1349 #[must_use]
1353 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1354 self.inner = self.inner.max_encoding_message_size(limit);
1355 self
1356 }
1357 pub async fn classify_error(
1358 &mut self,
1359 request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
1360 ) -> std::result::Result<
1361 tonic::Response<super::ClassifyErrorResponse>,
1362 tonic::Status,
1363 > {
1364 self.inner
1365 .ready()
1366 .await
1367 .map_err(|e| {
1368 tonic::Status::unknown(
1369 format!("Service was not ready: {}", e.into()),
1370 )
1371 })?;
1372 let codec = tonic::codec::ProstCodec::default();
1373 let path = http::uri::PathAndQuery::from_static(
1374 "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
1375 );
1376 let mut req = request.into_request();
1377 req.extensions_mut()
1378 .insert(
1379 GrpcMethod::new(
1380 "nominal.ai.v1.DataIngestionErrorClassifierService",
1381 "ClassifyError",
1382 ),
1383 );
1384 self.inner.unary(req, path, codec).await
1385 }
1386 }
1387}
1388#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1389pub struct GetProviderStatusRequest {}
1390#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1391pub struct GetProviderStatusResponse {
1392 #[prost(message, optional, tag = "1")]
1393 pub timestamp: ::core::option::Option<
1394 super::super::super::google::protobuf::Timestamp,
1395 >,
1396 #[prost(message, optional, tag = "2")]
1397 pub last_status: ::core::option::Option<ProviderStatus>,
1398 #[deprecated]
1399 #[prost(message, optional, tag = "3")]
1400 pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
1401 #[prost(message, optional, tag = "4")]
1402 pub aggregated_status: ::core::option::Option<ProviderStatus>,
1403}
1404#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1405pub struct ProviderStatus {
1406 #[prost(oneof = "provider_status::Status", tags = "1, 2")]
1407 pub status: ::core::option::Option<provider_status::Status>,
1408}
1409pub mod provider_status {
1411 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1412 pub enum Status {
1413 #[prost(message, tag = "1")]
1414 Healthy(super::Healthy),
1415 #[prost(message, tag = "2")]
1416 Degraded(super::Degraded),
1417 }
1418}
1419#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1420pub struct Healthy {}
1421#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1422pub struct Degraded {
1423 #[prost(enumeration = "DegradationReason", tag = "1")]
1424 pub reason: i32,
1425}
1426#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1427pub struct ProviderMetrics {
1428 #[prost(int32, tag = "1")]
1429 pub time_to_first_token_ms: i32,
1430 #[prost(int32, tag = "2")]
1431 pub total_time_ms: i32,
1432}
1433#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1434#[repr(i32)]
1435pub enum DegradationReason {
1436 Unspecified = 0,
1437 HighLatency = 1,
1438 Failures = 2,
1439 HighLatencyAndFailures = 3,
1440 Unavailable = 4,
1441}
1442impl DegradationReason {
1443 pub fn as_str_name(&self) -> &'static str {
1448 match self {
1449 Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
1450 Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
1451 Self::Failures => "DEGRADATION_REASON_FAILURES",
1452 Self::HighLatencyAndFailures => {
1453 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
1454 }
1455 Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
1456 }
1457 }
1458 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1460 match value {
1461 "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1462 "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
1463 "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
1464 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
1465 Some(Self::HighLatencyAndFailures)
1466 }
1467 "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
1468 _ => None,
1469 }
1470 }
1471}
1472pub mod model_provider_health_service_client {
1474 #![allow(
1475 unused_variables,
1476 dead_code,
1477 missing_docs,
1478 clippy::wildcard_imports,
1479 clippy::let_unit_value,
1480 )]
1481 use tonic::codegen::*;
1482 use tonic::codegen::http::Uri;
1483 #[derive(Debug, Clone)]
1484 pub struct ModelProviderHealthServiceClient<T> {
1485 inner: tonic::client::Grpc<T>,
1486 }
1487 impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
1488 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1490 where
1491 D: TryInto<tonic::transport::Endpoint>,
1492 D::Error: Into<StdError>,
1493 {
1494 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1495 Ok(Self::new(conn))
1496 }
1497 }
1498 impl<T> ModelProviderHealthServiceClient<T>
1499 where
1500 T: tonic::client::GrpcService<tonic::body::Body>,
1501 T::Error: Into<StdError>,
1502 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1503 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1504 {
1505 pub fn new(inner: T) -> Self {
1506 let inner = tonic::client::Grpc::new(inner);
1507 Self { inner }
1508 }
1509 pub fn with_origin(inner: T, origin: Uri) -> Self {
1510 let inner = tonic::client::Grpc::with_origin(inner, origin);
1511 Self { inner }
1512 }
1513 pub fn with_interceptor<F>(
1514 inner: T,
1515 interceptor: F,
1516 ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
1517 where
1518 F: tonic::service::Interceptor,
1519 T::ResponseBody: Default,
1520 T: tonic::codegen::Service<
1521 http::Request<tonic::body::Body>,
1522 Response = http::Response<
1523 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1524 >,
1525 >,
1526 <T as tonic::codegen::Service<
1527 http::Request<tonic::body::Body>,
1528 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1529 {
1530 ModelProviderHealthServiceClient::new(
1531 InterceptedService::new(inner, interceptor),
1532 )
1533 }
1534 #[must_use]
1539 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1540 self.inner = self.inner.send_compressed(encoding);
1541 self
1542 }
1543 #[must_use]
1545 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1546 self.inner = self.inner.accept_compressed(encoding);
1547 self
1548 }
1549 #[must_use]
1553 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1554 self.inner = self.inner.max_decoding_message_size(limit);
1555 self
1556 }
1557 #[must_use]
1561 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1562 self.inner = self.inner.max_encoding_message_size(limit);
1563 self
1564 }
1565 pub async fn get_provider_status(
1566 &mut self,
1567 request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
1568 ) -> std::result::Result<
1569 tonic::Response<super::GetProviderStatusResponse>,
1570 tonic::Status,
1571 > {
1572 self.inner
1573 .ready()
1574 .await
1575 .map_err(|e| {
1576 tonic::Status::unknown(
1577 format!("Service was not ready: {}", e.into()),
1578 )
1579 })?;
1580 let codec = tonic::codec::ProstCodec::default();
1581 let path = http::uri::PathAndQuery::from_static(
1582 "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
1583 );
1584 let mut req = request.into_request();
1585 req.extensions_mut()
1586 .insert(
1587 GrpcMethod::new(
1588 "nominal.ai.v1.ModelProviderHealthService",
1589 "GetProviderStatus",
1590 ),
1591 );
1592 self.inner.unary(req, path, codec).await
1593 }
1594 }
1595}