The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 17:15 UTC
fix(server): SSH device test rejects Node below agent-device's 22.12 floor (#35991)
Julius Marminge committed
Nov 12, 2026 at 21:23 UTC
939b2884f9e9617aab0b0c0ffda9357ef73ad0b9
3 files changed
+18
-2
apps/server/src/device/sshDeviceScript.test.ts
+15
@@ -46,6 +46,21 @@ it.effect("preserves shell metacharacters and newlines in remote arguments", ()
46
}),
47
);
48
49
+it.effect("rejects a Node release below the pinned agent-device engine floor", () =>
50
+ Effect.gen(function* () {
51
+ if ((yield* HostProcess.Platform) === "win32") return;
52
+ const probe = NodeChildProcess.spawnSync(process.execPath, [], {
53
+ input:
54
+ `Object.defineProperty(process.versions, "node", { value: "22.11.0" });\n` +
55
+ remoteDeviceScript("owner", "probe"),
56
+ env: { HOME: NodeOS.tmpdir(), PATH: NodePath.dirname(process.execPath) },
57
+ encoding: "utf8",
58
+ });
59
+ expect(probe.status).not.toBe(0);
60
+ expect(probe.stderr).toContain("Node 22.12 or newer");
61
+ }),
62
+);
63
+
64
it.effect("stops a daemon left for its owner when starting without agent tools", () =>
65
Effect.gen(function* () {
66
if ((yield* HostProcess.Platform) === "win32") return;
apps/server/src/device/sshDeviceScript.ts
+2
-1
@@ -139,7 +139,8 @@ async function install(name, version, entry) {
139
{ platform: 'android', available: android, ...(!android ? { reason: 'Android SDK missing. Set ANDROID_HOME or put adb on the SSH PATH.' } : {}) },
140
];
141
if (mode === 'probe') {
142
- if (Number(process.versions.node.split('.')[0]) < 22) throw Error('Node 22 or newer is required on the device host.');
142
+ const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(Number);
143
+ if (nodeMajor < 22 || (nodeMajor === 22 && nodeMinor < 12)) throw Error('Node 22.12 or newer is required on the device host.');
144
if (run('npm', ['--version']).status !== 0) throw Error('npm is missing from the non-interactive SSH PATH.');
145
console.log(JSON.stringify({ nodePath: process.execPath, platforms, tools: versions() })); return;
146
}
docs/user/devices.md
+1
-1
@@ -110,7 +110,7 @@ the environment’s own machine are skipped, since its devices are already local
110
The first device listing installs pinned device tools on the host.
111
SSH device hosts currently need macOS or Linux. To use devices on a Windows
112
machine, run T3 Code on that machine and connect to its environment.
113
-Node 22 or newer and npm must be available to non-interactive SSH commands.
113
+Node 22.12 or newer and npm must be available to non-interactive SSH commands.
114
T3 checks common Homebrew and Android SDK locations; custom installations need
115
the appropriate PATH and ANDROID_HOME on the host. Android emulator video needs
116
`ffmpeg` with libx264 on that host; physical Android devices use scrcpy and do