use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "agent-office")]
#[command(about = "A pleasant set of tools for refined AI agents to get work done")]
#[command(version = "0.1.0")]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
}
#[derive(Subcommand)]
pub enum Commands {
#[command(subcommand)]
Mail(MailCommands),
#[command(subcommand)]
Agent(AgentCommands),
#[command(subcommand)]
Kb(KbCommands),
#[command(subcommand)]
Human(HumanCommands),
}
#[derive(Subcommand)]
pub enum HumanCommands {
#[command(subcommand)]
Db(DbCommands),
Web {
#[arg(short = 'H', long, default_value = "127.0.0.1")]
host: String,
#[arg(short, long, default_value = "8080")]
port: u16,
},
}
#[derive(Subcommand)]
pub enum MailCommands {
Recent {
agent_id: String,
},
Send {
#[arg(short, long)]
from: String,
#[arg(short, long)]
to: String,
#[arg(short, long)]
subject: String,
#[arg(short, long)]
body: String,
},
Inbox {
agent_id: String,
},
Outbox {
agent_id: String,
},
Read {
mail_id: String,
},
ShouldLook {
agent_id: String,
},
Watch {
agent_id: String,
#[arg(short, long, default_value = "60")]
interval: u64,
#[arg(short, long)]
bash: String,
},
Search {
agent_id: String,
query: String,
},
}
#[derive(Subcommand)]
pub enum AgentCommands {
Create {
#[arg(short, long)]
name: String,
},
List,
Get {
#[arg(short, long)]
id: String,
},
Status {
#[arg(short, long)]
id: String,
#[arg(short, long)]
status: String,
},
}
#[derive(Subcommand)]
pub enum DbCommands {
Setup,
}
#[derive(Subcommand)]
pub enum KbCommands {
Create {
#[arg(short, long)]
id: Option<String>,
title: String,
content: String,
},
Branch {
parent_luhmann_id: String,
title: String,
content: String,
},
List,
Get {
luhmann_id: String,
},
Link {
from_luhmann_id: String,
to_luhmann_id: String,
#[arg(short, long)]
context: Option<String>,
},
Search {
query: String,
},
Tree {
prefix: String,
},
Cont {
from_luhmann_id: String,
to_luhmann_id: String,
},
Index {
luhmann_id: String,
},
Context {
luhmann_id: String,
},
}