-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(policy): add provider profile backed presets #3745
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
Closed
cheese-head
wants to merge
2
commits into
NVIDIA:main
from
cheese-head:policy-access/provider-profiles
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| binaries: | ||
| - /usr/bin/curl | ||
| - /usr/bin/git | ||
| - /home/linuxbrew/.linuxbrew/bin/brew | ||
| - /home/linuxbrew/.linuxbrew/bin/* | ||
| - /home/linuxbrew/.linuxbrew/Homebrew/bin/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| binaries: | ||
| - /usr/local/bin/npm* | ||
| - /usr/local/bin/npx* | ||
| - /usr/local/bin/node* | ||
| - /usr/local/bin/yarn* | ||
| - /usr/bin/npm* | ||
| - /usr/bin/node* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: pypi | ||
| display_name: PyPI | ||
| description: Python Package Index (PyPI) access | ||
| category: data | ||
| endpoints: | ||
| - host: pypi.org | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: HEAD, path: "/**" } | ||
| - host: files.pythonhosted.org | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: HEAD, path: "/**" } | ||
| binaries: | ||
| - /usr/bin/python3* | ||
| - /usr/bin/pip* | ||
| - /usr/local/bin/python3* | ||
| - /usr/local/bin/pip* | ||
| - /sandbox/.venv/bin/python* | ||
| - /sandbox/.venv/bin/pip* | ||
| - /sandbox/.uv/python/**/python* | ||
| - /sandbox/.local/bin/pip* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| id: slack | ||
| display_name: Slack | ||
| description: Slack API, Socket Mode, and webhooks access | ||
| category: messaging | ||
| endpoints: | ||
| - host: slack.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| request_body_credential_rewrite: true | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| - host: api.slack.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| request_body_credential_rewrite: true | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| - host: hooks.slack.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| request_body_credential_rewrite: true | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| - host: wss-primary.slack.com | ||
| port: 443 | ||
| protocol: websocket | ||
| enforcement: enforce | ||
| websocket_credential_rewrite: true | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: WEBSOCKET_TEXT, path: "/**" } | ||
| - host: wss-backup.slack.com | ||
| port: 443 | ||
| protocol: websocket | ||
| enforcement: enforce | ||
| websocket_credential_rewrite: true | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: WEBSOCKET_TEXT, path: "/**" } | ||
| binaries: | ||
| - /usr/local/bin/node | ||
| - /usr/bin/node |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 required docs frontmatter and SPDX header placement.
This new docs page is missing required frontmatter fields, and the SPDX markdown header is also missing.
Proposed structure
As per coding guidelines, “SPDX license header is present after frontmatter” and frontmatter must include “title, description, keywords, topics, tags, content type, difficulty, audience, and status fields.”
📝 Committable suggestion
🤖 Prompt for AI Agents