Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9fbd256
feat(driver): add MXC compute driver for Windows isolation sessions
pkhodade-NV Jun 5, 2026
6f00649
wip(mxc): checkpoint hung-agent work (recon, policy_map embed, A1 wir…
jamieknvidia Jun 9, 2026
6072f23
test(mxc): fix lifecycle and policy unit-test compile drift
jamieknvidia Jun 9, 2026
c78544a
fix(mxc): downgrade missing sandbox_token to debug log
jamieknvidia Jun 9, 2026
e4230b3
fix(mxc): keep sandbox Ready after a successful one-shot agent exec
jamieknvidia Jun 9, 2026
e4aed16
feat(mxc): add processContainer backend for default-deny enforcement
jamieknvidia Jun 10, 2026
2860a6d
refactor(driver-mxc): embed policy mapper as a module; remove standal…
gburachas Jun 10, 2026
4b63f90
feat(driver-mxc): implement lossless split_policy for proxy-delegated…
gburachas Jun 10, 2026
76957ff
feat(driver-mxc): implement Pattern-C governed-egress split through t…
gburachas Jun 12, 2026
0737e99
fix(driver-mxc): emit MXC network.proxy as {localhost: port}
gburachas Jun 12, 2026
ac2a363
fix(driver-mxc): serialize isolation_session stop/deprovision as unit…
gburachas Jun 12, 2026
0118a86
test(driver-mxc): add Tier-0 mapper coverage matrix with schema drift…
gburachas Jun 12, 2026
8aec2a8
feat(driver-mxc): inject agent_env into sandbox process.env
jamieknvidia Jun 24, 2026
dd764cf
test(driver-mxc): avoid unsafe env mutation in resolve_agent_env test
jamieknvidia Jun 26, 2026
a374f59
fix(mxc): adapt MXC driver to current GitHub OpenShell API
jamieknvidia Jul 29, 2026
df93c04
feat(server): wire the MXC compute driver into the gateway on Windows
jamieknvidia Jul 29, 2026
9ca59af
fix(driver-mxc): implement GetGatewayListenerRequirements for #2496 base
jamieknvidia Aug 11, 2026
7beadcb
test(driver-mxc): add probe-gated real wxc-exec test lane (no mocks)
gburachas Jun 12, 2026
70df438
fix(driver-mxc): address PR review feedback
shailendra-nv Aug 20, 2026
da22589
chore(driver-mxc): merge main and resolve conflicts
shailendra-nv Aug 20, 2026
7b43a98
chore(driver-mxc): integrate compiled driver registry
shailendra-nv Aug 20, 2026
2fef0b9
chore(driver-mxc): merge canonical main process
shailendra-nv Aug 20, 2026
0b6bd6a
feat(mxc): ETW->OCSF audit consumer + Windows OCSF JSONL parity (cp6 P1)
jamieknvidia Jul 9, 2026
7d2185e
feat(mxc): map remaining Sandboxing ETW events to OCSF
jamieknvidia Jul 9, 2026
701d7a9
fix(mxc): seed ETW attribution under registry lock + Device tests
jamieknvidia Jul 9, 2026
0acff39
fix(mxc-etw): buffer+replay racing events and harden attribution keys
jamieknvidia Jul 14, 2026
6aa0e0d
docs(mxc-etw): note cmd_line is captured raw with no privacy filtering
jamieknvidia Jul 14, 2026
557faca
fix(mxc-etw): open ETW trace on caller thread so start_session report…
jamieknvidia Jul 14, 2026
195caf5
fix(mxc-etw): guard pending-event replay against PID recycling
jamieknvidia Jul 14, 2026
bacca60
fix(mxc-etw): surface unexpected ProcessTrace termination (review #4)
jamieknvidia Jul 14, 2026
e44669a
feat(mxc-ocsf): add ETW->OCSF audit-trail example kit; fix proxy-con…
jamieknvidia Jul 15, 2026
cd7d034
feat(mxc-ocsf): clearer audit report + client-safe run-ocsf-audit.ps1
jamieknvidia Jul 16, 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
4 changes: 2 additions & 2 deletions .agents/skills/openshell-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ stopped. Delete remains the operation that removes retained state.

This is the most important multi-step workflow. It enables a tight feedback cycle where sandbox policy is refined based on observed activity.

**Key concept**: Policies have static fields (immutable after creation: `filesystem_policy`, `landlock`, `process`) and two dynamic fields: `network_policies` and `network_middlewares`. Both dynamic fields can be updated without recreating the sandbox.
**Key concept**: Policies have static fields (immutable after creation: `filesystem_policy`, `landlock`, `process`) and two dynamic fields: `network_policies` and `network_middlewares`. Both dynamic fields can be updated without recreating the sandbox when the selected compute driver supports live policy updates. MXC rejects live policy replacement and merge updates; delete and recreate an MXC sandbox instead.

An endpoint with omitted `protocol` retains explicit-proxy behavior. Explicit
`protocol: tcp` requests policy DNS and transparent TCP and currently requires
Expand Down Expand Up @@ -429,7 +429,7 @@ Edit `current-policy.yaml` to allow the blocked actions. **For policy content au
- Binary matching patterns
- Ordered `network_middlewares`, host selection, HTTP and WebSocket bindings, and `fail_open` or `fail_closed` behavior

`network_policies` and `network_middlewares` can be modified at runtime. If `filesystem_policy`, `landlock`, or `process` need changes, the sandbox must be recreated. Built-in middleware such as `openshell/regex` needs no gateway registration. An operator-run middleware must already be registered under `[[openshell.supervisor.middleware]]`; changing that static registration requires a gateway restart.
`network_policies` and `network_middlewares` can be modified at runtime when the selected compute driver supports live policy updates. MXC rejects live policy replacement and merge updates; delete and recreate an MXC sandbox instead. If `filesystem_policy`, `landlock`, or `process` need changes, the sandbox must be recreated. Built-in middleware such as `openshell/regex` needs no gateway registration. An operator-run middleware must already be registered under `[[openshell.supervisor.middleware]]`; changing that static registration requires a gateway restart.

Middleware can inspect parsed HTTP request bodies and complete client-to-upstream WebSocket text messages over both `ws://` and `wss://` when the implementation advertises the matching binding. The built-in `openshell/regex` advertises both bindings and applies its fixed patterns to UTF-8 text. A host-matched HTTP-only attachment can inspect the upgrade GET but does not join the WebSocket chain; look for `binding_not_selected` coverage. Binary messages pass under both `on_error` modes and active stages emit `unsupported_message_type` coverage; upstream-to-client messages remain uninspected. A broken fail-open WebSocket stage is disabled for the rest of that connection; inspect sandbox OCSF logs for `openshell.middleware.websocket_stage_disabled`.

Expand Down
4 changes: 2 additions & 2 deletions .agents/skills/openshell-cli/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ The sandbox name defaults to the last-used sandbox.

### `openshell policy update [name]`

Incrementally merge live network policy changes into the current sandbox policy. Multiple flags in one invocation are applied as one atomic batch and create at most one new revision.
Incrementally merge live network policy changes into the current sandbox policy when the selected compute driver supports live updates. Multiple flags in one invocation are applied as one atomic batch and create at most one new revision. MXC rejects live policy merges; delete and recreate an MXC sandbox instead.

| Flag | Default | Description |
|------|---------|-------------|
Expand Down Expand Up @@ -411,7 +411,7 @@ Notes:

### `openshell policy set [name] --policy <PATH>`

Replace the full policy on a live sandbox. Only the dynamic `network_policies` field can be changed at runtime.
Replace the full policy on a live sandbox when the selected compute driver supports live updates. Only the dynamic `network_policies` field can be changed at runtime. MXC rejects live policy replacement; delete and recreate an MXC sandbox instead.

| Flag | Default | Description |
|------|---------|-------------|
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ crates/openshell-core/src/proto/openshell.*.rs linguist-generated

# Vendored OCSF schemas fetched from schema.ocsf.io
crates/openshell-ocsf/schemas/** linguist-generated

# TypeScript tooling and Biome require stable LF input on every host
sdk/typescript/** text eol=lf
24 changes: 24 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ terminal-colorsaurus = "1.0"
# Error handling
miette = { version = "7", features = ["fancy"] }
thiserror = "2"

# Windows platform APIs (ETW/TDH audit consumer in openshell-driver-mxc; Windows-only)
windows = { version = "0.62", features = ["Win32_Foundation", "Win32_System_Diagnostics_Etw", "Win32_System_Time"] }
anyhow = "1"

# Logging/Tracing
Expand Down
4 changes: 4 additions & 0 deletions architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ bridge networks, port mappings, NAT traversal, or bespoke tunnels. The common
runtime requirement is narrower: the supervisor must be able to reach the
gateway.

The Windows MXC driver is an explicit exception. It launches and monitors a
one-shot workload in the driver, self-reports readiness, and does not expose a
supervisor session, interactive connect, live policy delivery, or governed egress.

The gateway delivers desired state; the sandbox applies it locally. Policy,
settings, credentials, and inference routes flow from the gateway to the
supervisor. The supervisor validates and applies what can change at runtime,
Expand Down
12 changes: 7 additions & 5 deletions architecture/windows-msvc-build.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Windows MSVC Build Design

This page records the design decisions for the native Windows MSVC build lane.
It is intentionally build-only. It does not make Windows a Docker, Kubernetes,
Podman, or VM runtime host.
It provides the native build lane and validates the in-process MXC compute
driver. It does not make Windows a Docker, Kubernetes, Podman, or VM runtime host.

## Goals

- Compile the OpenShell gateway and CLI for `x86_64-pc-windows-msvc` and `aarch64-pc-windows-msvc`.
- Keep the Linux and macOS build paths unchanged.
- Preserve gateway configuration parsing for all existing compute driver names.
- Build and test the in-process MXC driver on supported Windows hosts.
- Return clear unsupported errors when a Windows gateway is configured to use Docker, Kubernetes, Podman, or VM.
- Keep dedicated `windows:*` validation tasks while allowing the repository-wide
`pre-commit` task to delegate compiler-bearing Rust checks to the native
Expand All @@ -18,7 +19,7 @@ Podman, or VM runtime host.

- Do not support Docker Desktop, WSL, Hyper-V, Podman machine, Podman Desktop, Kubernetes, or VM-backed sandbox execution on Windows.
- Do not ship Windows standalone binaries for Docker, Kubernetes, Podman, or VM drivers.
- Do not implement named-pipe driver IPC, Windows services, MSI packaging, Credential Manager integration, DPAPI integration, or MXC policy translation in this build lane.
- Do not implement named-pipe driver IPC, Windows services, MSI packaging, Credential Manager integration, or DPAPI integration in this lane.

## Unsupported Driver Strategy

Expand All @@ -42,6 +43,7 @@ on Windows.
| Kubernetes | Driver crate excluded; server config contract retained. | Gateway construction returns unsupported. |
| Podman | Driver crate excluded; server config contract retained. | Gateway construction returns unsupported. |
| VM | Driver crate excluded from workspace validation. | Gateway construction returns unsupported. |
| MXC | Driver links into the native gateway and runs in Windows validation. | `process_container` is default-deny; grant-only `isolation_session` requires explicit configuration. |

This keeps Windows behavior explicit without carrying runtime dependencies or
creating misleading Windows driver artifacts.
Expand All @@ -62,7 +64,7 @@ Windows validation is exposed through `tasks/windows.toml`:
| `windows:check:arm64` | Check the ARM64 MSVC gateway/CLI build graph. |
| `windows:build:x64` | Build release x64 `openshell-gateway.exe` and `openshell.exe`. |
| `windows:build:arm64` | Build release ARM64 `openshell-gateway.exe` and `openshell.exe`. |
| `windows:test:x64` | Run native x64 workspace tests, excluding unsupported Windows packages as top-level test targets. |
| `windows:test:x64` | Run native x64 workspace tests, including MXC mapper and lifecycle tests, while excluding unsupported Windows packages as top-level test targets. |
| `windows:test:arm64` | Run native ARM64 workspace tests with the same package exclusions. |
| `windows:test:unsupported:x64` | Run focused server/runtime tests for unsupported driver contracts. |
| `windows:test:unsupported:arm64` | Run the same focused contracts natively on ARM64. |
Expand Down Expand Up @@ -159,5 +161,5 @@ A successful Windows build report should include:
- Focused unsupported-driver contract test status.
- Artifact size and SHA256 for each Windows binary.

Warnings from Linux-only dead code are acceptable in this build-only phase when
Warnings from Linux-only dead code are acceptable in the native Windows lane when
they come from code paths intentionally disabled on Windows.
6 changes: 5 additions & 1 deletion crates/openshell-core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ pub enum ComputeDriverKind {
Vm,
Docker,
Podman,
/// Microsoft MXC isolation session (Windows only).
Mxc,
}

impl ComputeDriverKind {
Expand All @@ -135,6 +137,7 @@ impl ComputeDriverKind {
Self::Vm => "vm",
Self::Docker => "docker",
Self::Podman => "podman",
Self::Mxc => "mxc",
}
}
}
Expand Down Expand Up @@ -175,8 +178,9 @@ impl FromStr for ComputeDriverKind {
"vm" => Ok(Self::Vm),
"docker" => Ok(Self::Docker),
"podman" => Ok(Self::Podman),
"mxc" => Ok(Self::Mxc),
other => Err(format!(
"unsupported compute driver '{other}'. expected one of: kubernetes, vm, docker, podman"
"unsupported compute driver '{other}'. expected one of: kubernetes, vm, docker, podman, mxc"
)),
}
}
Expand Down
4 changes: 4 additions & 0 deletions crates/openshell-core/src/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ pub enum TelemetryComputeDriver {
Kubernetes,
Podman,
Vm,
Mxc,
Unknown,
}

Expand All @@ -176,6 +177,7 @@ impl TelemetryComputeDriver {
Self::Kubernetes => "kubernetes",
Self::Podman => "podman",
Self::Vm => "vm",
Self::Mxc => "mxc",
Self::Unknown => "unknown",
}
}
Expand All @@ -187,6 +189,7 @@ impl TelemetryComputeDriver {
"k8s" | "kubernetes" => Self::Kubernetes,
"podman" => Self::Podman,
"vm" => Self::Vm,
"mxc" => Self::Mxc,
_ => Self::Unknown,
}
}
Expand All @@ -198,6 +201,7 @@ impl TelemetryComputeDriver {
Some(crate::ComputeDriverKind::Kubernetes) => Self::Kubernetes,
Some(crate::ComputeDriverKind::Podman) => Self::Podman,
Some(crate::ComputeDriverKind::Vm) => Self::Vm,
Some(crate::ComputeDriverKind::Mxc) => Self::Mxc,
None => Self::Unknown,
}
}
Expand Down
56 changes: 56 additions & 0 deletions crates/openshell-driver-mxc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

[package]
name = "openshell-driver-mxc"
description = "MXC (Windows isolation session) compute driver for OpenShell"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true

[lib]
name = "openshell_driver_mxc"

[dependencies]
openshell-core = { path = "../openshell-core" }
# OCSF builders + emit target used by the Windows ETW audit consumer. OS-agnostic
# crate (no windows deps), so safe to depend on from all targets; only the
# windows-gated `etw_consumer` module actually uses it.
openshell-ocsf = { path = "../openshell-ocsf" }
tokio = { workspace = true }
tonic = { workspace = true }
futures = { workspace = true }
tokio-stream = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
base64 = { workspace = true }
tracing = { workspace = true }
thiserror = { workspace = true }
uuid = { workspace = true }

# ETW/TDH real-time consumer (Plane A audit). Windows-only so the Linux/WSL
# build stays an empty stub.
[target.'cfg(target_os = "windows")'.dependencies]
windows = { workspace = true }

[dev-dependencies]
tokio = { workspace = true }
# tempfile is not a workspace dependency; 3.27 is already resolved in Cargo.lock.
tempfile = "3"
# Used by Windows-only integration tests to parse policy YAML into the typed
# proto. Inert on non-Windows.
openshell-policy = { path = "../openshell-policy" }
# Needed by the real-wxc integration test (wxc_exec_real.rs) which builds
# --config-base64 payloads without going through the async WxcExecInvoker.
# base64 and serde_json are already [dependencies] but dev-dependency resolution
# is independent; explicit entries make them visible to integration tests.
base64 = { workspace = true }
serde_json = { workspace = true }
# Used by the drift guard test (handled_fields_inventory) to parse YAML into a
# generic serde_json::Value for key enumeration.
serde_yml = { workspace = true }

[lints]
workspace = true
Loading