Skip to main content

Module command

Module command 

Source
Expand description

Bare-naked CLI handlers mirroring the SDK’s cli::command tree 1-for-1. Each leaf file here pairs with an SDK leaf at the same module path; the SDK leaf defines the typed Request / Response / ResponseItem shapes, this side defines the execute / execute_transform (and execute_streaming / execute_streaming_transform for chunk-or-id leaves) that actually do the work.

run.rs parses argv → SDK Command → SDK Request (via the SDK’s TryFrom impls), then dispatches to execute which fans out through the tier mod.rs files to the leaves below.

Re-exports§

pub use command::execute;

Modules§

agents
agents tier dispatch. Mirrors objectiveai-sdk-rs/src/cli/command/agents/mod.rs. Mix of unary leaves (get, publish) and streaming sub-trees (list, spawn, message, logs, queue, tags, plus the surviving instances aggregate that owns me/list).
api
api tier dispatch. Mirrors objectiveai-sdk-rs/src/cli/command/api/mod.rs — matches on the SDK’s tier Request variants and dispatches to local leaf executes. All api leaves are unary, so every arm wraps a single value in a one-shot stream.
command
Root-level dispatch. Mirrors objectiveai-sdk-rs/src/cli/command/command.rs — same match shape, same fan-out, but each arm calls the local tier execute (which actually does the work) instead of routing through CommandExecutor.
db
db — CLI-side dispatch for database access + lifecycle: query, spawn, kill.
functions
functions tier dispatch.
kill_helpers
Shared kill-by-lock-owner logic for the {api,db,mcp,viewer} kill commands.
mcp
mcp tier dispatch. Mirrors objectiveai-sdk-rs/src/cli/command/mcp/mod.rs — matches on the SDK’s tier Request variants and dispatches to local leaf executes. All mcp leaves are unary, so every arm wraps a single value in a one-shot stream.
plugins
plugins tier dispatch. Mirrors objectiveai-sdk-rs/src/cli/command/plugins/mod.rs. install, list, and run are streaming; get is unary. install is a sub-tier with its own dispatcher under install/mod.rs.
reexec
Re-exec envelope hygiene.
swarms
swarms tier dispatch. Mirrors objectiveai-sdk-rs/src/cli/command/swarms/mod.rs. list is a streaming leaf (one ResponseItem per swarm); get and publish are unary.
tasks
tasks — CLI-side dispatch for the tasks subtree. Three leaves today: schedule, list, run.
tools
tools tier dispatch. Mirrors objectiveai-sdk-rs/src/cli/command/tools/mod.rs. list and run are streaming leaves; get and install are unary.
update
update — bare-naked streaming handler.
viewer
viewer tier dispatch. Mirrors objectiveai-sdk-rs/src/cli/command/viewer/mod.rs. All viewer leaves are unary, so every arm wraps a single value in a one-shot stream.