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, PartialEq, ::prost::Message)]
735pub struct ResourceMarkup {
736 #[prost(oneof = "resource_markup::Kind", tags = "1, 2")]
737 pub kind: ::core::option::Option<resource_markup::Kind>,
738}
739pub mod resource_markup {
741 #[derive(Clone, PartialEq, ::prost::Oneof)]
742 pub enum Kind {
743 #[prost(message, tag = "1")]
744 Rid(super::RidResourceMarkup),
745 #[prost(message, tag = "2")]
746 RidList(super::RidListResourceMarkup),
747 }
748}
749#[derive(Clone, PartialEq, ::prost::Message)]
750pub struct RidResourceMarkup {
751 #[prost(string, tag = "1")]
752 pub rid: ::prost::alloc::string::String,
753 #[prost(string, optional, tag = "2")]
754 pub label: ::core::option::Option<::prost::alloc::string::String>,
755}
756#[derive(Clone, PartialEq, ::prost::Message)]
757pub struct RidListResourceMarkup {
758 #[prost(string, repeated, tag = "1")]
759 pub rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
760 #[prost(string, optional, tag = "2")]
761 pub label: ::core::option::Option<::prost::alloc::string::String>,
762}
763#[derive(Clone, Copy, PartialEq, ::prost::Message)]
764pub struct ContextStatus {
765 #[prost(int32, tag = "1")]
766 pub curr_token_count: i32,
767 #[prost(int32, tag = "2")]
768 pub model_context_limit: i32,
769}
770#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
771#[repr(i32)]
772pub enum FeedbackVote {
773 Unspecified = 0,
774 ThumbsUp = 1,
775 ThumbsDown = 2,
776}
777impl FeedbackVote {
778 pub fn as_str_name(&self) -> &'static str {
783 match self {
784 Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
785 Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
786 Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
787 }
788 }
789 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
791 match value {
792 "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
793 "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
794 "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
795 _ => None,
796 }
797 }
798}
799#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
800#[repr(i32)]
801pub enum ToolCallStatus {
802 Unspecified = 0,
803 Approved = 1,
804 Denied = 2,
805 AwaitingApproval = 3,
806}
807impl ToolCallStatus {
808 pub fn as_str_name(&self) -> &'static str {
813 match self {
814 Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
815 Self::Approved => "TOOL_CALL_STATUS_APPROVED",
816 Self::Denied => "TOOL_CALL_STATUS_DENIED",
817 Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
818 }
819 }
820 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
822 match value {
823 "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
824 "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
825 "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
826 "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
827 _ => None,
828 }
829 }
830}
831#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
832#[repr(i32)]
833pub enum TimeRangeType {
834 Unspecified = 0,
835 Absolute = 1,
836 Relative = 2,
837}
838impl TimeRangeType {
839 pub fn as_str_name(&self) -> &'static str {
844 match self {
845 Self::Unspecified => "TIME_RANGE_TYPE_UNSPECIFIED",
846 Self::Absolute => "TIME_RANGE_TYPE_ABSOLUTE",
847 Self::Relative => "TIME_RANGE_TYPE_RELATIVE",
848 }
849 }
850 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
852 match value {
853 "TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
854 "TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
855 "TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
856 _ => None,
857 }
858 }
859}
860pub mod ai_agent_service_client {
862 #![allow(
863 unused_variables,
864 dead_code,
865 missing_docs,
866 clippy::wildcard_imports,
867 clippy::let_unit_value,
868 )]
869 use tonic::codegen::*;
870 use tonic::codegen::http::Uri;
871 #[derive(Debug, Clone)]
872 pub struct AiAgentServiceClient<T> {
873 inner: tonic::client::Grpc<T>,
874 }
875 impl AiAgentServiceClient<tonic::transport::Channel> {
876 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
878 where
879 D: TryInto<tonic::transport::Endpoint>,
880 D::Error: Into<StdError>,
881 {
882 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
883 Ok(Self::new(conn))
884 }
885 }
886 impl<T> AiAgentServiceClient<T>
887 where
888 T: tonic::client::GrpcService<tonic::body::Body>,
889 T::Error: Into<StdError>,
890 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
891 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
892 {
893 pub fn new(inner: T) -> Self {
894 let inner = tonic::client::Grpc::new(inner);
895 Self { inner }
896 }
897 pub fn with_origin(inner: T, origin: Uri) -> Self {
898 let inner = tonic::client::Grpc::with_origin(inner, origin);
899 Self { inner }
900 }
901 pub fn with_interceptor<F>(
902 inner: T,
903 interceptor: F,
904 ) -> AiAgentServiceClient<InterceptedService<T, F>>
905 where
906 F: tonic::service::Interceptor,
907 T::ResponseBody: Default,
908 T: tonic::codegen::Service<
909 http::Request<tonic::body::Body>,
910 Response = http::Response<
911 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
912 >,
913 >,
914 <T as tonic::codegen::Service<
915 http::Request<tonic::body::Body>,
916 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
917 {
918 AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
919 }
920 #[must_use]
925 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
926 self.inner = self.inner.send_compressed(encoding);
927 self
928 }
929 #[must_use]
931 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
932 self.inner = self.inner.accept_compressed(encoding);
933 self
934 }
935 #[must_use]
939 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
940 self.inner = self.inner.max_decoding_message_size(limit);
941 self
942 }
943 #[must_use]
947 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
948 self.inner = self.inner.max_encoding_message_size(limit);
949 self
950 }
951 pub async fn stream_chat(
952 &mut self,
953 request: impl tonic::IntoRequest<super::StreamChatRequest>,
954 ) -> std::result::Result<
955 tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
956 tonic::Status,
957 > {
958 self.inner
959 .ready()
960 .await
961 .map_err(|e| {
962 tonic::Status::unknown(
963 format!("Service was not ready: {}", e.into()),
964 )
965 })?;
966 let codec = tonic::codec::ProstCodec::default();
967 let path = http::uri::PathAndQuery::from_static(
968 "/nominal.ai.v1.AIAgentService/StreamChat",
969 );
970 let mut req = request.into_request();
971 req.extensions_mut()
972 .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
973 self.inner.server_streaming(req, path, codec).await
974 }
975 #[deprecated]
976 pub async fn get_conversation(
977 &mut self,
978 request: impl tonic::IntoRequest<super::GetConversationRequest>,
979 ) -> std::result::Result<
980 tonic::Response<super::GetConversationResponse>,
981 tonic::Status,
982 > {
983 self.inner
984 .ready()
985 .await
986 .map_err(|e| {
987 tonic::Status::unknown(
988 format!("Service was not ready: {}", e.into()),
989 )
990 })?;
991 let codec = tonic::codec::ProstCodec::default();
992 let path = http::uri::PathAndQuery::from_static(
993 "/nominal.ai.v1.AIAgentService/GetConversation",
994 );
995 let mut req = request.into_request();
996 req.extensions_mut()
997 .insert(
998 GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
999 );
1000 self.inner.unary(req, path, codec).await
1001 }
1002 pub async fn get_conversation_metadata(
1003 &mut self,
1004 request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
1005 ) -> std::result::Result<
1006 tonic::Response<super::GetConversationMetadataResponse>,
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/GetConversationMetadata",
1020 );
1021 let mut req = request.into_request();
1022 req.extensions_mut()
1023 .insert(
1024 GrpcMethod::new(
1025 "nominal.ai.v1.AIAgentService",
1026 "GetConversationMetadata",
1027 ),
1028 );
1029 self.inner.unary(req, path, codec).await
1030 }
1031 pub async fn get_conversation_messages(
1032 &mut self,
1033 request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
1034 ) -> std::result::Result<
1035 tonic::Response<super::GetConversationMessagesResponse>,
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/GetConversationMessages",
1049 );
1050 let mut req = request.into_request();
1051 req.extensions_mut()
1052 .insert(
1053 GrpcMethod::new(
1054 "nominal.ai.v1.AIAgentService",
1055 "GetConversationMessages",
1056 ),
1057 );
1058 self.inner.unary(req, path, codec).await
1059 }
1060 pub async fn list_conversations(
1061 &mut self,
1062 request: impl tonic::IntoRequest<super::ListConversationsRequest>,
1063 ) -> std::result::Result<
1064 tonic::Response<super::ListConversationsResponse>,
1065 tonic::Status,
1066 > {
1067 self.inner
1068 .ready()
1069 .await
1070 .map_err(|e| {
1071 tonic::Status::unknown(
1072 format!("Service was not ready: {}", e.into()),
1073 )
1074 })?;
1075 let codec = tonic::codec::ProstCodec::default();
1076 let path = http::uri::PathAndQuery::from_static(
1077 "/nominal.ai.v1.AIAgentService/ListConversations",
1078 );
1079 let mut req = request.into_request();
1080 req.extensions_mut()
1081 .insert(
1082 GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
1083 );
1084 self.inner.unary(req, path, codec).await
1085 }
1086 pub async fn create_conversation(
1087 &mut self,
1088 request: impl tonic::IntoRequest<super::CreateConversationRequest>,
1089 ) -> std::result::Result<
1090 tonic::Response<super::CreateConversationResponse>,
1091 tonic::Status,
1092 > {
1093 self.inner
1094 .ready()
1095 .await
1096 .map_err(|e| {
1097 tonic::Status::unknown(
1098 format!("Service was not ready: {}", e.into()),
1099 )
1100 })?;
1101 let codec = tonic::codec::ProstCodec::default();
1102 let path = http::uri::PathAndQuery::from_static(
1103 "/nominal.ai.v1.AIAgentService/CreateConversation",
1104 );
1105 let mut req = request.into_request();
1106 req.extensions_mut()
1107 .insert(
1108 GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
1109 );
1110 self.inner.unary(req, path, codec).await
1111 }
1112 pub async fn update_conversation_metadata(
1113 &mut self,
1114 request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
1115 ) -> std::result::Result<
1116 tonic::Response<super::UpdateConversationMetadataResponse>,
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/UpdateConversationMetadata",
1130 );
1131 let mut req = request.into_request();
1132 req.extensions_mut()
1133 .insert(
1134 GrpcMethod::new(
1135 "nominal.ai.v1.AIAgentService",
1136 "UpdateConversationMetadata",
1137 ),
1138 );
1139 self.inner.unary(req, path, codec).await
1140 }
1141 pub async fn delete_conversation(
1142 &mut self,
1143 request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
1144 ) -> std::result::Result<
1145 tonic::Response<super::DeleteConversationResponse>,
1146 tonic::Status,
1147 > {
1148 self.inner
1149 .ready()
1150 .await
1151 .map_err(|e| {
1152 tonic::Status::unknown(
1153 format!("Service was not ready: {}", e.into()),
1154 )
1155 })?;
1156 let codec = tonic::codec::ProstCodec::default();
1157 let path = http::uri::PathAndQuery::from_static(
1158 "/nominal.ai.v1.AIAgentService/DeleteConversation",
1159 );
1160 let mut req = request.into_request();
1161 req.extensions_mut()
1162 .insert(
1163 GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
1164 );
1165 self.inner.unary(req, path, codec).await
1166 }
1167 pub async fn get_snapshot_rid_by_user_message_id(
1168 &mut self,
1169 request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
1170 ) -> std::result::Result<
1171 tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
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/GetSnapshotRidByUserMessageId",
1185 );
1186 let mut req = request.into_request();
1187 req.extensions_mut()
1188 .insert(
1189 GrpcMethod::new(
1190 "nominal.ai.v1.AIAgentService",
1191 "GetSnapshotRidByUserMessageId",
1192 ),
1193 );
1194 self.inner.unary(req, path, codec).await
1195 }
1196 pub async fn compact_conversation(
1197 &mut self,
1198 request: impl tonic::IntoRequest<super::CompactConversationRequest>,
1199 ) -> std::result::Result<
1200 tonic::Response<super::CompactConversationResponse>,
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/CompactConversation",
1214 );
1215 let mut req = request.into_request();
1216 req.extensions_mut()
1217 .insert(
1218 GrpcMethod::new(
1219 "nominal.ai.v1.AIAgentService",
1220 "CompactConversation",
1221 ),
1222 );
1223 self.inner.unary(req, path, codec).await
1224 }
1225 pub async fn submit_message_feedback(
1226 &mut self,
1227 request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1228 ) -> std::result::Result<
1229 tonic::Response<super::SubmitMessageFeedbackResponse>,
1230 tonic::Status,
1231 > {
1232 self.inner
1233 .ready()
1234 .await
1235 .map_err(|e| {
1236 tonic::Status::unknown(
1237 format!("Service was not ready: {}", e.into()),
1238 )
1239 })?;
1240 let codec = tonic::codec::ProstCodec::default();
1241 let path = http::uri::PathAndQuery::from_static(
1242 "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
1243 );
1244 let mut req = request.into_request();
1245 req.extensions_mut()
1246 .insert(
1247 GrpcMethod::new(
1248 "nominal.ai.v1.AIAgentService",
1249 "SubmitMessageFeedback",
1250 ),
1251 );
1252 self.inner.unary(req, path, codec).await
1253 }
1254 }
1255}
1256#[derive(Clone, PartialEq, ::prost::Message)]
1257pub struct ClassifyErrorRequest {
1258 #[prost(string, tag = "1")]
1259 pub error_message: ::prost::alloc::string::String,
1260}
1261#[derive(Clone, PartialEq, ::prost::Message)]
1262pub struct ClassifyErrorResponse {
1263 #[prost(enumeration = "ErrorClassification", tag = "1")]
1264 pub classification: i32,
1265 #[prost(string, tag = "2")]
1266 pub reason: ::prost::alloc::string::String,
1267}
1268#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1269#[repr(i32)]
1270pub enum ErrorClassification {
1271 Unspecified = 0,
1272 Client = 1,
1273 Server = 2,
1274}
1275impl ErrorClassification {
1276 pub fn as_str_name(&self) -> &'static str {
1281 match self {
1282 Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
1283 Self::Client => "ERROR_CLASSIFICATION_CLIENT",
1284 Self::Server => "ERROR_CLASSIFICATION_SERVER",
1285 }
1286 }
1287 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1289 match value {
1290 "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
1291 "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
1292 "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
1293 _ => None,
1294 }
1295 }
1296}
1297pub mod data_ingestion_error_classifier_service_client {
1299 #![allow(
1300 unused_variables,
1301 dead_code,
1302 missing_docs,
1303 clippy::wildcard_imports,
1304 clippy::let_unit_value,
1305 )]
1306 use tonic::codegen::*;
1307 use tonic::codegen::http::Uri;
1308 #[derive(Debug, Clone)]
1309 pub struct DataIngestionErrorClassifierServiceClient<T> {
1310 inner: tonic::client::Grpc<T>,
1311 }
1312 impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
1313 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1315 where
1316 D: TryInto<tonic::transport::Endpoint>,
1317 D::Error: Into<StdError>,
1318 {
1319 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1320 Ok(Self::new(conn))
1321 }
1322 }
1323 impl<T> DataIngestionErrorClassifierServiceClient<T>
1324 where
1325 T: tonic::client::GrpcService<tonic::body::Body>,
1326 T::Error: Into<StdError>,
1327 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1328 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1329 {
1330 pub fn new(inner: T) -> Self {
1331 let inner = tonic::client::Grpc::new(inner);
1332 Self { inner }
1333 }
1334 pub fn with_origin(inner: T, origin: Uri) -> Self {
1335 let inner = tonic::client::Grpc::with_origin(inner, origin);
1336 Self { inner }
1337 }
1338 pub fn with_interceptor<F>(
1339 inner: T,
1340 interceptor: F,
1341 ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
1342 where
1343 F: tonic::service::Interceptor,
1344 T::ResponseBody: Default,
1345 T: tonic::codegen::Service<
1346 http::Request<tonic::body::Body>,
1347 Response = http::Response<
1348 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1349 >,
1350 >,
1351 <T as tonic::codegen::Service<
1352 http::Request<tonic::body::Body>,
1353 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1354 {
1355 DataIngestionErrorClassifierServiceClient::new(
1356 InterceptedService::new(inner, interceptor),
1357 )
1358 }
1359 #[must_use]
1364 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1365 self.inner = self.inner.send_compressed(encoding);
1366 self
1367 }
1368 #[must_use]
1370 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1371 self.inner = self.inner.accept_compressed(encoding);
1372 self
1373 }
1374 #[must_use]
1378 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1379 self.inner = self.inner.max_decoding_message_size(limit);
1380 self
1381 }
1382 #[must_use]
1386 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1387 self.inner = self.inner.max_encoding_message_size(limit);
1388 self
1389 }
1390 pub async fn classify_error(
1391 &mut self,
1392 request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
1393 ) -> std::result::Result<
1394 tonic::Response<super::ClassifyErrorResponse>,
1395 tonic::Status,
1396 > {
1397 self.inner
1398 .ready()
1399 .await
1400 .map_err(|e| {
1401 tonic::Status::unknown(
1402 format!("Service was not ready: {}", e.into()),
1403 )
1404 })?;
1405 let codec = tonic::codec::ProstCodec::default();
1406 let path = http::uri::PathAndQuery::from_static(
1407 "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
1408 );
1409 let mut req = request.into_request();
1410 req.extensions_mut()
1411 .insert(
1412 GrpcMethod::new(
1413 "nominal.ai.v1.DataIngestionErrorClassifierService",
1414 "ClassifyError",
1415 ),
1416 );
1417 self.inner.unary(req, path, codec).await
1418 }
1419 }
1420}
1421#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1422pub struct GetProviderStatusRequest {}
1423#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1424pub struct GetProviderStatusResponse {
1425 #[prost(message, optional, tag = "1")]
1426 pub timestamp: ::core::option::Option<
1427 super::super::super::google::protobuf::Timestamp,
1428 >,
1429 #[prost(message, optional, tag = "2")]
1430 pub last_status: ::core::option::Option<ProviderStatus>,
1431 #[deprecated]
1432 #[prost(message, optional, tag = "3")]
1433 pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
1434 #[prost(message, optional, tag = "4")]
1435 pub aggregated_status: ::core::option::Option<ProviderStatus>,
1436}
1437#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1438pub struct ProviderStatus {
1439 #[prost(oneof = "provider_status::Status", tags = "1, 2")]
1440 pub status: ::core::option::Option<provider_status::Status>,
1441}
1442pub mod provider_status {
1444 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1445 pub enum Status {
1446 #[prost(message, tag = "1")]
1447 Healthy(super::Healthy),
1448 #[prost(message, tag = "2")]
1449 Degraded(super::Degraded),
1450 }
1451}
1452#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1453pub struct Healthy {}
1454#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1455pub struct Degraded {
1456 #[prost(enumeration = "DegradationReason", tag = "1")]
1457 pub reason: i32,
1458}
1459#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1460pub struct ProviderMetrics {
1461 #[prost(int32, tag = "1")]
1462 pub time_to_first_token_ms: i32,
1463 #[prost(int32, tag = "2")]
1464 pub total_time_ms: i32,
1465}
1466#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1467#[repr(i32)]
1468pub enum DegradationReason {
1469 Unspecified = 0,
1470 HighLatency = 1,
1471 Failures = 2,
1472 HighLatencyAndFailures = 3,
1473 Unavailable = 4,
1474}
1475impl DegradationReason {
1476 pub fn as_str_name(&self) -> &'static str {
1481 match self {
1482 Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
1483 Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
1484 Self::Failures => "DEGRADATION_REASON_FAILURES",
1485 Self::HighLatencyAndFailures => {
1486 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
1487 }
1488 Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
1489 }
1490 }
1491 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1493 match value {
1494 "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1495 "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
1496 "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
1497 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
1498 Some(Self::HighLatencyAndFailures)
1499 }
1500 "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
1501 _ => None,
1502 }
1503 }
1504}
1505pub mod model_provider_health_service_client {
1507 #![allow(
1508 unused_variables,
1509 dead_code,
1510 missing_docs,
1511 clippy::wildcard_imports,
1512 clippy::let_unit_value,
1513 )]
1514 use tonic::codegen::*;
1515 use tonic::codegen::http::Uri;
1516 #[derive(Debug, Clone)]
1517 pub struct ModelProviderHealthServiceClient<T> {
1518 inner: tonic::client::Grpc<T>,
1519 }
1520 impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
1521 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1523 where
1524 D: TryInto<tonic::transport::Endpoint>,
1525 D::Error: Into<StdError>,
1526 {
1527 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1528 Ok(Self::new(conn))
1529 }
1530 }
1531 impl<T> ModelProviderHealthServiceClient<T>
1532 where
1533 T: tonic::client::GrpcService<tonic::body::Body>,
1534 T::Error: Into<StdError>,
1535 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1536 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1537 {
1538 pub fn new(inner: T) -> Self {
1539 let inner = tonic::client::Grpc::new(inner);
1540 Self { inner }
1541 }
1542 pub fn with_origin(inner: T, origin: Uri) -> Self {
1543 let inner = tonic::client::Grpc::with_origin(inner, origin);
1544 Self { inner }
1545 }
1546 pub fn with_interceptor<F>(
1547 inner: T,
1548 interceptor: F,
1549 ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
1550 where
1551 F: tonic::service::Interceptor,
1552 T::ResponseBody: Default,
1553 T: tonic::codegen::Service<
1554 http::Request<tonic::body::Body>,
1555 Response = http::Response<
1556 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1557 >,
1558 >,
1559 <T as tonic::codegen::Service<
1560 http::Request<tonic::body::Body>,
1561 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1562 {
1563 ModelProviderHealthServiceClient::new(
1564 InterceptedService::new(inner, interceptor),
1565 )
1566 }
1567 #[must_use]
1572 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1573 self.inner = self.inner.send_compressed(encoding);
1574 self
1575 }
1576 #[must_use]
1578 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1579 self.inner = self.inner.accept_compressed(encoding);
1580 self
1581 }
1582 #[must_use]
1586 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1587 self.inner = self.inner.max_decoding_message_size(limit);
1588 self
1589 }
1590 #[must_use]
1594 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1595 self.inner = self.inner.max_encoding_message_size(limit);
1596 self
1597 }
1598 pub async fn get_provider_status(
1599 &mut self,
1600 request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
1601 ) -> std::result::Result<
1602 tonic::Response<super::GetProviderStatusResponse>,
1603 tonic::Status,
1604 > {
1605 self.inner
1606 .ready()
1607 .await
1608 .map_err(|e| {
1609 tonic::Status::unknown(
1610 format!("Service was not ready: {}", e.into()),
1611 )
1612 })?;
1613 let codec = tonic::codec::ProstCodec::default();
1614 let path = http::uri::PathAndQuery::from_static(
1615 "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
1616 );
1617 let mut req = request.into_request();
1618 req.extensions_mut()
1619 .insert(
1620 GrpcMethod::new(
1621 "nominal.ai.v1.ModelProviderHealthService",
1622 "GetProviderStatus",
1623 ),
1624 );
1625 self.inner.unary(req, path, codec).await
1626 }
1627 }
1628}