Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a1eaf57
Prototype locked Windows Node MXC sandbox
Copilot Aug 17, 2026
2a14e03
Keep locked Gateway alive during diagnostics
Copilot Aug 18, 2026
2c766f0
Keep unused agents locked during diagnostics
Copilot Aug 18, 2026
4458835
Persist Windows Node MXC selection
Copilot Aug 18, 2026
56cc3f6
Require proven-local MXC auto-selection
Copilot Aug 18, 2026
efd5874
Bundle headless Windows Node MXC host
Copilot Aug 18, 2026
54e8610
Attest bundled MXC diagnostic route
Copilot Aug 18, 2026
5e3aa9d
Vendor target-only MXC host preparation
Copilot Aug 19, 2026
bc0ea55
Activate bundled Windows Node MXC sandbox
Copilot Aug 19, 2026
43985fc
Fix Windows Node MXC approval flow
Copilot Aug 19, 2026
3371bb2
Clarify contained MXC approvals
Copilot Aug 19, 2026
f1b07b3
Implement global MXC folder policy
Copilot Aug 19, 2026
d5f0d50
Add single-prompt MXC approval proofs
Copilot Aug 19, 2026
e3fda3f
Avoid renderer sends after window teardown
Copilot Aug 20, 2026
af6180a
Ignore intentional gateway disconnect callbacks
Copilot Aug 20, 2026
cdf36b0
Decouple locked MXC from UI startup
Copilot Aug 20, 2026
da3fb16
feat: add transactional MXC approvals
Copilot Aug 20, 2026
7b892d9
fix: unblock bundled node bootstrap
Copilot Aug 20, 2026
b6bb611
feat: automate MXC readiness lifecycle
Copilot Aug 20, 2026
475511c
feat: authorize fixed MXC readiness probes
Copilot Aug 20, 2026
9357714
fix: normalize readiness plans from node wire
Copilot Aug 20, 2026
8efbab9
fix: allow slow gateway compatibility startup
Copilot Aug 20, 2026
0f6cbc1
feat: simplify MXC security details
Copilot Aug 24, 2026
6eead13
Merge origin/main into Windows Node MXC experiment
Copilot Aug 25, 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
10 changes: 8 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -70,18 +72,22 @@ jobs:
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Build step for C# (compiled language) — requires .NET 9 SDK
# Build step for C# (compiled language) — requires .NET 9 and 10 SDKs
- name: Setup .NET SDK
if: matrix.language == 'csharp'
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"
dotnet-version: |
9.0.x
10.0.x

- name: Build C# project
if: matrix.language == 'csharp'
shell: pwsh
run: |
dotnet build appcontainer/AppContainerLauncher.csproj
dotnet build windows-node-host/MicroClaw.WindowsNodeHost.csproj -p:ImportDirectoryBuildProps=false -p:ImportDirectoryBuildTargets=false
dotnet build third_party/mxc-host-prep-patch/source/MicroClaw.MxcHostPrep.csproj -p:ImportDirectoryBuildProps=false -p:ImportDirectoryBuildTargets=false

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Runs the end-to-end packaging script (build.ps1) on every PR.
# Verifies that the entire pipeline still produces:
# - AppContainerLauncher.exe (.NET 9)
# - bundled Windows Node host (.NET 10) + official MXC runtime
# - desktop\release\win-unpacked\ (electron-builder)
# - dist\microclaw-portable.zip
# - dist\MicroClawInstaller\ + dist\MicroClawInstaller.zip (PyInstaller)
Expand Down Expand Up @@ -134,8 +135,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

# Toolchain (Node 22, .NET 9 SDK, Python 3.12+) is pre-installed on
# Toolchain (Node 22, .NET 9/10 SDKs, Python 3.12+) is pre-installed on
# the self-hosted runner. We only verify versions here; installing
# via actions/setup-* is unreliable under the NetworkService account
# (HKLM/tool-cache permission issues).
Expand All @@ -150,9 +153,10 @@ jobs:
($parsed.Major -ge 25 -and $parsed -ge [version]'25.9.0')
if (-not $supported) { throw "Node $node is unsupported by OpenClaw 2026.7.1-1" }
Write-Host "node $node"
$dotnet = & dotnet --version
if ([version]($dotnet -split '-')[0] -lt [version]'9.0') { throw "dotnet $dotnet < 9.0" }
Write-Host "dotnet $dotnet"
$sdks = & dotnet --list-sdks
if (-not ($sdks -match '^9\.')) { throw ".NET 9 SDK is required" }
if (-not ($sdks -match '^10\.')) { throw ".NET 10 SDK is required" }
Write-Host $sdks

