@essentialai/cogent-bridge 3.21.1 → 3.21.3

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,75 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.21.3 — 2026-09-01
4
+
5
+ ### Fixed — `add_to_path` silently persisted nothing, stranding `cogent-codex` after a "successful" install
6
+
7
+ A second, independent cause of the same `zsh: command not found: cogent-codex` report. The helper
8
+ looped `.zshrc`/`.bashrc`/`.profile` and returned at the FIRST that existed:
9
+
10
+ 1. **Fresh macOS account: none of them exist** (macOS ships no default rc; zsh reads `/etc/zshrc`).
11
+ Every test failed, the loop ended, and the function returned 0 having written **nothing**. The
12
+ in-process `export PATH` still made `command -v cogent-codex` succeed *inside* the installer, so
13
+ it printed "Codex: start with cogent-codex" and "Done." — and the user's next terminal said
14
+ `command not found`. Completely silent.
15
+ 2. **First-match-wins ignored `$SHELL`:** a zsh user with a `~/.bashrc` (nvm, conda, pyenv and
16
+ rustup all create one) got the line written where zsh never reads it — plus a confident message
17
+ naming the wrong file, which is worse than no message.
18
+ 3. **The append was unguarded under `set -e`:** a read-only `~/.zshrc` (nix home-manager, chezmoi,
19
+ stow, or a root-owned dotfile) aborted the ENTIRE installer at step 1, before either agent
20
+ branch ran — strictly worse than the 3.21.2 bug.
21
+
22
+ Now: the line goes to every rc that exists **and unconditionally to the login shell's rc** (created
23
+ if absent), each write is guarded and idempotent, an unwritable file is a warning rather than a
24
+ death, and if nothing could be persisted the installer says so and prints the exact line to add by
25
+ hand. Both call sites are `|| true` so PATH persistence can never take down a good install.
26
+
27
+ ### Added — PATH-persistence cases in the install-matrix gate
28
+
29
+ `scripts/install-matrix-test.mjs` now exercises the rendered `add_to_path` directly against fake
30
+ homes: **no-rc-files**, **bashrc-only-zsh-user**, **readonly-zshrc**, **rerun-idempotent**.
31
+ Mutation-proven: 3 of 4 RED against the 3.21.2 script, all GREEN after the fix. The gate also
32
+ caught an incomplete first attempt at this very fix before it shipped.
33
+
34
+ Found by an adversarial audit of the installer rather than by another user report.
35
+
36
+ ## 3.21.2 — 2026-09-01
37
+
38
+ ### Fixed — `curl https://cogent.tools/install.sh | sh` died on its FIRST step for many users
39
+
40
+ If a `cogent` marketplace was already declared from the older **GitHub Git URL**, Claude Code
41
+ refuses to redeclare the name from a different source:
42
+
43
+ ```
44
+ ✘ Failed to add marketplace: Cannot add marketplace "cogent": its network source differs
45
+ from the one declared for it in settings ...
46
+ ```
47
+
48
+ install.sh runs under `set -e`, so that single failure **killed the entire installer**. Because
49
+ Claude Code is set up *before* Codex, the **Codex branch never ran** — the user was installing to
50
+ get `cogent-codex`, and got no Codex install, no launcher, and no explanation beyond
51
+ `command not found`. Latent since **2026-07-28**, shipped through every release since 3.12.0.
52
+
53
+ Two fixes: the marketplace add is now **idempotent** (on a source conflict it removes the stale
54
+ declaration and re-adds), and **every agent branch is failure-tolerant** — one agent's problem can
55
+ no longer deny the user the other agent. If nothing at all installs, the script now says so and
56
+ exits non-zero instead of printing a cheerful "Done."
57
+
58
+ ### Added — `scripts/install-matrix-test.mjs`, a HARD release gate (Step 13a)
59
+
60
+ The blocker survived ~5 weeks because our only install check began with
61
+ `claude plugin marketplace remove cogent` — it **deleted the state that triggers the bug**, then
62
+ declared the install works. It proved "install works on a machine we just cleaned", never "install
63
+ works on a real user's machine".
64
+
65
+ The new gate runs the real installer against the states users are actually in — **clean**,
66
+ **conflict-git** (followed the older Git-URL docs), **reinstall** — each in a throwaway
67
+ `CLAUDE_CONFIG_DIR` so it is hermetic. Per state it asserts exit 0, conflict recovery, the final
68
+ marketplace source, that `cogent@cogent` installs, **and that the Codex branch was reached**. It
69
+ also asserts install.sh / uninstall.sh / marketplace.json are actually SERVED and that
70
+ marketplace.json's version matches the release. Mutation-proven: RED against the live pre-fix
71
+ script (reproducing the user's exact error), GREEN against the fixed build.
72
+
3
73
  ## 3.21.1 — 2026-08-31
4
74
 
5
75
  ### Fixed — a label session with an unreachable relay delayed the MCP handshake by ~2.4s
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@essentialai/cogent-bridge",
3
- "version": "3.21.1",
3
+ "version": "3.21.3",
4
4
  "description": "Cogent Bridge — cross-agent comms for Claude Code, OpenAI Codex and Slack. Codex users: install with `curl -fsSL https://cogent.tools/install.sh | sh`, then start with `cogent-codex` for real-time peer wake.",
5
5
  "type": "module",
6
6
  "workspaces": [
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.21.1",
6
+ "version": "3.21.3",
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.21.1",
15
+ "version": "3.21.3",
16
16
  "runtimeHint": "npx",
17
17
  "transport": {
18
18
  "type": "stdio"