refactor(cli): rename oclif dispatch module - #2917
Conversation
This reverts commit 4ebeae4.
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR removes the legacy dispatch system by deleting the ChangesLegacy Dispatch Removal & Oclif Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
## Summary Start the post-UX architecture cleanup by extracting public argv normalization out of `src/nemoclaw.ts`. The top-level entrypoint still owns registry recovery and user-facing routing errors, but command classification now lives in a focused helper with unit coverage. ## Stack Navigation - Position: 23 of 60 - Previous PR: [#2915 — docs: sync oclif UX command reference](#2915) - Next PR: [#2917 — refactor(cli): rename oclif dispatch module](#2917) ## Changes - Added `src/lib/cli-argv-normalizer.ts` for root/global/sandbox argv normalization and typo suggestions. - Replaced duplicated command-shape parsing in `src/nemoclaw.ts` with the normalizer. - Added unit coverage for root help, global commands, explicit sandbox actions, implicit connect, and suggestions. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Verification - [x] `npx prek run --all-files` passes - [x] `npm test` passes - [x] Tests added or updated for new or changed behavior - [x] No secrets, API keys, or credentials committed - [ ] Docs updated for user-facing behavior changes - [ ] `make docs` builds without warnings (doc changes only) - [ ] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: Carlos Villela <cvillela@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit # Release Notes * **New Features** * Added `sandbox doctor` diagnostic command for comprehensive sandbox health checks. * Enhanced `sandbox logs` with `--tail`, `--since`, and `--follow` options for flexible log streaming. * Added `--probe-only` option to sandbox connection for testing without full connection. * **Documentation** * Updated CLI commands reference with new flag options and short aliases (`-y`, `-q`, `-o`, `-v`). * Added CLI usage examples across multiple commands for improved discoverability. * **Bug Fixes** * Made channel argument required for `channels` subcommands to prevent invalid invocations. * Improved validation for policy and channel mutations with clearer error messages. * **Refactoring** * Restructured internal CLI dispatching and removed legacy dispatch path. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
## Summary Start normalizing sandbox-scoped internal command IDs by moving policy commands to topic-style IDs. Public CLI syntax stays unchanged (`policy-add`, `policy-remove`, `policy-list`). ## Stack Navigation - Position: 25 of 60 - Previous PR: [#2917 — refactor(cli): rename oclif dispatch module](#2917) - Next PR: [#2919 — test(cli): require oclif command metadata](#2919) ## Changes - Renamed internal policy command IDs to `sandbox:policy:add`, `sandbox:policy:remove`, and `sandbox:policy:list`. - Updated dispatch routing and oclif command registration for the new IDs. - Updated dispatch tests for the normalized IDs. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Verification - [x] `npx prek run --all-files` passes - [x] `npm test` passes - [x] Tests added or updated for new or changed behavior - [x] No secrets, API keys, or credentials committed - [ ] Docs updated for user-facing behavior changes - [ ] `make docs` builds without warnings (doc changes only) - [ ] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: Carlos Villela <cvillela@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added `sandbox doctor` diagnostics command for health checks * Added log stream options: `--tail`/`-n` for line count and `--since` for time filtering * **Documentation** * Updated CLI command reference with new option aliases and examples across multiple commands * **Improvements** * Added short flag variants: `-y` (yes), `-q` (quick), `-o` (output), `-v` (verbose) * Made skill install path argument required * Refactored share command into discrete subcommands <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Summary
Remove the stale legacy naming from the oclif dispatch helper now that sandbox and global commands route through explicit oclif adapters. This is a small naming cleanup in the architecture follow-up stack.
Stack Navigation
Changes
legacy-oclif-dispatchtooclif-dispatch.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
sharecommand with structured subcommand support for mount, unmount, and status operations.