Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
39f8b77
fix(policy): restrict Hermes Discord binary access
prekshivyas Aug 31, 2026
69630ff
test(policy): cover Discord runtime guidance
prekshivyas Aug 31, 2026
7bd41ca
chore(policy): refresh reviewed runtime bundle
prekshivyas Aug 31, 2026
6b3c817
merge: refresh Hermes Discord fix from main
prekshivyas Aug 31, 2026
f03fdec
merge: refresh Hermes Discord fix from main
prekshivyas Aug 31, 2026
154699d
Merge branch 'main' into codex/fix-hermes-discord-node-policy
cv Sep 1, 2026
86f89a8
Merge branch 'main' into codex/fix-hermes-discord-node-policy
prekshivyas Sep 1, 2026
2bd37f0
fix(policy): validate Hermes Discord with Python
prekshivyas Sep 1, 2026
7961bc8
fix(policy): complete Hermes Discord regression evidence
prekshivyas Sep 1, 2026
9ba480c
test(e2e): cover Hermes Discord REST proof
prekshivyas Sep 1, 2026
b8813ca
merge: sync upstream main
prekshivyas Sep 1, 2026
74b0e67
merge: sync upstream main
prekshivyas Sep 1, 2026
e51270f
test(e2e): prove Hermes Discord REST rewrite
cv Sep 1, 2026
7b174c4
test(e2e): prove Hermes denies Node Discord egress
cv Sep 1, 2026
19e3815
refactor(policy): keep Discord guidance local
cv Sep 1, 2026
98baa26
test(e2e): tighten Hermes Discord denial proof
cv Sep 1, 2026
eb102f5
refactor(policy): restore manifest-owned guidance
cv Sep 1, 2026
928df08
fix(build): refresh reviewed startup runtime bundle
cv Sep 1, 2026
e34b1e0
merge: resolve conflicts with main
github-actions[bot] Sep 1, 2026
e59ea72
fix(policy): document Hermes Discord remediation
prekshivyas Sep 1, 2026
e25b802
Merge remote-tracking branch 'origin/main' into HEAD
prekshivyas Sep 1, 2026
1e6b8c0
Merge remote-tracking branch 'origin/main' into codex/pr10682-final
prekshivyas Sep 1, 2026
e12caf5
merge: resolve conflicts with main
github-actions[bot] Sep 1, 2026
4b621c8
merge(e2e): resolve Hermes Discord fixture conflicts
prekshivyas Sep 1, 2026
b4981ce
merge(main): synchronize PR 10682
prekshivyas Sep 1, 2026
2228126
Merge branch 'main' into codex/fix-hermes-discord-node-policy
prekshivyas Sep 1, 2026
67b53ed
merge(pr): preserve remote PR updates
prekshivyas Sep 1, 2026
1b2a896
merge(main): synchronize PR 10682
prekshivyas Sep 1, 2026
531642e
merge(main): synchronize PR 10682
prekshivyas Sep 1, 2026
864e37d
Merge branch 'main' into codex/fix-hermes-discord-node-policy
prekshivyas Sep 1, 2026
b3fd418
test(e2e): preserve Hermes denial evidence
prekshivyas Sep 1, 2026
e84a83f
merge(main): refresh PR 10682
prekshivyas Sep 1, 2026
db2377f
test(e2e): map Hermes denial probe parity
prekshivyas Sep 1, 2026
ebdcc63
merge(main): refresh PR 10682
prekshivyas Sep 1, 2026
dd7b229
test(e2e): remove redundant Hermes policy read
prekshivyas Sep 2, 2026
388e0fb
Merge remote-tracking branch 'origin/main' into codex/pr10682-e2e-den…
prekshivyas Sep 2, 2026
21a97b0
merge: resolve conflicts with main
github-actions[bot] Sep 2, 2026
df1f627
merge: refresh from upstream main
prekshivyas Sep 2, 2026
c9199a0
fix(ci): refresh reviewed startup runtime
prekshivyas Sep 2, 2026
7cfd627
fix(policy): accept Discord HTTP reachability evidence
prekshivyas Sep 2, 2026
3985a1d
merge: resolve conflicts with main
github-actions[bot] Sep 2, 2026
d858d2c
fix(discord): align Hermes review guidance
prekshivyas Sep 2, 2026
087024c
fix(test): drop retired Hermes Node probe
prekshivyas Sep 2, 2026
106f727
fix(discord): restrict Hermes runtime authority
prekshivyas Sep 2, 2026
9e79653
docs(policy): align Hermes Discord remediation
prekshivyas Sep 2, 2026
05bca26
fix(policy): complete Hermes Discord authority proof
prekshivyas Sep 2, 2026
2b7ede2
test(policy): align Hermes Discord CI coverage
prekshivyas Sep 2, 2026
260cf29
merge: resolve conflicts with main
github-actions[bot] Sep 2, 2026
1d0fb71
test(policy): consolidate Discord reconciliation
prekshivyas Sep 2, 2026
46127b3
test(e2e): share fake messaging policy setup
prekshivyas Sep 2, 2026
eb36cf7
test(e2e): cover explicit fake policy binaries
prekshivyas Sep 2, 2026
5e6bf13
test(e2e): move fake policy parity proof
prekshivyas Sep 2, 2026
1503226
test(e2e): keep parity proof behavior-focused
prekshivyas Sep 2, 2026
2e3e64c
Merge branch 'main' into codex/fix-hermes-discord-node-policy
prekshivyas Sep 2, 2026
5a84c21
merge(main): resolve conflicts for #10682
prekshivyas Sep 3, 2026
355b7ea
fix(pi): refresh Discord qualification receipts
prekshivyas Sep 3, 2026
f4249cd
fix(policy): restore Hermes Discord trust proofs
prekshivyas Sep 3, 2026
e46edd4
fix(security): refresh Pi receipts and harden fixture
prekshivyas Sep 3, 2026
d29047c
test(e2e): require attached fixture providers
prekshivyas Sep 3, 2026
178c820
test(e2e): record Slack credential phase
prekshivyas Sep 3, 2026
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
8 changes: 4 additions & 4 deletions ci/pi-agent-qualification-v1-linux-amd64.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"agent": "pi",
"platform": "linux/amd64",
"image": "ghcr.io/nvidia/nemoclaw/pi-sandbox",
"digest": "sha256:4dc92681c8a7a64d9b571527e5a9a66c9b665fdbc952fba32abfaca00a0b99eb",
"reference": "ghcr.io/nvidia/nemoclaw/pi-sandbox@sha256:4dc92681c8a7a64d9b571527e5a9a66c9b665fdbc952fba32abfaca00a0b99eb",
"digest": "sha256:3f8c1fe3e9103489c11bb16c2d984d201be01440d66db87ec0ce9390ad0de7e0",
"reference": "ghcr.io/nvidia/nemoclaw/pi-sandbox@sha256:3f8c1fe3e9103489c11bb16c2d984d201be01440d66db87ec0ce9390ad0de7e0",
"source": {
"repository": "NVIDIA/NemoClaw",
"revision": "49b70f08a9a375d45c275f7fd4924caf58a10ca4",
"revision": "f4249cd772bd099e0210c0851522080d85fbd30b",
"release": "v0.1.0",
"cohort": "ghrun-33701876532-1"
"cohort": "ghrun-33731127761-1"
},
"startupProfileContractVersion": 1,
"capabilityContractVersion": 1
Expand Down
8 changes: 4 additions & 4 deletions ci/pi-agent-qualification-v1-linux-arm64.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"agent": "pi",
"platform": "linux/arm64",
"image": "ghcr.io/nvidia/nemoclaw/pi-sandbox",
"digest": "sha256:cbeaa6592b98ea3438ebe02e856630cc7c5efe809a5b82b45f1a36204cbc131f",
"reference": "ghcr.io/nvidia/nemoclaw/pi-sandbox@sha256:cbeaa6592b98ea3438ebe02e856630cc7c5efe809a5b82b45f1a36204cbc131f",
"digest": "sha256:f3553f59c09f4d40c20f4d93b3db0a43e87835373d2de02968292f6bfc72af07",
"reference": "ghcr.io/nvidia/nemoclaw/pi-sandbox@sha256:f3553f59c09f4d40c20f4d93b3db0a43e87835373d2de02968292f6bfc72af07",
"source": {
"repository": "NVIDIA/NemoClaw",
"revision": "49b70f08a9a375d45c275f7fd4924caf58a10ca4",
"revision": "f4249cd772bd099e0210c0851522080d85fbd30b",
"release": "v0.1.0",
"cohort": "ghrun-33701876532-1"
"cohort": "ghrun-33731127761-1"
},
"startupProfileContractVersion": 1,
"capabilityContractVersion": 1
Expand Down
30 changes: 30 additions & 0 deletions docs/network-policy/apply-policy-presets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,36 @@ Run the same `policy add` command after you edit a maintained preset or a custom

