Refactor CLI command registration around commander#15
Merged
Conversation
Preserve normal help and version exits so grouped commands do not fail and Commander errors are not printed twice. Add regression coverage for help routing, version handling, and missing required options.
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.
Summary
agent-cdpCLI to Commander so command parsing and validation live behind a dedicatedsrc/cli/Module family instead of a single hand-rolled dispatcher.agent-cdp skills get core, while keeping the current command names, flags, IPC payloads, and formatter output paths.Backward Compatibility
helpoutput still includes the full legacy command reference and agent guidance text.Risks
--help.Manual Testing
Setup:
Scenario:
pnpm test,pnpm typecheck, andpnpm buildfrom the repo root and verify they all succeed.pnpm agent-cdp -- helpand verify the output still includes the full command list plus the instruction for LLM agents to runagent-cdp skills get core.pnpm agent-cdp -- target list --url http://127.0.0.1:9222and verify the command still accepts the existing flag shape and prints the usual target formatter output.pnpm agent-cdp -- runtime eval --expr "process.version"against a selected target and verify the command still routes through the daemon and prints the existing runtime formatter output.