Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
27548fa
feat(policy): add portable UI policy controls
shailendra-nv Sep 4, 2026
4cf0e41
fix(policy): address UI policy review feedback
shailendra-nv Sep 11, 2026
975de90
feat: enhance MXC backend with provider credential management
araza008 Aug 13, 2026
ba196e9
feat(mxc): validate provider credentials through host proxy
araza008 Aug 20, 2026
f44e95d
feat(mxc): route provider credentials through host proxy
araza008 Sep 10, 2026
c9beb07
docs(mxc): scope isolation session prerequisites
araza008 Sep 10, 2026
621443b
test(mxc): fail closed on artifact scan errors
araza008 Sep 10, 2026
0815ec8
test(mxc): redact probe output before logging
araza008 Sep 10, 2026
f6f6ed5
fix(policy): reuse provider snapshot for merge validation
araza008 Sep 10, 2026
f39b314
fix(auth): authorize provider environment access
araza008 Sep 10, 2026
45494a5
fix(mxc): reject expiring credential snapshots
araza008 Sep 10, 2026
0e8ff34
docs(mxc): define the host proxy trust boundary
araza008 Sep 10, 2026
30e2d78
fix(mxc): harden provider credential test runner
araza008 Sep 12, 2026
9deb7e6
fix(mxc): address PR #3296 review findings on credential lifetime and…
pkhodade-NV Sep 15, 2026
6c97108
fix(mxc): reject expired handle credentials
prekshivyas Sep 15, 2026
36e62a8
feat(mxc): add relay lifecycle and per-sandbox proxy authentication
prekshivyas Sep 14, 2026
7ea2631
fix(mxc): keep workload config sandbox-scoped
prekshivyas Sep 16, 2026
ba73e13
fix(mxc): harden relay integration after rebase
drew Sep 16, 2026
23362f7
test(cli): isolate completers from system gateways
drew Sep 16, 2026
026afbf
fix(sdk-go): honor system gateway directory override
drew Sep 16, 2026
438bcf0
fix(mxc): preserve relayed TCP half-closes
drew Sep 16, 2026
dc1242f
fix(mxc): reconcile rebased main APIs
drew Sep 17, 2026
c554589
Merge remote-tracking branch 'origin/main' into 1737-mxc-rfc12-integr…
drew Sep 17, 2026
7cd18e1
refactor(isolation): make confirmation backend-neutral
drew Sep 16, 2026
a5301e8
fix(sandbox): validate confirmation evidence at host boundary
drew Sep 16, 2026
ff98bab
refactor(isolation): keep fence evidence driver-owned
drew Sep 16, 2026
7228e69
refactor(mxc): adopt RFC 0012 sandbox runtime
drew Sep 17, 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
35 changes: 25 additions & 10 deletions .agents/skills/build-openshell-mxc-windows/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: build-openshell-mxc-windows
description: Maintain and validate OpenShell's build-only Windows MSVC lane for x64 and ARM64. Use when working on Windows compilation, `windows:*` mise tasks, unsupported Windows compute-driver contracts, or Windows build reports. This skill does not implement Docker, Kubernetes, Podman, VM, MXC driver, policy translation, MSI, service, or supervisor runtime support on Windows.
description: Maintain and validate OpenShell's native Windows MSVC and MXC runtime lane for x64 and ARM64. Use when working on Windows compilation, `windows:*` mise tasks, the MXC supervisor/sandbox pairing, unsupported Windows compute-driver contracts, or Windows build reports. This skill does not implement Docker, Kubernetes, Podman, VM, MSI, or service support on Windows.
metadata:
internal: true
---
Expand All @@ -12,11 +12,13 @@ OpenShell repository. The Windows lane is already present in `main`; do not
treat this skill as a first-time porting recipe unless the user explicitly asks
for a new fork or a from-scratch bring-up.

The lane is build-only. It validates that OpenShell can compile and test on
Windows MSVC for the supported deliverables:
The lane validates that OpenShell can compile and test on Windows MSVC for the
supported deliverables:

- `openshell-gateway.exe`
- `openshell.exe`
- `openshell-supervisor.exe` (host RFC 0012 isolation backend)
- `openshell-sandbox.exe` (MXC ProcessContainer boundary)

