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
2 changes: 1 addition & 1 deletion .agents/skills/verify-fabric-boundary/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Run [Write the YAML](../verify-yaml-deployment/SKILL.md#write-the-yaml), all fiv
Add what the checks need to the base YAML, then save it:

1. **Volumes.** Mount `$WORKSPACE_VOLUME` at `/sandbox/workspace` and `$ARTIFACTS_VOLUME` at `/sandbox/artifacts`, with `read_only: false` on both mounts; OpenShell defaults them to read-only. Follow [caller-owned volumes](../../../docs/build-deploy/state.md) for admission and filesystem access.
2. **Skills.** Keep the supplied skill under `/sandbox/workspace/skills/capability-probe`. Check the selected adapter's path validation before setting `harness.config.skills.paths`: OpenClaw at Fabric `e5b5ebf2b81cc3c6325301ea419ebf2453dab12e` requires individual skill directories containing `SKILL.md`, so use `[/sandbox/workspace/skills/capability-probe]`, not the parent directory. Record this per-item configuration separately from native discovery; do not claim directory scanning or automatic discovery of generated skills from it.
2. **Skills.** Keep the supplied skill under `/sandbox/workspace/skills/capability-probe`. Check the selected adapter's path validation before setting `harness.config.skills.paths`: at the Fabric pin in `image/fabric/Dockerfile`, OpenClaw and Hermes accept a folder that contains `SKILL.md` or a folder of such folders, as [Skills on a Mounted Volume](../../../docs/agents-inference/agents.md#skills-on-a-mounted-volume) describes. Use `[/sandbox/workspace/skills/capability-probe]`, the supplied skill's own folder, so the path names only that skill. Record this per-item configuration separately from native discovery; do not claim directory scanning or automatic discovery of generated skills from it.
3. **Capabilities.** Choose the run-scoped extension names first: run step 2 of [mounted-extensions](features/mounted-extensions.md), and note the generated plugin's ID, `fb-plugin-$UID8`, as step 4 of [plugins](features/plugins.md) derives it.
Resolve the bundled plugin's safe trigger, observable effect, and startup registration capture through [plugin bindings](features/plugins.md#driving-it-with-fabric-agent-ctl-and-the-openshell-cli) before apply; Hermes has a [pinned binding recipe](references/hermes-bundled-plugin.md).
Then enable each capability the feature files check: the native TUI and, where in scope, the Web UI; a harmless bundled plugin; the mounted native tool and plugin locations under `/sandbox/workspace/extensions`, with any per-item enablement; and a tool allow-list from which Config change can remove only the shell-launch tool.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/fabric-provider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ nemoclaw-fabric = { path = "../nemoclaw-fabric" }
nemoclaw-openshell = { path = "../nemoclaw-openshell" }
nemoclaw-tofu = { path = "../nemoclaw-tofu" }
openshell-provider = { path = "../openshell-provider", default-features = false, features = ["kubernetes"] }
nemo-fabric-core = { git = "https://github.com/NVIDIA/NeMo-Fabric", rev = "934ab7eca1ec9ac86a22fd24913f2e9d68637c4a" }
nemo-fabric-core = { git = "https://github.com/NVIDIA/NeMo-Fabric", rev = "ec77dcc0132bb02198f7aac736671bd0effa87eb" }
async-trait.workspace = true
regex.workspace = true
rustls.workspace = true
Expand Down
9 changes: 7 additions & 2 deletions crates/nemoclaw-build/src/run_ci/live_docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,9 @@ fn dummy_case(
const INTERFACES_CASE: &str = "docker-openclaw-hermes-interfaces";

/// The interface case bound to one run's UID, gateway endpoint, subnet, stub
/// model address and port, which its model provider and a grant name, and
/// OpenClaw and Hermes images.
/// model address and port, which its model provider and a grant name,
/// OpenClaw and Hermes images, and skills volumes named for the UID, so runs
/// never share one.
fn interfaces_case(
template: &str,
uid: &str,
Expand All @@ -424,6 +425,10 @@ fn interfaces_case(
("172.30.123.0/24", subnet),
(&format!("nc-fabric@sha256:{zero}"), openclaw),
(&format!("nc-fabric-hermes@sha256:{zero}"), hermes),
(
"source: hcl-interfaces-",
&format!("source: hcl-interfaces-{uid}-"),
),
],
)?)
}
Expand Down
36 changes: 33 additions & 3 deletions crates/nemoclaw-e2e/cases/docker-openclaw-hermes-interfaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
# same reply and refuses any request without the run's key. Apply reports
# each interface; a person reaches it with the pinned OpenShell CLI's forward
# and the token apply names. cargo ci live-docker gives each run a fresh
# identity, gateway port and subnet, stub address, and agent images. Only
# claw grants python3 the stub's /health, which the managed inference grant
# leaves out.
# identity, gateway port and subnet, stub address, volume names, and agent
# images. Only claw grants python3 the stub's /health, which the managed
# inference grant leaves out. Each agent's skills.paths lists a folder of
# skills on one volume and a skill on its own read-only volume; Hermes's
# folder is empty.
apiVersion: nemoclaw.nvidia.com/v1alpha1
kind: NemoClawConfig
metadata:
Expand Down Expand Up @@ -53,8 +55,22 @@ spec:
access: read-only
binaries:
- path: /usr/local/bin/python3
driverConfig:
docker:
mounts:
- type: volume
source: hcl-interfaces-claw-skills
target: /sandbox/skills
read_only: false
- type: volume
source: hcl-interfaces-claw-review-skill
target: /sandbox/review-skill
read_only: true
harness:
kind: nvidia.fabric.openclaw
config:
skills:
paths: [/sandbox/skills, /sandbox/review-skill]
settings:
interfaces:
dashboard:
Expand All @@ -72,8 +88,22 @@ spec:
ref: nc-fabric-hermes@sha256:0000000000000000000000000000000000000000000000000000000000000000
network:
tier: isolated
driverConfig:
docker:
mounts:
- type: volume
source: hcl-interfaces-hermes-skills
target: /sandbox/skills
read_only: false
- type: volume
source: hcl-interfaces-hermes-notes-skill
target: /sandbox/notes-skill
read_only: true
harness:
kind: nvidia.fabric.hermes
config:
skills:
paths: [/sandbox/skills, /sandbox/notes-skill]
settings:
interfaces:
api:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
assistant:
image:
metadata: {env: NEMOCLAW_AGENT_IMAGE_METADATA}
ref: fixture/agent@sha256:1d19a142c96ae1c19b60b7636e5af877f54a3138c11d6d6e23ef8b3ac849143e
ref: fixture/agent@sha256:48a128f23afd35fee801a8314c4bea657d335f1ef31f48fd28670f32ae9d6c56
network:
tier: isolated
harness:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
assistant:
image:
metadata: {env: NEMOCLAW_AGENT_IMAGE_METADATA}
ref: fixture/agent@sha256:1d19a142c96ae1c19b60b7636e5af877f54a3138c11d6d6e23ef8b3ac849143e
ref: fixture/agent@sha256:48a128f23afd35fee801a8314c4bea657d335f1ef31f48fd28670f32ae9d6c56
network:
tier: isolated
harness:
Expand All @@ -60,7 +60,7 @@ spec:
researcher:
image:
metadata: {env: NEMOCLAW_AGENT_IMAGE_METADATA}
ref: fixture/agent@sha256:1d19a142c96ae1c19b60b7636e5af877f54a3138c11d6d6e23ef8b3ac849143e
ref: fixture/agent@sha256:48a128f23afd35fee801a8314c4bea657d335f1ef31f48fd28670f32ae9d6c56
network:
tier: isolated
harness:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,35 @@
# the stub at a path only the document grants, and OpenShell refuses its
# connection to the managed gateway, which no grant names. Destroy keeps only
# the gateway's storage. cargo ci live-docker runs it.
#
# Each agent starts with two skills.paths entries, each on its own volume: a
# folder of skills and a folder that is one skill. OpenClaw's folder holds
# two skills and a file that isn't one; Hermes's is empty.