# Resolve a Python 3.12+ interpreter for the NetworkService account.
- name: Setup Python 3.12+
Expand Down
38 changes: 33 additions & 5 deletions .github/workflows/pr-security-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ jobs:
- 'plugins/**'
csharp:
- 'appcontainer/**'
- 'MicroClaw.sln'
- 'windows-node-host/**'
- 'windows-node-host.Tests/**'
- 'mxc-host-prep.Tests/**'
- 'third_party/mxc-host-prep-patch/**'
python:
- 'deployer/**'
- 'requirements.txt'
Expand Down Expand Up @@ -114,7 +117,7 @@ jobs:
working-directory: desktop/renderer
run: npm run test

# ── C# / .NET 9 ────────────────────────────────────────────────
# ── C# / .NET 9 and 10 ─────────────────────────────────────────
security-and-build-csharp:
name: C# - Audit & Build
needs: changes
Expand All @@ -124,14 +127,21 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup .NET 9 SDK
- name: Setup .NET 9 and 10 SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"
dotnet-version: |
9.0.x
10.0.x

- name: Restore NuGet packages
run: dotnet restore appcontainer/AppContainerLauncher.csproj
run: |
dotnet restore appcontainer/AppContainerLauncher.csproj
dotnet restore windows-node-host.Tests/MicroClaw.WindowsNodeHost.Tests.csproj -p:ImportDirectoryBuildProps=false -p:ImportDirectoryBuildTargets=false
dotnet restore mxc-host-prep.Tests/MicroClaw.MxcHostPrep.Tests.csproj -p:ImportDirectoryBuildProps=false -p:ImportDirectoryBuildTargets=false

# Security: check for known vulnerable NuGet packages
- name: Check for vulnerable NuGet packages
Expand All @@ -143,12 +153,30 @@ jobs:
Write-Host "::error::Vulnerable NuGet packages detected!"
exit 1
}
$output = dotnet list windows-node-host.Tests/MicroClaw.WindowsNodeHost.Tests.csproj package --vulnerable --include-transitive --no-restore 2>&1
Write-Host $output
if ($output -match "has the following vulnerable packages") {
Write-Host "::error::Vulnerable NuGet packages detected!"
exit 1
}
$output = dotnet list mxc-host-prep.Tests/MicroClaw.MxcHostPrep.Tests.csproj package --vulnerable --include-transitive --no-restore 2>&1
Write-Host $output
if ($output -match "has the following vulnerable packages") {
Write-Host "::error::Vulnerable NuGet packages detected!"
exit 1
}
Write-Host "No vulnerable NuGet packages found."

# Build
- name: Build AppContainerLauncher
run: dotnet build appcontainer/AppContainerLauncher.csproj -c Release --no-restore

- name: Test bundled Windows Node host
run: dotnet test windows-node-host.Tests/MicroClaw.WindowsNodeHost.Tests.csproj -c Release --no-restore -p:ImportDirectoryBuildProps=false -p:ImportDirectoryBuildTargets=false

- name: Test MicroClaw MXC host-prep patch
run: dotnet test mxc-host-prep.Tests/MicroClaw.MxcHostPrep.Tests.csproj -c Release --no-restore -p:ImportDirectoryBuildProps=false -p:ImportDirectoryBuildTargets=false

# ── Python ──────────────────────────────────────────────────────
security-check-python:
name: Python - Audit Dependencies
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

# GitHub-hosted windows-latest ships older/other toolchain versions than
# build.ps1 expects, so pin them explicitly with the setup-* actions
Expand All @@ -82,10 +84,12 @@ jobs:
with:
node-version: "22"

- name: Setup .NET 9 SDK
- name: Setup .NET 9 and 10 SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"
dotnet-version: |
9.0.x
10.0.x

- name: Setup Python 3.12
uses: actions/setup-python@v5
Expand All @@ -98,9 +102,10 @@ jobs:
$node = (& node --version).TrimStart('v')
if ([version]$node -lt [version]'22.0') { throw "Node $node < 22" }
Write-Host "node $node"
$dotnet = & dotnet --version
if ([version]($dotnet -split '-')[0] -lt [version]'9.0') { throw "dotnet $dotnet < 9.0" }
Write-Host "dotnet $dotnet"
$sdks = & dotnet --list-sdks
if (-not ($sdks -match '^9\.')) { throw ".NET 9 SDK is required" }
if (-not ($sdks -match '^10\.')) { throw ".NET 10 SDK is required" }
Write-Host $sdks
Write-Host "python $(& python --version)"

- name: Install Python build dependencies
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ desktop/studio-backend/data/
# Root-level dev tool artifacts (esbuild etc.)
node_modules/

