@essentialai/cogent-bridge 3.12.2 → 3.12.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.12.4 — 2026-07-30
4
+
5
+ ### Fixed
6
+ - **Codex plugin now also ships the bundled bridge** (no npx cold-start) — same fresh-install fix as 3.12.3, extended to Codex (`node ${CLAUDE_PLUGIN_ROOT}/bridge/cogent-bridge.mjs`, `COGENT_PLATFORM=codex`).
7
+ - FAQ + README: recovery steps for anyone who hit the pre-3.12.3 npx-timeout install state.
8
+
9
+
10
+ ## 3.12.3 — 2026-07-30
11
+
12
+ ### Fixed — CRITICAL: fresh install could never complete (cold npx > 30s MCP budget)
13
+ - **The plugin no longer launches the bridge via `npx`.** On a fresh machine the cold
14
+ `npx -y @essentialai/cogent-bridge@X` download took ~39s, over Claude Code's ~30s MCP
15
+ connect budget, so the `cogent_*` tools never bound to the session (`/cogent:register`
16
+ and `/cogent:status` were impossible). Worse, the timeout killed npm mid-install and
17
+ left a corrupt npx cache (`ajv-formats` present, `ajv` missing → `Cannot find module
18
+ 'ajv'` → crash), a self-sustaining loop.
19
+ - **Fix:** the Claude Code plugin now **ships a single self-contained bundle**
20
+ (`bridge/cogent-bridge.mjs`, all deps inlined via esbuild) and launches it with
21
+ `node ${CLAUDE_PLUGIN_ROOT}/bridge/cogent-bridge.mjs` — **no npx, no network at connect
22
+ time, ~0.4s cold start**, no cache corruption. The npm `@essentialai/cogent-bridge`
23
+ package is unchanged for direct/npx/Team consumers. (Codex plugin still uses npx — pinned
24
+ to 3.12.3; codex bundling is a fast-follow.)
25
+
3
26
  ## 3.12.2 — 2026-07-29
4
27
 
5
28
  ### Added — check-on-stop ("C"): catch messages that arrived while busy
package/README.md CHANGED
@@ -245,6 +245,17 @@ To override defaults, set environment variables in your `.mcp.json`:
245
245
 
246
246
  ## Troubleshooting
247
247
 
248
+ ### Fresh install: Cogent tools aren't available / `/cogent:register` can't run
249
+
250
+ Fixed in **3.12.3**. Older versions launched the bridge via `npx`, whose first-run download
251
+ could exceed Claude Code's MCP startup budget, so the tools never loaded (and the interrupted
252
+ download could corrupt the npx cache). The plugin now ships a self-contained bundle and starts
253
+ instantly. If you already hit the broken state, run once then fully quit + relaunch:
254
+
255
+ ```bash
256
+ rm -rf ~/.npm/_npx && claude plugin marketplace update && claude plugin update cogent@cogent
257
+ ```
258
+
248
259
  ### NVM/PATH: "npx not found" or server fails to start
249
260
 
250
261
  MCP servers are spawned as subprocesses and may not inherit your NVM configuration.
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,+DACsC,CAAC;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,QAAc,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,QAAiB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,WAAW,+DACsC,CAAC;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,QAAmB,CAAC;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,QAAiB,CAAC"}
package/dist/constants.js CHANGED
@@ -1,6 +1,18 @@
1
1
  import { createRequire } from "node:module";
2
- const require = createRequire(import.meta.url);
3
- const pkg = require("../package.json");
2
+ function resolveVersion() {
3
+ // `typeof` on an undeclared identifier is safe (returns "undefined"); in the bundle
4
+ // esbuild replaces the identifier with a string literal so this branch wins.
5
+ if (typeof __COGENT_VERSION__ === "string" && __COGENT_VERSION__) {
6
+ return __COGENT_VERSION__;
7
+ }
8
+ try {
9
+ const require = createRequire(import.meta.url);
10
+ return require("../package.json").version;
11
+ }
12
+ catch {
13
+ return "unknown";
14
+ }
15
+ }
4
16
  export const SERVER_NAME = "Cogent Bridge from Essential AI Solutions (essentialai.uk)";
5
17
  /**
6
18
  * cogent-bridge npm package version. Historically named SERVER_VERSION
@@ -10,7 +22,7 @@ export const SERVER_NAME = "Cogent Bridge from Essential AI Solutions (essential
10
22
  * all of which legitimately identify cogent-bridge AS the MCP server to the
11
23
  * user/CLI/CC).
12
24
  */
13
- export const SERVER_VERSION = pkg.version;
25
+ export const SERVER_VERSION = resolveVersion();
14
26
  /**
15
27
  * Alias of SERVER_VERSION for use sites where this string identifies the
16
28
  * client (cogent-bridge npm package) talking to cogent-server. Audit L4:
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAwB,CAAC;AAE9D,MAAM,CAAC,MAAM,WAAW,GACtB,4DAA4D,CAAC;AAE/D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAU5C,SAAS,cAAc;IACrB,oFAAoF;IACpF,6EAA6E;IAC7E,IAAI,OAAO,kBAAkB,KAAK,QAAQ,IAAI,kBAAkB,EAAE,CAAC;QACjE,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/C,OAAQ,OAAO,CAAC,iBAAiB,CAAyB,CAAC,OAAO,CAAC;IACrE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GACtB,4DAA4D,CAAC;AAE/D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,EAAE,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@essentialai/cogent-bridge",
3
- "version": "3.12.2",
3
+ "version": "3.12.4",
4
4
  "description": "MCP server for inter-Claude-Code session communication bridge",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -24,8 +24,9 @@
24
24
  "scripts": {
25
25
  "start": "node dist/index.js",
26
26
  "dev": "tsx watch src/index.ts",
27
- "build": "node node_modules/typescript/bin/tsc",
28
- "clean": "rm -rf dist",
27
+ "build": "node node_modules/typescript/bin/tsc && npm run build:bundle",
28
+ "build:bundle": "node scripts/build-bundle.mjs",
29
+ "clean": "rm -rf dist plugin/bridge",
29
30
  "test": "node node_modules/vitest/vitest.mjs run",
30
31
  "test:watch": "node node_modules/vitest/vitest.mjs",
31
32
  "test:unit": "node node_modules/vitest/vitest.mjs run --exclude 'src/e2e/**'",
@@ -72,6 +73,7 @@
72
73
  "@types/node": "^22.10.0",
73
74
  "@types/ws": "^8.18.1",
74
75
  "@vitest/coverage-v8": "^4.0.18",
76
+ "esbuild": "^0.28.1",
75
77
  "tsx": "^4.19.2",
76
78
  "typescript": "^5.7.2",
77
79
  "vitest": "^4.0.18"
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.eaisdevelopment/cogent",
4
4
  "title": "Cogent Bridge from Essential AI Solutions (essentialai.uk)",
5
5
  "description": "MCP bridge for inter-session communication between Claude Code instances",
6
- "version": "3.12.2",
6
+ "version": "3.12.4",
7
7
  "repository": {
8
8
  "url": "https://github.com/eaisdevelopment/cogent",
9
9
  "source": "github"
@@ -12,7 +12,7 @@
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "@essentialai/cogent-bridge",
15
- "version": "3.12.2",
15
+ "version": "3.12.4",
16
16
  "runtimeHint": "npx",
17
17
  "transport": {
18
18
  "type": "stdio"