Skip to content

refactor(cli): normalize gateway token command id - #2924

Merged
cv merged 34 commits into
mainfrom
refactor/oclif-arch-normalize-gateway-id
May 5, 2026
Merged

refactor(cli): normalize gateway token command id#2924
cv merged 34 commits into
mainfrom
refactor/oclif-arch-normalize-gateway-id

Conversation

@cv

@cv cv commented May 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Continue internal command ID normalization by moving the sandbox gateway token adapter to a topic-style oclif ID. Public syntax remains nemoclaw <name> gateway-token.

Stack Navigation

Changes

  • Renamed the internal gateway token command ID to sandbox:gateway:token.
  • Updated display metadata, dispatch routing, and oclif registration.
  • Kept public help and CLI syntax unchanged.

Type of Change

  • 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

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • 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 (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • Chores
    • Standardized gateway token command identifier format for improved internal consistency.

cv added 30 commits May 2, 2026 13:36
@cv cv self-assigned this May 3, 2026
@copy-pr-bot

copy-pr-bot Bot commented May 3, 2026

Copy link
Copy Markdown

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.

@coderabbitai

coderabbitai Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0caece73-6581-45c5-9f3f-c8f5ba835db1

📥 Commits

Reviewing files that changed from the base of the PR and between 85156a7 and 556e1d0.

📒 Files selected for processing (4)
  • src/lib/command-registry.ts
  • src/lib/gateway-token-cli-command.ts
  • src/lib/oclif-commands.ts
  • src/lib/oclif-dispatch.ts

📝 Walkthrough

Walkthrough

The command identifier for the gateway token command is renamed from sandbox:gateway-token to sandbox:gateway:token across four files: the command registry definition, the CLI command class, the oclif command map, and the dispatch router. Functionality remains unchanged.

Changes

Gateway Token Command Identifier Update

Layer / File(s) Summary
Command Definition
src/lib/gateway-token-cli-command.ts
GatewayTokenCliCommand.static id is updated from "sandbox:gateway-token" to "sandbox:gateway:token".
Registry & Export
src/lib/command-registry.ts, src/lib/oclif-commands.ts
Command registry entry and oclif command map key are updated to use the new identifier "sandbox:gateway:token".
Dispatch Routing
src/lib/oclif-dispatch.ts
Flat sandbox route for gateway-token action is updated to dispatch to "sandbox:gateway:token".

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A gateway ID now shines with clearer form,
From dash to colon—orderly and warm,
Four files aligned in harmonious cheer,
The token path is bright and crystal clear!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: normalizing the internal gateway token command ID from sandbox:gateway-token to sandbox:gateway:token across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/oclif-arch-normalize-gateway-id

Comment @coderabbitai help to get the list of available commands and usage tips.

@cv cv added the v0.0.34 label May 4, 2026
@wscurran wscurran added NemoClaw CLI refactor PR restructures code without intended behavior change dependencies Pull requests that update a dependency file and removed v0.0.34 dependencies Pull requests that update a dependency file labels May 4, 2026

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as part of stack from #2886 (auto-approve: CI green, no scope/behavior flags).

@cv cv added v0.0.35 and removed v0.0.34 labels May 5, 2026
cv added a commit that referenced this pull request May 5, 2026
## 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>
@cv
cv marked this pull request as ready for review May 5, 2026 18:53
@cv
cv changed the base branch from refactor/oclif-arch-table-dispatch to main May 5, 2026 18:53
@cv
cv enabled auto-merge (squash) May 5, 2026 18:53
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv
cv merged commit a0abba9 into main May 5, 2026
15 checks passed
cv added a commit that referenced this pull request May 5, 2026
## Summary
Introduce a public oclif help renderer for sandbox-scoped help paths
that still use compatibility routing. This lets those paths display
public NemoClaw syntax while pulling summaries and examples from oclif
command metadata.

## Stack Navigation
- Position: 32 of 60
- Previous PR: [#2924 — refactor(cli): normalize gateway token command
id](#2924)
- Next PR: [#2926 — refactor(cli): add shared oclif command
base](#2926)

## Changes
- Added a public help renderer that combines public usage with
registered oclif metadata.
- Extended help dispatch results with the oclif command ID that owns the
help text.
- Updated the top-level dispatcher to render public oclif help when
command metadata is available.
- Added coverage that public help output avoids internal command 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>

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv
cv deleted the refactor/oclif-arch-normalize-gateway-id branch May 27, 2026 21:17
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output and removed NemoClaw CLI labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants