mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 21:01:52 +08:00
The remaining slash commands already existed in the REPL path, so this change focuses on wiring the active CLI parser and runtime to expose them safely. `--version` now exits through a local reporting path, and `--allowedTools` constrains both advertised and executable tools without changing the underlying command surface. Constraint: The active CLI parser lives in main.rs, so a full parser unification would be broader than requested Constraint: --version must not require API credentials or construct the API client Rejected: Migrate the binary to the clap parser in args.rs | too large for a parity patch Rejected: Enforce allowed tools only at request construction time | execution-time mismatch risk Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep local-only flags like --version on pre-runtime codepaths and mirror tool allowlists in both definition and execution paths Tested: cargo fmt; cargo clippy --workspace --all-targets -- -D warnings; cargo test; cargo run -q -p rusty-claude-cli -- --version; cargo run -q -p rusty-claude-cli -- --help Not-tested: Interactive live API conversation with restricted tool allowlists