Skip to main content

Module commands

Module commands 

Source
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 option 1 = “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, mirroring tmx 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