name: hydrogen-adom-desktop-windows description: > Windows companion to hydrogen-adom-desktop: the Windows/WSL2-specific host behavior behind Adom Bridge (ab). Covers the run_script interpreter set (bash/cmd/powershell), the wsl_exec structured runner, the winget-based unattended installs (KiCad, Node.js), WSL2 loopback forwarding for the relay, the host port-discovery file, and the taskkill cautions. The generic Hydrogen/ab model, capability map, and CLI patterns live in hydrogen-adom-desktop. Trigger words: wsl_exec, winget install kicad, taskkill adom, windows host bridge, wsl loopback, windows run_script.

Adom Bridge on a Windows host: the specifics

Read hydrogen-adom-desktop first for the Hydrogen/ab model and the generic verb surface. This skill carries only what is Windows-specific.

Structured runners on Windows

run_script accepts interpreter: "bash" | "cmd" | "powershell" on Windows (bash resolves to WSL2 bash, not Git Bash). Base64 the script so no quoting survives to be mangled:

adom-bridge-cli run_script '{"interpreter":"powershell","scriptB64":"<b64>"}'

Windows also has an extra structured runner for executing INSIDE a WSL2 distro:

adom-bridge-cli wsl_exec '{"distro":"<workspace-distro>","user":"adom","scriptB64":"<b64>"}'

wsl_exec is a Windows/WSL2-only path; on other platforms it returns a clean "Windows-only" error.

Unattended installs (winget)

If KiCad or Node.js is missing on the host, ab can install them unattended via winget:

  • adom-bridge-cli desktop_install_kicad '{}' when kicad_list_versions returns errorCode:"kicad_not_installed"
  • adom-bridge-cli desktop_install_node '{}' when a browser_* call returns errorCode:"node_not_found" (Node.js unblocks the Pup bridge)

Relay networking (WSL2 loopback)

The host-side clients (Hydrogen's built-in bridge and the embedded ab) reach the in-workspace relay because WSL2 mirrored networking shares loopback between the distro and the Windows host: the relay's 127.0.0.1:8765/8766 inside the workspace is the same loopback the host dials. Hydrogen's control API port is discovered from the host-side ports file (%APPDATA%\hydrogen-desktop\ports.json); hd_api reads the discovered port for you (fallback 47084).

Process-kill cautions (taskkill)

  • Never taskkill /F /IM adom-bridge.exe (or the embedded ab process) from the workspace: the host ab IS your relay bridge, and killing it severs the control channel with no way to restore it from inside.
  • Never broad-kill node.exe or wsl.exe from the host either; VS Code Server and the workspace itself ride on them.
  • hydrogen-adom-desktop (base): the Hydrogen/ab model and capability map
  • hydrogen-networking: the Windows port architecture
  • hydrogen-container: the WSL2 workspace facts