The merge starts from the round-trippable base policy returned by `openshell policy get --base`. It excludes provider-composed `_provider_*` entries because OpenShell reserves that namespace and rejects it in `policy set`. Existing presets and baseline entries remain in place.

<AgentOnly variant="hermes">

### Remove the Previous Hermes Discord Node Grant

A Hermes sandbox that was created with an older Discord preset keeps its live policy during rebuild.
Reapply the maintained `discord` preset before the next rebuild to remove the previous `/usr/local/bin/node` grant.

Preview and apply the current preset:

```bash
$$nemoclaw <name> policy add discord --dry-run
$$nemoclaw <name> policy add discord --yes
```

Inspect the resulting live policy:

```bash
$$nemoclaw <name> policy get
```

The `discord` binary list must contain `/opt/hermes/.venv/bin/python3`, `/opt/hermes/.venv/bin/python`, `/usr/bin/python3`, and the managed image's resolved interpreter `/usr/bin/python3.13`.
It must not contain the broad `/usr/bin/python3*` wildcard or `/usr/local/bin/node`.
The reapply operation retains the Discord credential binding and all policy entries outside the maintained `discord` entry.
A later rebuild preserves this reconciled live policy.

If the apply command fails, NemoClaw leaves the live policy unchanged.
Resolve the reported policy or gateway error, then rerun the preview and apply commands.

