Skip to content

refactor: interactive-only (drop -p mode), v0.2.0#5

Merged
kurok merged 1 commit into
mainfrom
refactor/interactive-only
Jun 9, 2026
Merged

refactor: interactive-only (drop -p mode), v0.2.0#5
kurok merged 1 commit into
mainfrom
refactor/interactive-only

Conversation

@kurok

@kurok kurok commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Breaking change. Removes the entire claude -p/headless path; claudecmd now always drives Claude Code's interactive session and emits the parsed reply (default text, --json envelope, or --raw rendered screen). This keeps automated calls on the interactive (subscription) path.

Changes

  • Removed runner.py, claude_command.py, pty_runner.py (+ their tests); trimmed output.py to the JSON envelope.
  • cli.py: interactive-only. Dropped --stream, --pty, --no-session-persistence, --max-turns, --max-budget-usd, and the --interactive flag (now implicit). Added interactive-valid passthroughs (--system-prompt, --allowed-tools, --add-dir, …).
  • interactive_runner.py: absorbed default_claude_bin(); forwards the new flags.
  • setup.cfg: pexpect+pyte are now core install_requires; dropped the pty/interactive extras; bumped to 0.2.0.
  • Rewrote README + test_cli/test_output for interactive-only.

Verified

python -m buildpyclacmd-0.2.0; twine check passes; full suite (60) green; live runs via the installed command return REFACTOR_OK (text) and a "mode":"interactive" envelope (--json).

claudecmd now always drives Claude Code's interactive session and emits the
parsed assistant reply (default text, --json envelope, or --raw rendered
screen). Keeps automated calls on the interactive (subscription) path.

- remove the -p path: delete runner.py, claude_command.py, pty_runner.py
  (and their tests); trim output.py to the success envelope
- cli.py: interactive-only; drop --stream/--pty/--no-session-persistence/
  --max-turns/--max-budget-usd and the --interactive flag (now implicit);
  add interactive-valid passthroughs (--system-prompt, --allowed-tools, etc.)
- interactive_runner.py: absorb default_claude_bin(); forward the extra flags
- setup.cfg: pexpect+pyte become core install_requires; drop pty/interactive
  extras; bump to 0.2.0 (breaking)
- rewrite README + test_cli/test_output for interactive-only

Verified: build -> pyclacmd-0.2.0, twine check passes, suite (60) green, live
runs through default and --json work.

Signed-off-by: kurok <22548029+kurok@users.noreply.github.com>
@kurok kurok merged commit 157ee38 into main Jun 9, 2026
1 check passed
@kurok kurok deleted the refactor/interactive-only branch June 9, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant