@minhspark/codex-mcp-bridge 1.22.16 → 1.22.18

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-mcp-bridge",
3
- "version": "1.22.16",
3
+ "version": "1.22.18",
4
4
  "description": "Connect ChatGPT to your own Codex Desktop projects and conversations.",
5
5
  "author": {
6
6
  "name": "Bui Dang Minh"
package/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [SemVer](ht
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.22.18] - 2026-10-22
8
+
9
+ ### Fixed
10
+
11
+ - `wait_codex_reply` with a short `timeoutSec` no longer fails with `The response deadline elapsed while another operation held this thread` when no other operation held the thread. The tool's deadline starts before the caller's identity check, and that check spawns PowerShell on Windows. When it used up the whole budget, the observation never started and the bridge reported a held thread instead of a timeout. It now returns the normal timeout result with `nextAction: wait_codex_reply`. The held-thread message is now used only when another operation actually holds the thread; otherwise the error says the deadline elapsed before the operation started.
12
+
13
+ ### Tests
14
+
15
+ - The account-change wait test no longer depends on timing. Its relay fixture parks `wait_threads` on a gate that the test releases, instead of a fixed 2.5 s sleep against a 1 s budget. That timing failed on a stalled `windows-latest` runner.
16
+ - The relay fixture in `test/bridge-integration.test.mjs` provisions its creation receipts once per file, so Windows tests no longer spend four PowerShell cold starts inside their own timing.
17
+ - The Desktop task integration assertions now print the tool result when they fail.
18
+
19
+ ### Verification
20
+
21
+ - New unit tests cover a deadline that elapses before an unheld operation starts, and one that elapses while another operation holds the thread. The first fails on 1.22.17.
22
+ - Simulating a 1.2 s caller check reproduced the CI failure text exactly on 1.22.17. The rewritten test passes with 1.2 s and 3 s simulated delays.
23
+ - Full suite on macOS: 1558 pass, 0 fail, 23 skipped.
24
+
25
+ ## [1.22.17] - 2026-10-22
26
+
27
+ ### Fixed
28
+
29
+ - `npm install -g @minhspark/codex-mcp-bridge` run from Claude Code's Bash tool no longer warns that the installed version could not be verified. Claude Code shell snapshots keep the `npm()` function from `scripts/npm-footer.sh` but drop functions whose names start with `_`, so the separate `_codex_bridge_installed_version` helper vanished and every install printed `Warning: npm completed, but the installed @minhspark/codex-mcp-bridge version could not be verified.` even though it succeeded. The version reader now lives inside `npm()` and the script defines no other function.
30
+ - The 1.22.14 changelog entry no longer reads "The wake It needs".
31
+
32
+ ### Verification
33
+
34
+ - New test `reports an upgrade when only the npm function survives a shell snapshot` loads only `typeset -f npm` in bash and zsh, the way a snapshot does. CI passed on Ubuntu, macOS and Windows with Node 22 and 24 (#151).
35
+
7
36
  ## [1.22.16] - 2026-10-22
8
37
 
9
38
  ### Fixed
@@ -53,7 +82,7 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [SemVer](ht
53
82
 
54
83
  - On macOS the wake opens the task without activating Codex Desktop. On Windows the `codex://` handler brings the Codex Desktop window forward.
55
84
  - The wake helps only when the opened task does not already have its MCP servers loaded. If the relay process died while its task stayed loaded, reopening that task does not restart it; open another task or reconnect the task's MCP servers.
56
- - The wake It needs either the destination task or an earlier Codex Desktop task in the sender's project; otherwise the bridge reports the relay-down guidance.
85
+ - The wake needs either the destination task or an earlier Codex Desktop task in the sender's project; otherwise the bridge reports the relay-down guidance.
57
86
  - Codex can unload a task's MCP servers when the task is idle; the next request wakes the relay again.
58
87
 
59
88
  ## [1.22.13] - 2026-10-20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minhspark/codex-mcp-bridge",
3
- "version": "1.22.16",
3
+ "version": "1.22.18",
4
4
  "description": "Two-way MCP bridge between Claude and Codex: prompts into a live Codex thread, messages into a running Claude Code session.",
5
5
  "keywords": [
6
6
  "mcp",
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "codex-mcp-bridge",
4
- "version": "1.22.16",
4
+ "version": "1.22.18",
5
5
  "description": "Connect ChatGPT to your own Codex Desktop projects and conversations.",
6
6
  "author": {
7
7
  "name": "Bui Dang Minh",
@@ -24,7 +24,7 @@ import { stableInstallPath } from "../src/install-paths.mjs";
24
24
 
25
25
  exitForVersionRequest(import.meta.url);
26
26
 
27
- const VERSION = "1.22.16";
27
+ const VERSION = "1.22.18";
28
28
  const root = stableInstallPath(path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."));
29
29
  const entry = path.join(root, "src", "mcp-supervisor.mjs");
30
30
  const entryArgs = ["native-relay-companion.mjs"];
@@ -1,12 +1,9 @@
1
- _codex_bridge_installed_version() {
2
- command node --input-type=module -e 'import fs from "node:fs"; const value = JSON.parse(fs.readFileSync(process.argv[1], "utf8")); if (value.name !== "@minhspark/codex-mcp-bridge" || typeof value.version !== "string" || !/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(value.version)) process.exit(1); process.stdout.write(value.version);' "$1/@minhspark/codex-mcp-bridge/package.json" 2>/dev/null
3
- }
4
-
5
1
  npm() {
6
2
  if [ "$#" -eq 0 ]; then command npm; return $?; fi
7
3
  local bridge_command="${1-}" bridge_global=0 bridge_packages=0 bridge_supported=1
8
4
  local bridge_dry_run=auto bridge_root= bridge_before= bridge_after= bridge_install_status=0
9
5
  local bridge_after_root= bridge_mode=unknown bridge_before_verified=1
6
+ local bridge_version_script='import fs from "node:fs"; const value = JSON.parse(fs.readFileSync(process.argv[1], "utf8")); if (value.name !== "@minhspark/codex-mcp-bridge" || typeof value.version !== "string" || !/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(value.version)) process.exit(1); process.stdout.write(value.version);'
10
7
  local -a bridge_arguments bridge_context
11
8
  bridge_arguments=("$@")
12
9
  bridge_context=(--global)
@@ -49,7 +46,7 @@ npm() {
49
46
  case "$bridge_root" in
50
47
  /*)
51
48
  if [ -e "$bridge_root/@minhspark/codex-mcp-bridge/package.json" ]; then
52
- bridge_before="$(_codex_bridge_installed_version "$bridge_root")" || bridge_before_verified=0
49
+ bridge_before="$(command node --input-type=module -e "$bridge_version_script" "$bridge_root/@minhspark/codex-mcp-bridge/package.json" 2>/dev/null)" || bridge_before_verified=0
53
50
  fi
54
51
  ;;
55
52
  *) bridge_before_verified=0 ;;
@@ -65,7 +62,7 @@ npm() {
65
62
  else
66
63
  bridge_after_root="$(command npm root "${bridge_context[@]}" 2>/dev/null)" || bridge_after_root=
67
64
  case "$bridge_after_root" in
68
- /*) bridge_after="$(_codex_bridge_installed_version "$bridge_after_root")" || bridge_after= ;;
65
+ /*) bridge_after="$(command node --input-type=module -e "$bridge_version_script" "$bridge_after_root/@minhspark/codex-mcp-bridge/package.json" 2>/dev/null)" || bridge_after= ;;
69
66
  esac
70
67
  if [ -z "$bridge_after" ] || [ "$bridge_before_verified" -ne 1 ] || [ "$bridge_after_root" != "$bridge_root" ]; then
71
68
  printf 'Warning: npm completed, but the installed @minhspark/codex-mcp-bridge version could not be verified.\n' >&2
@@ -30,7 +30,7 @@ import { discoverClaudeProject } from "./claude-project-discovery.mjs";
30
30
 
31
31
  exitForVersionRequest(import.meta.url);
32
32
 
33
- const VERSION = "1.22.16";
33
+ const VERSION = "1.22.18";
34
34
  void import("./telemetry.mjs").then(({ startUsageReporting }) => startUsageReporting({ version: VERSION })).catch(() => {});
35
35
  const FORWARD_MIN_INTERVAL_MS = 5000;
36
36
  const FORWARD_MAX_PER_SESSION = 50;
package/src/index.mjs CHANGED
@@ -41,7 +41,7 @@ import { createRelayWake, relayKeeperEnabled, relayWakeStateFile, startRelayKeep
41
41
 
42
42
  exitForVersionRequest(import.meta.url);
43
43
 
44
- const VERSION = "1.22.16";
44
+ const VERSION = "1.22.18";
45
45
  void import("./telemetry.mjs").then(({ startUsageReporting }) => startUsageReporting({ version: VERSION })).catch(() => {});
46
46
  const log = (msg) => process.stderr.write(`[codex-mcp-bridge] ${msg}\n`);
47
47
 
@@ -39,7 +39,7 @@ import { NativeCreationReceipts, creationIdValid } from "./native-creation-recei
39
39
 
40
40
  exitForVersionRequest(import.meta.url);
41
41
 
42
- const VERSION = "1.22.16";
42
+ const VERSION = "1.22.18";
43
43
  const log = (msg) => process.stderr.write(`[native-relay] ${msg}\n`);
44
44
 
45
45
  function errorResponse(code, message, sent, details) {
@@ -160,10 +160,12 @@ export class DesktopTaskDelivery {
160
160
  }
161
161
 
162
162
  async withThread(threadId, operation, { deadline, onDeadline } = {}) {
163
+ const held = this.threadOperations.has(threadId);
163
164
  const previous = this.threadOperations.get(threadId) ?? Promise.resolve();
164
165
  let expired = false;
165
166
  const current = previous.catch(() => {}).then(() => {
166
- if (expired || (deadline !== undefined && this.now() >= deadline)) throw new Error("The response deadline elapsed while another operation held this thread. No new prompt was sent.");
167
+ if (deadline !== undefined && this.now() >= deadline) expired = true;
168
+ if (expired) throw new Error(`The response deadline elapsed ${held ? "while another operation held this thread" : "before the operation started"}. No new prompt was sent.`);
167
169
  return operation();
168
170
  });
169
171
  this.threadOperations.set(threadId, current);