It intentionally does not make Windows a Docker, Kubernetes, Podman, or VM
runtime host.
Expand Down Expand Up @@ -45,8 +47,8 @@ In scope:
- Refreshing a local checkout to the latest upstream GitHub `main`.
- Maintaining `tasks/windows.toml` and `tasks/scripts/windows-msvc.ps1`.
- Running x64 and ARM64 MSVC checks.
- Building x64 and ARM64 release binaries for `openshell-gateway` and
`openshell`.
- Building x64 and ARM64 release binaries for `openshell-gateway`, `openshell`,
`openshell-supervisor`, and `openshell-sandbox`.
- Running workspace tests on a native x64 or ARM64 host.
- Running focused unsupported-driver contract tests.
- Reporting test counts, skipped/gated areas, warnings, artifacts, and logs.
Expand All @@ -59,12 +61,9 @@ Out of scope:
- Kubernetes support on Windows.
- Podman, Podman machine, or Podman Desktop support on Windows.
- VM, Hyper-V, WSL, libkrun, or VM-backed sandbox execution on Windows.
- New MXC compute driver crate.
- OpenShell to MXC policy translation.
- Windows named-pipe driver IPC.
- Windows Credential Manager or DPAPI integration.
- MSI, WinGet, Windows service registration, or installer work.
- Windows supervisor runtime port.

## Hard Rules

Expand Down Expand Up @@ -157,6 +156,16 @@ mise run --skip-tools windows:test:x64
mise run --skip-tools windows:test:unsupported:x64
```

The two `windows:test:mxc-real:*` tasks are host-specific and mutually
exclusive on a single host (each rejects the other architecture -- see the
table below): run `windows:test:mxc-real:x64` on an x64 host, or
`windows:test:mxc-real:arm64` on an ARM64 host, as part of validating this
subsystem -- run the one matching your host architecture, not both, and not
neither. Both are skip-safe (they print a SKIP reason and exit 0 when
`wxc-exec` or the matching backend isn't available), so running the
arch-appropriate task is always safe even without real MXC hardware. Neither
is part of `windows:ci`'s ordered contract, so invoke it explicitly.

For full validation, detect the Windows host architecture first and choose the
native lane dynamically:

Expand All @@ -165,12 +174,14 @@ $arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
switch ($arch.ToString()) {
"X64" {
mise run --skip-tools windows:ci
mise run --skip-tools windows:test:mxc-real:x64
}
"Arm64" {
mise run --skip-tools windows:check:arm64
mise run --skip-tools windows:build:arm64
mise run --skip-tools windows:test:arm64
mise run --skip-tools windows:test:unsupported:arm64
mise run --skip-tools windows:test:mxc-real:arm64
mise run --skip-tools windows:artifacts
}
default {
Expand Down Expand Up @@ -240,12 +251,14 @@ crypto dependency builds.
|---|---|
| `windows:check:x64` | `cargo check --workspace` for `x86_64-pc-windows-msvc`, excluding unsupported Windows packages as top-level workspace targets. |
| `windows:check:arm64` | `cargo check --workspace` for `aarch64-pc-windows-msvc`, with the same top-level exclusions. |
| `windows:build:x64` | Release-builds `openshell-gateway.exe` and `openshell.exe` for x64. |
| `windows:build:arm64` | Release-builds `openshell-gateway.exe` and `openshell.exe` for ARM64. |
| `windows:build:x64` | Release-builds `openshell-gateway.exe`, `openshell.exe`, `openshell-supervisor.exe`, and `openshell-sandbox.exe` for x64. |
| `windows:build:arm64` | Release-builds the same four binaries for ARM64. |
| `windows:test:x64` | Runs native x64 workspace tests with `--no-fail-fast`, excluding unsupported Windows packages as top-level workspace targets. |
| `windows:test:arm64` | Runs native ARM64 workspace tests with `--no-fail-fast` and the same package exclusions. Rejects non-ARM64 hosts. |
| `windows:test:unsupported:x64` | Re-runs focused `openshell-gateway` tests for unsupported Windows driver behavior. |
| `windows:test:unsupported:arm64` | Re-runs the same focused contracts natively on ARM64. Rejects non-ARM64 hosts. |
| `windows:test:mxc-real:x64` | Runs the serial, ignored real-`wxc-exec` integration suite natively on x64 through the MSVC wrapper. Rejects non-x64 hosts. |
| `windows:test:mxc-real:arm64` | Runs the same real-`wxc-exec` suite natively on ARM64. Rejects non-ARM64 hosts. |
| `windows:artifacts` | Reports size and SHA256 for release artifacts that exist. |
| `windows:ci` | Runs the full ordered x64-host Windows CI lane, plus ARM64 check/build when not skipped. |

Expand Down Expand Up @@ -315,6 +328,8 @@ Useful log files:
| `test-aarch64-pc-windows-msvc.log` | Full native ARM64 workspace test output. |
| `test-x86_64-pc-windows-msvc-unsupported-*.log` | Focused unsupported-driver contract output. |
| `test-aarch64-pc-windows-msvc-unsupported-*.log` | Focused native ARM64 contract output. |
| `test-x86_64-pc-windows-msvc-mxc-real.log` | Native x64 real-MXC integration output. |
| `test-aarch64-pc-windows-msvc-mxc-real.log` | Native ARM64 real-MXC integration output. |

The first check downloads the pinned official Z3 archive for the target
architecture through `z3-sys`. GitHub Actions authenticates the lookup with its
Expand Down
16 changes: 6 additions & 10 deletions .agents/skills/build-openshell-mxc-windows/reference.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Reference: Windows MSVC maintenance lane

Companion to [SKILL.md](SKILL.md). Use this file for quick lookup while
maintaining the existing build-only Windows MSVC lane.
maintaining the native Windows MSVC and MXC runtime lane.

## Lane Files

Expand Down Expand Up @@ -76,7 +76,7 @@ Ninja to `PATH`, while the crypto crates select `clang-cl`. Use a short

## Unsupported Driver Rules

Windows is a build target only. These runtimes remain unsupported:
These Windows runtimes remain unsupported:

- Docker
- Kubernetes
Expand Down Expand Up @@ -111,18 +111,14 @@ top-level workspace targets for check/test:
--exclude openshell-driver-podman
--exclude openshell-driver-vault
--exclude openshell-driver-vm
--exclude openshell-sandbox
--exclude openshell-supervisor
--exclude openshell-supervisor-process
--exclude openshell-vfio
```

