pub mod config;
pub mod address;
pub mod port;
pub mod claude_agent_sdk;
pub mod codex_sdk;
pub mod objectiveai_authorization;
pub mod openrouter_authorization;
pub mod github_authorization;
pub mod mcp_authorization;
pub mod user_agent;
pub mod http_referer;
pub mod x_title;
pub mod commit_author_name;
pub mod commit_author_email;
pub mod spawn;
pub mod kill;
mod run;
pub mod detach;
pub mod conduit;
pub mod agent_id_arg;
pub mod body;
pub mod client;
pub mod call;
pub mod agent;
pub mod vector;
pub mod functions;
pub mod auth;
pub mod swarms;
pub mod agents;
pub mod error;
pub mod laboratories;
pub use run::*;
use clap::Subcommand;
#[derive(Subcommand)]
pub enum Commands {
Config {
#[command(subcommand)]
command: config::Commands,
},
Address {
#[command(subcommand)]
command: address::Commands,
},
Port {
#[command(subcommand)]
command: port::Commands,
},
ClaudeAgentSdk {
#[command(subcommand)]
command: claude_agent_sdk::Commands,
},
CodexSdk {
#[command(subcommand)]
command: codex_sdk::Commands,
},
ObjectiveaiAuthorization {
#[command(subcommand)]
command: objectiveai_authorization::Commands,
},
OpenrouterAuthorization {
#[command(subcommand)]
command: openrouter_authorization::Commands,
},
GithubAuthorization {
#[command(subcommand)]
command: github_authorization::Commands,
},
McpAuthorization {
#[command(subcommand)]
command: mcp_authorization::Commands,
},
UserAgent {
#[command(subcommand)]
command: user_agent::Commands,
},
HttpReferer {
#[command(subcommand)]
command: http_referer::Commands,
},
XTitle {
#[command(subcommand)]
command: x_title::Commands,
},
CommitAuthorName {
#[command(subcommand)]
command: commit_author_name::Commands,
},
CommitAuthorEmail {
#[command(subcommand)]
command: commit_author_email::Commands,
},
Agent {
#[command(subcommand)]
command: agent::Commands,
},
Vector {
#[command(subcommand)]
command: vector::Commands,
},
Functions {
#[command(subcommand)]
command: functions::Commands,
},
Auth {
#[command(subcommand)]
command: auth::Commands,
},
Swarms {
#[command(subcommand)]
command: swarms::Commands,
},
Agents {
#[command(subcommand)]
command: agents::Commands,
},
Error {
#[command(subcommand)]
command: error::Commands,
},
Laboratories {
#[command(subcommand)]
command: laboratories::Commands,
},
Spawn,
Kill,
}
impl Commands {
pub async fn handle(self, cli_config: &crate::Config, handle: &objectiveai_sdk::cli::output::Handle) -> Result<(), crate::error::Error> {
match self {
Commands::Config { command } => command.handle(cli_config, handle).await,
Commands::Address { command } => command.handle(cli_config, handle).await,
Commands::Port { command } => command.handle(cli_config, handle).await,
Commands::ClaudeAgentSdk { command } => command.handle(cli_config, handle).await,
Commands::CodexSdk { command } => command.handle(cli_config, handle).await,
Commands::ObjectiveaiAuthorization { command } => command.handle(cli_config, handle).await,
Commands::OpenrouterAuthorization { command } => command.handle(cli_config, handle).await,
Commands::GithubAuthorization { command } => command.handle(cli_config, handle).await,
Commands::McpAuthorization { command } => command.handle(cli_config, handle).await,
Commands::UserAgent { command } => command.handle(cli_config, handle).await,
Commands::HttpReferer { command } => command.handle(cli_config, handle).await,
Commands::XTitle { command } => command.handle(cli_config, handle).await,
Commands::CommitAuthorName { command } => command.handle(cli_config, handle).await,
Commands::CommitAuthorEmail { command } => command.handle(cli_config, handle).await,
Commands::Agent { command } => command.handle(cli_config, handle).await,
Commands::Vector { command } => command.handle(cli_config, handle).await,
Commands::Functions { command } => command.handle(cli_config, handle).await,
Commands::Auth { command } => command.handle(cli_config, handle).await,
Commands::Swarms { command } => command.handle(cli_config, handle).await,
Commands::Agents { command } => command.handle(cli_config, handle).await,
Commands::Error { command } => command.handle(cli_config, handle).await,
Commands::Laboratories { command } => command.handle(cli_config, handle).await,
Commands::Spawn => spawn::handle(cli_config, handle).await,
Commands::Kill => kill::handle(cli_config, handle).await,
}
}
}