Skip to content

fix: verify nemoclaw is on PATH after install - #79

Closed
WuKongAI-CMU wants to merge 1 commit into
NVIDIA:mainfrom
WuKongAI-CMU:fix/verify-nemoclaw-on-path
Closed

WuKongAI-CMU wants to merge 1 commit into
NVIDIA:mainfrom
WuKongAI-CMU:fix/verify-nemoclaw-on-path

Conversation

@WuKongAI-CMU

Copy link
Copy Markdown
Contributor

Summary

Fixes #9 — the installer now verifies that nemoclaw is accessible on PATH after installation.

  • After npm install/npm link, checks command -v nemoclaw
  • If not found, locates the npm global bin directory and shows the exact export PATH=... command the user needs
  • Temporarily adds the directory to PATH so onboarding can proceed in the same session
  • Works with nvm, non-standard npm prefixes, and source installs

Test plan

  • Shell syntax check passes (bash -n install.sh)
  • Existing tests pass (19/19)
  • Manual: install with nvm where npm global bin is not on PATH → should show the export command
  • Manual: install normally → should show "nemoclaw is on PATH: /path/to/nemoclaw"

🤖 Generated with Claude Code

After npm install/link, the installer now checks whether the nemoclaw
binary is actually available on PATH. If it was installed to a
directory not on PATH (common with nvm or non-standard npm prefixes),
the installer shows the exact export command needed and temporarily
adds the directory to PATH so that onboarding can proceed.

Closes NVIDIA#9

Signed-off-by: peteryuqin <[email protected]>
@WuKongAI-CMU

Copy link
Copy Markdown
Contributor Author

Closing — this was independently fixed by #70 which was merged earlier. Thanks!

mafueee pushed a commit to mafueee/NemoClaw that referenced this pull request Mar 28, 2026
…) (!52)

> **🏗️ build-from-issue-agent**

Closes NVIDIA#79

## Summary

Replaces the gateway-proxied inference model (`ProxyInference` RPC) with sandbox-local execution. The sandbox now resolves routes from either a standalone YAML route file or a cluster bundle fetched via the new `GetSandboxInferenceBundle` RPC, then forwards requests directly to inference backends using `navigator-router`.

### Benefits of removing the gRPC hop

Moving inference execution from the gateway to the sandbox eliminates the gRPC round-trip for every inference request:

- **No payload size limits**: Direct HTTP forwarding replaces protobuf-over-gRPC serialization.
- **Streaming-ready**: Preserves connection semantics for future SSE support (e.g., `stream: true`).
- **Lower latency**: Direct sandbox → backend path instead of sandbox → gateway → backend round-trip.
- **Reduced gateway load**: Gateway only serves the control-plane bundle delivery RPC.
- **Simpler error model**: HTTP status codes flow through directly without gRPC wrapping.

## Changes Made

- **Proto**: Removed `ProxyInference` RPC. Added `GetSandboxInferenceBundle` RPC for route bundle delivery.
- **Gateway**: Replaced `proxy_inference` with `get_sandbox_inference_bundle`. Removed `Router` and `navigator-router` dependency — gateway is now control-plane only for inference.
- **Router**: Switched config file format from TOML to YAML. Added `Debug` impl that redacts API keys.
- **Sandbox**: New `InferenceContext` with local `Router` + route cache. Routes loaded from `--inference-routes` file (standalone) or cluster bundle via gRPC, with 30s background refresh. New `--inference-routes` / `NAVIGATOR_INFERENCE_ROUTES` CLI arg.
- **Dev sandbox**: Added `inference-routes.yaml` at repo root with default NVIDIA NIM route. `mise run sandbox` now mounts it automatically and supports `-e` flag to forward env vars (e.g., `mise run sandbox`).
- **Example**: Added standalone example (`examples/inference/routes.yaml`) and rewrote README to cover both standalone and cluster workflows.
- **E2E tests**: Updated existing test names/docs. Added tests for Anthropic messages protocol and multi-route policy filtering.

## Tests Added

- **Unit (21 new):** `router_error_to_http` (6 variants), `load_from_file` YAML round-trip (5), `resolve_sandbox_inference_bundle` gRPC handler (6), `build_inference_context` route loading (4)
- **E2E (2 new):** Anthropic messages protocol routing, route filtering by `allowed_routes`
- **Total:** 188 unit tests passing across 3 crates

## Documentation Updated

- `architecture/gateway.md`: Removed router, updated Inference Service
- `architecture/sandbox.md`: Updated orchestration flow, InferenceContext, route loading
- `architecture/inference-routing.md`: Complete rewrite for sandbox-local architecture

## Verification

- [x] All unit tests passing (188 across 3 crates)
- [x] Pre-commit Rust checks passing (fmt, clippy, tests)
- [x] Architecture documentation updated
- [x] E2E tests updated with new test cases
- [x] Standalone example and documentation added
- [x] Default inference-routes.yaml with env passthrough for mise run sandbox
mafueee pushed a commit to mafueee/NemoClaw that referenced this pull request Mar 28, 2026
…d revise error messages (NVIDIA#79)

Closes NVIDIA#42

- Change non-CONNECT proxy response from 405 to 403 to align with
  how CONNECT denials are surfaced
- Add structured deny logging for non-CONNECT requests with hostname
  extraction from absolute-form URIs
- Revise 7 user-facing error messages across proxy.rs and
  dev-sandbox-policy.rego to follow consistent principle: generic
  policy-deny messages for non-inference requests, descriptive messages
  for recognized inference endpoints
- Update E2E test assertion to match new error message
- Update architecture docs to reflect new behavior

Co-authored-by: John Myers <[email protected]>
alessandro-festa added a commit to alessandro-festa/NemoClaw that referenced this pull request May 6, 2026
Discovered during US-507 cluster smoke test (NVIDIA#79): when both
NEMOCLAW_API_KEY and NEMOCLAW_SERVER_URL are set, the user is
addressing an operator-managed sandbox that doesn't exist in the
local registry. Upstream's main() rejects unknown sandbox names
before any oclif command body runs, so our env-var check inside
ConnectCliCommand / DisconnectCliCommand never fires.

Add a remote-mode short-circuit at the top of main()'s sandbox-action
handling: if both env vars are set AND the action is connect or
disconnect, skip the registry lookup + recovery and route straight
through resolveSandboxOclifDispatch. The matching oclif command body
re-reads the env vars and calls remote-connect.ts.

This is a 12-line patch to upstream's src/nemoclaw.ts — the smallest
unavoidable diff to make env-var-only dispatch work. (Flag-based
dispatch would have been similarly invasive in oclif command flag
definitions.)

Verified against the test cluster at 192.168.64.28:
- nemoclaw sandbox-alice connect — interactive shell over SSH tunnel,
  output `hostname=sandbox-alice` proves we landed inside the pod
- nemoclaw sandbox-alice disconnect — Sandbox.spec.replicas 1 → 0

Part of US-507 (NVIDIA#79).
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install.sh does not leave the nemoclaw CLI available on PATH

2 participants