# The skills volumes, which a platform provides before apply. The agent images
# run agents as 10001:10001 (image/fabric/Dockerfile).
run "volume" {
module {
source = "./volume"
}

variables {
owner = "10001:10001"
files = {
"claw:/sandbox/skills" = {
"summarize/SKILL.md" = "---\nname: summarize\ndescription: Summarize the workspace.\n---\n\nSummarize the workspace.\n"
"translate/SKILL.md" = "---\nname: translate\ndescription: Translate the reply.\n---\n\nTranslate the reply.\n"
"README.md" = "Skills shared by the deployment's agents.\n"
}
"claw:/sandbox/review-skill" = {
"SKILL.md" = "---\nname: review\ndescription: Review the change.\n---\n\nReview the change.\n"
}
"hermes:/sandbox/notes-skill" = {
"SKILL.md" = "---\nname: notes\ndescription: Keep notes.\n---\n\nKeep notes.\n"
}
}
}
}

run "model" {
module {
Expand Down
40 changes: 29 additions & 11 deletions crates/nemoclaw-e2e/tests/e2e/hcl/volume/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
# The named volumes a Docker case's sandboxes mount, provisioned with the
# bundled Docker provider before the case's first apply, as
# docs/build-deploy/state.md asks of a platform: each volume carries
# OpenShell's default approval labels for the deployment's workspace, and the
# sandbox's identity owns its root. NemoClaw's destroy leaves the volumes;
# OpenShell's default approval labels for the deployment's workspace, holds
# the files the case names for it, and belongs to the sandbox's identity.
# NemoClaw's destroy leaves the volumes;
# tofu test removes them when the case ends.

terraform {
Expand All @@ -28,15 +29,25 @@ variable "owner" {
type = string
}

variable "files" {
description = "Files to write in a volume before its sandbox starts: by \"SANDBOX:TARGET\", the sandbox's name and the volume's mount target, then by path in the volume."
type = map(map(string))
default = {}
}

locals {
document = yamldecode(file(var.context.config))
# OpenShell admits a volume for the workspace that its label names, which
# NemoClaw derives from the deployment's UID.
workspace = "nc-${substr(sha256(local.document.metadata.uid), 0, 16)}"
# Each mounted volume and the image of the sandbox that mounts it.
# Each mounted volume, the image of the sandbox that mounts it, and the
# files to write in it.
volumes = merge([
for sandbox in values(local.document.spec.sandboxes) : {
for mount in try(sandbox.driverConfig.docker.mounts, []) : mount.source => sandbox.image.ref
for name, sandbox in local.document.spec.sandboxes : {
for mount in try(sandbox.driverConfig.docker.mounts, []) : mount.source => {
image = sandbox.image.ref
files = lookup(var.files, "${name}:${mount.target}", {})
}
if mount.type == "volume"
}
]...)
Expand Down Expand Up @@ -69,13 +80,20 @@ resource "docker_volume" "mounted" {
}

# A new volume's root belongs to root. The sandbox's own image, run once as
# root without a network, hands it to the sandbox's identity.
# root without a network, writes the volume's files and hands it to the
# sandbox's identity. Each file's content arrives in its own environment
# variable, so the script quotes only paths.
resource "docker_container" "owner" {
for_each = local.volumes
name = "${each.key}-owner"
image = each.value
user = "0:0"
entrypoint = ["chown", var.owner, "/volume"]
for_each = local.volumes
name = "${each.key}-owner"
image = each.value.image
user = "0:0"
entrypoint = length(each.value.files) == 0 ? ["chown", var.owner, "/volume"] : ["sh", "-c", join("\n", concat(
["set -e"],
[for index, path in keys(each.value.files) : "mkdir -p \"$(dirname '/volume/${path}')\" && printf '%s' \"$NEMOCLAW_VOLUME_FILE_${index}\" > '/volume/${path}'"],
["chown -R ${var.owner} /volume"],
))]
env = [for index, path in keys(each.value.files) : "NEMOCLAW_VOLUME_FILE_${index}=${each.value.files[path]}"]
network_mode = "none"
must_run = false
attach = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ run "verify" {
assert {
condition = alltrue([
for binding in [
openshell_inference.inference_hosted-22877e5d3b30075fab1951c5,
openshell_inference.inference_nvidia-0eeb59e6e69664e5ca31bc21,
openshell_inference.inference_nvidia-b086c7471e688c318b5fc93e,
openshell_inference.inference_hosted-9d2dfc001bdd6f546a5d19fd,
openshell_inference.inference_nvidia-361ce3344fad2b9d0b2ba866,
openshell_inference.inference_nvidia-f7d603dfd605989d81132c5d,
] :
module.observed.registrations[binding.registration].credentials == { (binding.sandbox_env) = "env:${binding.server.credential_env}" }
&& contains(values(module.observed.registrations[binding.registration].config), binding.server.endpoint)
]) && openshell_inference.inference_hosted-22877e5d3b30075fab1951c5.api == "anthropic-messages"
]) && openshell_inference.inference_hosted-9d2dfc001bdd6f546a5d19fd.api == "anthropic-messages"
error_message = "A registration's API, base URL, or credential differs from its provider."
}

# The OpenClaw sandbox names the Anthropic binding and one NVIDIA binding;
# the Hermes sandbox names only its own NVIDIA binding.
assert {
condition = (
contains(module.observed.agents.assistant.providers, openshell_inference.inference_hosted-22877e5d3b30075fab1951c5.registration)
contains(module.observed.agents.assistant.providers, openshell_inference.inference_hosted-9d2dfc001bdd6f546a5d19fd.registration)
&& length(module.observed.agents.assistant.providers) == 2
&& length(module.observed.agents.researcher.providers) == 1
&& length(setintersection(module.observed.agents.assistant.providers, module.observed.agents.researcher.providers)) == 0
Expand All @@ -72,7 +72,7 @@ run "verify" {
condition = (
module.observed.agents.assistant.start.configuration == jsondecode(terraform_data.agent_assistant.input)
&& module.observed.agents.researcher.start.configuration == jsondecode(terraform_data.agent_researcher.input)
&& module.observed.agents.assistant.start.configuration.models.smart.api_key_env == openshell_inference.inference_hosted-22877e5d3b30075fab1951c5.sandbox_env
&& module.observed.agents.assistant.start.configuration.models.smart.api_key_env == openshell_inference.inference_hosted-9d2dfc001bdd6f546a5d19fd.sandbox_env
&& module.observed.agents.assistant.start.configuration.models.default == module.observed.agents.assistant.start.configuration.models.smart
&& module.observed.http.requests == []
)
Expand Down
2 changes: 1 addition & 1 deletion crates/nemoclaw-fabric/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ nemoclaw-docker = { path = "../nemoclaw-docker", optional = true }
nemoclaw-openshell = { path = "../nemoclaw-openshell" }
nemoclaw-tofu = { path = "../nemoclaw-tofu" }
jsonschema.workspace = true
nemo-fabric-core = { git = "https://github.com/NVIDIA/NeMo-Fabric", rev = "934ab7eca1ec9ac86a22fd24913f2e9d68637c4a" }
nemo-fabric-core = { git = "https://github.com/NVIDIA/NeMo-Fabric", rev = "ec77dcc0132bb02198f7aac736671bd0effa87eb" }
serde.workspace = true
serde_json.workspace = true
sha2.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/nemoclaw-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ nemoclaw-fabric = { path = "../nemoclaw-fabric", default-features = false }
# Only the endpoint policy and retained identity types, without the engine client.
nemoclaw-docker = { path = "../nemoclaw-docker", default-features = false }
nemoclaw-runtime = { path = "../nemoclaw-runtime", default-features = false }
nemo-fabric-core = { git = "https://github.com/NVIDIA/NeMo-Fabric", rev = "934ab7eca1ec9ac86a22fd24913f2e9d68637c4a" }
nemo-fabric-core = { git = "https://github.com/NVIDIA/NeMo-Fabric", rev = "ec77dcc0132bb02198f7aac736671bd0effa87eb" }
futures-util.workspace = true
jsonschema.workspace = true
reqwest.workspace = true
Expand Down
Loading
Loading