@codexhost/cli 0.3.4 → 0.4.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 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.3.4
8
+ npm install -g @codexhost/cli@0.4.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.3.4";
9
+ const version = "0.4.0";
10
10
  const userArguments = process.argv.slice(2);
11
11
  const startupTraceStartedAt = Date.now();
12
12
  function startupTrace(stage) {
@@ -29,7 +29,8 @@ const platformPackages = {
29
29
  "darwin-x64": "@codexhost/cli-darwin-x64",
30
30
  "win32-x64": "@codexhost/cli-win32-x64",
31
31
  "win32-arm64": "@codexhost/cli-win32-arm64",
32
- "linux-x64": "@codexhost/cli-linux-x64"
32
+ "linux-x64": "@codexhost/cli-linux-x64",
33
+ "linux-arm64": "@codexhost/cli-linux-arm64"
33
34
  };
34
35
  const platformKey = `${process.platform}-${process.arch}`;
35
36
  const platformPackage = platformPackages[platformKey];
@@ -189,6 +190,7 @@ if (updateEnvironment.CODEXHOST_REMOTE_SSH_MANAGED === "1") {
189
190
 
190
191
  let launchArguments;
191
192
  let remoteArguments = null;
193
+ let delegationArguments = null;
192
194
  if (userArguments.length === 0) {
193
195
  launchArguments = ["launch"];
194
196
  } else if (userArguments[0] === "launch") {
@@ -198,6 +200,13 @@ if (userArguments.length === 0) {
198
200
  } else if (userArguments[0] === "remote") {
199
201
  launchArguments = null;
200
202
  remoteArguments = userArguments.slice(1);
203
+ } else if (
204
+ userArguments[0] === "harness" ||
205
+ userArguments[0] === "delegate" ||
206
+ userArguments[0] === "thread"
207
+ ) {
208
+ launchArguments = null;
209
+ delegationArguments = userArguments;
201
210
  } else if (userArguments[0] === "--help" || userArguments[0] === "-h") {
202
211
  console.log(
203
212
  [
@@ -207,6 +216,10 @@ if (userArguments.length === 0) {
207
216
  " codexhost inspect",
208
217
  " codexhost launch [launcher options]",
209
218
  " codexhost remote install|start|stop|status|uninstall",
219
+ " codexhost delegate --help",
220
+ " codexhost harness inspect ...",
221
+ " codexhost delegate start ...",
222
+ " codexhost thread send|cancel|read|wait|list ...",
210
223
  "",
211
224
  "This npm package uses the current Node.js runtime and the packaged",
212
225
  "Rust launcher/shim. Codex Desktop must already be installed.",
@@ -245,7 +258,28 @@ if (launchArguments?.[0] === "launch") {
245
258
  launchArguments = ["launch", ...extras, ...launchArguments.slice(1)];
246
259
  }
247
260
 
248
- if (remoteArguments !== null) {
261
+ if (delegationArguments !== null) {
262
+ const child = spawn(
263
+ process.execPath,
264
+ [hostRuntime, "--codexhost-delegation-cli", ...delegationArguments],
265
+ {
266
+ env: {
267
+ ...updateEnvironment,
268
+ CODEXHOST_CLI_PATH: fileURLToPath(import.meta.url),
269
+ },
270
+ stdio: "inherit",
271
+ windowsHide: true,
272
+ },
273
+ );
274
+ child.on("error", (error) => fail(error.message));
275
+ child.on("exit", (code, signal) => {
276
+ if (signal) {
277
+ process.kill(process.pid, signal);
278
+ return;
279
+ }
280
+ process.exit(code ?? 1);
281
+ });
282
+ } else if (remoteArguments !== null) {
249
283
  const child = spawn(
250
284
  process.execPath,
251
285
  [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codexhost/cli",
3
- "version": "0.3.4",
3
+ "version": "0.4.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,11 +14,12 @@
14
14
  "node": ">=22"
15
15
  },
16
16
  "optionalDependencies": {
17
- "@codexhost/cli-darwin-arm64": "0.3.4",
18
- "@codexhost/cli-darwin-x64": "0.3.4",
19
- "@codexhost/cli-win32-x64": "0.3.4",
20
- "@codexhost/cli-win32-arm64": "0.3.4",
21
- "@codexhost/cli-linux-x64": "0.3.4"
17
+ "@codexhost/cli-darwin-arm64": "0.4.0",
18
+ "@codexhost/cli-darwin-x64": "0.4.0",
19
+ "@codexhost/cli-win32-x64": "0.4.0",
20
+ "@codexhost/cli-win32-arm64": "0.4.0",
21
+ "@codexhost/cli-linux-x64": "0.4.0",
22
+ "@codexhost/cli-linux-arm64": "0.4.0"
22
23
  },
23
24
  "keywords": [
24
25
  "codex",