The gateway keeps platform configuration and unsupported-operation contracts
without depending on the Docker, Kubernetes, Podman, sandbox runtime,
standalone supervisor, supervisor process runtime, VM, or VFIO crates. The MXC
driver does depend on the cross-platform supervisor network library for its host
egress proxy. The Kubernetes Secrets and Vault libraries still compile as
gateway dependencies; only their standalone Unix-socket binaries and
without depending on the Docker, Kubernetes, Podman, VM, or VFIO runtime crates.
The MXC runtime compiles the supervisor, supervisor-process library, and sandbox
boundary on Windows. The Kubernetes Secrets and Vault libraries still compile
as gateway dependencies; only their standalone Unix-socket binaries and
package-level tests are excluded as top-level targets.

## Common Errors
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ These pipelines connect skills into end-to-end workflows. Individual skill files
| `crates/openshell-driver-docker/` | Docker compute driver | In-process `ComputeDriver` backend for local Docker sandbox containers |
| `crates/openshell-driver-podman/` | Podman compute driver | In-process `ComputeDriver` backend for local Podman sandbox containers |
| `crates/openshell-driver-vm/` | VM compute driver | Standalone libkrun-backed `ComputeDriver` subprocess (embeds its own rootfs + runtime) |
| `crates/openshell-driver-mxc/` | Microsoft MXC compute driver | In-process Windows AppContainer and isolation-session compute backend |
| `crates/openshell-driver-mxc/` | Microsoft MXC compute driver | In-process Windows ProcessContainer backend that pairs a host isolation-backend supervisor with `openshell-sandbox` inside MXC |
| `crates/openshell-prover/` | Policy prover | Policy verification and proof generation |
| `crates/openshell-server-macros/` | Server macros | Compile-time helpers for gateway RPC authorization |
| `crates/openshell-supervisor-middleware/` | Middleware runtime | Generic middleware registry, remote service integration, and chain execution |
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Contributor and maintainer skills live in `.agents/skills/`. They are marked int
| Triage | `triage-issue` | Assess, classify, and route community-filed issues |
| Platform | `helm-dev-environment` | Start and manage the local Kubernetes development environment |
| Platform | `tui-development` | Development guide for the ratatui-based terminal UI |
| Platform | `build-openshell-mxc-windows` | Maintain and validate the build-only x64 and ARM64 Windows MSVC lane |
| Platform | `build-openshell-mxc-windows` | Maintain and validate the x64 and ARM64 Windows MSVC and MXC runtime lane |
| Documentation | `update-docs-from-commits` | Scan recent commits and draft doc updates for user-facing changes |
| Maintenance | `sync-agent-infra` | Detect and fix drift across agent-first infrastructure files |
| Reference | `sbom` | Generate SBOMs and resolve dependency licenses |
Expand Down
9 changes: 8 additions & 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ 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 = ["Wdk_System_Threading", "Win32_Foundation", "Win32_System_Diagnostics_Etw", "Win32_System_Time"] }
windows = { version = "0.62", features = ["Wdk_System_Threading", "Win32_Foundation", "Win32_Security", "Win32_System_Diagnostics_Etw", "Win32_System_Threading", "Win32_System_Time"] }
anyhow = "1"

# Logging/Tracing
Expand Down
33 changes: 31 additions & 2 deletions architecture/compute-runtimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ launches and monitors the policy-constrained workload itself.