</AgentOnly>

## List and Remove Presets

List available presets and identify which ones match the current OpenShell policy:
Expand Down
28 changes: 25 additions & 3 deletions docs/reference/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2239,11 +2239,11 @@ In that case:

### Discord preset validation behind a proxy

The built-in Discord policy preset intentionally allows the Node binaries used by the messaging runtime and does not allow `curl`. As a result, `curl -s https://discord.com` failing, hanging, or printing no output is not proof that the Discord preset is broken.
The built-in Discord policy preset allows the OpenClaw Node.js runtime and does not allow `curl`. As a result, `curl -s https://discord.com` failing, hanging, or printing no output is not proof that the Discord preset is broken.

Behind the OpenShell proxy, direct DNS-only checks can also be the wrong signal. For example, `dns.resolve("gateway.discord.gg")` can fail even when HTTPS requests routed through the proxy are healthy.

Use Node HTTPS as the manual REST probe:
Use the OpenClaw Node.js runtime for the manual REST probe:

```bash
node - <<'NODE'
Expand Down Expand Up @@ -2279,7 +2279,7 @@ https
NODE
```

Any HTTP status from these probes means the Node process reached the endpoint; the exact status can vary by unauthenticated path. If the Node REST probe works but the Discord channel is still unhealthy, investigate the native gateway path instead of widening the preset. Check the gateway logs and blocked-request output with `openshell term`, and look for `gateway.discord.gg` connection or WebSocket upgrade failures.
Any HTTP status from these probes means the Node.js process reached the endpoint; the exact status can vary by unauthenticated path. A transport error or OpenShell policy denial means the probe failed. If the REST probe works but the Discord channel is still unhealthy, investigate the native gateway path instead of widening the preset. Check the gateway logs and blocked-request output with `openshell term`, and look for `gateway.discord.gg` connection or WebSocket upgrade failures.

### Messaging bridge appears running but no messages arrive

Expand Down Expand Up @@ -4297,6 +4297,28 @@ Continue only when onboarding no longer reports that the Podman service or OpenS

The issues below are common problems you may encounter when running Hermes through `nemohermes`. For setup, refer to [Quickstart with Hermes](../../hermes/get-started/quickstart).

### Discord preset validation behind a proxy

The Hermes Discord policy allows its virtual-environment Python interpreter and the concrete system paths to which that interpreter resolves. It does not grant Node.js or `curl` Discord egress. A Node.js or `curl` failure is therefore not proof that the Discord preset is broken.

Use the Hermes virtual-environment Python runtime inside the affected sandbox for the manual REST probe:

```bash
nemohermes <name> exec -- /opt/hermes/.venv/bin/python -c 'import urllib.error, urllib.request; u="https://discord.com/api/v10/gateway";
try: print(urllib.request.urlopen(u, timeout=20).status)
except urllib.error.HTTPError as error: print(error.code)'
```

