Skip to main content

unitycatalog_server/codegen/agent_skills/
handler.rs

1// @generated — do not edit by hand.
2//! Handler trait for [`AgentSkillHandler`].
3//!
4//! Implement this trait to provide a custom backend for this service, then mount the
5//! generated handler functions (in the sibling `server` module) onto an `axum::Router`
6//! with your implementation as state.
7//!
8//! # Composability
9//!
10//! A single struct can implement multiple handler traits to serve multiple
11//! services. Use [`axum::Router::merge`] to compose per-service routers together.
12//!
13//! Service for managing agent skills in Unity Catalog.
14//!
15//! Agent skills are storage-backed directories (SKILL.md + optional resources)
16//! within a schema. This is an early-stage (v0alpha1) surface aligned with the
17//! Open Sharing agent-skill community proposal.
18use crate::Result;
19use async_trait::async_trait;
20use unitycatalog_common::models::agent_skills::v0alpha1::*;
21#[async_trait]
22pub trait AgentSkillHandler<Cx = crate::api::RequestContext>: Send + Sync + 'static {
23    /// Lists agent skills.
24    async fn list_agent_skills(
25        &self,
26        request: ListAgentSkillsRequest,
27        context: Cx,
28    ) -> Result<ListAgentSkillsResponse>;
29    async fn create_agent_skill(
30        &self,
31        request: CreateAgentSkillRequest,
32        context: Cx,
33    ) -> Result<AgentSkill>;
34    async fn get_agent_skill(
35        &self,
36        request: GetAgentSkillRequest,
37        context: Cx,
38    ) -> Result<AgentSkill>;
39    async fn update_agent_skill(
40        &self,
41        request: UpdateAgentSkillRequest,
42        context: Cx,
43    ) -> Result<AgentSkill>;
44    async fn delete_agent_skill(&self, request: DeleteAgentSkillRequest, context: Cx)
45    -> Result<()>;
46}