#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueuedMessage {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub client_message_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub message: ::core::option::Option<StreamChatRequest>,
#[prost(enumeration = "QueuedMessageState", tag = "5")]
pub state: i32,
#[prost(string, tag = "6")]
pub failure_code: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub created_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateQueuedMessageRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub client_message_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub message: ::core::option::Option<StreamChatRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateQueuedMessageResponse {
#[prost(message, optional, tag = "1")]
pub queued_message: ::core::option::Option<QueuedMessage>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListQueuedMessagesRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListQueuedMessagesResponse {
#[prost(message, repeated, tag = "1")]
pub queued_messages: ::prost::alloc::vec::Vec<QueuedMessage>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteQueuedMessageRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub queued_message_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteQueuedMessageResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitMessageFeedbackRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub message_id: ::prost::alloc::string::String,
#[prost(enumeration = "FeedbackVote", tag = "3")]
pub vote: i32,
#[prost(string, optional, tag = "4")]
pub comment: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub issue_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SubmitMessageFeedbackResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelAgentRunRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub agent_run_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CancelAgentRunResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSnapshotRidByUserMessageIdRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub message_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSnapshotRidByUserMessageIdResponse {
#[prost(
oneof = "get_snapshot_rid_by_user_message_id_response::RestorePoint",
tags = "1, 2"
)]
pub restore_point: ::core::option::Option<
get_snapshot_rid_by_user_message_id_response::RestorePoint,
>,
}
pub mod get_snapshot_rid_by_user_message_id_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RestorePoint {
#[prost(string, tag = "1")]
SnapshotRid(::prost::alloc::string::String),
#[prost(string, tag = "2")]
CommitId(::prost::alloc::string::String),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReadOnlyMode {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EditMode {
#[prost(bool, optional, tag = "1")]
pub auto_accept: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ConversationMode {
#[prost(oneof = "conversation_mode::Mode", tags = "1, 2")]
pub mode: ::core::option::Option<conversation_mode::Mode>,
}
pub mod conversation_mode {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Mode {
#[prost(message, tag = "1")]
ReadOnly(super::ReadOnlyMode),
#[prost(message, tag = "2")]
Edit(super::EditMode),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolApprovalResult {
#[prost(string, tag = "1")]
pub tool_call_id: ::prost::alloc::string::String,
#[prost(oneof = "tool_approval_result::Response", tags = "2, 3")]
pub response: ::core::option::Option<tool_approval_result::Response>,
}
pub mod tool_approval_result {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "2")]
Approved(super::ToolApprovedResponse),
#[prost(message, tag = "3")]
Denied(super::ToolDeniedResponse),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolApprovedResponse {
#[prost(string, optional, tag = "1")]
pub override_args: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolDeniedResponse {
#[prost(string, tag = "2")]
pub denial_reason: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RetryRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserPromptRequest {
#[prost(message, optional, tag = "1")]
pub message: ::core::option::Option<UserModelMessage>,
#[prost(message, repeated, tag = "2")]
pub images: ::prost::alloc::vec::Vec<ImagePart>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolApprovalRequest {
#[prost(message, repeated, tag = "1")]
pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserQuestionAnswer {
#[prost(uint32, tag = "1")]
pub question_index: u32,
#[prost(string, repeated, tag = "2")]
pub selected_labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub other_text: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UserQuestionDeclined {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserQuestionResponseRequest {
#[prost(string, tag = "1")]
pub tool_call_id: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub question_index: u32,
#[prost(uint64, tag = "3")]
pub version: u64,
#[prost(oneof = "user_question_response_request::Response", tags = "4, 5")]
pub response: ::core::option::Option<user_question_response_request::Response>,
}
pub mod user_question_response_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "4")]
Answered(super::UserQuestionAnswer),
#[prost(message, tag = "5")]
Declined(super::UserQuestionDeclined),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamChatRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[deprecated]
#[prost(message, optional, tag = "2")]
pub message: ::core::option::Option<UserModelMessage>,
#[deprecated]
#[prost(message, repeated, tag = "3")]
pub images: ::prost::alloc::vec::Vec<ImagePart>,
#[deprecated]
#[prost(message, repeated, tag = "6")]
pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
#[prost(bool, tag = "13")]
pub detach_on_disconnect: bool,
#[prost(bool, tag = "14")]
pub reattach_only: bool,
#[prost(message, optional, tag = "15")]
pub model_selection: ::core::option::Option<ModelSelection>,
#[prost(message, optional, tag = "16")]
pub page_context: ::core::option::Option<PageContext>,
#[prost(oneof = "stream_chat_request::RequestType", tags = "7, 8, 9, 12")]
pub request_type: ::core::option::Option<stream_chat_request::RequestType>,
#[prost(oneof = "stream_chat_request::Context", tags = "4, 5, 10, 11")]
pub context: ::core::option::Option<stream_chat_request::Context>,
}
pub mod stream_chat_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RequestType {
#[prost(message, tag = "7")]
Retry(super::RetryRequest),
#[prost(message, tag = "8")]
UserPrompt(super::UserPromptRequest),
#[prost(message, tag = "9")]
ToolApproval(super::ToolApprovalRequest),
#[prost(message, tag = "12")]
UserQuestionResponse(super::UserQuestionResponseRequest),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Context {
#[prost(message, tag = "4")]
Workbook(super::WorkbookContext),
#[prost(message, tag = "5")]
Global(super::GlobalContext),
#[prost(message, tag = "10")]
Checklist(super::ChecklistContext),
#[prost(message, tag = "11")]
Template(super::TemplateContext),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PageContext {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub primary_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub in_view_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelSelection {
#[prost(string, tag = "1")]
pub model_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub thinking_effort: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint32, optional, tag = "3")]
pub context_window_tokens: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "4")]
pub max_output_tokens: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ThinkingEffortOption {
#[prost(string, tag = "1")]
pub effort: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub default_output_tokens: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelOption {
#[prost(string, tag = "1")]
pub model_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub thinking_efforts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint32, tag = "4")]
pub min_context_window_tokens: u32,
#[prost(uint32, tag = "5")]
pub max_context_window_tokens: u32,
#[prost(uint32, tag = "6")]
pub default_context_window_tokens: u32,
#[prost(uint32, repeated, tag = "7")]
pub context_window_presets: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, tag = "8")]
pub min_output_tokens: u32,
#[prost(uint32, tag = "9")]
pub max_output_tokens: u32,
#[prost(uint32, tag = "10")]
pub default_output_tokens: u32,
#[prost(message, repeated, tag = "11")]
pub thinking_effort_options: ::prost::alloc::vec::Vec<ThinkingEffortOption>,
#[prost(bool, tag = "12")]
pub supports_image_input: bool,
#[prost(string, optional, tag = "13")]
pub default_thinking_effort: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListModelsRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListModelsResponse {
#[prost(message, repeated, tag = "1")]
pub models: ::prost::alloc::vec::Vec<ModelOption>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkbookContext {
#[prost(string, tag = "1")]
pub workbook_rid: ::prost::alloc::string::String,
#[deprecated]
#[prost(message, optional, tag = "2")]
pub user_presence: ::core::option::Option<WorkbookUserPresence>,
#[prost(string, optional, tag = "3")]
pub active_tab_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub visible_time_range: ::core::option::Option<TimeRange>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChecklistContext {
#[prost(string, tag = "1")]
pub checklist_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub branch_name: ::prost::alloc::string::String,
#[prost(oneof = "checklist_context::ReferenceRid", tags = "3, 4")]
pub reference_rid: ::core::option::Option<checklist_context::ReferenceRid>,
}
pub mod checklist_context {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ReferenceRid {
#[prost(string, tag = "3")]
Asset(::prost::alloc::string::String),
#[prost(string, tag = "4")]
Run(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TemplateContext {
#[prost(string, tag = "1")]
pub template_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub branch_name: ::prost::alloc::string::String,
#[prost(oneof = "template_context::ReferenceRid", tags = "3, 4")]
pub reference_rid: ::core::option::Option<template_context::ReferenceRid>,
}
pub mod template_context {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ReferenceRid {
#[prost(string, tag = "3")]
Asset(::prost::alloc::string::String),
#[prost(string, tag = "4")]
Run(::prost::alloc::string::String),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GlobalContext {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WorkbookUserPresence {
#[prost(int32, tag = "1")]
pub tab_index: i32,
#[prost(message, optional, tag = "2")]
pub range: ::core::option::Option<TimeRange>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConversationRequest {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub old_conversation_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub previous_message_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub conversation_mode: ::core::option::Option<ConversationMode>,
#[prost(string, optional, tag = "6")]
pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "7")]
pub resources: ::prost::alloc::vec::Vec<ConversationResource>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConversationResponse {
#[prost(string, tag = "1")]
pub new_conversation_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConversationMetadataRequest {
#[prost(string, optional, tag = "1")]
pub title: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub conversation_mode: ::core::option::Option<ConversationMode>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateConversationMetadataResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteConversationRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteConversationResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveConversationRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveConversationResponse {
#[prost(message, optional, tag = "1")]
pub conversation: ::core::option::Option<ConversationMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnarchiveConversationRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnarchiveConversationResponse {
#[prost(message, optional, tag = "1")]
pub conversation: ::core::option::Option<ConversationMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "3")]
pub max_message_count: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactConversationRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CompactConversationResponse {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<ContextStatus>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelMessageWithId {
#[prost(string, tag = "3")]
pub message_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
#[prost(message, repeated, tag = "8")]
pub user_question_calls: ::prost::alloc::vec::Vec<UserQuestionCall>,
#[prost(message, optional, tag = "9")]
pub created_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(double, optional, tag = "10")]
pub turn_duration_s: ::core::option::Option<f64>,
#[prost(oneof = "model_message_with_id::Content", tags = "1, 2, 6")]
pub content: ::core::option::Option<model_message_with_id::Content>,
#[prost(oneof = "model_message_with_id::RestorePoint", tags = "4, 7")]
pub restore_point: ::core::option::Option<model_message_with_id::RestorePoint>,
}
pub mod model_message_with_id {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Content {
#[prost(message, tag = "1")]
Message(super::ModelMessage),
#[prost(message, tag = "2")]
ToolAction(super::ToolAction),
#[prost(message, tag = "6")]
ToolActionConfirmation(super::ToolActionConfirmation),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RestorePoint {
#[prost(string, tag = "4")]
SnapshotRid(::prost::alloc::string::String),
#[prost(string, tag = "7")]
CommitId(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationResponse {
#[prost(message, repeated, tag = "1")]
pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
#[prost(message, optional, tag = "2")]
pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationMetadataRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationMetadataResponse {
#[prost(message, optional, tag = "1")]
pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
#[prost(message, optional, tag = "2")]
pub active_run: ::core::option::Option<ActiveAgentRun>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActiveAgentRun {
#[prost(string, tag = "1")]
pub agent_run_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub started_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(enumeration = "AgentRunExecutionMode", tag = "3")]
pub execution_mode: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationMessagesRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "3")]
pub max_message_count: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationMessagesResponse {
#[prost(message, repeated, tag = "1")]
pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConversationsRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "3")]
pub page_size: ::core::option::Option<i32>,
#[prost(string, optional, tag = "4")]
pub title_query: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag = "6")]
pub include_archived: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversationResource {
#[prost(string, tag = "1")]
pub rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConversationResourcesRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub add_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub remove_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConversationResourcesResponse {
#[prost(message, repeated, tag = "1")]
pub resources: ::prost::alloc::vec::Vec<ConversationResource>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversationMetadata {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "4")]
pub last_updated_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "5")]
pub mode: ::core::option::Option<ConversationMode>,
#[prost(message, optional, tag = "6")]
pub current_context: ::core::option::Option<ContextStatus>,
#[prost(string, optional, tag = "7")]
pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "8")]
pub resources: ::prost::alloc::vec::Vec<ConversationResource>,
#[prost(message, optional, tag = "9")]
pub active_run: ::core::option::Option<ActiveAgentRun>,
#[prost(message, optional, tag = "10")]
pub archived_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConversationsResponse {
#[prost(message, repeated, tag = "1")]
pub conversations: ::prost::alloc::vec::Vec<ConversationMetadata>,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetConversationActiveRunsRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub conversation_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetConversationActiveRunsResponse {
#[prost(message, repeated, tag = "1")]
pub active_runs: ::prost::alloc::vec::Vec<ConversationActiveRun>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversationActiveRun {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub active_run: ::core::option::Option<ActiveAgentRun>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeRange {
#[prost(message, optional, tag = "1")]
pub range_start: ::core::option::Option<Timestamp>,
#[prost(message, optional, tag = "2")]
pub range_end: ::core::option::Option<Timestamp>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Timestamp {
#[prost(int32, tag = "1")]
pub seconds: i32,
#[prost(int32, tag = "2")]
pub nanoseconds: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelMessage {
#[prost(oneof = "model_message::Kind", tags = "1, 2")]
pub kind: ::core::option::Option<model_message::Kind>,
}
pub mod model_message {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag = "1")]
User(super::UserModelMessage),
#[prost(message, tag = "2")]
Assistant(super::AssistantModelMessage),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserModelMessage {
#[prost(message, repeated, tag = "1")]
pub text: ::prost::alloc::vec::Vec<UserContentPart>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssistantModelMessage {
#[prost(message, repeated, tag = "1")]
pub content_parts: ::prost::alloc::vec::Vec<AssistantContentPart>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserContentPart {
#[prost(oneof = "user_content_part::Part", tags = "1, 2")]
pub part: ::core::option::Option<user_content_part::Part>,
}
pub mod user_content_part {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Part {
#[prost(message, tag = "1")]
Text(super::TextPart),
#[prost(message, tag = "2")]
Image(super::ImagePart),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssistantContentPart {
#[prost(oneof = "assistant_content_part::Part", tags = "1, 2")]
pub part: ::core::option::Option<assistant_content_part::Part>,
}
pub mod assistant_content_part {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Part {
#[prost(message, tag = "1")]
Text(super::TextPart),
#[prost(message, tag = "2")]
Reasoning(super::ReasoningPart),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextPart {
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImagePart {
#[prost(string, tag = "2")]
pub media_type: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub attachment_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReasoningPart {
#[prost(string, tag = "1")]
pub reasoning: ::prost::alloc::string::String,
#[prost(double, optional, tag = "2")]
pub duration_s: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamChatResponse {
#[prost(
oneof = "stream_chat_response::Response",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16"
)]
pub response: ::core::option::Option<stream_chat_response::Response>,
}
pub mod stream_chat_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Finish(super::Finish),
#[prost(message, tag = "2")]
Error(super::Error),
#[prost(message, tag = "3")]
TextStart(super::TextStart),
#[prost(message, tag = "4")]
TextDelta(super::TextDelta),
#[prost(message, tag = "5")]
TextEnd(super::TextEnd),
#[prost(message, tag = "6")]
ReasoningStart(super::ReasoningStart),
#[prost(message, tag = "7")]
ReasoningDelta(super::ReasoningDelta),
#[prost(message, tag = "8")]
ReasoningEnd(super::ReasoningEnd),
#[prost(message, tag = "10")]
ToolAction(super::ToolAction),
#[prost(message, tag = "11")]
ToolActionConfirmation(super::ToolActionConfirmation),
#[prost(message, tag = "12")]
StepStart(super::StepStart),
#[prost(message, tag = "13")]
StepEnd(super::StepEnd),
#[prost(message, tag = "14")]
ClientDirective(super::ClientDirective),
#[prost(message, tag = "15")]
CompactionNotice(super::CompactionNotice),
#[prost(message, tag = "16")]
StreamReset(super::StreamReset),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StreamReset {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StepStart {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StepEnd {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CompactionNotice {
#[prost(int32, tag = "1")]
pub tokens_before: i32,
#[prost(int32, tag = "2")]
pub estimated_checkpoint_tokens: i32,
#[prost(enumeration = "compaction_notice::Trigger", tag = "3")]
pub trigger: i32,
}
pub mod compaction_notice {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Trigger {
Unspecified = 0,
PreTurn = 1,
MidRun = 2,
}
impl Trigger {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TRIGGER_UNSPECIFIED",
Self::PreTurn => "TRIGGER_PRE_TURN",
Self::MidRun => "TRIGGER_MID_RUN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
"TRIGGER_PRE_TURN" => Some(Self::PreTurn),
"TRIGGER_MID_RUN" => Some(Self::MidRun),
_ => None,
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolCallDescription {
#[prost(string, tag = "1")]
pub tool_call_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub tool_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub tool_args_json_string: ::prost::alloc::string::String,
#[prost(enumeration = "ToolCallStatus", tag = "4")]
pub status: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserQuestionCall {
#[prost(message, optional, tag = "1")]
pub tool_call: ::core::option::Option<ToolCallDescription>,
#[prost(uint32, tag = "2")]
pub current_question_index: u32,
#[prost(message, repeated, tag = "3")]
pub answers: ::prost::alloc::vec::Vec<UserQuestionAnswer>,
#[prost(enumeration = "UserQuestionState", tag = "4")]
pub state: i32,
#[prost(uint64, tag = "5")]
pub version: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Finish {
#[prost(string, repeated, tag = "1")]
pub ordered_message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub new_title: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "3")]
pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
#[prost(message, optional, tag = "4")]
pub updated_context: ::core::option::Option<ContextStatus>,
#[prost(string, optional, tag = "5")]
pub turn_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "6")]
pub user_question_calls: ::prost::alloc::vec::Vec<UserQuestionCall>,
#[prost(double, optional, tag = "7")]
pub duration_s: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Error {
#[prost(string, tag = "1")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextStart {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextDelta {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub delta: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextEnd {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReasoningStart {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReasoningDelta {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub delta: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReasoningEnd {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub duration_s: f64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolAction {
#[prost(string, tag = "2")]
pub tool_action_verb: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub tool_call_description: ::core::option::Option<ToolCallDescription>,
#[deprecated]
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[deprecated]
#[prost(string, tag = "4")]
pub tool_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolActionConfirmation {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(double, optional, tag = "4")]
pub duration_s: ::core::option::Option<f64>,
#[prost(oneof = "tool_action_confirmation::Outcome", tags = "2, 3")]
pub outcome: ::core::option::Option<tool_action_confirmation::Outcome>,
}
pub mod tool_action_confirmation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Outcome {
#[prost(message, tag = "2")]
Success(super::ToolActionSuccess),
#[prost(message, tag = "3")]
Failure(super::ToolActionFailure),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolActionSuccess {
#[prost(string, tag = "1")]
pub tool_success_message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolActionFailure {
#[prost(string, tag = "1")]
pub tool_error_message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientDirective {
#[prost(oneof = "client_directive::Version", tags = "1")]
pub version: ::core::option::Option<client_directive::Version>,
}
pub mod client_directive {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Version {
#[prost(message, tag = "1")]
V1(super::ClientDirectiveV1),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientDirectiveV1 {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(oneof = "client_directive_v1::Kind", tags = "2, 3, 4")]
pub kind: ::core::option::Option<client_directive_v1::Kind>,
}
pub mod client_directive_v1 {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag = "2")]
ResourceEdited(super::ResourceEditedDirective),
#[prost(message, tag = "3")]
SetTimeRange(super::SetTimeRangeDirective),
#[prost(message, tag = "4")]
ResourceChanged(super::ResourceChangedDirective),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceEditedDirective {
#[prost(oneof = "resource_edited_directive::Resource", tags = "1, 2, 3")]
pub resource: ::core::option::Option<resource_edited_directive::Resource>,
}
pub mod resource_edited_directive {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Resource {
#[prost(message, tag = "1")]
Checklist(super::ChecklistEdited),
#[prost(message, tag = "2")]
Template(super::TemplateEdited),
#[prost(message, tag = "3")]
Workbook(super::WorkbookEdited),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChecklistEdited {
#[prost(string, tag = "1")]
pub checklist_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub branch_name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub check_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub committed_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TemplateEdited {
#[prost(string, tag = "1")]
pub template_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub branch_name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub committed_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkbookEdited {
#[prost(string, tag = "1")]
pub workbook_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceChangedDirective {
#[prost(string, tag = "1")]
pub resource_rid: ::prost::alloc::string::String,
#[prost(enumeration = "ResourceChangeType", tag = "2")]
pub change: i32,
#[prost(string, optional, tag = "3")]
pub branch_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub related_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetTimeRangeDirective {
#[prost(string, tag = "1")]
pub workbook_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "3")]
pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(enumeration = "TimeRangeType", tag = "4")]
pub time_range_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceMarkup {
#[prost(oneof = "resource_markup::Kind", tags = "1, 2")]
pub kind: ::core::option::Option<resource_markup::Kind>,
}
pub mod resource_markup {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag = "1")]
Rid(super::RidResourceMarkup),
#[prost(message, tag = "2")]
RidList(super::RidListResourceMarkup),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RidResourceMarkup {
#[prost(string, tag = "1")]
pub rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub label: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RidListResourceMarkup {
#[prost(string, repeated, tag = "1")]
pub rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub label: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ContextStatus {
#[prost(int32, tag = "1")]
pub curr_token_count: i32,
#[prost(int32, tag = "2")]
pub model_context_limit: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputeProvenanceV1 {
#[prost(string, tag = "1")]
pub compute_request_json: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "ComputeOutputType", tag = "4")]
pub output_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Citation {
#[prost(string, tag = "1")]
pub r#ref: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub retrieved_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(uint32, optional, tag = "5")]
pub number: ::core::option::Option<u32>,
#[prost(oneof = "citation::Payload", tags = "4, 6")]
pub payload: ::core::option::Option<citation::Payload>,
}
pub mod citation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Payload {
#[prost(message, tag = "4")]
Telemetry(super::TelemetryCitation),
#[prost(message, tag = "6")]
File(super::DriveFileCitation),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TelemetryCitation {
#[prost(oneof = "telemetry_citation::Version", tags = "1")]
pub version: ::core::option::Option<telemetry_citation::Version>,
}
pub mod telemetry_citation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Version {
#[prost(message, tag = "1")]
V1(super::ComputeProvenanceV1),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DriveFileCitation {
#[prost(string, tag = "1")]
pub file_revision_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub file_identity: ::core::option::Option<
super::super::file_store::v1::LogicalFileIdentity,
>,
#[prost(string, tag = "3")]
pub drive_rid: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub total_size_bytes: u64,
#[prost(oneof = "drive_file_citation::Kind", tags = "5, 6")]
pub kind: ::core::option::Option<drive_file_citation::Kind>,
}
pub mod drive_file_citation {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag = "5")]
Text(super::TextFileCitation),
#[prost(message, tag = "6")]
Pdf(super::PdfFileCitation),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TextFileCitation {
#[prost(message, optional, tag = "1")]
pub byte_range: ::core::option::Option<ByteRange>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PdfFileCitation {
#[prost(uint32, tag = "1")]
pub first_page: u32,
#[prost(uint32, tag = "2")]
pub page_count: u32,
#[prost(uint32, tag = "3")]
pub total_page_count: u32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ByteRange {
#[prost(uint64, tag = "1")]
pub offset: u64,
#[prost(uint64, tag = "2")]
pub length: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetCitationsRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub refs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetCitationsResponse {
#[prost(message, repeated, tag = "1")]
pub citations: ::prost::alloc::vec::Vec<Citation>,
#[prost(message, repeated, tag = "2")]
pub errors: ::prost::alloc::vec::Vec<GetCitationResponseError>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCitationResponseError {
#[prost(string, tag = "1")]
pub r#ref: ::prost::alloc::string::String,
#[prost(enumeration = "get_citation_response_error::Reason", tag = "2")]
pub reason: i32,
}
pub mod get_citation_response_error {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Reason {
Unspecified = 0,
NotFound = 1,
}
impl Reason {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "REASON_UNSPECIFIED",
Self::NotFound => "REASON_NOT_FOUND",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REASON_UNSPECIFIED" => Some(Self::Unspecified),
"REASON_NOT_FOUND" => Some(Self::NotFound),
_ => None,
}
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum QueuedMessageState {
Unspecified = 0,
Queued = 1,
Dispatching = 2,
Failed = 3,
}
impl QueuedMessageState {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "QUEUED_MESSAGE_STATE_UNSPECIFIED",
Self::Queued => "QUEUED_MESSAGE_STATE_QUEUED",
Self::Dispatching => "QUEUED_MESSAGE_STATE_DISPATCHING",
Self::Failed => "QUEUED_MESSAGE_STATE_FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"QUEUED_MESSAGE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"QUEUED_MESSAGE_STATE_QUEUED" => Some(Self::Queued),
"QUEUED_MESSAGE_STATE_DISPATCHING" => Some(Self::Dispatching),
"QUEUED_MESSAGE_STATE_FAILED" => Some(Self::Failed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FeedbackVote {
Unspecified = 0,
ThumbsUp = 1,
ThumbsDown = 2,
}
impl FeedbackVote {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
"FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
"FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AgentRunExecutionMode {
Unspecified = 0,
Inline = 1,
Durable = 2,
}
impl AgentRunExecutionMode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "AGENT_RUN_EXECUTION_MODE_UNSPECIFIED",
Self::Inline => "AGENT_RUN_EXECUTION_MODE_INLINE",
Self::Durable => "AGENT_RUN_EXECUTION_MODE_DURABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AGENT_RUN_EXECUTION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"AGENT_RUN_EXECUTION_MODE_INLINE" => Some(Self::Inline),
"AGENT_RUN_EXECUTION_MODE_DURABLE" => Some(Self::Durable),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ToolCallStatus {
Unspecified = 0,
Approved = 1,
Denied = 2,
AwaitingApproval = 3,
}
impl ToolCallStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
Self::Approved => "TOOL_CALL_STATUS_APPROVED",
Self::Denied => "TOOL_CALL_STATUS_DENIED",
Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
"TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
"TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UserQuestionState {
Unspecified = 0,
Pending = 1,
Answered = 2,
Declined = 3,
}
impl UserQuestionState {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "USER_QUESTION_STATE_UNSPECIFIED",
Self::Pending => "USER_QUESTION_STATE_PENDING",
Self::Answered => "USER_QUESTION_STATE_ANSWERED",
Self::Declined => "USER_QUESTION_STATE_DECLINED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"USER_QUESTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"USER_QUESTION_STATE_PENDING" => Some(Self::Pending),
"USER_QUESTION_STATE_ANSWERED" => Some(Self::Answered),
"USER_QUESTION_STATE_DECLINED" => Some(Self::Declined),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ResourceChangeType {
Unspecified = 0,
Created = 1,
Updated = 2,
Archived = 3,
}
impl ResourceChangeType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "RESOURCE_CHANGE_TYPE_UNSPECIFIED",
Self::Created => "RESOURCE_CHANGE_TYPE_CREATED",
Self::Updated => "RESOURCE_CHANGE_TYPE_UPDATED",
Self::Archived => "RESOURCE_CHANGE_TYPE_ARCHIVED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESOURCE_CHANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"RESOURCE_CHANGE_TYPE_CREATED" => Some(Self::Created),
"RESOURCE_CHANGE_TYPE_UPDATED" => Some(Self::Updated),
"RESOURCE_CHANGE_TYPE_ARCHIVED" => Some(Self::Archived),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TimeRangeType {
Unspecified = 0,
Absolute = 1,
Relative = 2,
}
impl TimeRangeType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TIME_RANGE_TYPE_UNSPECIFIED",
Self::Absolute => "TIME_RANGE_TYPE_ABSOLUTE",
Self::Relative => "TIME_RANGE_TYPE_RELATIVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
"TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ComputeOutputType {
Unspecified = 0,
RangeSeries = 1,
NumericSeries = 2,
NumericArraySeries = 3,
EnumSeries = 4,
EnumArraySeries = 5,
LogSeries = 6,
StructSeries = 7,
VideoSeries = 8,
UntypedSeries = 9,
GroupedSeries = 10,
LastPoint = 11,
LastRange = 12,
CartesianPoints = 13,
Cartesian3dPoints = 14,
Multivariate = 15,
NumericHistogram = 16,
FrequencyDomain = 17,
FrequencyDomainV2 = 18,
BucketedFrequencyDomain = 19,
NumericRangeAggregate = 20,
CurveFit = 21,
CurveV2 = 22,
}
impl ComputeOutputType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "COMPUTE_OUTPUT_TYPE_UNSPECIFIED",
Self::RangeSeries => "COMPUTE_OUTPUT_TYPE_RANGE_SERIES",
Self::NumericSeries => "COMPUTE_OUTPUT_TYPE_NUMERIC_SERIES",
Self::NumericArraySeries => "COMPUTE_OUTPUT_TYPE_NUMERIC_ARRAY_SERIES",
Self::EnumSeries => "COMPUTE_OUTPUT_TYPE_ENUM_SERIES",
Self::EnumArraySeries => "COMPUTE_OUTPUT_TYPE_ENUM_ARRAY_SERIES",
Self::LogSeries => "COMPUTE_OUTPUT_TYPE_LOG_SERIES",
Self::StructSeries => "COMPUTE_OUTPUT_TYPE_STRUCT_SERIES",
Self::VideoSeries => "COMPUTE_OUTPUT_TYPE_VIDEO_SERIES",
Self::UntypedSeries => "COMPUTE_OUTPUT_TYPE_UNTYPED_SERIES",
Self::GroupedSeries => "COMPUTE_OUTPUT_TYPE_GROUPED_SERIES",
Self::LastPoint => "COMPUTE_OUTPUT_TYPE_LAST_POINT",
Self::LastRange => "COMPUTE_OUTPUT_TYPE_LAST_RANGE",
Self::CartesianPoints => "COMPUTE_OUTPUT_TYPE_CARTESIAN_POINTS",
Self::Cartesian3dPoints => "COMPUTE_OUTPUT_TYPE_CARTESIAN_3D_POINTS",
Self::Multivariate => "COMPUTE_OUTPUT_TYPE_MULTIVARIATE",
Self::NumericHistogram => "COMPUTE_OUTPUT_TYPE_NUMERIC_HISTOGRAM",
Self::FrequencyDomain => "COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN",
Self::FrequencyDomainV2 => "COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN_V2",
Self::BucketedFrequencyDomain => {
"COMPUTE_OUTPUT_TYPE_BUCKETED_FREQUENCY_DOMAIN"
}
Self::NumericRangeAggregate => "COMPUTE_OUTPUT_TYPE_NUMERIC_RANGE_AGGREGATE",
Self::CurveFit => "COMPUTE_OUTPUT_TYPE_CURVE_FIT",
Self::CurveV2 => "COMPUTE_OUTPUT_TYPE_CURVE_V2",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COMPUTE_OUTPUT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"COMPUTE_OUTPUT_TYPE_RANGE_SERIES" => Some(Self::RangeSeries),
"COMPUTE_OUTPUT_TYPE_NUMERIC_SERIES" => Some(Self::NumericSeries),
"COMPUTE_OUTPUT_TYPE_NUMERIC_ARRAY_SERIES" => Some(Self::NumericArraySeries),
"COMPUTE_OUTPUT_TYPE_ENUM_SERIES" => Some(Self::EnumSeries),
"COMPUTE_OUTPUT_TYPE_ENUM_ARRAY_SERIES" => Some(Self::EnumArraySeries),
"COMPUTE_OUTPUT_TYPE_LOG_SERIES" => Some(Self::LogSeries),
"COMPUTE_OUTPUT_TYPE_STRUCT_SERIES" => Some(Self::StructSeries),
"COMPUTE_OUTPUT_TYPE_VIDEO_SERIES" => Some(Self::VideoSeries),
"COMPUTE_OUTPUT_TYPE_UNTYPED_SERIES" => Some(Self::UntypedSeries),
"COMPUTE_OUTPUT_TYPE_GROUPED_SERIES" => Some(Self::GroupedSeries),
"COMPUTE_OUTPUT_TYPE_LAST_POINT" => Some(Self::LastPoint),
"COMPUTE_OUTPUT_TYPE_LAST_RANGE" => Some(Self::LastRange),
"COMPUTE_OUTPUT_TYPE_CARTESIAN_POINTS" => Some(Self::CartesianPoints),
"COMPUTE_OUTPUT_TYPE_CARTESIAN_3D_POINTS" => Some(Self::Cartesian3dPoints),
"COMPUTE_OUTPUT_TYPE_MULTIVARIATE" => Some(Self::Multivariate),
"COMPUTE_OUTPUT_TYPE_NUMERIC_HISTOGRAM" => Some(Self::NumericHistogram),
"COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN" => Some(Self::FrequencyDomain),
"COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN_V2" => Some(Self::FrequencyDomainV2),
"COMPUTE_OUTPUT_TYPE_BUCKETED_FREQUENCY_DOMAIN" => {
Some(Self::BucketedFrequencyDomain)
}
"COMPUTE_OUTPUT_TYPE_NUMERIC_RANGE_AGGREGATE" => {
Some(Self::NumericRangeAggregate)
}
"COMPUTE_OUTPUT_TYPE_CURVE_FIT" => Some(Self::CurveFit),
"COMPUTE_OUTPUT_TYPE_CURVE_V2" => Some(Self::CurveV2),
_ => None,
}
}
}
pub mod ai_agent_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct AiAgentServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl AiAgentServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> AiAgentServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AiAgentServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn list_models(
&mut self,
request: impl tonic::IntoRequest<super::ListModelsRequest>,
) -> std::result::Result<
tonic::Response<super::ListModelsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/ListModels",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListModels"));
self.inner.unary(req, path, codec).await
}
pub async fn stream_chat(
&mut self,
request: impl tonic::IntoRequest<super::StreamChatRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/StreamChat",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
self.inner.server_streaming(req, path, codec).await
}
#[deprecated]
pub async fn get_conversation(
&mut self,
request: impl tonic::IntoRequest<super::GetConversationRequest>,
) -> std::result::Result<
tonic::Response<super::GetConversationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/GetConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_conversation_metadata(
&mut self,
request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
) -> std::result::Result<
tonic::Response<super::GetConversationMetadataResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/GetConversationMetadata",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"GetConversationMetadata",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_conversation_messages(
&mut self,
request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
) -> std::result::Result<
tonic::Response<super::GetConversationMessagesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/GetConversationMessages",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"GetConversationMessages",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_conversations(
&mut self,
request: impl tonic::IntoRequest<super::ListConversationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListConversationsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/ListConversations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_get_conversation_active_runs(
&mut self,
request: impl tonic::IntoRequest<
super::BatchGetConversationActiveRunsRequest,
>,
) -> std::result::Result<
tonic::Response<super::BatchGetConversationActiveRunsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/BatchGetConversationActiveRuns",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"BatchGetConversationActiveRuns",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_conversation(
&mut self,
request: impl tonic::IntoRequest<super::CreateConversationRequest>,
) -> std::result::Result<
tonic::Response<super::CreateConversationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/CreateConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_conversation_metadata(
&mut self,
request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateConversationMetadataResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"UpdateConversationMetadata",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_conversation(
&mut self,
request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteConversationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/DeleteConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
);
self.inner.unary(req, path, codec).await
}
pub async fn archive_conversation(
&mut self,
request: impl tonic::IntoRequest<super::ArchiveConversationRequest>,
) -> std::result::Result<
tonic::Response<super::ArchiveConversationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/ArchiveConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"ArchiveConversation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn unarchive_conversation(
&mut self,
request: impl tonic::IntoRequest<super::UnarchiveConversationRequest>,
) -> std::result::Result<
tonic::Response<super::UnarchiveConversationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/UnarchiveConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"UnarchiveConversation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_snapshot_rid_by_user_message_id(
&mut self,
request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
) -> std::result::Result<
tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"GetSnapshotRidByUserMessageId",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn compact_conversation(
&mut self,
request: impl tonic::IntoRequest<super::CompactConversationRequest>,
) -> std::result::Result<
tonic::Response<super::CompactConversationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/CompactConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"CompactConversation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn submit_message_feedback(
&mut self,
request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
) -> std::result::Result<
tonic::Response<super::SubmitMessageFeedbackResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"SubmitMessageFeedback",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_conversation_resources(
&mut self,
request: impl tonic::IntoRequest<super::UpdateConversationResourcesRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateConversationResourcesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/UpdateConversationResources",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"UpdateConversationResources",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_queued_message(
&mut self,
request: impl tonic::IntoRequest<super::CreateQueuedMessageRequest>,
) -> std::result::Result<
tonic::Response<super::CreateQueuedMessageResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/CreateQueuedMessage",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"CreateQueuedMessage",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_queued_messages(
&mut self,
request: impl tonic::IntoRequest<super::ListQueuedMessagesRequest>,
) -> std::result::Result<
tonic::Response<super::ListQueuedMessagesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/ListQueuedMessages",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListQueuedMessages"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_queued_message(
&mut self,
request: impl tonic::IntoRequest<super::DeleteQueuedMessageRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteQueuedMessageResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/DeleteQueuedMessage",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"DeleteQueuedMessage",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn cancel_agent_run(
&mut self,
request: impl tonic::IntoRequest<super::CancelAgentRunRequest>,
) -> std::result::Result<
tonic::Response<super::CancelAgentRunResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/CancelAgentRun",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "CancelAgentRun"),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_get_citations(
&mut self,
request: impl tonic::IntoRequest<super::BatchGetCitationsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchGetCitationsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/BatchGetCitations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "BatchGetCitations"),
);
self.inner.unary(req, path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClassifyErrorRequest {
#[prost(string, tag = "1")]
pub error_message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClassifyErrorResponse {
#[prost(enumeration = "ErrorClassification", tag = "1")]
pub classification: i32,
#[prost(string, tag = "2")]
pub reason: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ErrorClassification {
Unspecified = 0,
Client = 1,
Server = 2,
}
impl ErrorClassification {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
Self::Client => "ERROR_CLASSIFICATION_CLIENT",
Self::Server => "ERROR_CLASSIFICATION_SERVER",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
"ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
"ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
_ => None,
}
}
}
pub mod data_ingestion_error_classifier_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct DataIngestionErrorClassifierServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> DataIngestionErrorClassifierServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
DataIngestionErrorClassifierServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn classify_error(
&mut self,
request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
) -> std::result::Result<
tonic::Response<super::ClassifyErrorResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.DataIngestionErrorClassifierService",
"ClassifyError",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetProviderStatusRequest {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetProviderStatusResponse {
#[prost(message, optional, tag = "1")]
pub timestamp: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "2")]
pub last_status: ::core::option::Option<ProviderStatus>,
#[deprecated]
#[prost(message, optional, tag = "3")]
pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
#[prost(message, optional, tag = "4")]
pub aggregated_status: ::core::option::Option<ProviderStatus>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProviderStatus {
#[prost(oneof = "provider_status::Status", tags = "1, 2")]
pub status: ::core::option::Option<provider_status::Status>,
}
pub mod provider_status {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Status {
#[prost(message, tag = "1")]
Healthy(super::Healthy),
#[prost(message, tag = "2")]
Degraded(super::Degraded),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Healthy {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Degraded {
#[prost(enumeration = "DegradationReason", tag = "1")]
pub reason: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProviderMetrics {
#[prost(int32, tag = "1")]
pub time_to_first_token_ms: i32,
#[prost(int32, tag = "2")]
pub total_time_ms: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DegradationReason {
Unspecified = 0,
HighLatency = 1,
Failures = 2,
HighLatencyAndFailures = 3,
Unavailable = 4,
}
impl DegradationReason {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
Self::Failures => "DEGRADATION_REASON_FAILURES",
Self::HighLatencyAndFailures => {
"DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
}
Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
"DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
"DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
Some(Self::HighLatencyAndFailures)
}
"DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
_ => None,
}
}
}
pub mod model_provider_health_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ModelProviderHealthServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ModelProviderHealthServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
ModelProviderHealthServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get_provider_status(
&mut self,
request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
) -> std::result::Result<
tonic::Response<super::GetProviderStatusResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.ModelProviderHealthService",
"GetProviderStatus",
),
);
self.inner.unary(req, path, codec).await
}
}
}