`compute_driver.proto` is the supported gateway/driver extension boundary.
At initialization the gateway snapshots the driver's identity, version,
default image, gateway-lifecycle preference, and
`driver_reports_runtime_readiness` from `GetCapabilities`. The gateway includes
default image, gateway-lifecycle preference, runtime-readiness ownership, and
complete UI-policy enforcement support from `GetCapabilities`. The gateway includes
the canonical `SandboxPolicy` in `DriverSandboxSpec.policy` for validation and
creation. Drivers that enforce policy outside the standard supervisor fetch
later revisions through `GetSandboxConfig` and acknowledge them through
Expand Down Expand Up @@ -118,6 +118,18 @@ The capability RPC reports driver identity, version, and the default sandbox
image used by the gateway. GPU availability stays driver-local and is validated
when a sandbox create request asks for GPU resources.

UI policy is capability-negotiated at the configured driver-instance boundary.
`supports_ui_policy = true` means the driver completely enforces every field in
the current portable `SandboxPolicy.ui` contract; partial implementations must
report false. When `ui` is explicitly present, including as `{}`, the gateway
rejects create before the driver validation RPC or provisioning unless this
capability is true. An absent section bypasses this gate and preserves the
runtime's existing behavior. The startup snapshot is also exposed through
gateway info so clients can discover the selected runtime's support. UI cannot
be supplied by a gateway-global policy because it is applied at startup. When a
global dynamic policy is active, effective-policy reads retain the UI block from
the sandbox's creation policy.

The gateway records driver identity and version from the startup capability
response. Elevated gateway info reports that initialized driver snapshot instead
of re-querying drivers on each request.
Expand Down Expand Up @@ -155,6 +167,23 @@ on a server-only API.

## Stop and Start Lifecycle

On Windows, the MXC driver creates the same RFC 0012 runtime pairing as the VM
backend: `openshell-supervisor --role=isolation-backend` runs on the trusted
host and `openshell-sandbox` runs inside the ProcessContainer. Their
generation-scoped TLS transport and sandbox JWT carry lifecycle, exec,
forwarding, provider refresh, and retained process I/O. The driver only
provisions and monitors the pair; it does not define a second control or relay
protocol.

MXC denies direct Internet access and allows only the loopback route required
for the authenticated Sandbox Protocol and explicit proxy. Proxy-aware
workloads receive a per-generation authenticated proxy URL and public CA trust
material. The host supervisor applies OpenShell network policy and provider
injection. The loopback exception does not isolate unrelated host services, and
the current Windows explicit-proxy path attributes descendant traffic to the
admitted main workload binary. See the MXC driver README for these enforcement
limits.

The gateway persists lifecycle intent before mutating compute:

```text
Expand Down
14 changes: 11 additions & 3 deletions architecture/gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,12 @@ Public RPC contracts and durable protobuf formats have separate ownership. The `

`ReportEndpointStatus` is a sandbox-authenticated public gateway RPC. Its request, response, and `EndpointObservation` messages belong only to the public closure. `EndpointStatus` and `EndpointResult` also belong to the durable closure because `Sandbox.status.endpoint_statuses` persists them. The repeated status field uses a new wire tag; stored sandboxes without it decode with an empty endpoint list and retain their lifecycle fields. A fixed payload encoded with the earlier sandbox schema verifies that no database rewrite is required.

`DeleteSandboxRequest` adds optional identity and resource-version preconditions
at tags 4 and 5; the workspace selector retains tag 3. Omitted preconditions
preserve existing deletion behavior. Matching clients and servers are required
when relying on these checks: an older server can ignore unknown fields. These
request-only additions do not change any durable storage payload.

The removed `NetworkBinary.harness` field remains reserved by number and name,
so protobuf implementations cannot reuse its wire slot or source identifier.
The durable-policy compatibility decoder reads the former boolean before Prost
Expand Down Expand Up @@ -700,9 +706,11 @@ leave an ambiguous final dynamic-token state or a deleted custom profile that is
still referenced by a sandbox.

Policy and runtime settings are delivered together through the effective sandbox
config path. A gateway-global policy can override sandbox-scoped policy. The
sandbox supervisor polls for config revisions and hot-reloads dynamic policy
when the policy engine accepts the update.
config path. A gateway-global policy can override sandbox-scoped dynamic policy.
Startup-only UI remains anchored to each sandbox's creation policy, and global
policy writes containing UI are rejected. The sandbox supervisor polls for
config revisions and hot-reloads dynamic policy when the policy engine accepts
the update.

External supervisor middleware registration is operator-owned configuration
under `[[openshell.supervisor.middleware]]`. At startup the gateway connects to
Expand Down
Loading
Loading