Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/nightly-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ on:
issue-4462-gateway-pinned-approval-characterization-e2e,
messaging-compatible-endpoint-e2e, sessions-agents-cli-e2e,
channels-add-remove-e2e, channels-stop-start-e2e, brave-search-e2e,
kimi-inference-compat-e2e, bedrock-runtime-compatible-anthropic-e2e,
token-rotation-e2e, sandbox-survival-e2e, issue-2478-crash-loop-recovery-e2e,
common-egress-agent-e2e, kimi-inference-compat-e2e,
bedrock-runtime-compatible-anthropic-e2e, token-rotation-e2e,
sandbox-survival-e2e, issue-2478-crash-loop-recovery-e2e,
hermes-e2e, hermes-dashboard-e2e, hermes-root-entrypoint-smoke-e2e,
openclaw-onboard-security-posture-e2e, hermes-onboard-security-posture-e2e,
hermes-inference-switch-e2e, hermes-discord-e2e, hermes-slack-e2e,
Expand Down Expand Up @@ -717,6 +718,22 @@ jobs:
nvidia_api_key: true
github_token: true
secrets: *nightly-e2e-default-secrets
common-egress-agent-e2e:
if: >-
github.repository == 'NVIDIA/NemoClaw' && (github.event_name != 'workflow_dispatch' ||
inputs.jobs == '' ||
contains(format(',{0},', inputs.jobs), ',common-egress-agent-e2e,'))
uses: ./.github/workflows/e2e-script.yaml
with:
ref: ${{ inputs.target_ref || github.ref }}
script: test/e2e/test-common-egress-agent-e2e.sh
timeout_minutes: 120
artifact_name: "common-egress-agent-e2e-logs"
artifact_path: "/tmp/nemoclaw-e2e-common-egress-*.log"
env_json: '{"NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE":"1","NEMOCLAW_NON_INTERACTIVE":"1","NEMOCLAW_RECREATE_SANDBOX":"1"}'
nvidia_api_key: true
github_token: true
secrets: *nightly-e2e-default-secrets
kimi-inference-compat-e2e:
if: >-
github.repository == 'NVIDIA/NemoClaw' &&
Expand Down Expand Up @@ -2033,6 +2050,7 @@ jobs:
channels-add-remove-e2e,
channels-stop-start-e2e,
brave-search-e2e,
common-egress-agent-e2e,
kimi-inference-compat-e2e,
bedrock-runtime-compatible-anthropic-e2e,
token-rotation-e2e,
Expand Down Expand Up @@ -2144,6 +2162,7 @@ jobs:
channels-add-remove-e2e,
channels-stop-start-e2e,
brave-search-e2e,
common-egress-agent-e2e,
kimi-inference-compat-e2e,
bedrock-runtime-compatible-anthropic-e2e,
token-rotation-e2e,
Expand Down Expand Up @@ -2312,6 +2331,7 @@ jobs:
channels-add-remove-e2e,
channels-stop-start-e2e,
brave-search-e2e,
common-egress-agent-e2e,
kimi-inference-compat-e2e,
bedrock-runtime-compatible-anthropic-e2e,
token-rotation-e2e,
Expand Down
91 changes: 91 additions & 0 deletions nemoclaw-blueprint/policies/presets/public-reference.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

preset:
name: public-reference
description: "Read-only structured public reference APIs"

