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.
- Pending
Sub
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
--jsonemits strict RFC-8259 JSON viaserde_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
--homeor$HOME. - resolve_
session - Resolve the session id without auto-creating one. Returns
Noneif no explicit override / env var is set and the caller has no saved session yet —runhandles 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.