@codexhost/cli 0.3.5 → 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.5
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.5";
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) {
@@ -190,6 +190,7 @@ if (updateEnvironment.CODEXHOST_REMOTE_SSH_MANAGED === "1") {
190
190
 
191
191
  let launchArguments;
192
192
  let remoteArguments = null;
193
+ let delegationArguments = null;
193
194
  if (userArguments.length === 0) {
194
195
  launchArguments = ["launch"];
195
196
  } else if (userArguments[0] === "launch") {
@@ -199,6 +200,13 @@ if (userArguments.length === 0) {
199
200
  } else if (userArguments[0] === "remote") {
200
201
  launchArguments = null;
201
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;
202
210
  } else if (userArguments[0] === "--help" || userArguments[0] === "-h") {
203
211
  console.log(
204
212
  [
@@ -208,6 +216,10 @@ if (userArguments.length === 0) {
208
216
  " codexhost inspect",
209
217
  " codexhost launch [launcher options]",
210
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 ...",
211
223
  "",
212
224
  "This npm package uses the current Node.js runtime and the packaged",
213
225
  "Rust launcher/shim. Codex Desktop must already be installed.",
@@ -246,7 +258,28 @@ if (launchArguments?.[0] === "launch") {
246
258
  launchArguments = ["launch", ...extras, ...launchArguments.slice(1)];
247
259
  }
248
260
 
249
- 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) {
250
283
  const child = spawn(
251
284
  process.execPath,
252
285
  [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codexhost/cli",
3
- "version": "0.3.5",
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,12 +14,12 @@
14
14
  "node": ">=22"
15
15
  },
16
16
  "optionalDependencies": {
17
- "@codexhost/cli-darwin-arm64": "0.3.5",
18
- "@codexhost/cli-darwin-x64": "0.3.5",
19
- "@codexhost/cli-win32-x64": "0.3.5",
20
- "@codexhost/cli-win32-arm64": "0.3.5",
21
- "@codexhost/cli-linux-x64": "0.3.5",
22
- "@codexhost/cli-linux-arm64": "0.3.5"
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"
23
23
  },
24
24
  "keywords": [
25
25
  "codex",