To check Discord CDN egress, use the same sandbox-qualified Python runtime:

```bash
nemohermes <name> exec -- /opt/hermes/.venv/bin/python -c 'import urllib.error, urllib.request; u="https://cdn.discordapp.com/";
try: print(urllib.request.urlopen(u, timeout=20).status)
except urllib.error.HTTPError as error: print(error.code)'
```

Any HTTP status means the Python process reached the endpoint; the exact status can vary by unauthenticated path. A transport error or OpenShell policy denial means the probe failed. If the REST probe works but the Discord channel is still unhealthy, inspect the gateway logs and blocked-request output with `openshell term`. Look for `gateway.discord.gg` connection or WebSocket upgrade failures instead of widening the preset.

### Hermes dashboard config did not converge

`nemohermes inference set` updates the OpenShell route, registry, and `/sandbox/.hermes/config.yaml` before it refreshes the separate dashboard profile. If the dashboard profile exists but NemoClaw cannot confirm that `/sandbox/.hermes/profiles/dashboard-home/config.yaml` was updated, the command exits nonzero without printing `Inference route synced`. The committed route and main Hermes config are not rolled back.
Expand Down
20 changes: 18 additions & 2 deletions src/lib/actions/sandbox/policy-channel-policy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,17 +332,33 @@ describe("addSandboxPolicy", () => {
},
);

