Skip to content

feat(config): add network grants to the isolated preset - #13405

Merged
cv merged 1 commit into
v1from
feat/network-grants
Oct 18, 2026
Merged

cv merged 1 commit into
v1from
feat/network-grants

Conversation

@cv

@cv cv commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #13404. Part of #13394.

Failure

A YAML sandbox's network was either the isolated preset or policy.explicit, OpenShell's complete policy. An agent that needed one more host, or a tool-restricted MCP grant, had to restate the whole policy: filesystem, Landlock and process settings that must match the harness. The HCL travel team example adds such grants on top of OpenShell's defaults, for researcher sources and for the buyer's booking service restricted to two tools, which the YAML couldn't express.

Decision

  • network.grants holds named grants added to the isolated preset. Each grant takes endpoints in OpenShell's endpoint shape, including MCP method and tool rules, and optional binaries.
  • Grants join the sandbox's managed rules, like the inference and search grants. Without binaries, they take the harness's executables from the launch.
  • An explicit policy can't take grants, since it already lists every rule, and a grant can't reuse a managed rule's name.
  • network.rs is adapted code; its change list records this.

Validation

  • A new SDK test failed before the change (unknown fields are not allowed) and passes after. It checks that the compiled policy input carries the grant on top of the preset with no executables, that the document round-trips, and that grants plus an explicit policy are rejected.
  • A new lifecycle test applies a grant through the SDK and the bundle's CLI against the fixture gateway, exports, re-applies unchanged, and destroys.
  • cargo ci passes locally: 1549 unit tests and 153 lifecycle tests.
  • The schema and the configuration reference are regenerated, and docs/sandbox-network.md documents grants.

network.grants adds named endpoint grants to the isolated preset, joining the
sandbox's managed rules with the harness's executables unless binaries are
given, so an agent needing one more host keeps the preset.
@cv
cv enabled auto-merge (squash) October 18, 2026 03:52
@cv
cv merged commit c1a6f8e into v1 Oct 18, 2026
@cv
cv deleted the feat/network-grants branch October 18, 2026 04:05
@github-actions

Copy link
Copy Markdown
Contributor

cv added a commit that referenced this pull request Oct 18, 2026
)

Closes #13399. Part of #13394. Stacked on #13405.

## Failure

The multi-agent travel team existed only as hand-written HCL (#13393).
Expressing it in YAML exposed gaps that #13400, #13401, #13402, #13403
and #13405 closed, but there was no YAML version showing that the team
now fits.

## Decision

`examples/travel-team.yaml` declares the HCL example's six agents:

- **Researchers:** a managed Ollama Nemotron Nano, web search with
Hermes's key name (`sandboxEnv`), the `web` toolset, at temperature 0.2.
- **Scheduler:** a hosted Nemotron Super at temperature 0.3, with the
`delegation` toolset.
- **Buyer:**
  - the hosted model at temperature 0;
- the booking service as an `api` integration and an MCP server, with
only its toolset;
- a network grant limiting the service to setup, discovery, `get_quote`
and `book_option`.
- **All roles:** isolated sandboxes, Hermes's `custom` provider
(reasoning off), and the HCL example's token and turn limits.

The YAML has no templating, so instructions are written out per agent
and shorter than the HCL's, and they describe each hand-off format
instead of embedding the JSON Schemas. The HCL README links the YAML
version and says when to use each.

## Validation

- A new SDK test compiles the example and checks each sandbox against
the HCL example's settings: Fabric model provider, temperature, token
and turn limits, toolsets, instructions, attached registrations, and the
buyer's tool-restricted grant.
- `cargo ci` passes locally: 1552 unit tests and 153 lifecycle tests.
- Not run against a live gateway; the HCL version ran on a DGX Spark in
#13393.
@wscurran wscurran added area: policy Network policy, egress rules, presets, or sandbox policy area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality v1 NemoClaw v1 branch labels Oct 23, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: policy Network policy, egress rules, presets, or sandbox policy area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants