Skip to content

Commit 38e42c0

Browse files
committed
wip(mxc): checkpoint hung-agent work (recon, policy_map embed, A1 wiring, demo artifacts)
Safety checkpoint of uncommitted work from the background agent run that stalled mid-Step-7. Includes: mxc-driver-recon.md (Step 0.5), policy_map.rs (~876L embedded mapper), A1 policy-threading edits across driver.rs/policy.rs/mxc.rs/compute/mod.rs, and examples/ (demo.yaml + mxc-gateway.toml). Not yet verified to compile end-to-end; to be reorganized into the skill's Step 11 commit sequence.
1 parent 2124247 commit 38e42c0

11 files changed

Lines changed: 1829 additions & 39 deletions

File tree

‎Cargo.lock‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-driver-mxc/Cargo.toml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,19 @@ futures = { workspace = true }
2121
tokio-stream = { workspace = true }
2222
serde = { workspace = true }
2323
serde_json = { workspace = true }
24+
# serde_yaml is not a workspace dependency, but 0.9.34 is already resolved in
25+
# Cargo.lock (transitive). Used by the embedded `policy_map` module to consume
26+
# the OpenShell policy in the shape Giedrius's mapper expects.
27+
serde_yaml = "0.9"
2428
base64 = { workspace = true }
2529
tracing = { workspace = true }
2630
thiserror = { workspace = true }
2731
uuid = { workspace = true }
2832

2933
[dev-dependencies]
3034
tokio = { workspace = true }
35+
# tempfile is not a workspace dependency; 3.27 is already resolved in Cargo.lock.
36+
tempfile = "3"
3137

3238
[lints]
3339
workspace = true
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# demo.yaml — June 15 MXC filesystem-policy proof.
5+
#
6+
# Minimal filesystem policy granting the shared host folder read-write;
7+
# everything else is implicitly denied (default-deny). The granted path MUST
8+
# match `share_dir` / OPENSHELL_MXC_SHARE_DIR and the agent_command target.
9+
#
10+
# NOTE: the canonical OpenShell policy YAML key is `filesystem_policy`
11+
# (parsed by the `openshell-policy` crate into SandboxPolicy.filesystem), NOT
12+
# `filesystem`. The MXC driver's policy bridge then re-emits this under the
13+
# `filesystem_policy` key the embedded mapper expects.
14+
version: 1
15+
16+
filesystem_policy:
17+
include_workdir: false
18+
read_only: []
19+
read_write:
20+
- "C:/work/openshell-mxc-demo" # = OPENSHELL_MXC_SHARE_DIR (host-visible share)
21+
22+
# No landlock / process / network_policies for the demo. (Network policy on
23+
# isolation_session is REJECTED by the driver — see the crate README. Adding a
24+
# network_policies block here would make `sandbox create` fail with a precise
25+
# invalid_argument naming the rule, never a silent drop.)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# MXC gateway config for the June 15 demo.
5+
#
6+
# Pass to the gateway with `--config <path>` (or the gateway's config-file
7+
# discovery). The `[openshell.drivers.mxc]` table is deserialized into
8+
# `MxcComputeConfig`.
9+
#
10+
# Keep `share_dir`, `agent_cwd`, the agent_command target path, and demo.yaml's
11+
# `filesystem_policy.read_write` entry IDENTICAL, or the positive proof will not
12+
# line up.
13+
14+
[openshell.drivers.mxc]
15+
# Path to wxc-exec.exe — REQUIRED for live runs on the demo box. Leave commented
16+
# for mock-mode smoke tests (set OPENSHELL_MXC_MOCK_WXC=1 instead).
17+
# wxc_exec_path = "C:\\mxc\\wxc-exec.exe"
18+
19+
# MXC configurationId for isolation session. Never use "small" (known OS bug).
20+
default_configuration_id = "composable"
21+
22+
# Host folder mapped read-write into the sandbox; where hello.txt appears.
23+
share_dir = "C:/work/openshell-mxc-demo"
24+
25+
# Working directory for the agent inside the sandbox (defaults to share_dir).
26+
agent_cwd = "C:/work/openshell-mxc-demo"
27+
28+
# The agent the driver execs (exec-in-driver). POSITIVE demo: writes hello.txt
29+
# INSIDE the granted share. Swap target to an out-of-policy path (e.g.
30+
# C:/Windows/Temp/hello.txt) to drive the NEGATIVE proof.
31+
agent_command = [
32+
"powershell",
33+
"-NoProfile",
34+
"-Command",
35+
"Set-Content -Path 'C:/work/openshell-mxc-demo/hello.txt' -Value 'hello from mxc'",
36+
]
37+
38+
# Enable --debug on wxc-exec invocations.
39+
debug = false

0 commit comments

Comments
 (0)