Skip to content

Computer use for the Pi coding agent — Windows apps, browsers and desktops through native UI trees, screenshots and real input.

Fix the fork runtime hash in driver.ts: it must match the pinned runtime 33c4b82b (LPT-940)

alexshpunt-clanker[bot]c3a53174096b
diff --git a/src/driver.ts b/src/driver.ts
index 74bb0fd..65e8162 100644
--- a/src/driver.ts
+++ b/src/driver.ts
@@ -87,7 +87,7 @@ export const WINDOW_RESTORE_RUNTIME = {
/** Window management plus every earlier native capability; `windows-desktop` selects these bytes. Browser pages use Playwright, not this runtime. */
export const WINDOW_MANAGEMENT_RUNTIME = {
source: "33c4b82b655065327253e771e73c70ff88697074", version: "0.37.0",
- sha256: "e37cbfb042853e7aea5cd78655d4058c09abf23146adf7975e7f6f087cd5cf6b",
+ sha256: "14fee78b3b5a6ac0368d29813cbd2c0bdd43da3ee14a5a4791762ce0f3e3dc03",
} as const;
const forkRuntimes = {
"windows-desktop": WINDOW_MANAGEMENT_RUNTIME,
diff --git a/test/runtime-pin-consistency.test.ts b/test/runtime-pin-consistency.test.ts
new file mode 100644
index 0000000..dbbf2ac
--- /dev/null
+++ b/test/runtime-pin-consistency.test.ts
@@ -0,0 +1,10 @@
+import { readFileSync } from "node:fs";
+import { expect, test } from "vitest";
+import { WINDOW_MANAGEMENT_RUNTIME } from "../src/driver.ts";
+
+// A machine configured with a trusted command is checked against WINDOW_MANAGEMENT_RUNTIME; the bundled runtime against the pins file.
+// If the two disagree, one of them refuses the driver the other one ships.
+test("the fork runtime the driver accepts is the runtime the package pins", () => {
+ const pins = JSON.parse(readFileSync(new URL("../src/runtime-pins.json", import.meta.url), "utf8")) as { source: string; version: string; files: Record<string, string> };
+ expect(WINDOW_MANAGEMENT_RUNTIME).toEqual({ source: pins.source, version: pins.version, sha256: pins.files["cua-driver.exe"] });
+});