Skip to content

feat(browser): run turno-browser on Windows - #152

Merged
william-monroy merged 15 commits into
mainfrom
feat/browser-windows
Nov 23, 2026
Merged

william-monroy merged 15 commits into
mainfrom
feat/browser-windows

Conversation

@william-monroy

@william-monroy william-monroy commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

turno-browser (the CLI and the MCP server) now installs with npm and runs on Windows 10 and 11 (x64), with no admin rights. turno-cli stays macOS and Linux only: its os field makes npm refuse it on Windows.

What changed

POSIX assumptions found, and what replaces each on Windows:

  • Folders. turno-core's paths follow %APPDATA% (settings) and %LOCALAPPDATA% (data, state); TURNO_*_DIR and XDG_* still win. The home is USERPROFILE.
  • Sockets. The background server and the live view listen on named pipes (\\.\pipe\turno-browser-<id>-<hash>); the default pipe DACL lets only the user, administrators and SYSTEM write.
  • Signals and process groups. Chrome and servers are ended with taskkill /T (killTree in core). Messages print taskkill /PID <pid> /T /F where they printed kill <pid>. Tests that freeze Chrome with SIGSTOP are skipped on Windows.
  • ps and SingletonLock. The process table comes from WMI through Windows PowerShell. Chrome's profile lock is its lockfile, and the Chrome pid in the runtime lock comes from the process table. The script calls .NET only: any cmdlet (Get-CimInstance, Add-Type) took 20 s when an agent passes a trimmed environment, and .NET takes 0.3 s (measured on windows-latest). The DPAPI script from feat(core): a Windows secret store with DPAPI-encrypted files #154 got the same change.
  • Program lookup. findOnPath reads PATHEXT. An npm .cmd shim can only start through cmd.exe, so setup and init register cmd /c turno-browser-mcp --identity <id>, and init --yes runs an agent's .cmd through cmd.exe /d /s /c with each argument escaped. The standalone executable from feat(browser): standalone executables without Node, with checksums and attestations #155 keeps its own <exe> mcp entry.
  • Browser detection. Chrome, Edge and Brave are found in Program Files, Program Files (x86) and %LOCALAPPDATA%. Chrome for Testing goes to %LOCALAPPDATA%\ms-playwright. Doctor adds a winget hint.
  • Chrome and USERPROFILE. Chrome refuses the DevTools pipe when USERPROFILE points somewhere other than the account's profile. Chrome now always gets the account's own USERPROFILE (chromeEnv); the rest of the sandbox env is unchanged.
  • Opening URLs. rundll32 url.dll,FileProtocolHandler instead of open or xdg-open.
  • Session owners. cmd /c, powershell -Command and pwsh -c are seen through when turno-cli works out who started a session.
  • Packing. scripts/shrinkwrap.mjs handles backslash paths and a CRLF pnpm-lock.yaml.

How it was verified

The CI job browser on windows runs on windows-latest with Node 22 and 24:

  • the turno-core suite, including a real DPAPI round trip;
  • the full turno-browser suite, including the tests that start a real Google Chrome: lifecycle, background server, attach, live view, vault login, proxy with a password, record and replay, passkeys;
  • pnpm pack of both packages, then npm install of the tarballs, then, through the .cmd shims, add, setup claude-code, install-browser, doctor --json (asserting the smoke launch and the Chrome for Testing checks) and remove.

In run 45110969003, both Node versions pass: turno-core has 22 passed and 9 skipped, and turno-browser has 704 passed and 32 skipped. Doctor's smoke launch started and closed Chrome in 3 to 5 s.

On Windows, the secret store tests run against the real DPAPI store in the sandbox's LOCALAPPDATA instead of the macOS and Linux stand-ins. macOS and Ubuntu stay green.

Skipped on Windows only, each with its reason in the test:

  • SIGSTOP-based lifecycle tests;
  • POSIX SingletonLock and ps parsing tests;
  • the lightpanda and camoufox fake-script tests;
  • one remove test whose stand-ins are a SingletonLock and HOME-scoped servers.

Known gaps

  • Edge and Brave are detected but were not launched in CI.
  • No hand test on a Windows desktop, and no ARM64.
  • Copilot CLI and the Cursor editor starting cmd /c entries is unverified. Claude Code, Codex, Gemini and the Cursor CLI resolve it.
  • Lightpanda has no Windows build. Camoufox was not tried.
  • destroy cannot tell stray servers apart by their environment on Windows, because the process table has no environment.
  • Each process table read starts Windows PowerShell (about 0.3 to 0.5 s).

…ows browser locations

Named pipes for the background and live servers, Chrome found through its
lockfile and the PowerShell process table, process trees ended with taskkill,
Chrome, Edge and Brave in their Windows folders, agents' .cmd shims run
through cmd.exe with escaped arguments, and tests that run on windows-latest.
Session owners know cmd, PowerShell and Git Bash on Windows; doctor's secret
store and Chrome install hints name what works there; the docs say how to
install turno-browser on Windows, where its data lives and what was checked;
CI installs the packed packages with npm on windows-latest.
@william-monroy
william-monroy marked this pull request as ready for review November 23, 2026 04:30
@william-monroy
william-monroy merged commit d65d855 into main Nov 23, 2026
15 checks passed
@william-monroy
william-monroy deleted the feat/browser-windows branch November 23, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant