@codexhost/cli 0.16.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bin/codexhost.js +27 -3
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -5,10 +5,10 @@ Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install -g @codexhost/cli@0.
|
|
8
|
+
npm install -g @codexhost/cli@0.17.0
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
npm automatically installs the matching macOS, Windows, or Linux platform package. Node.js 22 or
|
|
11
|
+
npm automatically installs the matching macOS, Windows, or Linux platform package. Node.js 22.19.0 or later, except 23.x and the official ChatGPT/Codex Desktop are required.
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
package/bin/codexhost.js
CHANGED
|
@@ -6,8 +6,28 @@ import { homedir } from "node:os";
|
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
9
|
-
const version = "0.
|
|
9
|
+
const version = "0.17.0";
|
|
10
|
+
const minimumNodeVersion = "22.19.0";
|
|
11
|
+
const excludedNodeRange = {"from":"23.0.0","to":"24.0.0"};
|
|
10
12
|
const userArguments = process.argv.slice(2);
|
|
13
|
+
{
|
|
14
|
+
const compare = (left, right) => {
|
|
15
|
+
const a = left.split(".").map(Number);
|
|
16
|
+
const b = right.split(".").map(Number);
|
|
17
|
+
return a[0] - b[0] || a[1] - b[1] || a[2] - b[2];
|
|
18
|
+
};
|
|
19
|
+
const current = process.versions.node;
|
|
20
|
+
if (
|
|
21
|
+
compare(current, minimumNodeVersion) < 0 ||
|
|
22
|
+
(compare(current, excludedNodeRange.from) >= 0 &&
|
|
23
|
+
compare(current, excludedNodeRange.to) < 0)
|
|
24
|
+
) {
|
|
25
|
+
console.error(
|
|
26
|
+
`codexhost: Node.js ${current} is not supported; @codexhost/cli requires Node.js 22.19.0 or later, except 23.x.`,
|
|
27
|
+
);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
11
31
|
const repositoryUrl = "https://github.com/BytePioneer-AI/codex-host";
|
|
12
32
|
const startupTraceStartedAt = Date.now();
|
|
13
33
|
function startupTrace(stage) {
|
|
@@ -234,7 +254,9 @@ if (userArguments.length === 0) {
|
|
|
234
254
|
consoleArguments = userArguments.slice(1);
|
|
235
255
|
} else if (userArguments[0] === "remote") {
|
|
236
256
|
launchArguments = null;
|
|
237
|
-
|
|
257
|
+
// The packaged resources are appended after the subcommand; without one, the
|
|
258
|
+
// first injected option would be read as the subcommand. Show usage instead.
|
|
259
|
+
remoteArguments = userArguments.length > 1 ? userArguments.slice(1) : ["help"];
|
|
238
260
|
} else if (userArguments[0] === "broker") {
|
|
239
261
|
launchArguments = null;
|
|
240
262
|
brokerArguments = userArguments.slice(1);
|
|
@@ -289,7 +311,9 @@ if (launchArguments?.[0] === "launch") {
|
|
|
289
311
|
}
|
|
290
312
|
}
|
|
291
313
|
const extras = [];
|
|
292
|
-
if (!injected.has("--node")
|
|
314
|
+
if (!injected.has("--node") && process.platform !== "darwin") {
|
|
315
|
+
extras.push("--node", process.execPath);
|
|
316
|
+
}
|
|
293
317
|
if (!injected.has("--shim")) extras.push("--shim", shim);
|
|
294
318
|
if (!injected.has("--host-runtime")) extras.push("--host-runtime", hostRuntime);
|
|
295
319
|
if (!injected.has("--desktop-controller")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codexhost/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"README.md"
|
|
12
12
|
],
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": ">=22"
|
|
14
|
+
"node": ">=22.19.0 <23.0.0 || >=24.0.0"
|
|
15
15
|
},
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@codexhost/cli-darwin-arm64": "0.
|
|
18
|
-
"@codexhost/cli-darwin-x64": "0.
|
|
19
|
-
"@codexhost/cli-win32-x64": "0.
|
|
20
|
-
"@codexhost/cli-win32-arm64": "0.
|
|
21
|
-
"@codexhost/cli-linux-x64": "0.
|
|
22
|
-
"@codexhost/cli-linux-arm64": "0.
|
|
17
|
+
"@codexhost/cli-darwin-arm64": "0.17.0",
|
|
18
|
+
"@codexhost/cli-darwin-x64": "0.17.0",
|
|
19
|
+
"@codexhost/cli-win32-x64": "0.17.0",
|
|
20
|
+
"@codexhost/cli-win32-arm64": "0.17.0",
|
|
21
|
+
"@codexhost/cli-linux-x64": "0.17.0",
|
|
22
|
+
"@codexhost/cli-linux-arm64": "0.17.0"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"codex",
|