olai-uc-common 0.0.2

Shared types, generated Unity Catalog models, and storage/REST abstractions for the Unity Catalog server and client crates.
Documentation
// @generated
// This file is @generated by prost-build.
/// An agent registered in Unity Catalog.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Agent {
    /// Name of the agent, relative to parent schema.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// Name of parent catalog.
    #[prost(string, tag="2")]
    pub catalog_name: ::prost::alloc::string::String,
    /// Name of parent schema.
    #[prost(string, tag="3")]
    pub schema_name: ::prost::alloc::string::String,
    /// The three-level (fully qualified) name of the agent.
    #[prost(string, tag="4")]
    pub full_name: ::prost::alloc::string::String,
    /// The unique identifier of the agent.
    #[prost(string, tag="5")]
    pub agent_id: ::prost::alloc::string::String,
    /// The protocol a recipient uses to invoke the agent.
    #[prost(enumeration="InvocationProtocol", tag="6")]
    pub invocation_protocol: i32,
    /// The agent's invocation endpoint URL.
    #[prost(string, tag="7")]
    pub endpoint: ::prost::alloc::string::String,
    /// An LLM-readable description of what the agent does and the inputs it
    /// expects.
    #[prost(string, optional, tag="8")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    /// Capability identifiers advertised by the agent (e.g. `sql_query`,
    /// `document_search`, `code_execution`).
    #[prost(string, repeated, tag="9")]
    pub capabilities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// A JSON Schema (encoded as a JSON string) describing the agent's expected
    /// input payload. Kept as an opaque string so the schema can evolve without
    /// changing this message.
    #[prost(string, optional, tag="10")]
    pub input_schema: ::core::option::Option<::prost::alloc::string::String>,
    /// Username of current owner of the agent.
    #[prost(string, optional, tag="11")]
    pub owner: ::core::option::Option<::prost::alloc::string::String>,
    /// User-provided free-form text description.
    #[prost(string, optional, tag="12")]
    pub comment: ::core::option::Option<::prost::alloc::string::String>,
    /// Time at which this agent was created, in epoch milliseconds.
    #[prost(int64, optional, tag="1000")]
    pub created_at: ::core::option::Option<i64>,
    /// Username of agent creator.
    #[prost(string, optional, tag="1001")]
    pub created_by: ::core::option::Option<::prost::alloc::string::String>,
    /// Time at which this agent was last updated, in epoch milliseconds.
    #[prost(int64, optional, tag="1002")]
    pub updated_at: ::core::option::Option<i64>,
    /// Username of user who last modified the agent.
    #[prost(string, optional, tag="1003")]
    pub updated_by: ::core::option::Option<::prost::alloc::string::String>,
    /// The unique identifier of the metastore.
    #[prost(string, optional, tag="1004")]
    pub metastore_id: ::core::option::Option<::prost::alloc::string::String>,
}
/// The protocol a recipient uses to invoke an agent.
#[cfg_attr(feature = "python", ::pyo3::pyclass)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InvocationProtocol {
    Unspecified = 0,
    /// Model Context Protocol server.
    Mcp = 1,
    /// Agent-to-Agent protocol (Google A2A spec).
    A2a = 2,
    /// OpenAI-compatible chat completions endpoint.
    Openai = 3,
    /// Anthropic-compatible messages endpoint.
    Anthropic = 4,
    /// Minimal REST baseline (`POST {endpoint}/invoke`).
    Rest = 5,
}
impl InvocationProtocol {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "INVOCATION_PROTOCOL_UNSPECIFIED",
            Self::Mcp => "MCP",
            Self::A2a => "A2A",
            Self::Openai => "OPENAI",
            Self::Anthropic => "ANTHROPIC",
            Self::Rest => "REST",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "INVOCATION_PROTOCOL_UNSPECIFIED" => Some(Self::Unspecified),
            "MCP" => Some(Self::Mcp),
            "A2A" => Some(Self::A2a),
            "OPENAI" => Some(Self::Openai),
            "ANTHROPIC" => Some(Self::Anthropic),
            "REST" => Some(Self::Rest),
            _ => None,
        }
    }
}
/// List agents.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListAgentsRequest {
    /// The identifier of the catalog.
    #[prost(string, tag="1")]
    pub catalog_name: ::prost::alloc::string::String,
    /// The identifier of the schema.
    #[prost(string, tag="2")]
    pub schema_name: ::prost::alloc::string::String,
    /// The maximum number of results per page that should be returned.
    #[prost(int32, optional, tag="3")]
    pub max_results: ::core::option::Option<i32>,
    /// Opaque pagination token to go to next page based on previous query.
    #[prost(string, optional, tag="4")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// Whether to include agents in the response for which the principal can only
    /// access selective metadata for.
    #[prost(bool, optional, tag="5")]
    pub include_browse: ::core::option::Option<bool>,
}
/// List agents response.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAgentsResponse {
    /// The agents returned.
    #[prost(message, repeated, tag="1")]
    pub agents: ::prost::alloc::vec::Vec<Agent>,
    /// Opaque token to retrieve the next page of results.
    ///
    /// Absent if there are no more pages. page_token should be set to
    /// this value for the next request to retrieve the next page of results.
    #[prost(string, optional, tag="2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
