@codexhost/cli 0.10.2 → 0.11.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 +1 -1
- package/bin/codexhost.js +21 -11
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ 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.11.0
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
npm automatically installs the matching macOS, Windows, or Linux platform package. Node.js 22 or 24 and the official ChatGPT/Codex Desktop are required.
|
package/bin/codexhost.js
CHANGED
|
@@ -6,7 +6,7 @@ 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.11.0";
|
|
10
10
|
const userArguments = process.argv.slice(2);
|
|
11
11
|
const repositoryUrl = "https://github.com/BytePioneer-AI/codex-host";
|
|
12
12
|
const startupTraceStartedAt = Date.now();
|
|
@@ -104,21 +104,16 @@ const shim = path.join(packageRoot, "libexec", `codexhost-shim${executableSuffix
|
|
|
104
104
|
const hostRuntime = path.join(packageRoot, "app", "host-runtime.mjs");
|
|
105
105
|
const desktopController = path.join(packageRoot, "app", "desktop-controller.mjs");
|
|
106
106
|
const rendererExtension = path.join(packageRoot, "app", "renderer-extension.js");
|
|
107
|
+
const consoleServer = path.join(packageRoot, "app", "console-server.mjs");
|
|
107
108
|
|
|
108
109
|
function fail(message) {
|
|
109
110
|
console.error(`codexhost: ${message}`);
|
|
110
111
|
process.exit(1);
|
|
111
112
|
}
|
|
112
113
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
["host runtime", hostRuntime],
|
|
117
|
-
["desktop controller", desktopController],
|
|
118
|
-
["renderer extension", rendererExtension],
|
|
119
|
-
]) {
|
|
120
|
-
if (!existsSync(filePath)) fail(`missing ${label}: ${filePath}`);
|
|
121
|
-
}
|
|
114
|
+
// Desktop resources are validated by the Launcher after it starts the recovery
|
|
115
|
+
// console. Do not prevent recovery when one of those resources is missing.
|
|
116
|
+
if (!existsSync(launcher)) fail(`missing launcher: ${launcher}`);
|
|
122
117
|
|
|
123
118
|
function existingFile(filePath) {
|
|
124
119
|
return typeof filePath === "string" && filePath.length > 0 && existsSync(filePath)
|
|
@@ -226,12 +221,16 @@ let launchArguments;
|
|
|
226
221
|
let remoteArguments = null;
|
|
227
222
|
let brokerArguments = null;
|
|
228
223
|
let delegationArguments = null;
|
|
224
|
+
let consoleArguments = null;
|
|
229
225
|
if (userArguments.length === 0) {
|
|
230
226
|
launchArguments = ["launch"];
|
|
231
227
|
} else if (userArguments[0] === "launch") {
|
|
232
228
|
launchArguments = userArguments;
|
|
233
229
|
} else if (userArguments[0] === "inspect") {
|
|
234
230
|
launchArguments = userArguments;
|
|
231
|
+
} else if (userArguments[0] === "console") {
|
|
232
|
+
launchArguments = null;
|
|
233
|
+
consoleArguments = userArguments.slice(1);
|
|
235
234
|
} else if (userArguments[0] === "remote") {
|
|
236
235
|
launchArguments = null;
|
|
237
236
|
remoteArguments = userArguments.slice(1);
|
|
@@ -252,6 +251,7 @@ if (userArguments.length === 0) {
|
|
|
252
251
|
" codexhost",
|
|
253
252
|
" codexhost --version",
|
|
254
253
|
" codexhost inspect",
|
|
254
|
+
" codexhost console",
|
|
255
255
|
" codexhost launch [launcher options]",
|
|
256
256
|
" codexhost remote install|start|stop|status|uninstall",
|
|
257
257
|
" codexhost broker install|status|stop|uninstall",
|
|
@@ -297,7 +297,17 @@ if (launchArguments?.[0] === "launch") {
|
|
|
297
297
|
launchArguments = ["launch", ...extras, ...launchArguments.slice(1)];
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
if (
|
|
300
|
+
if (consoleArguments !== null) {
|
|
301
|
+
if (consoleArguments.length > 0) fail("console accepts no arguments");
|
|
302
|
+
if (!existsSync(consoleServer)) fail(`missing console: ${consoleServer}`);
|
|
303
|
+
const child = spawn(process.execPath, [consoleServer, "open"], {
|
|
304
|
+
env: { ...updateEnvironment, CODEXHOST_LAUNCHER_EXECUTABLE: launcher },
|
|
305
|
+
stdio: "inherit",
|
|
306
|
+
windowsHide: true,
|
|
307
|
+
});
|
|
308
|
+
child.on("error", (error) => fail(error.message));
|
|
309
|
+
child.on("exit", (code) => process.exit(code ?? 1));
|
|
310
|
+
} else if (delegationArguments !== null) {
|
|
301
311
|
const child = spawn(
|
|
302
312
|
process.execPath,
|
|
303
313
|
[hostRuntime, "--codexhost-delegation-cli", ...delegationArguments],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codexhost/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"node": ">=22"
|
|
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.11.0",
|
|
18
|
+
"@codexhost/cli-darwin-x64": "0.11.0",
|
|
19
|
+
"@codexhost/cli-win32-x64": "0.11.0",
|
|
20
|
+
"@codexhost/cli-win32-arm64": "0.11.0",
|
|
21
|
+
"@codexhost/cli-linux-x64": "0.11.0",
|
|
22
|
+
"@codexhost/cli-linux-arm64": "0.11.0"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"codex",
|