@linzumi/cli 0.0.97-beta → 0.0.98-beta

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
@@ -58,7 +58,7 @@ Install the CLI or run it with `npx`:
58
58
  ```bash
59
59
  npm install -g @linzumi/cli@latest
60
60
  npx -y @linzumi/cli@latest signup
61
- npx -y @linzumi/cli@0.0.97-beta --version
61
+ npx -y @linzumi/cli@0.0.98-beta --version
62
62
  linzumi --version
63
63
  ```
64
64
 
package/dist/index.js CHANGED
@@ -14705,7 +14705,16 @@ function linzumiMcpServerConfig(options) {
14705
14705
  ...options.toolScope === void 0 || options.toolScope === "all" ? [] : ["--tool-scope", options.toolScope]
14706
14706
  ],
14707
14707
  env: {
14708
- ...options.accessToken === void 0 ? {} : { LINZUMI_MCP_ACCESS_TOKEN: options.accessToken }
14708
+ ...options.accessToken === void 0 ? {} : { LINZUMI_MCP_ACCESS_TOKEN: options.accessToken },
14709
+ // The Linzumi metadata MCP is launched by codex as a STDIO child whose
14710
+ // `command` may be the Electron app binary. That binary only behaves as a
14711
+ // plain Node process (and thus boots the MCP server instead of a GUI
14712
+ // shell) when ELECTRON_RUN_AS_NODE=1 is present in its env. Newer codex
14713
+ // sanitizes MCP-child env to an allowlist that drops ELECTRON_RUN_AS_NODE,
14714
+ // so we both (a) pin it here and (b) explicitly forward it via
14715
+ // codexMcpConfigArgs / codexMcpConfigToml below. For a real Node `command`
14716
+ // this flag is a harmless no-op, so we always include it.
14717
+ ELECTRON_RUN_AS_NODE: "1"
14709
14718
  }
14710
14719
  };
14711
14720
  }
@@ -14714,7 +14723,16 @@ function codexMcpConfigArgs(config) {
14714
14723
  "-c",
14715
14724
  `mcp_servers.${config.name}.command=${JSON.stringify(config.command)}`,
14716
14725
  "-c",
14717
- `mcp_servers.${config.name}.args=${tomlStringArray(config.args)}`
14726
+ `mcp_servers.${config.name}.args=${tomlStringArray(config.args)}`,
14727
+ // Explicitly forward the server env (ELECTRON_RUN_AS_NODE,
14728
+ // LINZUMI_MCP_ACCESS_TOKEN, …) so codex passes it to the stdio child
14729
+ // regardless of its env-forwarding/sanitization allowlist. Without this,
14730
+ // newer codex strips ELECTRON_RUN_AS_NODE and the Electron-binary `command`
14731
+ // boots a GUI shell that pollutes the MCP stdout JSON-RPC framing.
14732
+ ...Object.entries(config.env).flatMap(([key, value]) => [
14733
+ "-c",
14734
+ `mcp_servers.${config.name}.env.${key}=${JSON.stringify(value)}`
14735
+ ])
14718
14736
  ];
14719
14737
  }
14720
14738
  function linzumiMcpCommandForProcess(processExecPath, scriptPath, execArgv = []) {
@@ -19785,7 +19803,7 @@ var linzumiCliVersion, linzumiCliVersionText;
19785
19803
  var init_version = __esm({
19786
19804
  "src/version.ts"() {
19787
19805
  "use strict";
19788
- linzumiCliVersion = "0.0.97-beta";
19806
+ linzumiCliVersion = "0.0.98-beta";
19789
19807
  linzumiCliVersionText = `linzumi ${linzumiCliVersion}`;
19790
19808
  }
19791
19809
  });
@@ -24737,6 +24755,11 @@ async function openLocalCodexRunner(options, log2, cleanup, close) {
24737
24755
  threadId: rebuildArgs.kandanThreadId,
24738
24756
  codexThreadId: rebuildArgs.codexThreadId,
24739
24757
  cwd,
24758
+ // Carry the conversation context through the rebuild-replay so
24759
+ // the respawned worker's developer instructions match what the
24760
+ // server would have replayed (parity with the live reconnect
24761
+ // control built above at channelSession.linzumiContext).
24762
+ ...control.linzumiContext === void 0 ? {} : { linzumiContext: control.linzumiContext },
24740
24763
  ...integerValue(control.rootSeq) === void 0 ? {} : { rootSeq: integerValue(control.rootSeq) },
24741
24764
  sourceSeq: message.seq,
24742
24765
  workDescription: message.body,
@@ -24755,7 +24778,8 @@ async function openLocalCodexRunner(options, log2, cleanup, close) {
24755
24778
  seq: message.seq,
24756
24779
  body: message.body,
24757
24780
  actorSlug: message.actorSlug,
24758
- actorUserId: message.actorUserId
24781
+ actorUserId: message.actorUserId,
24782
+ boundStartTimeout: true
24759
24783
  });
24760
24784
  } else {
24761
24785
  await startThreadRunnerProcess(reconnectControl, cwd);
@@ -26506,7 +26530,10 @@ async function resumeCodexThreadForReconnect(codex, codexThreadId, resumeOverrid
26506
26530
  threadId: codexThreadId,
26507
26531
  ...resumeOverrides
26508
26532
  };
26509
- const resumeResponse = await codex.request("thread/resume", resumeParams);
26533
+ const resumeResponse = await withCodexStartRequestTimeout(
26534
+ "thread/resume",
26535
+ codex.request("thread/resume", resumeParams)
26536
+ );
26510
26537
  if (!("error" in resumeResponse)) {
26511
26538
  return;
26512
26539
  }
@@ -26524,7 +26551,10 @@ async function resumeCodexThreadForReconnect(codex, codexThreadId, resumeOverrid
26524
26551
  `failed to prepare Codex thread before reconnect: ${injected.error.message}`
26525
26552
  );
26526
26553
  }
26527
- const verified = await codex.request("thread/resume", resumeParams);
26554
+ const verified = await withCodexStartRequestTimeout(
26555
+ "thread/resume",
26556
+ codex.request("thread/resume", resumeParams)
26557
+ );
26528
26558
  if ("error" in verified) {
26529
26559
  throw new Error(
26530
26560
  `failed to verify Codex thread before reconnect: ${verified.error.message}`
@@ -27115,7 +27145,8 @@ async function applyControl(codex, kandan, topic, instanceId, options, agentProv
27115
27145
  seq: sourceSeq,
27116
27146
  body: workDescription,
27117
27147
  actorSlug: identity.actorUsername,
27118
- actorUserId: identity.actorUserId
27148
+ actorUserId: identity.actorUserId,
27149
+ boundStartTimeout: true
27119
27150
  });
27120
27151
  }
27121
27152
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linzumi/cli",
3
- "version": "0.0.97-beta",
3
+ "version": "0.0.98-beta",
4
4
  "description": "Linzumi CLI — point a Codex agent at the real code on your laptop, with your team watching and steering from shared threads.",
5
5
  "type": "module",
6
6
  "bin": {