The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
Windows native: the desktop app on Windows (sub-project C)
Date: 2026-10-18 Status: draft, for review
Goal
On a Windows 10/11 PC (x64 or arm64), the Harness desktop app works the way it does on a Mac:
- the PC is "this computer";
- the app installs the Harness CLI itself and keeps the daemon running;
- agents and terminals run on the PC, and the app reaches the owner's other machines as it does now;
- system notifications, a tray icon,
harness://links, image paste and the font list all work; - the app updates itself.
Everything is per user, with no administrator rights and no UAC prompt.
Sub-project B (docs/superpowers/specs/2026-10-16-windows-native-cli-design.md) made the CLI
installable, supervised, updatable and trusted on Windows. C builds the desktop on top of B.
Decomposition (unchanged)
| Sub-project | Depends on | |
|---|---|---|
| A | PTY host, terminal backend and Windows process control (done) | — |
| B | CLI on Windows (done; merge pending) | A |
| C | Desktop on Windows (this spec) | B |
| D | Code signing; production release of the desktop's Windows artifacts (signed zip, .exe installer, winget) |
A–C |
C publishes to staging only: the CI-built zip, plus a staging manifest entry for the end-to-end run. Signing and the production release belong to D.
Current state
Forced viewer.
lib/core/viewer_mode.dartsetskViewerModeon Windows. The app is a remote viewer, like the web build. It has no "this computer" row, provisioning, daemon supervision or self-update.Runner.
desktop/windows/runneris the stock Flutter template. It has never been built in this repo, and no CI job builds it.desktop/README.mdsays Windows is not supported.CLI.
lib/core/harness_cli_runner.dartresolves~/.harness/cli/cli.js,~/.local/bin/harness, then PATH. The Windows layout (B) has neither of the first two.lib/bootstrap/environment_provisioner.dart:- runs
curl … install.sh | /bin/sh; - runs its probes through
zshorbash; - checks
test -w "$HOME"; - requires tmux;
- has a Windows branch (
_verifyWindows) that only checks the CLI and says "There is no Windows installer yet".
- runs
Daemon connection.
lib/ws/local_daemon_transport.dartprefers the Unix socket and has none on Windows, so everything goes over loopback TCP.- Over TCP the daemon refuses the trusted routes, which on Windows need the authenticated pipe (B §2):
POST /api/auth/handoff, the Add Phone code;- the
daemon_*frames; product_observe.
dart:iocannot open a Windows named pipe.
Paths. Several places read only
HOME:agent_prefetch.dart;app_state.dart(_harnessInstalledBefore);new_harness.dart;usage_credentials.dart.
Some places run
/bin/chmod.Native. The macOS runner implements these channels:
harness/notificationsharness/clipboard_imageharness/fontsharness/community_linksharness/app_menuharness/swarm_tabs
It also has the status menu, which is fed from
swarm_screen.dart(statusMenuEntries,statusMenuWorkingEntries). Linux implementscommunity_linksandclipboard_image, and draws an in-window menu bar (lib/widgets/linux_menu_bar.dart). Windows has none of them:platformSystemNotifierreturnsNoSystemNotifier;NativeClipboardreturns null;ForkInboxswallows the missing plugin;- there is no menu.
Terminal keys. xterm gets
TerminalTargetPlatform.macoson Windows (terminal_session.dart).Self-update.
lib/update/desktop_updater.dart:- knows the macOS
.app(swapped withditto) and the Linux AppImage; - its
currentBundlePathreturns null on Windows; - its
_otaKeysfalls through to the macOS keys.
- knows the macOS
Release.
release-desktop.ymlbuilds macOS and Linux only.Plugins. Every plugin supports Windows except
webview_flutter, which already falls back to showing the URL as text. Thesqlite3FFI needs asqlite3.dllthat Windows does not ship, so OpenCode usage reads "unavailable".
Decisions
- Full local desktop, like the Mac. It is not a viewer-first stage.
kViewerModeis no longer forced on Windows. A viewer build stays a viewer, because the flag comes from the build, not the OS. - Same shape as macOS and Linux.
- Dart keeps its existing method channel names and calls them on every OS.
- The Windows side is C++ in
desktop/windows/runner, one file per feature, as macOS has Swift and Linux has C. - Platform-specific Dart stays inside the existing services: the provisioner, the CLI runner, the updater, the notifier and the menu. It is not forked into new screens.
- Trusted IPC through a Dart FFI pipe client. It is written in Dart over
dart:ffi(kernel32). The runner gets no pipe code. It speaks B's protocol unchanged. - Zip, per-user self-install, self-update by version folders. There is no MSIX, because it needs signing and
its sandbox virtualises AppData and limits spawning. There is no installer
.exein C; D adds a signed one. A one-line PowerShell install (§3.7) downloads the same zip. - The app installs the CLI with
install.ps1 -Desktopfrom the CDN, the counterpart ofinstall.sh --desktop. The app never bundles the CLI. - Builds for x64 and arm64. Flutter 3.47 builds Windows arm64. If a plugin cannot build for arm64, that is recorded, and the x64 zip is served to arm64 PCs, which Windows runs under emulation, until it can.
- No change to macOS or Linux behaviour. Shared Dart changes are behaviour-neutral there, and the macOS and
Linux runners are not touched. The one shared refactor is the in-window menu bar (§2.7): it moves from
linux_menu_bar.dartto a shared widget, and Linux renders exactly what it renders now.
1. "This computer" on Windows
1.1 Mode
Windows is no longer in kViewerMode's forced list. It boots like macOS and Linux:
bootstrapping → preparingEnvironment → unauthenticated → authenticated.
1.2 One home folder
homeDir() is a new helper in lib/core/:
- it returns
USERPROFILEon Windows andHOMEelsewhere; - if the variable is missing, it falls back to the other one, as
harness_cli_runner.dartalready does.
Every reader of HOME uses it (the list in Current state, plus any found while porting). POSIX-only commands get a
Windows counterpart or are skipped:
/bin/chmod: skipped on Windows, because the profile ACL already restricts the files, as in B.test -w: replaced by a create-and-delete probe.zshandbashlogin shells: on Windows, programs are run directly with an explicit environment.
1.3 Finding the CLI
On Windows, HarnessCliRunner.resolve tries these, in order:
%USERPROFILE%\.harness\runtime\current-nodepluscli\current, which namescli\<ver>\cli.js. These are the same pointers B's launchers read, with the same rule: one line, no BOM, version folder names only.%USERPROFILE%\.harness\bin\harness.exe.harness.exeon PATH.
The commands the app relies on are unchanged (B's contract): start, stop, version, auth status --json,
login --json, link …. node.exe and harness.exe are console programs started by a GUI app. No console
window may flash: the first task checks what Process.start does on Windows. If a window shows, the runner starts
them through CreateProcessW with CREATE_NO_WINDOW (FFI, the same isolate helper as §1.6) and hands back the
pipes.
1.4 Installing the CLI
EnvironmentProvisioner gets a real Windows path:
Readiness steps. The Harness CLI, and the terminal host (
%USERPROFILE%\.harness\runtime\pty\<ver>\harness-pty.exe, the folderinstall.ps1writes). There is no tmux,psor clipboard-helper step.Recipe. Run, hidden, with output to the installer log the setup screen already tails:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "[Console]::OutputEncoding = [Text.UTF8Encoding]::new($false); iex \"& { $(irm '<base>/install.ps1' -ErrorAction Stop) } -Desktop\"; exit $LASTEXITCODE"- This is B's line plus what a hidden run needs:
- PowerShell by its full path under
SystemRoot, because a barepowershell.exeis looked for in the working folder first; - UTF-8 output, so install.ps1's sentences about a profile such as
C:\Users\Nguyễn Văn A'are not garbled; -ErrorAction Stop, so a failed download fails instead of running an emptyiex;exit $LASTEXITCODE, because install.ps1 underiexsets the code and never exits.
- PowerShell by its full path under
<base>is the CDN'sharness/cli, orharness/staging/cliwhen the app is a staging build (--dart-define=HARNESS_STAGING=true). The URL can be overridden with--dart-define=HARNESS_INSTALL_PS1_URL=…for tests. Only anhttpsaddress, orhttpto this computer, is accepted.-Desktopinstalls the CLI and the terminal host, and registers no scheduled task. The app supervises the daemon itself (§1.5), as on a Mac withoutharness service install.- Every step of the recipe installs in-app (no
requiresTerminal). As on macOS, the app installs straight after the probe, with no review screen.
- This is B's line plus what a hidden run needs:
Minimum version. The app reinstalls when the CLI is older than its minimum, as on macOS and Linux. For Windows the minimum is
kMinimumWindowsHarnessCliVersion, the first CLI release with Windows support (B's version).Failure copy. The "no Windows installer yet" text is replaced. A failed install says which step failed, in
install.ps1's own sentence, and offers Retry and Copy log.
1.5 Keeping the daemon running
LocalCliDiscovery's supervision is unchanged:
- poll
/api/status; - run
harness startin its spawn slot after two quiet ticks.
On Windows, harness start goes through harness-launch.exe (B), so the daemon leaves the app's job and opens no
window. Quitting the app never stops the daemon. The macOS-only harness stop/restart guard
(app_state.dart) stays macOS-only.
1.6 Connection
Ordinary traffic stays on loopback TCP, as today. The trusted routes go over the pipe:
- REST
POST /api/auth/handoff; - the WS frames
daemon_*andproduct_observe. They ride this computer's window connection, which on Windows dials the pipe first. No other WebSocket uses the pipe: a second window connection would count as a second presence.
The loopback port. On a PC shared by two people, the first user's daemon holds 18473, and the second user's daemon
binds another port and records it in daemon-18473.json (B). macOS and Linux reach their own daemon through the
socket named for 18473, whatever port it bound. Windows has no socket, so the app takes the port from the record, as
the CLI's own clients do. With no record yet, discovery reports the daemon down and asks nothing on 18473.
The pipe.
- Finding the pipe. Read
daemon-<port>.jsonin the daemon's data folder,%USERPROFILE%\.harness\cli\dataorADAPTER_DATA_DIR. It records the pipe's name, which is new on each daemon start. Accept only a name matching\\.\pipe\harness-<32 hex>. Anything else is not a Harness pipe. - Proving.
- Read
daemon-tokenfrom the same folder: 64 lowercase hex digits, which decode to the 32-byte token. - Each request carries
x-harness-auth: <nonce>.<HMAC-SHA256(token, 0x01‖nonce)>, where the nonce starts with the pipe's id. - Accept the answer only if
x-harness-proofequalsHMAC-SHA256(token, 0x00‖nonce). - A pipe that cannot prove itself is treated as no pipe, so a squatter on a dead daemon's name learns nothing and is told nothing.
- The token never leaves the process.
- Read
- Client.
lib/ws/windows_pipe.dartopens the pipe withCreateFileW(GENERIC_READ | GENERIC_WRITE, no sharing,OPEN_EXISTING).- It reads and writes with
ReadFile/WriteFileon a background isolate, because blocking calls may not run on the UI isolate. - It exposes the connection as a byte
Stream/StreamSinkpair.LocalDaemonTransportuses that pair where it uses a UnixSocketon macOS: Dio's adapter for REST, andWebSocket.fromUpgradedSocketafter a hand-written HTTP/1.1 upgrade for WS. - One pipe connection carries one HTTP exchange or one WebSocket, as the Unix socket does.
- Fallback. If the pipe is missing, unproven or broken:
- the trusted routes report themselves unavailable with a plain sentence (for example, the Add Phone dialog shows only its QR, as an older CLI does);
- TCP keeps everything else working, but a trusted route is never sent there;
- each new trusted request looks up the pipe again, so a daemon restart does not strand the app.
- Proof vectors. Fixed vectors (token, pipe id, nonce, auth, proof) are pinned in a shared fixture. Both
desktop/testandcli/src/lib/windows/pipeAuth.spec.tscheck them, so the two sides cannot drift.
2. Native features on Windows
There is one C++ file per feature in desktop/windows/runner/. flutter_window.cpp registers each one's
channel. Every handler answers on the platform thread and never blocks it.
- Notifications (
harness/notifications:authorize,show,withdraw, matching the macOS calls).- Shown as Windows toasts through the WinRT
ToastNotificationManager. - An unpackaged app needs an AppUserModelID (AUMID) on a Start Menu shortcut, which the self-install creates
(§3.3). The AUMID is
Autonomous.Harness. - The toast carries
activationType="protocol"andlaunch="harness://notification/<machineId>/<agentId>". Clicking it arrives as a deep link (item 3) and opens that agent, as a notification click does on macOS. No COM activator is needed. authorizereports whether Windows notifications are on for the app.withdrawremoves a toast by its tag. Windows caps a tag at 64 characters, so Dart sends a short hash of the notification id as the tag, and thelaunchlink, withshowandwithdraw.
- Shown as Windows toasts through the WinRT
- Single instance.
main.cpptakes a named mutexLocal\Harness-<user SID>.- If the mutex is held, the new process finds the running window, sends its command line (a
harness://link, if any) withWM_COPYDATA, brings the window to the front, and exits. - The running instance hands the link to Dart (item 3).
- Quit.
WM_HARNESS_QUITis the registered window messageAutonomous.Harness.Quit. The app quits on it as the tray's Quit does, hidden or not, on its main window and on its single-instance window.Harness.exeposts it to the main window of each process that runs from its install (§3.5);harness-desktop.exe --quitposts it to the single-instance window.
harness://links (harness/community_links).- The self-install writes
HKCU\Software\Classes\harness:URL Protocol, andshell\open\command = "<install>\Harness.exe" "%1", pointing at the stable launcher (§3.2). - Every start of the installed
Harness.exerewrites the key if it does not match, so a moved install heals itself. A copy run from the zip never takes the links. - A link that arrives at launch, or through
WM_COPYDATA, goes to the same channel events that macOS and Linux send. Thenotification/…links are handled in Dart beside the community links.
- The self-install writes
- Tray icon (
harness/status_menu, a new channel name, used by Windows only).Shell_NotifyIconWshows the app's icon. Its menu shows what the macOS status menu shows:- the notification rows (
statusMenuEntries); - the working rows (
statusMenuWorkingEntries); - "All caught up", or "Open Harness to get started";
- Open Harness;
- Quit.
- the notification rows (
- Dart sends those rows where macOS gets them, from
swarm_screen.dart's_nativepayload. - A chosen row comes back to the existing
_openStatusHarnesshandler. - Clicking the icon shows the window.
- Closing the window hides it to the tray. Quit in the tray menu, or the app menu's Quit, exits the app. The daemon keeps running either way.
- Image paste (
harness/clipboard_image, the method names macOS and Linux answer).readImagePngreturns PNG bytes:- from the clipboard's registered
PNGformat if present; - otherwise from
CF_DIBV5orCF_DIB, encoded to PNG with WIC.
- from the clipboard's registered
readFilePathsreturns the paths of aCF_HDROP(files copied in Explorer), as macOS does with file URLs.writeImagePngputs a PNG on the clipboard, for image drag-drop onto a local pane, as on macOS and Linux.
- Font list (
harness/fonts). Installed font families, viaEnumFontFamiliesExW, de-duplicated. The terminal's font picker reads them as it does on macOS.- A fresh Windows terminal uses a real Windows monospaced face matching the standard Windows PowerShell terminal, rather than falling through the Linux-only DejaVu Sans Mono default. Its default, Reset action and fallback chain keep terminal columns aligned and Vietnamese text readable. An explicitly saved font choice stays in use.
- In-window menu bar.
linux_menu_bar.dartbecomes a sharedin_window_menu_bar.dart, used on Linux and Windows. Linux output is unchanged.swarm_menu_bus.dartandswarm_screen.darttreat Windows as they treat Linux, so every menu-only command is reachable.- The
harness/app_menuandharness/swarm_tabschannels stay macOS-only. On Windows the tabs are Flutter's, as on Linux.
- Keys.
- xterm gets
TerminalTargetPlatform.windows. - App shortcuts on Windows use Ctrl, and take Ctrl+Shift where a plain Ctrl chord belongs to the terminal. This
follows Linux's rule (
app_shortcuts.dart): a chord a terminal program answers is never taken. On Windows readline, PSReadLine and the engines answer every plain Ctrl+letter, so every letter command takes Ctrl+Shift, as Windows Terminal's own commands do. Plain Ctrl is left only for the tab digits and Settings' comma. A browser on Windows keeps the web build's keys. - The terminal keeps Ctrl-C, Ctrl-D, Ctrl-Z, Ctrl-R, Ctrl-W, Ctrl-U, Ctrl-L and Ctrl-A. Copy and paste are Ctrl+Shift+C and Ctrl+Shift+V, as in Windows Terminal.
- xterm gets
- Window chrome. The native caption bar, through
window_manager, as today. No custom title bar.
3. Install and self-update
3.1 Names
- The app's executable is
harness-desktop.exe, set byBINARY_NAMEindesktop/windows/CMakeLists.txt. The CLI already ownsharness.exe, and Windows matches names case-insensitively. - Its version resource says Harness:
FileDescription,ProductName, and the AUMID's display name. Task Manager, the taskbar, toasts and Settings ▸ Apps therefore show "Harness", following the Naming System. - The launcher is
Harness.exe. In thepty/workspace it is the binharness-desktop-launcher, renamed toHarness.exewhen the zip is packaged: a bin namedHarnessand B'sharnesswould be the same file intarget\on a case-insensitive file system.
3.2 Layout
%LOCALAPPDATA%\Programs\Harness\
Harness.exe stable launcher (Rust, GUI subsystem; pty/ workspace)
Harness.ico the icon of the shortcut and of the uninstall entry
current one line: the version folder in use (no BOM)
previous one line: the version to fall back to, if any
app\<ver>\ the Flutter bundle: harness-desktop.exe, its DLLs, data\
launch.log the launcher's last lines
launch-state.json the launcher's record of the last two starts, for rollback
Harness.exe:
- reads
currentand startsapp\<ver>\harness-desktop.exewith its own arguments passed through (CreateProcessW, no shell), then exits; - takes
--wait-pid <pid>first: it waits for that process to end before it starts the app. The updater and the self-install pass the app they replace, which still holds the single-instance mutex; without the wait, the new start would hand its link to the exiting window and end; - applies B's pointer rules: one segment, no
.., an existing folder. A leading BOM is dropped on read, as B's readers do; - has these other forms:
--install [--wait-pid <pid>],--uninstalland--version.
The Start Menu shortcut, the harness:// key and the uninstall entry all name Harness.exe. An update never
breaks them, and neither does a shortcut the person pinned to the taskbar. The app sets the same AUMID on its own
process (SetCurrentProcessExplicitAppUserModelID), so its windows group under the pinned shortcut.
3.3 First install
The zip, harness-desktop-<ver>-windows-<arch>.zip, has the install layout's shape: Harness.exe, Harness.ico,
current and app\<ver>\. The person extracts it anywhere and runs Harness.exe, or app\<ver>\harness-desktop.exe.
When the app finds it is not running from %LOCALAPPDATA%\Programs\Harness\ (the counterpart of
MoveToApplications.swift), it runs <its zip folder>\Harness.exe --install --wait-pid <its pid> and exits. The launcher owns every
install step, so cargo test covers them on Windows:
- Copy
app\<ver>to%LOCALAPPDATA%\Programs\Harness\app\<ver>.staging, then rename it toapp\<ver>. CopyHarness.exeandHarness.ico, and writecurrent. - Create
%APPDATA%\Microsoft\Windows\Start Menu\Programs\Harness.lnk(theFOLDERID_Programsknown folder). It targets the installedHarness.exe, has the iconHarness.ico, and carriesSystem.AppUserModel.ID = Autonomous.Harness. - Write the
harness://key (§2.3). - Write
HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Harnesswith these values:DisplayNameHarness;DisplayVersion;PublisherAutonomous;InstallLocation;DisplayIcon;UninstallString"<install>\Harness.exe" --uninstall;NoModify1 andNoRepair1.
- Start the installed
Harness.exe.
Everything is under HKCU and the profile, with no UAC. If the same version is already installed, running a zip copy just opens the installed app. If the zip holds an older version than the installed one, the app says so and opens the installed app. An install over a different version that is running first asks it to quit (§2.2).
3.4 Self-update
DesktopUpdater gets a Windows branch:
Manifest key. It reads the same
metadata.jsonwith the keysdesktop-windows-x64anddesktop-windows-arm64. An arm64 PC takes the newer ofdesktop-windows-arm64anddesktop-windows-x64; arm64 wins a tie, and x64 runs under emulation. The architecture is the PC's (IsWow64Process2), so an x64 build on an arm64 PC moves to arm64 once an arm64 build is published.Staging. A staging build (
--dart-define=HARNESS_STAGING=true) reads the staging manifest,harness/staging/desktop/metadata.json.Download. The zip is checked for sha256 and size, and only a strictly newer version is taken, as on macOS and Linux.
Swap.
- Extract the zip's
app\<ver>toapp\<ver>.staging, then rename it toapp\<ver>. ReplaceHarness.exewith the zip's own by rename. The launcher is not running, because it exits once it has started the app. - Write
previous(the running version), thencurrent. Each is written to a temp file, flushed, and renamed into place. - Start
Harness.exe --wait-pid <this app's pid>and quit.
The running folder cannot be deleted while it is in use. The next start removes every
app\*folder exceptcurrentandprevious, plus any leftover*.staging.- Extract the zip's
Rollback.
- The app writes the marker (
app\<ver>\.started) once its first frame is drawn, once per version folder. - The launcher records each start in
launch-state.json(version, time, pid and the process's creation time), keeping two, and logs each start inlaunch.log. It exits before the app does, so at the next start it looks at whether each recorded process still runs. - If the
currentfolder is missing its executable, or the last two starts were bothcurrent's and both ended without the marker, the launcher switchescurrentback topreviousand logs why. A start whose process cannot be looked at counts as ended once it is 10 s old. - A rollback removes
previousand the recorded starts, so it cannot bounce back.currentnames a broken folder for at most two starts.
- The app writes the marker (
Off switches. As today: a development build never updates, and
DESKTOP_UPDATE_METADATA_URLpoints at a scratch manifest for tests.
3.5 Uninstall
Settings ▸ Apps ▸ Harness ▸ Uninstall runs Harness.exe --uninstall, which:
- asks the running app to quit with
WM_HARNESS_QUIT(§2.2), and ends it if it has not quit within 10 s; - removes the shortcut, the
harness://key and the uninstall key; - removes the install folder after the launcher exits, with B's "remove after the process has exited" last step
(
cmd.exewaiting on the pid); - leaves the CLI, its daemon and agents alone, and ends with one line: "Harness's command line and agents stay
on this PC. To remove them, run
harness uninstall."
The app's own state is removed too: every %USERPROFILE%\.harness\desktop-app* folder (the app writes
desktop-app-v2; desktop-app is an older name). The rest of .harness belongs to the CLI and stays.
3.6 Staging release
The Windows desktop workflow's release mode builds both zips with the version stamped, as staging builds
(--dart-define=HARNESS_STAGING=true). It uploads them under harness/staging/desktop/<ver>/ and writes the staging
manifest entries, for the end-to-end run. A dry run, the default, checks the zips and keeps the manifest it would write.
Until the workflow is on main it cannot be dispatched, so while the branch has its temporary push trigger, a pushed
commit whose subject is ci(windows): desktop staging release <ver> runs the release mode; both go before merge.
Production publishing, signing and the installer .exe are D's.
3.7 Install by one command
Besides the zip, a person can install the app with one line in PowerShell:
irm https://cdn.autonomous.ai/harness/desktop/install.ps1 | iex
- It is B's
install.ps1in its-Appmode. It is published a second time asdesktop/install.ps1, with the one line that turns that mode on changed. - It reads the desktop manifest and takes this PC's zip as the updater does (§3.4):
- an x64 PC takes
desktop-windows-x64; - an arm64 PC takes the newer of the two keys, and arm64 wins a tie.
- an x64 PC takes
- It downloads the zip into a temp folder and checks its sha256 and size. It unpacks the zip with Windows'
tar.exeand runs the zip'sHarness.exe --install, which does §3.3's steps and opens the app. The temp folder is then removed. - PowerShell does not mark the files it downloads as coming from the internet (no
Zone.Identifier), so Windows shows no SmartScreen prompt. A browser's download of the zip does get that prompt until D signs the build. - It installs the app only. The app installs the CLI on its first start (§1.4).
- C publishes it to staging only (
harness/staging/desktop/install.ps1). The production copy goes up with the production manifest, after the merge.
4. Build, CI and testing
4.1 Workflow
.github/workflows/windows-desktop.yml runs on demand only, following the repo's rule for heavy workflows. It runs
on windows-latest (x64) and windows-11-arm (arm64):
flutter build windows --release;flutter test(the whole desktop suite, so the Windows branches run on Windows);- the runner's C++ build;
cargo testforHarness.exe;- zip packaging;
- upload as an artifact.
It also has a release input for §3.6. A test that assumes POSIX fails on Windows and is recorded once in a
baseline file; the job fails on any other failure, and on any failure in the files that test the Windows branches. PR
CI is unchanged: Linux unit checks of the changed components.
4.2 Unit tests (Dart, platform injected, as existing tests do)
homeDir().- CLI resolution: all three tiers, bad pointers refused,
.exe. - The provisioner's Windows plan: the steps, the
install.ps1 -Desktopcommand line, the minimum version, the failure copy. - The pipe:
- the record and token readers;
- proof generation and answer verification against the shared vectors;
- fallback to TCP;
- re-lookup after a restart.
- The updater's Windows branch:
- key choice on x64 and arm64;
- staging, the pointer writes, cleanup;
- rollback decisions, with a fake file system and a fake clock.
- Self-install and uninstall plans: the files and registry values, with fakes.
- The status-menu payload on Windows, and the shared in-window menu bar's Linux output, pinned as it is today.
4.3 On real Windows (CI)
The FFI pipe client against a real daemon pipe:
- REST, and a WS upgrade;
- refused without a proof, and with a wrong one;
- a pipe that answers with a bad proof is not trusted.
The runner channels:
- fonts lists at least one family;
- clipboard round-trips a PNG and a
CF_HDROP; - a
WM_COPYDATAlink reaches Dart; - the second instance exits.
These run through an integration test with
FLUTTER_TEST=1.Harness.exe's pointer and rollback rules, ascargo test.
4.4 End to end on the Windows 11 ARM64 VM
The run uses a dedicated test user and never touches C:\work\e2e. Results go in
docs/testing/windows-desktop-e2e.md, scenario by scenario, with evidence:
- First install. Download the staging zip, run it: it installs itself, then installs the CLI. Then sign in.
- This computer.
- Create an agent and type in its terminal.
- Get an Add Phone code over the pipe.
- The Mac shows up as a remote machine.
- Native.
- A toast appears, and clicking it opens that agent.
- The tray menu lists working agents.
- A
harness://link opens from a browser. - Pasting a screenshot attaches it.
- Closing the window hides it to the tray.
- Update. N to N+1 through the staging manifest (or the B5.13 fake CDN). A broken N+1 rolls back to N.
- Uninstall from Settings ▸ Apps: the CLI and agents are untouched, and so is the daemon.
- x64 build on arm64, under emulation, to check the fallback in Decision 6.
- Install by one command (§3.7), from the staging copy. The app installs and opens with no SmartScreen prompt, no installed file is marked as downloaded, and no temp folder is left.
The desktop half on the owner's Mac (the Windows PC seen from the Mac) is checked by a person.
4.5 macOS and Linux
- The full desktop suite on macOS, compared test by test to the base. Base has known failures: about 26 on 2026-09-25.
- The Linux job of PR CI.
- No file under
desktop/macosordesktop/linuxchanges.
Out of scope for C
- For D:
- code signing;
- the installer
.exe; - winget;
- the production manifest;
- SmartScreen reputation.
webview_flutteron Windows. The web pane keeps showing the URL as text.- Shipping
sqlite3.dll. OpenCode usage reads "unavailable" on Windows. - Launch at login, which no platform has.
- WSL.
- The
hnTUI on Windows.
Known limits
- Unsigned zip and executables: SmartScreen and Defender may warn on the first run of a zip downloaded in a browser, until D signs them. The E2E doc records the "More info ▸ Run anyway" step. The one-command install (§3.7) shows no such prompt.
- Smart App Control, where it is on (some fresh Windows 11 installs), blocks unsigned programs however they were installed, and offers no way to run them. Only D's signing lifts that.
- A toast needs the Start Menu shortcut's AUMID. A copy run straight from the zip, before the self-install, shows no toasts.
- A profile path with
%followed by a digit,*or~breaks theharness://command: the shell substitutes those inshell\open\commandand has no escape. Any other%works. - The daemon's loopback TCP port carries agent commands without the pipe's credential (B, Known limits). C does not change that.
Risks
- Plugins on arm64. A plugin with no arm64 build: Decision 6's x64 fallback, recorded in the E2E doc.
- WinRT toasts from an unpackaged C++ runner. Mitigation: the AUMID shortcut is created before the first
toast.
authorizereports "off" honestly when Windows refuses. - The FFI pipe client is new I/O code on a background isolate. Mitigations:
- the shared proof vectors;
- the real-pipe CI tests;
- TCP as the fallback for everything but the trusted routes.
- Hiding to the tray changes what X means compared with macOS. The first hide shows a one-time toast: "Harness is still running in the tray."