Skip to content

Commit bd2003e

Browse files
authored
refactor: ux improvements (#38)
* feat(ui): inference --no-verify, OpenShell rebrand, NVIDIA green vars, fixed save bar, upgrade URL short name * Hide recommendation in policy tab page when there is no recommendation * feat(welcome-ui): add inference provider picker (NVIDIA + partners) in install flow * Fixed inference providers UI * fixed NCP welcome selection * Added skill for network policy fail fast * Correctly loaded in the right policy.yaml
1 parent bc4b5a3 commit bd2003e

File tree

2 files changed

+74
-5
lines changed

2 files changed

+74
-5
lines changed

sandboxes/openclaw-nvidia/Dockerfile

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ RUN apt-get update && \
2222

2323
# Bake the NeMoClaw default policy into the same location used by the
2424
# OpenClaw base image so direct image launches and create-time --policy
25-
# launches start from the same policy.
26-
RUN mkdir -p /etc/navigator
27-
COPY policy.yaml /etc/navigator/policy.yaml
25+
# launches start from the same policy. (Start script and policy-proxy
26+
# read from /etc/openshell/policy.yaml.)
27+
RUN mkdir -p /etc/openshell
28+
COPY policy.yaml /etc/openshell/policy.yaml
2829

2930
# Override the startup script with our version (adds runtime API key injection)
3031
COPY openclaw-nvidia-start.sh /usr/local/bin/openclaw-nvidia-start
@@ -44,8 +45,7 @@ RUN npm install -g @hono/node-server@1.19.11
4445

4546
# Allow the sandbox user to read the default policy (the startup script
4647
# copies it to a writable location; this chown covers non-Landlock envs).
47-
# Some base image variants do not pre-create /etc/navigator.
48-
RUN mkdir -p /etc/navigator && chown -R sandbox:sandbox /etc/navigator
48+
RUN mkdir -p /etc/openshell && chown -R sandbox:sandbox /etc/openshell
4949
# Stage the NeMoClaw DevX extension source
5050
COPY nemoclaw-ui-extension/extension/ /opt/nemoclaw-devx/
5151

@@ -80,4 +80,13 @@ RUN set -e; \
8080
RUN npm install -g tar@7.5.11 && \
8181
npm --prefix "$(npm root -g)/openclaw" update tar
8282

83+
# Sandbox-specific agent skills (e.g. OpenShell network policy fail-fast).
84+
# Installed into ~/.agents/skills and symlinked into ~/.claude/skills for discovery.
85+
COPY skills/ /sandbox/.agents/skills/
86+
RUN for skill in /sandbox/.agents/skills/*/; do \
87+
[ -d "$skill" ] || continue; \
88+
ln -sf "$skill" "/sandbox/.claude/skills/$(basename "$skill")"; \
89+
done && \
90+
chown -R sandbox:sandbox /sandbox/.agents/skills /sandbox/.claude/skills
91+
8392
ENTRYPOINT ["/bin/bash"]
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: openshell-network-policy-failfast
3+
description: Stops retrying the same tool call, execution, internet search, or network connection when it fails due to OpenShell sandbox network policy blocking. Use when running in the openclaw-nvidia sandbox (OpenShell) and any network-dependent operation fails with connection refused, timeout, or policy denial.
4+
license: Apache-2.0
5+
compatibility: OpenShell Community sandboxes (e.g. openclaw-nvidia); applies when the agent runs inside a sandbox with restrictive network_policies.
6+
metadata:
7+
version: "1.0"
8+
---
9+
# OpenShell Network Policy Fail-Fast
10+
11+
When running inside the **openclaw-nvidia** sandbox (or any OpenShell sandbox), network access is restricted by `network_policies`. Tool calls, shell commands that use the network, internet searches, and outbound connections can be **blocked** by policy. This skill instructs the agent to **stop retrying the same operation** when a failure is due to policy blocking and to respond clearly to the user instead.
12+
13+
## When to Apply
14+
15+
- The agent is operating in the **openclaw-nvidia** (or OpenShell) sandbox context.
16+
- A **tool call**, **command execution**, **web search**, or **network request** fails with:
17+
- Connection refused, connection reset, or timeout to an external host
18+
- Explicit policy/denial or “blocked” in logs or error message
19+
- Errors indicating the request was not allowed (e.g. sandbox/network policy)
20+
- The user has not explicitly asked to “retry” or “try again” with the same operation.
21+
22+
## Output Format
23+
24+
When a network-related failure is attributed to OpenShell policy blocking:
25+
26+
**Summary:** One sentence stating that the operation was blocked by sandbox network policy and will not be retried.
27+
28+
**Details:**
29+
- **What failed:** <tool/command/search/URL or operation name>
30+
- **Reason:** Blocked by OpenShell sandbox network policy (no retry of same operation).
31+
- **Suggestion:** <alternatives: use allowed endpoints, suggest user run outside sandbox, or point to policy docs>
32+
33+
## Rules
34+
35+
1. **Do not retry** the same tool call, execution, internet search, or network connection once it has failed due to blocking network policies. One failure under policy is sufficient to treat the operation as disallowed.
36+
2. **Identify policy-related failures** from errors such as connection refused, timeout to external hosts, or messages that indicate sandbox/network policy denial. Do not assume every network error is policy-related; only apply this behavior when the context (OpenShell/openclaw-nvidia sandbox) and error pattern fit.
37+
3. **Report clearly** to the user that the operation was blocked and will not be retried, and offer alternatives (e.g. use an allowed service, run the task outside the sandbox, or check policy configuration).
38+
4. **Prefer allowed endpoints** when possible (e.g. use REST APIs or hosts that are listed in the sandbox’s `network_policies` instead of retrying a blocked host).
39+
5. **Do not loop** on the same URL, command, or tool; stop after the first policy-related failure for that operation.
40+
41+
## Example
42+
43+
**Input (scenario):** User asks to “fetch the latest news from example.com.” The agent runs a tool (e.g. `curl` or a web search) and receives connection refused or a policy denial.
44+
45+
**Output:**
46+
47+
**Summary:** The request to fetch content from example.com was blocked by the OpenShell sandbox network policy and will not be retried.
48+
49+
**Details:**
50+
- **What failed:** Tool/request to example.com (e.g. `curl` or web search).
51+
- **Reason:** Blocked by OpenShell sandbox network policy (no retry of same operation).
52+
- **Suggestion:** Use an allowed endpoint if available, or run this request outside the sandbox. You can review allowed hosts in the sandbox’s `policy.yaml` (e.g. `network_policies`).
53+
54+
## Gotchas
55+
56+
- **Not every failure is policy:** Timeouts or refusals can be due to the host being down or firewalled elsewhere. Apply this skill when the environment is an OpenShell sandbox and the error is consistent with policy blocking (e.g. only certain hosts work).
57+
- **Same operation, different params:** “Do not retry the same operation” means the same tool call/URL/command. Trying a different allowed host or a different tool is acceptable and encouraged.
58+
- **User says “retry”:** If the user explicitly asks to retry, acknowledge the policy block and explain that retrying the same request will likely fail again; suggest alternatives rather than blindly retrying.
59+
60+
For more on OpenShell sandbox policies, see the repository’s [policy.yaml](https://github.com/NVIDIA/OpenShell-Community/blob/main/sandboxes/openclaw-nvidia/policy.yaml) and [CONTRIBUTING.md](https://github.com/NVIDIA/OpenShell-Community/blob/main/CONTRIBUTING.md).

0 commit comments

Comments
 (0)