objectiveai-cli 2.0.5

ObjectiveAI command-line interface and embeddable library
// THIS FILE IS AUTO-GENERATED. DO NOT EDIT.
// Generated by objectiveai-cli-builder from objectiveai-json-schema/.

use clap::Subcommand;

#[derive(Subcommand)]
#[command(rename_all = "verbatim")]
pub enum GetCommand {
    #[command(name = "get")]
    Get,
}

#[derive(Subcommand)]
#[command(rename_all = "verbatim")]
pub enum Commands {
    #[command(name = "list")]
    List,
    AudioContent {
        #[command(subcommand)]
        command: GetCommand,
    },
    CallToolRequestParams {
        #[command(subcommand)]
        command: GetCommand,
    },
    CallToolResult {
        #[command(subcommand)]
        command: GetCommand,
    },
    ContentBlock {
        #[command(subcommand)]
        command: GetCommand,
    },
    EmbeddedResource {
        #[command(subcommand)]
        command: GetCommand,
    },
    ImageContent {
        #[command(subcommand)]
        command: GetCommand,
    },
    ListToolsRequest {
        #[command(subcommand)]
        command: GetCommand,
    },
    ListToolsResult {
        #[command(subcommand)]
        command: GetCommand,
    },
    ResourceLink {
        #[command(subcommand)]
        command: GetCommand,
    },
    TaskMetadata {
        #[command(subcommand)]
        command: GetCommand,
    },
    TaskSupport {
        #[command(subcommand)]
        command: GetCommand,
    },
    TextContent {
        #[command(subcommand)]
        command: GetCommand,
    },
    Tool {
        #[command(subcommand)]
        command: GetCommand,
    },
    ToolAnnotations {
        #[command(subcommand)]
        command: GetCommand,
    },
    ToolExecution {
        #[command(subcommand)]
        command: GetCommand,
    },
    ToolResultContent {
        #[command(subcommand)]
        command: GetCommand,
    },
    ToolSchemaObject {
        #[command(subcommand)]
        command: GetCommand,
    },
    ToolSchemaType {
        #[command(subcommand)]
        command: GetCommand,
    },
    ToolUseContent {
        #[command(subcommand)]
        command: GetCommand,
    },
}

impl Commands {
    pub async fn handle(self, handle: &objectiveai_cli_sdk::output::Handle) -> Result<(), crate::error::Error> {
        match self {
            Commands::List => {
                const NAMES: &[&str] = &["AudioContent", "CallToolRequestParams", "CallToolResult", "ContentBlock", "EmbeddedResource", "ImageContent", "ListToolsRequest", "ListToolsResult", "ResourceLink", "TaskMetadata", "TaskSupport", "TextContent", "Tool", "ToolAnnotations", "ToolExecution", "ToolResultContent", "ToolSchemaObject", "ToolSchemaType", "ToolUseContent"];
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schemas>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schemas {
                            schemas: NAMES.iter().map(|s| s.to_string()).collect(),
                        },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::AudioContent { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.AudioContent.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::CallToolRequestParams { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.CallToolRequestParams.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::CallToolResult { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.CallToolResult.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ContentBlock { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ContentBlock.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::EmbeddedResource { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.EmbeddedResource.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ImageContent { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ImageContent.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ListToolsRequest { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ListToolsRequest.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ListToolsResult { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ListToolsResult.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ResourceLink { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ResourceLink.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::TaskMetadata { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.TaskMetadata.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::TaskSupport { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.TaskSupport.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::TextContent { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.TextContent.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::Tool { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.Tool.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ToolAnnotations { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ToolAnnotations.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ToolExecution { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ToolExecution.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ToolResultContent { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ToolResultContent.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ToolSchemaObject { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ToolSchemaObject.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ToolSchemaType { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ToolSchemaType.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
            Commands::ToolUseContent { .. } => {
                let schema: serde_json::Value = serde_json::from_str(
                    include_str!("../../../../../objectiveai-json-schema/mcp.tool.ToolUseContent.json"),
                ).expect("embedded JSON Schema must parse");
                objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
                    objectiveai_cli_sdk::output::Notification {
                        value: objectiveai_cli_sdk::output::Schema { schema },
                    },
                ).emit(handle).await;
                Ok(())
            }
        }
    }
}