@geohar/pi-mcp-combiner 0.23.0 → 0.24.0

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