it("prints Discord validation guidance when the preset name is provided", async () => {
it("prints Hermes Python Discord validation guidance when the preset name is provided", async () => {
arrangeSandbox("hermes");

await addSandboxPolicy("test-sandbox", { preset: "discord", yes: true });

expect(printedText()).toContain("curl is not in the preset binary allowlist");
expect(printedText()).toContain("Node HTTPS");
expect(printedText()).toContain("nemohermes <name> exec -- /opt/hermes/.venv/bin/python -c");
expect(printedText()).toContain("except urllib.error.HTTPError as error: print(error.code)");
expect(printedText()).toContain("Any HTTP response confirms reachability");
expect(printedText()).not.toContain("prints 200 on success");
expect(printedText()).not.toMatch(/^\/opt\/hermes\/\.venv\/bin\/python -c/mu);
expect(printedText()).not.toContain("node -e");
expect(promptMock).not.toHaveBeenCalled();
expect(applyPresetMock).toHaveBeenCalledWith("test-sandbox", "discord", {
suppressDisclosure: true,
});
});

it("prints OpenClaw Node Discord validation guidance without the Hermes probe", async () => {
arrangeSandbox("openclaw");

await addSandboxPolicy("test-sandbox", { preset: "discord", yes: true });

expect(printedText()).toContain("node -e");
expect(printedText()).not.toContain("/opt/hermes/.venv/bin/python");
});

it("does not print messaging guidance when a non-messaging preset is selected", async () => {
await addSandboxPolicy("test-sandbox");

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 @@ -454,7 +454,9 @@ async function addSandboxPolicyUnlocked(
policies.logOpenClawNpmCompatibilityDisclosure();
}

const presetWarning = policies.getPresetValidationWarning(answer);
const messagingAgent =
sandboxAgent === "openclaw" || sandboxAgent === "hermes" ? sandboxAgent : undefined;
const presetWarning = policies.getPresetValidationWarning(answer, { agent: messagingAgent });
if (presetWarning) {
console.log("");
console.log(` ${presetWarning}`);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/agent/candidate-authority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const CANDIDATE_QUALIFICATION_RECEIPT_DIGESTS: Readonly<
Record<CandidateManagedImageAgent, readonly string[]>
> = Object.freeze({
pi: Object.freeze([
"781f7d740336db953f917ea4396ebab9902322f1d9d606b4009c10aea63cb6b1",
"837bac6c20ef32640797768eded6975d1909b0cb3243efa5b59f8f9422a8b8e0",
"aa0cf71163ac4741e70b794e8a0d9afdb49e1c16770b0ad2fed33ccb2c65c8c7",
"0eba30f97b70724a9f35a5193ba46358caae15708e3c7c87d2488434d0950cbc",
]),
});

Expand Down
18 changes: 15 additions & 3 deletions src/lib/messaging/channels/discord/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,23 @@ export const discordManifest = {
validationWarningLines: [
"For Discord preset validation, do not use curl as the success signal:",
"curl is not in the preset binary allowlist, so curl probes can fail even",
"when the policy is working. Use Node HTTPS against",
"https://discord.com/api/v10/gateway or validate the configured",
'messaging bridge/gateway path. DNS-only checks such as dns.resolve("gateway.discord.gg")',
"when the policy is working. Validate the configured messaging bridge/gateway path.",
'DNS-only checks such as dns.resolve("gateway.discord.gg")',
"can also be inconclusive behind a proxy.",
"The agent-specific gateway probe prints an HTTP status when it reaches Discord.",
"Any HTTP response confirms reachability. A transport error or OpenShell policy",
"denial means validation failed.",
],
validationWarningLinesByAgent: {
openclaw: [
"OpenClaw validation uses its Node runtime:",
`node -e "require('node:https').get('https://discord.com/api/v10/gateway',r=>console.log(r.statusCode)).on('error',e=>{console.error(e.message);process.exitCode=1})"`,
],
hermes: [
"Hermes validation uses its virtual-environment Python runtime:",
`nemohermes <name> exec -- /opt/hermes/.venv/bin/python -c "import urllib.error, urllib.request; u='https://discord.com/api/v10/gateway';\ntry: print(urllib.request.urlopen(u, timeout=20).status)\nexcept urllib.error.HTTPError as error: print(error.code)"`,
],
},
},
],
render: [
Expand Down
9 changes: 6 additions & 3 deletions src/lib/messaging/channels/discord/policy/hermes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ network_policies:
enforcement: enforce
rules:
- allow: { method: GET, path: "/**" }
# OpenShell matches the resolved realpath exactly. Hermes' venv Python
# resolves to /usr/bin/python3.13 in the managed image, so retain both the
# operator-facing venv paths and the concrete runtime identities.
# Revisit the versioned path when the base image bumps Python.
binaries:
- { path: /usr/local/bin/node }
- { path: /usr/bin/python3* }
- { path: /usr/bin/python3.13 }
- { path: /opt/hermes/.venv/bin/python3 }
- { path: /opt/hermes/.venv/bin/python }
- { path: /usr/bin/python3 }
- { path: /usr/bin/python3.13 }
23 changes: 22 additions & 1 deletion src/lib/messaging/channels/metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,22 @@ describe("built-in messaging channel metadata", () => {
"teams",
]);
expect(getMessagingPolicyPresetValidationWarnings().discord).toContain(
"https://discord.com/api/v10/gateway or validate the configured",
"Any HTTP response confirms reachability. A transport error or OpenShell policy",
);
const openClawDiscordWarning = getMessagingPolicyPresetValidationWarnings({
agent: "openclaw",
}).discord;
expect(openClawDiscordWarning).toContain("OpenClaw validation uses its Node runtime:");
expect(openClawDiscordWarning).not.toContain(
"Hermes validation uses its virtual-environment Python runtime:",
);
const hermesDiscordWarning = getMessagingPolicyPresetValidationWarnings({
agent: "hermes",
}).discord;
expect(hermesDiscordWarning).toContain(
"Hermes validation uses its virtual-environment Python runtime:",
);
expect(hermesDiscordWarning).not.toContain("OpenClaw validation uses its Node runtime:");
expect(listOpenClawManagedChannelNames()).toEqual([
"telegram",
"discord",
Expand Down Expand Up @@ -324,11 +338,13 @@ describe("built-in messaging channel metadata", () => {
policyKeys: ["alpha_key"],
agentPolicyKeys: { hermes: ["alpha_hermes"] },
validationWarningLines: ["alpha warning"],
validationWarningLinesByAgent: { hermes: ["alpha Hermes warning"] },
}),
manifestWithPreset("beta", {
name: "shared",
policyKeys: ["beta_key"],
validationWarningLines: ["beta warning"],
validationWarningLinesByAgent: { openclaw: ["beta OpenClaw warning"] },
}),
];

Expand All @@ -339,8 +355,13 @@ describe("built-in messaging channel metadata", () => {
]);
expect(getMessagingPolicyPresetValidationWarnings({ manifests }).shared).toEqual([
"alpha warning",
"alpha Hermes warning",
"beta warning",
"beta OpenClaw warning",
]);
expect(
getMessagingPolicyPresetValidationWarnings({ agent: "hermes", manifests }).shared,
).toEqual(["alpha warning", "alpha Hermes warning", "beta warning"]);
});

it("derives OpenClaw managed channel names from explicit runtime metadata", () => {
Expand Down
10 changes: 8 additions & 2 deletions src/lib/messaging/channels/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export interface MessagingPolicyPresetMetadata {
readonly agentPolicyKeys: Partial<Record<MessagingAgentId, readonly string[]>>;
readonly requiredAtCreate: boolean;
readonly validationWarningLines: readonly string[];
readonly validationWarningLinesByAgent: Partial<Record<MessagingAgentId, readonly string[]>>;
}

export interface OpenClawRuntimeChannelMetadata {
Expand Down Expand Up @@ -267,6 +268,7 @@ export function listMessagingPolicyPresetMetadata(
agentPolicyKeys: normalized.agentPolicyKeys ?? {},
requiredAtCreate: normalized.requiredAtCreate === true,
validationWarningLines: normalized.validationWarningLines ?? [],
validationWarningLinesByAgent: normalized.validationWarningLinesByAgent ?? {},
};
}),
);
Expand Down Expand Up @@ -341,10 +343,14 @@ export function getMessagingPolicyPresetValidationWarnings(
): Readonly<Record<string, readonly string[]>> {
const result: Record<string, string[]> = {};
for (const preset of listMessagingPolicyPresetMetadata(options)) {
if (preset.validationWarningLines.length === 0) continue;
const agentLines = options.agent
? (preset.validationWarningLinesByAgent[options.agent] ?? [])
: Object.values(preset.validationWarningLinesByAgent).flatMap((lines) => lines ?? []);
const warningLines = [...preset.validationWarningLines, ...agentLines];
if (warningLines.length === 0) continue;
result[preset.presetName] = uniqueStrings([
...(result[preset.presetName] ?? []),
...preset.validationWarningLines,
...warningLines,
]);
}
return result;
Expand Down
1 change: 1 addition & 0 deletions src/lib/messaging/manifest/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface ChannelPolicyPresetSpec {
readonly agentPolicyKeys?: Partial<Record<MessagingAgentId, readonly string[]>>;
readonly requiredAtCreate?: boolean;
readonly validationWarningLines?: readonly string[];
readonly validationWarningLinesByAgent?: Partial<Record<MessagingAgentId, readonly string[]>>;
}

/** How a channel obtains credential or session material. */
Expand Down
9 changes: 7 additions & 2 deletions src/lib/onboard/initial-policy-real-policy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,13 @@ describe("initial sandbox policy real preset merge", () => {

const discordBinaries =
policy.network_policies?.discord?.binaries?.map((binary) => binary.path) ?? [];
expect(discordBinaries).toContain("/usr/bin/python3*");
expect(discordBinaries).toContain("/opt/hermes/.venv/bin/python");
expect(discordBinaries).toEqual([
"/opt/hermes/.venv/bin/python3",
"/opt/hermes/.venv/bin/python",
"/usr/bin/python3",
"/usr/bin/python3.13",
]);
expect(discordBinaries).not.toContain("/usr/bin/python3*");
expect(discordBinaries).not.toContain("/usr/bin/node");

const boundProviders =
Expand Down
13 changes: 8 additions & 5 deletions src/lib/policy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,10 @@ const MESSAGING_PRESET_LABELS: Readonly<Record<string, string>> = Object.fromEnt
}),
);

const MESSAGING_PRESET_VALIDATION_WARNING_LINES: Readonly<Record<string, readonly string[]>> =
getMessagingPolicyPresetValidationWarnings();

function getPresetValidationWarning(presetName: string): string | null {
function getPresetValidationWarning(
presetName: string,
options: { agent?: "openclaw" | "hermes" } = {},
): string | null {
if (presetName === "jira") {
return [
"Jira preset validation uses per-binary policy signals.",
Expand All @@ -508,7 +508,10 @@ function getPresetValidationWarning(presetName: string): string | null {
"configuration are wired up at onboard time and are not added by applying",
"this preset alone.",
];
lines.push(...(MESSAGING_PRESET_VALIDATION_WARNING_LINES[presetName] ?? []));
const validationWarningLines = getMessagingPolicyPresetValidationWarnings({
agent: options.agent,
});
lines.push(...(validationWarningLines[presetName] ?? []));

return lines.join("\n ");
}
Expand Down
Loading
Loading