network_policies:
public_reference:
name: public_reference
endpoints:
- host: "*.wikipedia.org"
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/w/api.php" }
- allow: { method: HEAD, path: "/w/api.php" }
- allow: { method: GET, path: "/api/rest_v1/**" }
- allow: { method: HEAD, path: "/api/rest_v1/**" }
- host: api.wikimedia.org
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/core/v1/**" }
- allow: { method: HEAD, path: "/core/v1/**" }
- host: commons.wikimedia.org
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/w/api.php" }
- allow: { method: HEAD, path: "/w/api.php" }
- allow: { method: GET, path: "/api/rest_v1/**" }
- allow: { method: HEAD, path: "/api/rest_v1/**" }
- host: www.wikidata.org
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/w/api.php" }
- allow: { method: HEAD, path: "/w/api.php" }
- allow: { method: GET, path: "/wiki/Special:EntityData/**" }
- allow: { method: HEAD, path: "/wiki/Special:EntityData/**" }
- host: query.wikidata.org
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/sparql" }
- allow: { method: HEAD, path: "/sparql" }
- allow: { method: GET, path: "/bigdata/namespace/wdq/sparql" }
- allow: { method: HEAD, path: "/bigdata/namespace/wdq/sparql" }
- host: commons-query.wikimedia.org
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/sparql" }
- allow: { method: HEAD, path: "/sparql" }
- host: nominatim.openstreetmap.org
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/search" }
- allow: { method: HEAD, path: "/search" }
- allow: { method: GET, path: "/reverse" }
- allow: { method: HEAD, path: "/reverse" }
- allow: { method: GET, path: "/lookup" }
- allow: { method: HEAD, path: "/lookup" }
- allow: { method: GET, path: "/status" }
- allow: { method: HEAD, path: "/status" }
- host: restcountries.com
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/v3.1/**" }
- allow: { method: HEAD, path: "/v3.1/**" }
binaries:
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node }
- { path: /usr/bin/node }
- { path: /usr/local/bin/hermes }
- { path: /opt/hermes/.venv/bin/python }
- { path: /usr/bin/python3 }
- { path: /usr/bin/python3.11 }
- { path: /usr/bin/curl }
- { path: /usr/local/bin/curl }
72 changes: 72 additions & 0 deletions nemoclaw-blueprint/policies/presets/weather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

preset:
name: weather
description: "Read-only public weather, geocoding, and alert APIs"

network_policies:
weather:
name: weather
endpoints:
- host: api.open-meteo.com
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/v1/forecast" }
- allow: { method: HEAD, path: "/v1/forecast" }
- allow: { method: GET, path: "/v1/elevation" }
- allow: { method: HEAD, path: "/v1/elevation" }
- host: geocoding-api.open-meteo.com
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/v1/search" }
- allow: { method: HEAD, path: "/v1/search" }
- allow: { method: GET, path: "/v1/get" }
- allow: { method: HEAD, path: "/v1/get" }
- host: api.weather.gov
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/points/**" }
- allow: { method: HEAD, path: "/points/**" }
- allow: { method: GET, path: "/gridpoints/**" }
- allow: { method: HEAD, path: "/gridpoints/**" }
- allow: { method: GET, path: "/alerts" }
- allow: { method: HEAD, path: "/alerts" }
- allow: { method: GET, path: "/alerts/**" }
- allow: { method: HEAD, path: "/alerts/**" }
- allow: { method: GET, path: "/stations" }
- allow: { method: HEAD, path: "/stations" }
- allow: { method: GET, path: "/stations/**" }
- allow: { method: HEAD, path: "/stations/**" }
- allow: { method: GET, path: "/zones" }
- allow: { method: HEAD, path: "/zones" }
- allow: { method: GET, path: "/zones/**" }
- allow: { method: HEAD, path: "/zones/**" }
- allow: { method: GET, path: "/offices" }
- allow: { method: HEAD, path: "/offices" }
- allow: { method: GET, path: "/offices/**" }
- allow: { method: HEAD, path: "/offices/**" }
- allow: { method: GET, path: "/products" }
- allow: { method: HEAD, path: "/products" }
- allow: { method: GET, path: "/products/**" }
- allow: { method: HEAD, path: "/products/**" }
- allow: { method: GET, path: "/openapi.json" }
- allow: { method: HEAD, path: "/openapi.json" }
- allow: { method: GET, path: "/openapi.yaml" }
- allow: { method: HEAD, path: "/openapi.yaml" }
binaries:
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node }
- { path: /usr/bin/node }
- { path: /usr/local/bin/hermes }
- { path: /opt/hermes/.venv/bin/python }
- { path: /usr/bin/python3 }
- { path: /usr/bin/python3.11 }
- { path: /usr/bin/curl }
- { path: /usr/local/bin/curl }
5 changes: 4 additions & 1 deletion nemoclaw-blueprint/policies/tiers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ tiers:

- name: balanced
label: Balanced
description: Full dev tooling and web search. Package installs, model downloads, and inference. No messaging platform access.
description: Full dev tooling, web search, and core weather lookups. Package installs, model downloads, and inference. No messaging platform access.
presets:
- { name: npm, access: read-write }
- { name: pypi, access: read-write }
- { name: huggingface, access: read-write }
- { name: brew, access: read-write }
- { name: brave, access: read-write }
- { name: weather, access: read }

- name: open
label: Open
Expand All @@ -36,6 +37,8 @@ tiers:
- { name: huggingface, access: read-write }
- { name: brew, access: read-write }
- { name: brave, access: read-write }
- { name: weather, access: read }
- { name: public-reference, access: read }
- { name: slack, access: read-write }
- { name: discord, access: read-write }
- { name: telegram, access: read-write }
Expand Down
4 changes: 3 additions & 1 deletion src/lib/actions/sandbox/policy-channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { hashCredential } from "../../security/credential-hash";
const { isNonInteractive } = require("../../onboard") as { isNonInteractive: () => boolean };
const onboardProviders = require("../../onboard/providers");

import { filterSetupPolicyPresetsForAgent } from "../../onboard/agent-policy-presets";
import * as policies from "../../policy";

// Lazy-required: keeps qrcode-terminal + the iLink HTTP client out of the
Expand Down Expand Up @@ -118,7 +119,8 @@ export async function addSandboxPolicy(
return;
}

const allPresets = policies.listPresets();
const sandboxAgent = registry.getSandbox(sandboxName)?.agent ?? null;
const allPresets = filterSetupPolicyPresetsForAgent(policies.listPresets(), sandboxAgent);
const applied = policies.getAppliedPresets(sandboxName);

let answer = null;
Expand Down
41 changes: 41 additions & 0 deletions src/lib/onboard/agent-policy-presets.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { HERMES_TOOL_GATEWAY_PRESET_NAMES } from "./hermes-managed-tools";
import {
isOpenclawAgent,
OPENCLAW_OTEL_LOCAL_POLICY_PRESET,
} from "./openclaw-otel-policy-presets";

const OPENCLAW_ONLY_POLICY_PRESETS = new Set<string>([
"openclaw-pricing",
OPENCLAW_OTEL_LOCAL_POLICY_PRESET,
]);

function isHermesAgent(agent: string | null | undefined): boolean {
return typeof agent === "string" && agent.trim().toLowerCase() === "hermes";
}

export function setupPolicyPresetAppliesToAgent(
presetName: string,
agent: string | null | undefined,
): boolean {
const name = presetName.trim().toLowerCase();
if (HERMES_TOOL_GATEWAY_PRESET_NAMES.has(name)) return isHermesAgent(agent);
if (OPENCLAW_ONLY_POLICY_PRESETS.has(name)) return isOpenclawAgent(agent);
return true;
}

export function filterSetupPolicyPresetsForAgent<T extends { name: string }>(
presets: T[],
agent: string | null | undefined,
): T[] {
return presets.filter((preset) => setupPolicyPresetAppliesToAgent(preset.name, agent));
}

export function filterSetupPolicyPresetNamesForAgent(
presetNames: string[],
agent: string | null | undefined,
): string[] {
return presetNames.filter((name) => setupPolicyPresetAppliesToAgent(name, agent));
}
4 changes: 4 additions & 0 deletions src/lib/onboard/hermes-managed-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ export function defaultHermesToolGatewaySelection(): string[] {
);
}

export function allHermesToolGatewayPolicyPresets(): string[] {
return HERMES_TOOL_GATEWAY_PRESETS.map((preset) => preset.name);
}

function resolveHermesToolGatewaySelection(part: string) {
const index = /^[0-9]+$/.test(part) ? Number(part) - 1 : -1;
if (index >= 0) return HERMES_TOOL_GATEWAY_PRESETS[index] || null;
Expand Down
Loading
Loading