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 skill registered in Unity Catalog.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentSkill {
    /// Name of the agent skill, relative to parent schema.
    ///
    /// Per the Agent Skills spec a skill name is lowercase letters, numbers, and
    /// hyphens, but Unity Catalog object names disallow hyphens, so UC stores the
    /// catalog object name with underscores; the spec-shaped name lives in the
    /// skill's own SKILL.md.
    #[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 skill.
    #[prost(string, tag="4")]
    pub full_name: ::prost::alloc::string::String,
    /// The storage location of the skill's directory (the root that holds
    /// `SKILL.md`).
    #[prost(string, tag="5")]
    pub storage_location: ::prost::alloc::string::String,
    /// The unique identifier of the agent skill.
    #[prost(string, tag="6")]
    pub agent_skill_id: ::prost::alloc::string::String,
    /// How the storage location is provisioned (external or managed).
    #[prost(enumeration="AgentSkillType", tag="7")]
    pub agent_skill_type: i32,
    /// A human-readable description of what the skill does and when to use it.
    ///
    /// Mirrors the Agent Skills spec `description` frontmatter field.
    #[prost(string, optional, tag="8")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    /// SPDX license identifier or free-form license text for the skill.
    #[prost(string, optional, tag="9")]
    pub license: ::core::option::Option<::prost::alloc::string::String>,
    /// The tools the skill is permitted to use, as declared in its SKILL.md.
    #[prost(string, repeated, tag="10")]
    pub allowed_tools: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Arbitrary additional metadata declared by the skill.
    #[prost(map="string, string", tag="11")]
    pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Username of current owner of the agent skill.
    #[prost(string, optional, tag="12")]
    pub owner: ::core::option::Option<::prost::alloc::string::String>,
    /// User-provided free-form text description.
    #[prost(string, optional, tag="13")]
    pub comment: ::core::option::Option<::prost::alloc::string::String>,
    /// Time at which this agent skill was created, in epoch milliseconds.
    #[prost(int64, optional, tag="1000")]
    pub created_at: ::core::option::Option<i64>,
    /// Username of agent skill creator.
    #[prost(string, optional, tag="1001")]
    pub created_by: ::core::option::Option<::prost::alloc::string::String>,
    /// Time at which this agent skill 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 skill.
    #[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>,
}
/// How an agent skill's storage location is provisioned.
#[cfg_attr(feature = "python", ::pyo3::pyclass)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AgentSkillType {
    Unspecified = 0,
    /// The skill directory lives at a caller-supplied location within a
    /// registered external location.
    External = 1,
    /// The skill directory lives at a server-derived location under the parent
    /// schema/catalog managed storage root.
    Managed = 2,
}
impl AgentSkillType {
    /// 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 => "AGENT_SKILL_TYPE_UNSPECIFIED",
            Self::External => "EXTERNAL",
            Self::Managed => "MANAGED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AGENT_SKILL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "EXTERNAL" => Some(Self::External),
            "MANAGED" => Some(Self::Managed),
            _ => None,
        }
    }
}
/// List agent skills.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListAgentSkillsRequest {
    /// 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 agent skills 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 agent skills response.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAgentSkillsResponse {
    /// The agent skills returned.
    #[prost(message, repeated, tag="1")]
    pub agent_skills: ::prost::alloc::vec::Vec<AgentSkill>,
    /// 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 skill.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAgentSkillRequest {
    /// 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 skill.
    #[prost(string, tag="3")]
    pub name: ::prost::alloc::string::String,
    /// How the storage location is provisioned (external or managed).
    #[prost(enumeration="AgentSkillType", tag="4")]
    pub agent_skill_type: i32,
    /// The storage location of the skill directory on the cloud.
    ///
    /// Required for EXTERNAL skills; ignored (server-derived) for MANAGED skills.
    #[prost(string, optional, tag="5")]
    pub storage_location: ::core::option::Option<::prost::alloc::string::String>,
    /// A human-readable description of what the skill does and when to use it.
    #[prost(string, optional, tag="6")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    /// SPDX license identifier or free-form license text for the skill.
    #[prost(string, optional, tag="7")]
    pub license: ::core::option::Option<::prost::alloc::string::String>,
    /// The tools the skill is permitted to use.
    #[prost(string, repeated, tag="8")]
    pub allowed_tools: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Arbitrary additional metadata declared by the skill.
    #[prost(map="string, string", tag="9")]
    pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// User-provided free-form text description.
    #[prost(string, optional, tag="10")]
    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 GetAgentSkillRequest {
    /// The three-level (fully qualified) name of the agent skill.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// Whether to include agent skills 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 UpdateAgentSkillRequest {
    /// The three-level (fully qualified) name of the agent skill.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// New name for the agent skill.
    #[prost(string, optional, tag="2")]
    pub new_name: ::core::option::Option<::prost::alloc::string::String>,
    /// Updated description of what the skill does and when to use it.
    #[prost(string, optional, tag="3")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    /// Updated tools the skill is permitted to use.
    #[prost(string, repeated, tag="4")]
    pub allowed_tools: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The comment attached to the agent skill.
    #[prost(string, optional, tag="5")]
    pub comment: ::core::option::Option<::prost::alloc::string::String>,
    /// The identifier of the user who owns the agent skill.
    #[prost(string, optional, tag="6")]
    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 DeleteAgentSkillRequest {
    /// The three-level (fully qualified) name of the agent skill.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
}
include!("unitycatalog.agent_skills.v0alpha1.serde.rs");
// @@protoc_insertion_point(module)