Expand description
csd (Claude Session Driver) — drive an interactive claude REPL in a detached tmux session on
the flat-rate subscription seat, inject input reliably, and detect session state, emitting JSON
for programmatic consumers (copad, life-assistant). See docs/poc-findings.md for the empirical
basis and ~/dev/copad/docs/decisions.md #49 for why this exists.
Re-exports§
Modules§
- backend
- Backend abstraction.
csddrivesclaudetoday and is designed to drivecodexlater (decision #49: keep the dispatch backend swappable so a forced move off the interactive REPL is a config flip, not a rewrite). Everything release-dependent — the spawn command and the capture-pane gate markers — lives behind this trait in ONE place (PoC gotcha #4). - cli
- Command-line surface (clap derive). Kept declarative;
mainmaps these ontocrate::commands. - commands
- Command implementations — the orchestration layer between the CLI (
crate::cli) and the primitives (crate::tmux,crate::session,crate::backend,crate::detect). - detect
- The hybrid state detector. No single source is sufficient (PoC §3): the transcript is reliable
for questions/turns but lags TUI-interrupt gates; capture-pane catches the gates but its markers
shift per release; the plan file holds plan content.
detectcombines all three. - error
- session
- Session metadata sidecar + path derivation.
- tmux
- Thin wrappers over the
tmuxCLI. Every call shells out to the user’s tmux server.