refactor: interactive-only (drop -p mode), v0.2.0#5
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking change. Removes the entire
claude -p/headless path;claudecmdnow always drives Claude Code's interactive session and emits the parsed reply (default text,--jsonenvelope, or--rawrendered screen). This keeps automated calls on the interactive (subscription) path.Changes
runner.py,claude_command.py,pty_runner.py(+ their tests); trimmedoutput.pyto the JSON envelope.cli.py: interactive-only. Dropped--stream,--pty,--no-session-persistence,--max-turns,--max-budget-usd, and the--interactiveflag (now implicit). Added interactive-valid passthroughs (--system-prompt,--allowed-tools,--add-dir, …).interactive_runner.py: absorbeddefault_claude_bin(); forwards the new flags.setup.cfg:pexpect+pyteare now coreinstall_requires; dropped thepty/interactiveextras; bumped to 0.2.0.test_cli/test_outputfor interactive-only.Verified
python -m build→pyclacmd-0.2.0;twine checkpasses; full suite (60) green; live runs via the installed command returnREFACTOR_OK(text) and a"mode":"interactive"envelope (--json).