/// Create a new agent.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateAgentRequest {
    /// The identifier of the catalog.
    #[prost(string, tag="1")]
    pub catalog_name: ::prost::alloc::string::String,
    /// The identifier of the schema.
    #[prost(string, tag="2")]
    pub schema_name: ::prost::alloc::string::String,
    /// The identifier of the agent.
    #[prost(string, tag="3")]
    pub name: ::prost::alloc::string::String,
    /// The protocol a recipient uses to invoke the agent.
    #[prost(enumeration="InvocationProtocol", tag="4")]
    pub invocation_protocol: i32,
    /// The agent's invocation endpoint URL.
    #[prost(string, tag="5")]
    pub endpoint: ::prost::alloc::string::String,
    /// An LLM-readable description of what the agent does and the inputs it expects.
    #[prost(string, optional, tag="6")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    /// Capability identifiers advertised by the agent.
    #[prost(string, repeated, tag="7")]
    pub capabilities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// A JSON Schema (encoded as a JSON string) describing the expected input.
    #[prost(string, optional, tag="8")]
    pub input_schema: ::core::option::Option<::prost::alloc::string::String>,
    /// User-provided free-form text description.
    #[prost(string, optional, tag="9")]
    pub comment: ::core::option::Option<::prost::alloc::string::String>,
}
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAgentRequest {
    /// The three-level (fully qualified) name of the agent.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// Whether to include agents in the response for which the principal can only
    /// access selective metadata for.
    #[prost(bool, optional, tag="1005")]
    pub include_browse: ::core::option::Option<bool>,
}
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateAgentRequest {
    /// The three-level (fully qualified) name of the agent.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// New name for the agent.
    #[prost(string, optional, tag="2")]
    pub new_name: ::core::option::Option<::prost::alloc::string::String>,
    /// The protocol a recipient uses to invoke the agent.
    #[prost(enumeration="InvocationProtocol", optional, tag="3")]
    pub invocation_protocol: ::core::option::Option<i32>,
    /// The agent's invocation endpoint URL.
    #[prost(string, optional, tag="4")]
    pub endpoint: ::core::option::Option<::prost::alloc::string::String>,
    /// Updated LLM-readable description.
    #[prost(string, optional, tag="5")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    /// Updated capability identifiers advertised by the agent.
    #[prost(string, repeated, tag="6")]
    pub capabilities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Updated JSON Schema (encoded as a JSON string) describing the expected input.
    #[prost(string, optional, tag="7")]
    pub input_schema: ::core::option::Option<::prost::alloc::string::String>,
    /// The comment attached to the agent.
    #[prost(string, optional, tag="8")]
    pub comment: ::core::option::Option<::prost::alloc::string::String>,
    /// The identifier of the user who owns the agent.
    #[prost(string, optional, tag="9")]
    pub owner: ::core::option::Option<::prost::alloc::string::String>,
}
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteAgentRequest {
    /// The three-level (fully qualified) name of the agent.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
}
include!("unitycatalog.agents.v0alpha1.serde.rs");
// @@protoc_insertion_point(module)