# .NET build artifacts
**/bin/
**/obj/

# Vitest coverage reports (generated by `vitest --coverage`)
coverage/

Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "third_party/openclaw-windows-node/source"]
path = third_party/openclaw-windows-node/source
url = https://github.com/openclaw/openclaw-windows-node.git
24 changes: 24 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,30 @@ included below or can be found in the respective project repositories.
- Source: https://github.com/openclaw
- License: See OpenClaw repository for license details

## OpenClaw Windows Node
- Source: https://github.com/openclaw/openclaw-windows-node
- Revision: fc9add75eda78daf548d80a55ffb64e63b159961
- Copyright: Copyright (c) 2025 Scott Hanselman
- License: MIT License
- Use: architecture and protocol baseline for MicroClaw's minimal headless Windows node host

## Microsoft MXC SDK and Windows runtime
- Source: https://github.com/microsoft/mxc
- Package: @microsoft/mxc-sdk@0.7.0
- License: MIT License
- The official architecture-specific wxc-exec.exe and sibling runtime files are packaged unchanged.

## MicroClaw MXC system-drive host-preparation patch
- Source: https://github.com/microsoft/mxc
- Issue: https://github.com/microsoft/mxc/issues/648
- Pull request: https://github.com/microsoft/mxc/pull/649
- Revision: 695c2b89c6142090a098ec4484f49aff8157f0b3
- Copyright: Copyright (c) Microsoft Corporation
- License: MIT License
- Use: minimal C# port of target-only system-drive prepare/unprepare behavior
- Artifact: microclaw-mxc-host-prep.exe is built and optionally signed by MicroClaw; it is not an
official or Microsoft-signed MXC binary. Official MXC runtime files remain unchanged.

## Electron
- Source: https://github.com/electron/electron
- License: MIT License
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ download-update path.
- Node.js 22+
- Python 3.10+ — install build deps with `pip install -r requirements.txt` (includes PyInstaller)
- .NET 9 SDK (for the AppContainer launcher)
- .NET 10 SDK (for the bundled Windows Node host)
- npm dependencies installed (`cd desktop && npm install`)

---
Expand Down
1 change: 1 addition & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ npm run dev
- Node.js 22+
- Python 3.10+ —— 通过 `pip install -r requirements.txt` 安装构建依赖(已包含 PyInstaller)
- .NET 9 SDK(用于构建 AppContainer 启动器)
- .NET 10 SDK(用于构建内置 Windows Node 主机)
- npm 依赖已安装(`cd desktop && npm install`)

---
Expand Down
89 changes: 57 additions & 32 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,51 @@ if (-not $nodeFound) {
exit 1
}

# -- Step 1: Build AppContainerLauncher.exe (.NET 9) --
Write-Host "`n=== Step 1/7: Build AppContainerLauncher ===" -ForegroundColor Cyan
$windowsNodeSharedProject = "$root\third_party\openclaw-windows-node\source\src\OpenClaw.Shared\OpenClaw.Shared.csproj"
if (-not (Test-Path $windowsNodeSharedProject)) {
Write-Host " Initializing pinned OpenClaw Windows Node source..." -ForegroundColor Yellow
git -C $root submodule update --init --recursive -- third_party/openclaw-windows-node/source
if ($LASTEXITCODE -ne 0 -or -not (Test-Path $windowsNodeSharedProject)) {
Write-Host " ERROR: unable to initialize the pinned OpenClaw Windows Node submodule" -ForegroundColor Red
exit 1
}
}

# Bootstrap desktop dependencies before building the Windows node, because the
# resource preparation step consumes the pinned @microsoft/mxc-sdk package.
Push-Location "$root\desktop"
try {
$needsNpmInstall = -not (Test-Path "$root\desktop\node_modules")
if (-not $needsNpmInstall) {
$prev = $ErrorActionPreference
$ErrorActionPreference = "Continue"
npm ls --depth=0 *> $null
$npmLsExit = $LASTEXITCODE
$ErrorActionPreference = $prev
if ($npmLsExit -ne 0) {
$needsNpmInstall = $true
Write-Host " desktop dependencies are incomplete — running 'npm install'..." -ForegroundColor Yellow
}
} else {
Write-Host " desktop\node_modules not found — running 'npm install'..." -ForegroundColor Yellow
}

if ($needsNpmInstall) {
$prev = $ErrorActionPreference
$ErrorActionPreference = "Continue"
npm install 2>&1 | ForEach-Object { Write-Host " $_" }
$ErrorActionPreference = $prev
if ($LASTEXITCODE -ne 0) {
Write-Host " ERROR: npm install failed" -ForegroundColor Red
exit 1
}
}
} finally {
Pop-Location
}

