Expand description
Command implementations — the orchestration layer between the CLI (crate::cli) and the
primitives (crate::tmux, crate::session, crate::backend, crate::detect).
Each command returns a Serialize result; main renders it as JSON.
Modules§
- approve
csd approve— answer a plan-approval or tool-permission gate by selecting a menu option (PoC §2.3). Default option1= “Yes, and use auto mode” for the plan gate.- kill
csd kill— stop a session and remove its sidecar. Idempotent: a session that is already gone still gets its sidecar cleaned up.- ps
csd ps— list tracked sessions with liveness + live state, mirroringtmx agents --json.- send
csd send— inject a prompt with readiness/retry (PoC §2.2 + gotcha #1).- spawn
csd spawn— start a detached interactive agent on the subscription seat (PoC §2.1).- state
csd state— report the hybrid-detector verdict for one session.
Constants§
- APPROVE_
DELAY - Pause between sending a menu digit and pressing Enter (PoC §2.3).
- DEFAULT_
HEIGHT - DEFAULT_
SEND_ RETRIES - Default number of send→verify-echo attempts before giving up.
- DEFAULT_
WIDTH - Default detached-pane size — generous so the TUI renders and capture-pane has room (PoC §2.1).
- SEND_
SETTLE - How long to wait for injected keystrokes to settle before checking the echo (PoC gotcha #1).
- SUBMIT_
DELAY - Pause between a confirmed prompt echo and pressing Enter (PoC §2.2).
- TRUST_
POLL_ ATTEMPTS - How long to watch for the one-time folder-trust gate after spawning with
--trust. - TRUST_
POLL_ INTERVAL