-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(sandbox): install provider access tools #3747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
631b063
e2f6ffc
af71588
cdb8cfd
faa6e8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # NemoClaw OpenShell Integration | ||
|
|
||
| ```mermaid | ||
| flowchart LR | ||
| user["User"] --> agent["Agent runtime"] | ||
| agent --> adapter["NemoClaw agent adapter"] | ||
|
|
||
| subgraph adapters["Current adapters"] | ||
| openclaw["OpenClaw plugin"] | ||
| hermes["Hermes plugin"] | ||
| end | ||
|
|
||
| subgraph plugin_tools["NemoClaw access tools"] | ||
| list["list_resource_access_presets"] | ||
| request["request_resource_access"] | ||
| check["check_resource_access"] | ||
| end | ||
|
|
||
| adapter --> adapters | ||
| adapters --> plugin_tools | ||
| onboard["nemoclaw onboard"] --> profile_import["Import NemoClaw provider profiles"] | ||
| profile_import --> profiles["OpenShell provider profiles"] | ||
| list --> profiles | ||
| profiles --> presets["Provider-backed access presets"] | ||
| presets --> request | ||
|
|
||
| request --> policy_local["policy.local HTTP API"] | ||
| check --> policy_local | ||
|
|
||
| subgraph sandbox["OpenShell sandbox"] | ||
| policy_local | ||
| proxy["Sandbox HTTP proxy"] | ||
| policy_runtime["Sandbox policy runtime"] | ||
| end | ||
|
|
||
| policy_local --> proposals["OpenShell policy proposals"] | ||
| proposals --> review["Operator review"] | ||
| review --> approve["Approve or reject"] | ||
| approve --> merge["Policy merge and reload"] | ||
| merge --> policy_runtime | ||
| policy_runtime --> check | ||
|
|
||
| agent --> workload["Requested agent work"] | ||
| workload --> proxy | ||
| proxy --> policy_runtime | ||
| policy_runtime --> external["Approved external resources"] | ||
| ``` | ||
|
|
||
| ## Flow | ||
|
|
||
| 1. The agent asks NemoClaw for allowed resource presets with `list_resource_access_presets`. | ||
| 2. During onboarding, NemoClaw imports its provider profiles into OpenShell for package registries, messaging platforms, Brave Search, Jira, Hugging Face, and local inference. | ||
| 3. NemoClaw builds the agent-visible preset list from OpenShell provider profiles, with built-in presets as fallback coverage for older OpenShell versions. | ||
| 4. The agent calls `request_resource_access` with a preset, access mode, reason, and optional wait timeout. | ||
| 5. NemoClaw submits a least-privilege proposal to `policy.local`. | ||
| 6. OpenShell surfaces the proposal for operator review. | ||
| 7. After approval, OpenShell merges and reloads the sandbox policy. | ||
| 8. The agent calls `check_resource_access`; NemoClaw reports `applied` only after OpenShell reports the policy reload is complete. | ||
|
|
||
| ## Agent Tools | ||
|
|
||
| - `list_resource_access_presets`: discovers provider-backed preset ids. | ||
| - `request_resource_access`: submits a network access proposal through OpenShell. | ||
| - `check_resource_access`: polls an existing proposal until it is pending, denied, failed, or applied. | ||
|
|
||
| ## Adapter Contract | ||
|
|
||
| Each agent adapter exposes the same tool names and response shape through the harness-native mechanism. OpenClaw uses its plugin API. Hermes uses its Python plugin API. Additional harnesses can implement the same contract without changing the OpenShell policy proposal flow. | ||
|
|
||
| ## Provider Profiles | ||
|
|
||
| NemoClaw imports OpenShell provider profiles for its policy presets during onboarding. Existing OpenShell profiles are left untouched, and already-imported NemoClaw profiles are skipped so repeated onboarding remains idempotent. If the OpenShell gateway does not support provider-profile import, NemoClaw continues with local fallback presets. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| id: brave | ||
| display_name: Brave Search | ||
| description: Brave Search API access | ||
| category: knowledge | ||
| endpoints: | ||
| - host: api.search.brave.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| binaries: | ||
| - /usr/local/bin/node | ||
| - /usr/bin/node | ||
| - /usr/bin/curl |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| id: brew | ||
| display_name: Homebrew | ||
| description: Homebrew (Linuxbrew) package manager access | ||
| category: data | ||
| endpoints: | ||
| - host: formulae.brew.sh | ||
| port: 443 | ||
| access: full | ||
| tls: skip | ||
| - host: github.com | ||
| port: 443 | ||
| access: full | ||
| tls: skip | ||
| - host: ghcr.io | ||
| port: 443 | ||
| access: full | ||
| tls: skip | ||
| - host: pkg-containers.githubusercontent.com | ||
| port: 443 | ||
| access: full | ||
| tls: skip | ||
| - host: objects.githubusercontent.com | ||
| port: 443 | ||
| access: full | ||
| tls: skip | ||
| - host: raw.githubusercontent.com | ||
| port: 443 | ||
| access: full | ||
| tls: skip | ||
|
Comment on lines
+12
to
+32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not skip TLS verification on public endpoints. Using Suggested change - host: formulae.brew.sh
port: 443
access: full
- tls: skip
- host: github.com
port: 443
access: full
- tls: skip
- host: ghcr.io
port: 443
access: full
- tls: skip
- host: pkg-containers.githubusercontent.com
port: 443
access: full
- tls: skip
- host: objects.githubusercontent.com
port: 443
access: full
- tls: skip
- host: raw.githubusercontent.com
port: 443
access: full
- tls: skip🤖 Prompt for AI Agents |
||
| binaries: | ||
| - /usr/bin/curl | ||
| - /usr/bin/git | ||
| - /home/linuxbrew/.linuxbrew/bin/brew | ||
| - /home/linuxbrew/.linuxbrew/bin/* | ||
| - /home/linuxbrew/.linuxbrew/Homebrew/bin/* | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| id: discord | ||
| display_name: Discord | ||
| description: Discord API, gateway, and CDN access | ||
| category: messaging | ||
| endpoints: | ||
| - host: discord.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| - allow: { method: PUT, path: "/**" } | ||
| - allow: { method: PATCH, path: "/**" } | ||
| - allow: { method: DELETE, path: "/api/v*/channels/*/messages/*" } | ||
| - allow: { method: DELETE, path: "/api/v*/channels/*/messages/*/reactions/*/*" } | ||
| - host: gateway.discord.gg | ||
| port: 443 | ||
| protocol: websocket | ||
| enforcement: enforce | ||
| websocket_credential_rewrite: true | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: WEBSOCKET_TEXT, path: "/**" } | ||
| - host: cdn.discordapp.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - host: media.discordapp.net | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| binaries: | ||
| - /usr/local/bin/node | ||
| - /usr/bin/node |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| id: huggingface | ||
| display_name: Hugging Face | ||
| description: Hugging Face Hub, LFS, and Inference API access | ||
| category: knowledge | ||
| endpoints: | ||
| - host: huggingface.co | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - host: cdn-lfs.huggingface.co | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - host: router.huggingface.co | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| binaries: | ||
| - /usr/local/bin/python3 | ||
| - /usr/local/bin/node |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| id: jira | ||
| display_name: Jira | ||
| description: Jira and Atlassian Cloud access | ||
| category: data | ||
| endpoints: | ||
| - host: "*.atlassian.net" | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| - host: auth.atlassian.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| - host: api.atlassian.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| binaries: | ||
| - /usr/local/bin/node |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| id: local-inference | ||
| display_name: Local Inference | ||
| description: Local inference access (Ollama, vLLM) via host gateway | ||
| category: inference | ||
| endpoints: | ||
| - host: host.openshell.internal | ||
| port: 11434 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| allowed_ips: | ||
| - 10.0.0.0/8 | ||
| - 172.16.0.0/12 | ||
| - 192.168.0.0/16 | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| - host: host.openshell.internal | ||
| port: 11435 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| allowed_ips: | ||
| - 10.0.0.0/8 | ||
| - 172.16.0.0/12 | ||
| - 192.168.0.0/16 | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| - host: host.openshell.internal | ||
| port: 8000 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| allowed_ips: | ||
| - 10.0.0.0/8 | ||
| - 172.16.0.0/12 | ||
| - 192.168.0.0/16 | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| binaries: | ||
| - /usr/local/bin/openclaw | ||
| - /usr/local/bin/node | ||
| - /usr/bin/node | ||
| - /usr/bin/curl | ||
| - /usr/bin/python3 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,23 @@ | ||||||||||||||||||||||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||||||||||||||||||||||
| # SPDX-License-Identifier: Apache-2.0 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| id: npm | ||||||||||||||||||||||
| display_name: npm | ||||||||||||||||||||||
| description: npm and Yarn registry access | ||||||||||||||||||||||
| category: data | ||||||||||||||||||||||
| endpoints: | ||||||||||||||||||||||
| - host: registry.npmjs.org | ||||||||||||||||||||||
| port: 443 | ||||||||||||||||||||||
| access: full | ||||||||||||||||||||||
| tls: skip | ||||||||||||||||||||||
| - host: registry.yarnpkg.com | ||||||||||||||||||||||
| port: 443 | ||||||||||||||||||||||
| access: full | ||||||||||||||||||||||
| tls: skip | ||||||||||||||||||||||
|
Comment on lines
+11
to
+16
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid This disables TLS verification for external registries and weakens secure-by-default behavior. Please keep TLS verification enabled. Suggested change - host: registry.npmjs.org
port: 443
access: full
- tls: skip
- host: registry.yarnpkg.com
port: 443
access: full
- tls: skip📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| binaries: | ||||||||||||||||||||||
| - /usr/local/bin/npm* | ||||||||||||||||||||||
| - /usr/local/bin/npx* | ||||||||||||||||||||||
| - /usr/local/bin/node* | ||||||||||||||||||||||
| - /usr/local/bin/yarn* | ||||||||||||||||||||||
| - /usr/bin/npm* | ||||||||||||||||||||||
| - /usr/bin/node* | ||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the required SPDX license header at the top of this page.
This new Markdown file is missing the required SPDX copyright and Apache-2.0 header.
As per coding guidelines, "
**/*.{js,ts,tsx,jsx,sh,yaml,yml,json,md,mdx}: Every source file must include an SPDX license header for copyright and Apache-2.0 license".🤖 Prompt for AI Agents