# -- Step 1: Build native security helpers --
Write-Host "`n=== Step 1/7: Build security helpers ===" -ForegroundColor Cyan
$acProject = "$root\appcontainer"
if (-not (Test-Path "$acProject\AppContainerLauncher.csproj")) {
Write-Host " ERROR: appcontainer project not found at $acProject" -ForegroundColor Red
Expand Down Expand Up @@ -96,6 +139,17 @@ if (-not (Test-Path $acExe)) {
}
Write-Host " AppContainerLauncher.exe built" -ForegroundColor Green

Push-Location "$root\desktop"
try {
npm run prepare-windows-node-resources
if ($LASTEXITCODE -ne 0) {
Write-Host " ERROR: bundled Windows Node/MXC resource preparation failed" -ForegroundColor Red
exit 1
}
} finally {
Pop-Location
}

# Copy sandbox-preload.js and its modules alongside launcher (used by electron-builder extraResources)
$preloadSrc = "$acProject\sandbox-preload.js"
if (Test-Path $preloadSrc) {
Expand Down Expand Up @@ -128,38 +182,9 @@ if (-not (Test-Path $outDist)) {
Write-Host "`n=== Step 3/7: Build & pack desktop ===" -ForegroundColor Cyan
Push-Location "$root\desktop"
try {
# First-run bootstrap: install npm deps (including renderer via postinstall)
# if node_modules is missing or the installed dependency tree is incomplete.
# Without this, `npm run pack` can fail later inside electron-builder.
$needsNpmInstall = -not (Test-Path "$root\desktop\node_modules")
if (-not $needsNpmInstall) {
$prev = $ErrorActionPreference
$ErrorActionPreference = "Continue"
npm ls --depth=0 *> $null
$npmLsExit = $LASTEXITCODE
$ErrorActionPreference = $prev
if ($npmLsExit -ne 0) {
$needsNpmInstall = $true
Write-Host " desktop dependencies are incomplete — running 'npm install'..." -ForegroundColor Yellow
}
} else {
Write-Host " desktop\node_modules not found — running 'npm install'..." -ForegroundColor Yellow
}

if ($needsNpmInstall) {
$prev = $ErrorActionPreference
$ErrorActionPreference = "Continue"
npm install 2>&1 | ForEach-Object { Write-Host " $_" }
$ErrorActionPreference = $prev
if ($LASTEXITCODE -ne 0) {
Write-Host " ERROR: npm install failed" -ForegroundColor Red
exit 1
}
}

$prev = $ErrorActionPreference
$ErrorActionPreference = "Continue"
npm run pack 2>&1 | ForEach-Object { Write-Host " $_" }
npm run pack:prepared 2>&1 | ForEach-Object { Write-Host " $_" }
$ErrorActionPreference = $prev
if ($LASTEXITCODE -ne 0) {
Write-Host " ERROR: desktop build failed" -ForegroundColor Red
Expand Down
16 changes: 16 additions & 0 deletions desktop/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,24 @@ copyright: Copyright © 2026 MicroClaw
directories:
output: release

afterSign: scripts/update-signed-windows-node-manifest.mjs

win:
target:
- target: nsis
arch:
- x64
icon: assets/microclaw.ico
signExts:
# These are unmodified third-party MXC binaries. MicroClaw-owned helpers,
# including microclaw-mxc-host-prep.exe, remain eligible for product signing.
- "!mxc-diagnostic-console.exe"
- "!winhttp-proxy-shim.exe"
- "!wxc-exec.exe"
- "!wxc-host-prep.exe"
- "!wxc-test-proxy.exe"
- "!wxc-windows-sandbox-daemon.exe"
- "!wxc-windows-sandbox-guest.exe"

appx:
artifactName: MicroClawDesktop-${version}-${arch}.msix
Expand All @@ -37,12 +49,16 @@ nsis:
extraResources:
- from: dist/github-copilot-auth-worker.js
to: github-copilot-auth-worker.js
- from: src/openclaw-approval-replay-compat.mjs
to: openclaw-approval-replay-compat.mjs
- from: resources/node.exe
to: node.exe
- from: resources/openclaw/
to: openclaw/
- from: resources/openclaw.asar
to: openclaw.asar
- from: resources/windows-node/
to: windows-node/
- from: ../appcontainer/bin/Release/net9.0-windows/win-x64/AppContainerLauncher.exe
to: AppContainerLauncher.exe
- from: ../appcontainer/sandbox-preload.js
Expand Down
Loading
Loading