@geohar/pi-mcp-combiner 0.22.0 → 0.23.1

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 ADDED
@@ -0,0 +1,218 @@
1
+ # Changelog
2
+
3
+ All notable changes to the Pi extension are documented here. The version moves
4
+ in lockstep with the rest of the repo (`scripts/bump-version.sh`); releases are
5
+ tagged `vX.Y.Z`. The extension runs the matching mcp-combiner release, so each
6
+ entry also summarises the combiner's changes; the full list is in
7
+ [the combiner's changelog](https://github.com/georgeharker/mcp-combiner/blob/main/combiner/CHANGELOG.md).
8
+
9
+ ## [0.23.1] - 2026-11-09
10
+
11
+ ### Changed
12
+
13
+ - The package now ships this changelog, so Pi shows what changed after an
14
+ update.
15
+
16
+ ## [0.23.0] - 2026-11-09
17
+
18
+ No extension changes. The combiner it runs:
19
+
20
+ - **Isolated servers** (`isolate: true`, e.g. cribsheet, svg-mcp) list their
21
+ tools through one shared connection; a chat's own session is only for its
22
+ calls. A chat whose session died gets a fresh one on its next call, and is
23
+ told once that its state on that server was reset.
24
+ - **Busy servers are never killed.** The combiner restarts a server by itself
25
+ only when it's gone; one that's running but not answering prompts "Restart
26
+ it?" on the next call to it.
27
+ - **Per-chat hidden tools**: `combiner__session_hide_tools` /
28
+ `combiner__session_show_tools` hide tools by name or glob for one chat.
29
+ - A server that can't be listed is reported as failed, not as having no tools.
30
+ - `/status` page; web login checks the `Host` header; Tailscale docs.
31
+
32
+ ## [0.22.0] - 2026-11-08
33
+
34
+ No extension changes. The combiner it runs:
35
+
36
+ - **Web login (`web_auth`)** for widget pages, the widget relay and the OAuth
37
+ authorization page: a password (e.g. from 1Password via
38
+ `MCP_COMBINER_WEB_PASSWORD`), single-use ticket links for MCP clients, this
39
+ machine exempt, rate-limited sign-in.
40
+ - `combiner__authorize_server`, proper OAuth authorization pages, and a
41
+ per-server `login_hint`.
42
+ - Resource changes from server lifecycle are announced.
43
+ - `/neovim/*` requires the inbound bearer when one is set.
44
+
45
+ ## [0.21.3] - 2026-11-04
46
+
47
+ ### Fixed
48
+
49
+ - When the combiner is owned by another host (Neovim, via
50
+ `MCP_COMPANION_COMBINER_URL`) or not managed by pi (`PI_MCP_COMBINER_MANAGE=false`),
51
+ a connect no longer calls `attachCombiner`, which isn't declared on that path:
52
+ the call threw a `ReferenceError` (temporal dead zone) on every reconnect.
53
+
54
+ ## [0.21.2] - 2026-11-03
55
+
56
+ ### Changed
57
+
58
+ - Package metadata (`repository`, `bugs`, `homepage`, preview image) points at the
59
+ renamed repository, `georgeharker/mcp-combiner`.
60
+
61
+ ## [0.20.0] - 2026-11-03
62
+
63
+ ### Changed
64
+
65
+ - The URL the extension dials comes from `PI_MCP_COMBINER_HOST` read as the
66
+ combiner's bind setting: the first entry of a comma-separated list, loopback for a
67
+ wildcard (`0.0.0.0` / `::`) or `auto` (tailnet), and IPv6 addresses bracketed.
68
+
69
+ ## [0.18.0] - 2026-11-01
70
+
71
+ ### Added
72
+
73
+ - **`structuredContent` passthrough**: an upstream tool's `outputSchema` is declared
74
+ on the native tool (pi ≥ 1.2), and its `structuredContent` rides the tool result, so
75
+ codemode scripts get typed values instead of re-parsing text. Older hosts ignore it.
76
+
77
+ Other releases from 0.17.0 to 0.21.2 changed only the combiner (see
78
+ `combiner/CHANGELOG.md`).
79
+
80
+ ## [0.17.0] - 2026-10-08
81
+
82
+ ### Changed
83
+
84
+ - **Tool-result truncation spills instead of cutting** (`client/render.ts`): text over the
85
+ `maxResultChars` cap (default 16 KiB, setting `extensions/mcp-combiner.json`, env
86
+ `PI_MCP_COMBINER_MAX_RESULT_CHARS`) gets a surrogate-safe head + a notice naming a 0600
87
+ temp file with the FULL text (`/tmp/pi-mcp-*/<tool>.txt`) — recoverable via `read`, never
88
+ a mid-JSON dead end; `full_output_path` rides the result `details` (bash parity). Applied
89
+ on every surface: `mcp()` router calls, the native tool surface (previously UNGUARDED —
90
+ full 80 KB+ results went straight to the model), and `read_*` resources.
91
+ - **Image-block handling unified** — images stay real `{type:"image"}` blocks on all call
92
+ paths (`mcp()`, native surface, `read_*`); the non-vision omission note (read-tool
93
+ parity, via the new guarded `safeModel` read in `runner-stale.ts`) replaces the old
94
+ pre-emptive flattening in the `mcp()` router. `widget-support.ts` re-exports the shared
95
+ guarded `renderResourceResult` from `render.ts` instead of its own 16 KB cut.
96
+
97
+ ## [0.16.0] - 2026-10-04
98
+
99
+ ### Removed
100
+
101
+ - **The legacy SDK client** (`@modelcontextprotocol/client`) — native mode is the
102
+ only mode. The transport is `@earendil-works/pi-mcp` (peer dep, `^1.0.2`):
103
+ Pi's own MCP client library on our owned connection.
104
+ - `mcpScript` (pi's built-in codemode is the superset), the `directTools`
105
+ search-promote (native exposure + `tool_search` replace it), and the legacy
106
+ resource sync (native resources own the interactive `read_*` surface).
107
+ - `mode` and `scriptMode` settings — moot.
108
+
109
+ ### Added
110
+
111
+ - `client/types.ts` — the `CombinerConnection` interface + shared summary types;
112
+ the native connection `implements` it, so surface modules depend on the
113
+ contract, not the implementation.
114
+ - `exposeResources` gating for the native resource surface.
115
+
116
+ ### Fixed
117
+
118
+ - Native surface registration deferred to `session_start` (post-token): a
119
+ factory-time run logged "no grouping token set" startup warnings, and the
120
+ wiring's `setHooks` replaced the activation's hook outright (last-wins).
121
+ - Zombie connection teardown on `/reload`: pi re-imports the module without
122
+ firing `session_shutdown`, so the old instance's stream stayed alive and
123
+ competed for elicit routing. A process-global registry survives re-imports;
124
+ the fresh factory closes prior connections.
125
+ - The native connection's stale-session retry covers **every** request method,
126
+ not just `callTool` — `listTools`/`listPrompts`/`getPrompt`/`listResources`/
127
+ `readResource` were bare, so the router's listTools-first lookup surfaced raw
128
+ `McpSessionExpiredError` after a combiner bounce and never reset the client,
129
+ wedging the connection until reload.
130
+ - Review-driven fixes (dev native-MCP review): `callTool` retries transport
131
+ failures **stale-only** (typed `McpSessionExpiredError` — raised before the
132
+ server executes anything), so a tool error's own text can no longer trigger a
133
+ re-run of a destructive tool; connection races closed (a reset no longer
134
+ publishes an in-flight laggard connect, resets target the failing client only,
135
+ and a slow connect that loses its timeout race is closed instead of leaking an
136
+ untracked stream); pi's cancel signal now actually rides into `callTool`
137
+ (upstream work + widget holds abort); per-project `directTools`/filter ride as
138
+ per-pass getters (worktrees get their own exposure); `read_*` tool UI URLs are
139
+ computed per call (stale session tokens no longer baked in at registration);
140
+ the panel's async rejection is handled to stderr; debug logging is opt-in via
141
+ `PI_MCP_COMBINER_NC_DBG=1`; removed tools are re-registered `hidden`, and
142
+ unchanged declarations skip re-registration via schema-signature diffing;
143
+ tool results map through pi-mcp's `toLlmContent` (real image blocks); README
144
+ documents the codemode activation quirk; lockfile regenerated; three
145
+ transport-level regression tests added (fake combiner over pi-mcp's
146
+ in-memory pair).
147
+ - Runner-stale guard (pi earendil-works/pi#10599): pi's `reload()` invalidates
148
+ the extension runner BEFORE replacing it — a window of seconds in which any
149
+ guarded ctx read throws. Tool executes now read `ctx.hasUI` ONCE at entry
150
+ through a throwing-getter-safe helper (`client/runner-stale.ts`) and never
151
+ re-read past an await: a call that already executed can no longer be turned
152
+ into a rejection (whose model-retry would re-execute it). Runner-stale errors
153
+ that do surface get a recovery hint naming what happened and when retrying
154
+ is safe, instead of pi's raw assertion text. No auto-retry for this class:
155
+ unlike transport staleness, execution may already have happened.
156
+ - Stale-ctx sweep (pi 1.0's hard assertion on `ctx.ui` reads from async
157
+ callbacks): every async callback now uses a **captured ui object** (the
158
+ getter asserts; the object doesn't), catches degrade to stderr and never
159
+ re-enter the getter, and the second logger (`makeLog`) captures at call
160
+ time + guards its notify. The slash-command paths (status, meta-tool
161
+ calls, the panel) audited: all async `ctx.ui` re-entries eliminated.
162
+ - Stale-ctx crash on `/reload` (pi 1.0's hard assertion): the teardown's
163
+ reset-reason log rode the orphaned instance's captured `ctx.ui` — an
164
+ uncaught throw in the fire-and-forget microtask killed pi. `clientLog`
165
+ now degrades a stale UI capture to stderr instead of throwing, and the
166
+ teardown retires the whole instance (footer timer, UI captures, connection).
167
+
168
+ ## [0.15.0] - 2026-10-03
169
+
170
+ ### Added
171
+
172
+ - **Native mode** (`"mode": "native"`): per-tool pi-1.0 registration
173
+ (exposure/namespace/annotations) via the pi-mcp transport on an owned
174
+ connection — same custody token, elicitation capability advertised and
175
+ bridged. The `mcp` router registers alongside in both modes (tool_call
176
+ gates recognize the `mcp` tool name).
177
+ - `docs/call-chain.md` — the layer map, naming, and token custody for a call
178
+ in both modes, with the pi-native contrast.
179
+
180
+ ### Fixed
181
+
182
+ - Connection-wide one-shot stale-session retry: a combiner restart mid-flight
183
+ surfaced raw "Session not found" from the router's cache refresh before any
184
+ `callTool` ran.
185
+ - Recovery-hint error messages name what died, what survives, and the retry.
186
+
187
+ ### Changed
188
+
189
+ - The legacy client factored to `src/legacy-client/` (deletion checklist in
190
+ its README); shared modules extracted to `src/client/`.
191
+
192
+ ## [0.14.0] - 2026-09-17
193
+
194
+ ### Added
195
+
196
+ - **The client half** — the extension speaks MCP to the combiner itself:
197
+ the `mcp()` proxy tool (search/describe/call/list/status), `mcpScript`
198
+ batching, `read_<resource>` tools with `ui://` detection and widget
199
+ auto-open, prompt slash commands (`mcp__<server>__<name>`), the elicitation
200
+ bridge (SDK structured dialogs), the footer chip, and the `/mcp-combiner`
201
+ panel + control verbs.
202
+ - **Interactive widgets (Stage 2)** — widget-bound tool results hold the call;
203
+ the extension auto-opens the widget URL from the hold notification
204
+ (`uiAutoOpen` setting, default true) and the combiner streams the data.
205
+ - **directTools** — allowlist + search-mode tool promotion.
206
+ - `uiAutoOpen` / `mcpFooterKey` settings; adapter tri-state (`auto`/`true`/
207
+ `false`) coexistence with pi-mcp-adapter.
208
+ - Conformance tests ported from pi-mcp-adapter (51 passing).
209
+
210
+ ### Fixed
211
+
212
+ - TUI renderers implement `invalidate()` — pi-tui's Component contract; the
213
+ missing method crashed pi on transcript invalidation (session restore,
214
+ theme change, resize).
215
+
216
+ ## [0.13.4] and earlier
217
+
218
+ See the [GitHub releases](https://github.com/georgeharker/mcp-companion/releases).
@@ -41,7 +41,7 @@ function ncDbg(s) {
41
41
  }
42
42
  // Keep in sync with plugins/pi/package.json "version": scripts/bump-version.sh stamps
43
43
  // this line alongside the package files (the string is what this client declares).
44
- const CLIENT_INFO = { name: "pi-mcp-combiner", version: "0.22.0" };
44
+ const CLIENT_INFO = { name: "pi-mcp-combiner", version: "0.23.1" };
45
45
  const CONNECT_TIMEOUT_MS = 8_000;
46
46
  const LIST_CACHE_MS = 5_000;
47
47
  function isRecord(v) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geohar/pi-mcp-combiner",
3
- "version": "0.22.0",
3
+ "version": "0.23.1",
4
4
  "description": "Pi extension: run the mcp-combiner MCP aggregator via sharedserver and inject its tool-discovery directive. Pairs with pi-mcp-adapter, which makes the combiner's tools reachable from Pi.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -9,7 +9,8 @@
9
9
  "extensions": [
10
10
  "./src/index.ts"
11
11
  ],
12
- "image": "https://raw.githubusercontent.com/georgeharker/mcp-combiner/main/plugins/pi/assets/preview.png"
12
+ "image": "https://raw.githubusercontent.com/georgeharker/mcp-combiner/main/plugins/pi/assets/preview.png",
13
+ "changelogPath": "./CHANGELOG.md"
13
14
  },
14
15
  "files": [
15
16
  "src",
@@ -18,7 +19,8 @@
18
19
  "mcp.json.example",
19
20
  "README.md",
20
21
  "LICENSE",
21
- "assets"
22
+ "assets",
23
+ "CHANGELOG.md"
22
24
  ],
23
25
  "scripts": {
24
26
  "build": "tsc",
@@ -109,7 +109,7 @@ function ncDbg(s: string): void {
109
109
 
110
110
  // Keep in sync with plugins/pi/package.json "version": scripts/bump-version.sh stamps
111
111
  // this line alongside the package files (the string is what this client declares).
112
- const CLIENT_INFO = { name: "pi-mcp-combiner", version: "0.22.0" }
112
+ const CLIENT_INFO = { name: "pi-mcp-combiner", version: "0.23.1" }
113
113
  const CONNECT_TIMEOUT_MS = 8_000
114
114
  const LIST_CACHE_MS = 5_000
115
115