Something went wrong. Try again.
Identities for entities did.bot
agent llm did
Something went wrong. Try again.
2.7 kB · 89 lines
Rust
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990//! The verbs `didbot` knows by name.
use didbot_cli::FirstPartyVerb;
/// Every first-party verb, and the binary that answers it.////// `didbot-operator` takes the verb as its own subcommand; `didbot-oauth`/// and `didbot-register` are one verb each, so the verb is dropped and the/// rest is passed as typed.pub const FIRST_PARTY: &[FirstPartyVerb] = &[ FirstPartyVerb { verb: "operate", binary: "didbot-operator", package: "didbot-operator", argv: &["operate"], about: "claim a server, admit an account beneath you, or check either", }, FirstPartyVerb { verb: "login", binary: "didbot-operator", package: "didbot-operator", argv: &["login"], about: "sign in as a deployment's operator", }, FirstPartyVerb { verb: "estop", binary: "didbot-operator", package: "didbot-operator", argv: &["estop"], about: "read or set a deployment's emergency stop", }, FirstPartyVerb { verb: "account", binary: "didbot-operator", package: "didbot-operator", argv: &["account"], about: "act on one account: lock, unlock, lift-quarantine, erase, delete, revoke-tokens", }, FirstPartyVerb { verb: "app", binary: "didbot-operator", package: "didbot-operator", argv: &["app"], about: "act on one OAuth application: end-logins", }, FirstPartyVerb { verb: "announce", binary: "didbot-operator", package: "didbot-operator", argv: &["announce"], about: "ask the relay to crawl a deployment", }, FirstPartyVerb { verb: "oauth", binary: "didbot-oauth", package: "didbot-agentd", argv: &[], about: "answer sign-ins as an agent: pending, show, approve, decline", }, FirstPartyVerb { verb: "register", binary: "didbot-register", package: "didbot-agentd", argv: &[], about: "make this machine an account, with a key that never leaves it", },];
/// The verb table as `--help` shows it.pub fn help_table() -> String { let width = FIRST_PARTY .iter() .map(|row| row.verb.len()) .max() .unwrap_or(0); let mut out = String::from("Verbs:\n"); for row in FIRST_PARTY { out.push_str(&format!( " {:<width$} {} [{}]\n", row.verb, row.about, row.binary )); } out.push_str( " <other> didbot-<other> from PATH, with the rest of the command line\n\ \n\ `didbot help <verb>` is `didbot <verb> --help`.", ); out}