refactor(cli): use oclif summaries in root help - #2922
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 failedPull request was closed or merged during review 📝 WalkthroughWalkthroughA new oclif command metadata lookup system is introduced, allowing registered command summaries to be loaded dynamically and used in help output with fallback logic. The help action is updated to display command summaries from the registry when multiple commands share the same ID but have different descriptions. ChangesOclif Metadata Lookup & Help Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Automated PR review summaryReviewed PR #2922: refactor(cli): use oclif summaries in root help Recommendation
Installation and setup findings
What was validated
Failing tests and unresolved impactFailing test 1: Root help should not collapse distinct display rows that share one oclif command ID
Passing tests and why they matteredPassing test 1: Installed root help uses oclif summaries when they differ from display metadata
Passing test 2: Installed dist metadata lookup works without TypeScript source loading
Bottom line
|
## Summary Introduce explicit public-display-to-oclif command IDs in the command registry. This prepares root help and docs tooling to combine NemoClaw's public syntax with oclif command metadata without changing runtime behavior. ## Stack Navigation - Position: 28 of 60 - Previous PR: [#2920 — refactor(cli): return typed debug parse results](#2920) - Next PR: [#2922 — refactor(cli): use oclif summaries in root help](#2922) ## Changes - Added `commandId` to command display metadata entries. - Mapped every public and hidden display entry to the oclif command that handles it. - Added metadata coverage to ensure display entries point at registered oclif commands. ## 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` command for sandbox health diagnostics and troubleshooting * Added short flags across CLI commands (`-y` for yes, `-q` for quick, `-o` for output) * Enhanced `logs` command with `--tail/-n` and `--since` filtering options * Restructured `share` functionality into dedicated subcommands (`mount`, `unmount`, `status`) * **Documentation** * Updated command reference with expanded flag support and usage examples across all subcommands <!-- 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 Replace switch-heavy sandbox command dispatch with route tables. Public CLI behavior is preserved while making the mapping between public sandbox syntax and internal oclif command IDs easier to review and extend. ## Stack Navigation - Position: 30 of 60 - Previous PR: [#2922 — refactor(cli): use oclif summaries in root help](#2922) - Next PR: [#2924 — refactor(cli): normalize gateway token command id](#2924) ## Changes - Added flat sandbox route metadata for single-action commands. - Added nested sandbox route metadata for skill, share, snapshot, shields, channels, and config. - Kept public help and compatibility routing behavior stable. ## 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 * **Refactor** * Restructured CLI command routing system * Modified help behavior for nested commands (channels, config, shields) <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Summary
Start generating root help content from oclif command metadata by using registered command summaries for visible help descriptions. The public usage/group display remains driven by the NemoClaw display metadata.
Stack Navigation
Changes
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
New Features
Tests