Skip to main content

Module commands

Module commands 

Source
Expand description

clap-derived command tree and dispatch.

Each primitive is one subcommand. run builds a Request from the subcommand, calls Client::call, and returns the response; render formats it for stdout.

Structs§

Cli
Top-level CLI.

Enums§

Command
The subcommand vocabulary. One variant per primitive.
PendingSub

Functions§

connect
Connect to the daemon, auto-spawning if necessary (unless --no-spawn). When the caller passed --home, propagate it to the spawned daemon — otherwise auto-spawn writes the socket to the default home and the caller waits forever for it to appear at the requested home.
render
--json emits strict RFC-8259 JSON via serde_json (escaping, surrogates, control characters all handled). The default is the canonical wire form that an agent would consume directly.
resolve_paths
Resolve effective paths from --home or $HOME.
resolve_session
Resolve the session id without auto-creating one. Returns None if no explicit override / env var is set and the caller has no saved session yet — run handles the auto-create case for commands that need a session.
run
End-to-end dispatch. Auto-opens a session for the caller if needed and binds session-open / session-close side effects to the caller key so concurrent agents in different shells stay isolated.