@fitchmultz/pi-mcp-adapter 8.0.5 → 8.0.7

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +140 -7
  2. package/OAUTH.md +13 -16
  3. package/README.md +8 -8
  4. package/cli.js +67 -28
  5. package/dist/abort.js +18 -9
  6. package/dist/client-operations.js +4 -2
  7. package/dist/commands.js +77 -43
  8. package/dist/config.js +194 -105
  9. package/dist/connection-runtime.d.ts +2 -2
  10. package/dist/connection-runtime.js +29 -18
  11. package/dist/consent-manager.d.ts +2 -2
  12. package/dist/consent-manager.js +5 -2
  13. package/dist/direct-tools.d.ts +1 -1
  14. package/dist/direct-tools.js +13 -7
  15. package/dist/elicitation-handler.d.ts +2 -3
  16. package/dist/elicitation-handler.js +113 -58
  17. package/dist/gateway-arguments.d.ts +1 -1
  18. package/dist/gateway-arguments.js +90 -23
  19. package/dist/glimpse-ui.js +10 -5
  20. package/dist/host-html-template.d.ts +3 -1
  21. package/dist/host-html-template.js +9 -12
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +264 -119
  24. package/dist/init.d.ts +1 -3
  25. package/dist/init.js +91 -51
  26. package/dist/legacy-migration.d.ts +1 -1
  27. package/dist/legacy-migration.js +17 -12
  28. package/dist/lifecycle.d.ts +3 -3
  29. package/dist/lifecycle.js +33 -17
  30. package/dist/logger.d.ts +2 -2
  31. package/dist/logger.js +4 -2
  32. package/dist/mcp-auth-flow.js +150 -58
  33. package/dist/mcp-auth.d.ts +7 -7
  34. package/dist/mcp-auth.js +189 -138
  35. package/dist/mcp-callback-server.js +19 -8
  36. package/dist/mcp-code.js +168 -54
  37. package/dist/mcp-keyring-helper.cjs +57 -23
  38. package/dist/mcp-oauth-provider.d.ts +6 -7
  39. package/dist/mcp-oauth-provider.js +146 -72
  40. package/dist/mcp-oauth-runtime.js +29 -16
  41. package/dist/mcp-output-guard.js +193 -65
  42. package/dist/mcp-output-preview.js +41 -20
  43. package/dist/mcp-panel.d.ts +9 -9
  44. package/dist/mcp-panel.js +141 -70
  45. package/dist/mcp-script-worker.mjs +135 -43
  46. package/dist/mcp-setup-panel.d.ts +8 -8
  47. package/dist/mcp-setup-panel.js +130 -44
  48. package/dist/mcp-status.js +14 -7
  49. package/dist/mcp-trace.d.ts +10 -5
  50. package/dist/mcp-trace.js +127 -61
  51. package/dist/metadata-cache.d.ts +3 -4
  52. package/dist/metadata-cache.js +83 -43
  53. package/dist/npx-resolver.js +101 -60
  54. package/dist/onboarding-state.js +4 -2
  55. package/dist/plain-result-reader.js +78 -31
  56. package/dist/prompts.js +36 -20
  57. package/dist/proxy-modes.js +670 -193
  58. package/dist/resource-tools.js +30 -9
  59. package/dist/runtime-owner.js +36 -18
  60. package/dist/sampling-handler.d.ts +1 -2
  61. package/dist/sampling-handler.js +41 -21
  62. package/dist/search-ranking.d.ts +1 -1
  63. package/dist/search-ranking.js +67 -34
  64. package/dist/server-manager.d.ts +11 -11
  65. package/dist/server-manager.js +283 -166
  66. package/dist/session-recovery.js +113 -61
  67. package/dist/tool-approval.js +9 -3
  68. package/dist/tool-loader.js +154 -55
  69. package/dist/tool-metadata.d.ts +1 -1
  70. package/dist/tool-metadata.js +51 -23
  71. package/dist/tool-registrar.js +32 -10
  72. package/dist/tool-result-renderer.d.ts +3 -3
  73. package/dist/tool-result-renderer.js +65 -44
  74. package/dist/types.d.ts +2 -2
  75. package/dist/types.js +39 -18
  76. package/dist/ui-message-history.js +33 -13
  77. package/dist/ui-resource-handler.d.ts +3 -3
  78. package/dist/ui-resource-handler.js +37 -21
  79. package/dist/ui-server.js +101 -43
  80. package/dist/ui-session.js +66 -29
  81. package/dist/ui-stream-types.js +14 -4
  82. package/dist/ui-tool-visibility.js +12 -6
  83. package/dist/unix-socket-transport.d.ts +1 -2
  84. package/dist/unix-socket-transport.js +19 -12
  85. package/dist/utils.d.ts +2 -0
  86. package/dist/utils.js +60 -35
  87. package/package.json +29 -5
  88. package/skills/mcp-scripting/SKILL.md +6 -6
package/CHANGELOG.md CHANGED
@@ -7,6 +7,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## 8.0.7 - 2026-11-02
11
+
12
+ <!-- npm-release:unreleased:start -->
13
+ <!-- npm-release:unreleased:end -->
14
+
15
+ - Adopt strict quality toolchain and formatting (1/2) (#124) ([d88b71a](https://github.com/fitchmultz/pi-mcp-adapter/commit/d88b71a70b48ec2f44563a79489abddca6af6adf))
16
+
17
+ ### What's Changed
18
+
19
+ - Adopt strict quality toolchain and formatting (1/2) by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/124
20
+ - Enforce strict lint for conformance tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/125
21
+ - Enforce strict lint for prompt tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/126
22
+ - Enforce strict lint for runtime integration tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/127
23
+ - Enforce strict lint for auto-auth tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/128
24
+ - Enforce strict lint for discovery and result tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/130
25
+ - perf: parallelize independent awaits in hot paths by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/129
26
+ - Enforce strict lint for state and callback tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/131
27
+ - Enforce strict lint for output storage tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/132
28
+ - Enforce strict lint on packaging tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/133
29
+ - Enforce strict lint on transport tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/134
30
+ - Enforce strict lint on instruction tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/135
31
+ - Enforce strict lint on lazy startup tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/137
32
+ - Check source directives during quality migration by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/136
33
+ - Enforce strict lint on metadata cache tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/138
34
+ - Enforce strict lint on resource discovery tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/139
35
+ - Adopt the strict quality engineering standard by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/140
36
+ - Enforce strict lint on UI host tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/141
37
+ - Authenticate official host qualification requests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/143
38
+ - Enforce strict lint on panel tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/142
39
+ - Verify strict policy and compiler coverage by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/144
40
+ - Enforce strict lint on callback lifecycle tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/145
41
+ - Enforce strict lint on credential storage tests by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/146
42
+ - Qualify startup cancellation through native HTTP transports by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/147
43
+ - Enforce operation-bound exceptions for protocol tracing by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/148
44
+
45
+ **Full Changelog**: https://github.com/fitchmultz/pi-mcp-adapter/compare/v8.0.6...v8.0.7
46
+
47
+ ## 8.0.6 - 2026-11-02
48
+
49
+ <!-- npm-release:unreleased:start -->
50
+ <!-- npm-release:unreleased:end -->
51
+
52
+ - Raise the Pi floor to 1.5.0 (#122) ([fc9bed1](https://github.com/fitchmultz/pi-mcp-adapter/commit/fc9bed1ac87fcfaabeca626115dbe107c0e63ac9))
53
+
54
+ ### What's Changed
55
+
56
+ - Raise the Pi floor to 1.5.0 by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/122
57
+
58
+ **Full Changelog**: https://github.com/fitchmultz/pi-mcp-adapter/compare/v8.0.5...v8.0.6
59
+
10
60
  ## 8.0.5 - 2026-11-02
11
61
 
12
62
  <!-- npm-release:unreleased:start -->
@@ -15,8 +65,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
65
  - Reconnect all MCP servers concurrently (#120) ([50b4a32](https://github.com/fitchmultz/pi-mcp-adapter/commit/50b4a326471d724f42e2318e97c685c76f418f20))
16
66
 
17
67
  ### What's Changed
18
- * Reconnect all MCP servers concurrently by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/120
19
68
 
69
+ - Reconnect all MCP servers concurrently by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/120
20
70
 
21
71
  **Full Changelog**: https://github.com/fitchmultz/pi-mcp-adapter/compare/v8.0.4...v8.0.5
22
72
 
@@ -28,14 +78,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
28
78
  - Use direct Flash for automatic release remediation (#118) ([376688c](https://github.com/fitchmultz/pi-mcp-adapter/commit/376688cf0e8fa50aaaa9883eee08968fc30224f9))
29
79
 
30
80
  ### What's Changed
31
- * Use direct Flash for necessary release remediation by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/118
32
81
 
82
+ - Use direct Flash for necessary release remediation by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/118
33
83
 
34
84
  **Full Changelog**: https://github.com/fitchmultz/pi-mcp-adapter/compare/v8.0.3...v8.0.4
35
85
 
36
86
  ## 8.0.3 - 2026-11-01
37
87
 
38
88
  <!-- npm-release:unreleased:start -->
89
+
39
90
  ### Changed
40
91
 
41
92
  - Automatically open reviewed patch-version PRs and publish the retained candidate after full CI and package qualification.
@@ -44,15 +95,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
44
95
  ### Fixed
45
96
 
46
97
  - Keep the locked development Pi packages on one current official cohort so a clean install can run the native SDK tests. The Pi 1.0 support floor and optional runtime peers are unchanged.
98
+
47
99
  <!-- npm-release:unreleased:end -->
48
100
 
49
101
  - Automate qualified npm patch releases (#116) ([d2cdb1a](https://github.com/fitchmultz/pi-mcp-adapter/commit/d2cdb1a900695277281a1fae109a13727a8a1802))
50
102
 
51
103
  ### What's Changed
52
- * Fix clean-install Pi development dependencies by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/114
53
- * Qualify the retained MCP adapter release candidate by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/115
54
- * Automate qualified npm patch releases by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/116
55
104
 
105
+ - Fix clean-install Pi development dependencies by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/114
106
+ - Qualify the retained MCP adapter release candidate by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/115
107
+ - Automate qualified npm patch releases by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/116
56
108
 
57
109
  **Full Changelog**: https://github.com/fitchmultz/pi-mcp-adapter/compare/v8.0.2...v8.0.3
58
110
 
@@ -327,11 +379,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
327
379
  ## [4.0.2] - 2026-08-09
328
380
 
329
381
  ### Fixed
382
+
330
383
  - Preserved compact search settings across pagination and clarified recovery when an explicit server does not own a requested tool.
331
384
 
332
385
  ## [4.0.1] - 2026-08-08
333
386
 
334
387
  ### Fixed
388
+
335
389
  - Paginated server tool catalogs with bounded ranges, explicit continuation calls, a 100-item page cap, and out-of-range recovery instead of dumping every tool.
336
390
  - Ranked typo suggestions by same-server edit distance, rejected oversized guessed names before ranking, avoided connecting on cached-name misses, and removed full-catalog error dumps.
337
391
  - Let `mcp_script` process full raw MCP results before model-facing output guards, and kept overflow summaries distinct from real `structuredContent`.
@@ -340,6 +394,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
340
394
  ## [4.0.0] - 2026-08-08
341
395
 
342
396
  ### Changed
397
+
343
398
  - **BREAKING:** Removed regex tool search and the `regex: true` input. Ranked substring and token search remains available.
344
399
  - **BREAKING:** Removed the legacy `settings.hostConfigDiscovery: "prompt"` value. Existing `"prompt"` settings are treated as `"off"`; use `"on"` to load detected host configs.
345
400
  - Proxy and direct tool calls now share one execution path, keeping output guarding, recovery, UI handling, and raw MCP result details consistent.
@@ -348,11 +403,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
348
403
  ## [3.0.1] - 2026-08-07
349
404
 
350
405
  ### Changed
406
+
351
407
  - The MCP footer status now defaults to compact `MCP connected/enabled`. Set `settings.mcpFooterStatus` to `"full"` to restore the previous detailed text.
352
408
 
353
409
  ## [3.0.0] - 2026-08-06
354
410
 
355
411
  ### Changed
412
+
356
413
  - **BREAKING:** Pi 0.84.0 or later and Node.js 22.19.0 or later are now required. Pi host development dependencies and TypeBox are pinned to the released 0.84.0 contract, while core runtime packages remain optional wildcard peers per Pi package conventions.
357
414
  - MCP sampling now dispatches through Pi's `ModelRegistry.complete()` so resolved endpoints, custom providers, authentication, and `null` header-deletion markers are preserved by the 0.84 request pipeline.
358
415
  - Direct-tool schemas now use Pi 0.84's bundled TypeBox APIs directly, stale tools use the supported active-tool deactivation flow instead of compatibility probes for non-contract host APIs, and renderer hints honor configured Pi keybindings.
@@ -360,24 +417,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
360
417
  - Custom MCP panels now open only in TUI mode; non-TUI UI clients receive text status or command guidance.
361
418
 
362
419
  ### Fixed
420
+
363
421
  - Stopped tokenless discovery requests, sandboxed MCP app documents, unrelated child windows, and app-opened popups from gaining session authority; discovery now serves a non-sensitive landing page, app HTML loads with a separate resource-only token, host messages accept only the app frame as their source, and the app response enforces sandboxing even when opened as a top-level page.
364
422
 
365
423
  ## [2.19.0] - 2026-08-03
366
424
 
367
425
  ### Added
426
+
368
427
  - `mcp_script` now records each search, describe, and call with its input, outcome, and duration in result details; emitted, returned, and console values retain readable Maps, Sets, cycles, functions, symbols, and BigInts. Its docs now lead with the plain JavaScript agents write and position it as the primary MCP multi-call workflow surface.
369
428
  - Documented how to hide the bundled `mcp-scripting` Pi skill while keeping the adapter extension installed. Thanks @aryzing for issue #267.
370
429
  - Documented Linux revoked-keyring recovery in the OAuth guide and `_meta.ui.visibility` behavior in the MCP UI guide.
371
430
 
372
431
  ### Changed
432
+
373
433
  - `mcp_script` is now registered by default for trusted JavaScript MCP multi-call workflows, while `mcp` remains the right tool for status, discovery, auth, and single calls. Set `settings.scriptMode` to `false` to hide the tool.
374
434
 
375
435
  ### Fixed
436
+
376
437
  - `mcp_script` traces now include missing describe attempts, and shared acyclic values no longer render as circular in script output formatting.
377
438
 
378
439
  ## [2.18.0] - 2026-08-02
379
440
 
380
441
  ### Added
442
+
381
443
  - Added `settings.freezeDirectTools` to keep direct MCP tool registration stable after initial sync while preserving explicit reconnect refreshes. Thanks @ddfourtwo for PR #254.
382
444
  - Added best-effort Linux OAuth credential recovery when Pi inherits a revoked session keyring, allowing explicit re-authentication through a fresh `keyctl` session helper. Thanks @anthod0 for issue #248 and the validation prototype.
383
445
  - Ranked, paginated MCP tool search: best matches come first in a short page of 12 instead of an unranked dump of every match with full schemas, so the model stops guessing and each search costs a fraction of the tokens. Misses on describe/call now return top-5 "Did you mean" suggestions, letting the model self-correct a typo or missing prefix in the same turn instead of burning a round trip.
@@ -390,16 +452,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
390
452
  The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint shape probe, TypeScript-shaped schemas, and codemode design in this release are adapted from [Executor](https://github.com/UsefulSoftwareCo/executor) by Rhys Sullivan (@RhysSullivan). Thanks Rhys.
391
453
 
392
454
  ### Fixed
455
+
393
456
  - Brought MCP Apps UI hosting in line with the current spec: provider HTML now runs in a real sandbox, gets a restrictive default CSP even when the resource omits one, and `_meta.ui.visibility` is honored so app-only tools stay out of the model tool list while model-only tools cannot be called from the UI.
394
457
  - MCP Apps UI sessions are now easier to open from Moshi and remote terminals: the local UI server uses Moshi-discoverable low ports, answers preview discovery probes, serves a loopback-only landing shell, prints Moshi/SSH access hints for remote sessions, and fits the host shell better in narrow in-app browsers. UI-submitted model context is now captured as a bounded handoff, wakes the agent like prompts and intents, and remains available through `mcp({ action: "ui-messages" })` after the UI closes.
395
458
 
396
459
  ## [2.17.0] - 2026-07-31
397
460
 
398
461
  ### Added
462
+
399
463
  - Added `settings.mcpFooterStatus` to compact or hide the persistent MCP footer status. Thanks @jwintz for issue #5.
400
464
  - Added per-server OAuth `authorizationParams` for provider-specific authorization URL parameters such as Google's `access_type=offline`, while rejecting OAuth flow-owned parameter overrides. Thanks @hank-warren for issue #238.
401
465
 
402
466
  ### Fixed
467
+
403
468
  - Added a best-effort absolute-path fallback for loading the `@napi-rs/keyring` native binding when compiled Pi/Bun cannot resolve the package loader. Thanks @sgiath for issue #230.
404
469
  - Bound collapsed MCP tool result rendering by character count as well as line count, preventing huge single-line results from slowing long TUI sessions. Thanks @Whisperfall for issue #249.
405
470
  - Let configured `oauth.scope` override OAuth discovery scopes during authorization flows. Thanks @viggy28 for issue #225 and @adity982 for PR #226.
@@ -407,13 +472,16 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
407
472
  ## [2.16.0] - 2026-07-30
408
473
 
409
474
  ### Added
475
+
410
476
  - Added an optional per-server `toolPrefix` override for direct MCP tools, prompts, and proxy summaries, falling back to the global prefix when unset. Thanks @FurryWolfX for issue #229.
411
477
  - Added an advisory warning when resolved direct tools pass the documented 75-tool threshold, with no cap or enforcement. Thanks @JasonLandbridge for issue #240.
412
478
 
413
479
  ### Changed
480
+
414
481
  - Restored the MCP SDK v1 client for compatibility with deployed MCP servers and OAuth providers. This rollback temporarily removes SDK v2-only protocol negotiation while retaining OAuth issuer binding and callback issuer validation. Thanks @hyknerf for PR #237 and issue #236, @leonfox28 for issue #227, and @JorelLatraille for issue #241.
415
482
 
416
483
  ### Fixed
484
+
417
485
  - Avoided a double-close race when disconnecting MCP connections by letting the SDK client own transport shutdown. Thanks Szymon Wiszczuk (@golota60) for PR #235.
418
486
  - Prevented `/mcp` and `/mcp-auth` from crashing when the OS OAuth credential store is unavailable.
419
487
  - Stored oversized OAuth credential payloads as secure-store manifests plus chunks, so Windows Credential Manager value limits no longer block OAuth completion for large token records. Thanks @LysanderdeJong for issue #223.
@@ -423,25 +491,30 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
423
491
  ## [2.15.0] - 2026-07-25
424
492
 
425
493
  ### Added
494
+
426
495
  - Added native `rmcp-mux` Unix-socket connections for explicitly sharing external MCP server processes across Pi sessions. Thanks j0e1 (@pWoLiAn) for issue #76.
427
496
  - Added connection-time command resolution for HTTP bearer tokens and headers, OAuth client secrets, and stdio environment values, with `!!` escaping and fail-closed execution. Thanks @estrizhok for issue #221.
428
497
 
429
498
  ### Fixed
499
+
430
500
  - Treated null optional server URLs as absent and cleaned unpublished runtimes after initialization failures, preventing `not_initialized` sessions with surviving MCP children. Thanks @autopeasant for the diagnosis in issue #222.
431
501
  - Registered env-selected direct MCP tools before child `agent_start` when their metadata cache must be populated first. Thanks @peedrr for the original report in issue #219.
432
502
 
433
503
  ## [2.14.0] - 2026-07-25
434
504
 
435
505
  ### Added
506
+
436
507
  - Added the global `settings.showStatusIcon` opt-out for plain `MCP: ...` status and connection text while keeping the plug icon enabled by default. Thanks @vaultboy001 for issue #216.
437
508
 
438
509
  ### Fixed
510
+
439
511
  - Deferred implicit OAuth credential-store access until an HTTP server actually challenges for authentication, so unauthenticated remote Streamable HTTP servers work in headless environments. Thanks @vdom-1 for issue #218.
440
512
  - Accepted draft-07 tool output schemas alongside JSON Schema 2020-12 while preserving structured-content validation. Thanks Daniel Marbach (@danielmarbach) for issue #217.
441
513
 
442
514
  ## [2.13.0] - 2026-07-25
443
515
 
444
516
  ### Added
517
+
445
518
  - Added a versioned, sanitized MCP runtime status snapshot on Pi's shared event bus for extensions, without connecting lazy servers or exposing SDK internals. Thanks Ludev (@ludevdot) for issue #110.
446
519
  - Added opt-in host-specific MCP config discovery with source/provenance and conflict reporting. Standard shared and Pi-owned config precedence remains unchanged, and external host files are never written or silently executed. Thanks @lsmir2 for issue #169.
447
520
  - Added opt-in metadata-only JSONL MCP protocol tracing with bounded per-session files and redaction. Thanks @66-firebat for issue #45.
@@ -452,13 +525,16 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
452
525
  - Accepted JSONC-style comments and trailing commas in MCP JSON config files. Thanks @GoCoder7 for issue #124.
453
526
 
454
527
  ### Changed
528
+
455
529
  - Measured and spilled oversized raw MCP result details as compact JSON instead of pretty-printed JSON, reducing hot-path allocation and event-loop work. Thanks José Maia (@glitch-ux) for issue #214 and PR #215.
456
530
  - Renamed generated MCP resource tools from `get_<resource>` to `read_<resource>` to match the MCP `resources/read` operation. Thanks @vdom-1 for issue #185.
457
531
 
458
532
  ### Security
533
+
459
534
  - Moved persistent OAuth credentials from plaintext `tokens.json` files into the operating system credential store, with one-way legacy import and fail-closed behavior when secure storage is unavailable. Thanks Sam Atkins (@atkinsam) for issue #180.
460
535
 
461
536
  ### Fixed
537
+
462
538
  - Skipped `resources/list` for MCP servers that do not advertise the `resources` capability, matching the existing prompt discovery gate and silencing the SDK v2 debug line that tools-only servers printed on every connect. Thanks Aleksandr Davydenko (@kotuke) for PR #213.
463
539
  - Made the MCP footer show enabled configured servers as the primary count, with active connections as secondary state, so lazy servers no longer look broken before first use or after idle shutdown. Thanks blumlaut (@Blumlaut) for issue #93.
464
540
  - Show the actual proxied MCP server/tool name in `mcp` tool results. Thanks Finn (@finnvyrn) and @dillontkh for issue #68.
@@ -467,11 +543,13 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
467
543
  ## [2.12.1] - 2026-07-24
468
544
 
469
545
  ### Fixed
546
+
470
547
  - Restored the SDK v1 dependency required by the MCP Apps bridge during Pi managed installs, where peer dependencies are intentionally not auto-installed. Thanks Nikolai Ugelvik (@NikolaiUgelvik), @warmwaffles, and @max-miller1204 for issue #212.
471
548
 
472
549
  ## [2.12.0] - 2026-07-24
473
550
 
474
551
  ### Added
552
+
475
553
  - Added MCP prompts support as Pi slash commands under the `mcp__<server>__<prompt>` namespace, with capability-gated discovery, cache-backed startup registration, argument validation, lazy dispatch, and `/mcp prompts` listing. Thanks to Egor Egorov (@ee92) for PR #203.
476
554
  - Hot-loaded refreshed direct MCP tools after metadata reconnects, lazy connects, direct-tool panel changes, and MCP list-change notifications. Thanks Devin Bost (@devinbost) for PR #72.
477
555
  - Migrated the MCP client and interactive visualizer to the exact-pinned MCP SDK v2 beta.5 packages, with automatic protocol negotiation and client conformance coverage. Thanks Matt Carey (@mattzcarey) for PR #210.
@@ -488,11 +566,13 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
488
566
  - Added `createMcpAdapter({ config, configPath })` for isolated SDK configuration and file-path overrides. Thanks @Cansiny0320 for PR #86.
489
567
 
490
568
  ### Changed
569
+
491
570
  - Removed stale hot-loaded direct tools from Pi's registry when `pi.unregisterTool()` is available, while preserving active-tool deactivation fallback for older Pi hosts.
492
571
  - Deferred loading the regex safety checker until regex search is used, improving startup time. Thanks @kaushikgopal for PR #175.
493
572
  - Declared Pi host packages as optional peer dependencies with exact development pins, reducing extension install footprint and avoiding host version conflicts. Thanks @t0dorakis for PR #200.
494
573
 
495
574
  ### Fixed
575
+
496
576
  - Started MCP initialization at extension load when any server is configured with `lifecycle: "eager"` or `"keep-alive"`, so hosts that drive Pi programmatically without `session_start` still connect startup servers. Thanks Brian Gebel (@ductiletoaster) for PR #170.
497
577
  - Enforced normalized standard `_meta.ui.csp` and OpenAI-compatible `_meta["openai/widgetCSP"]` metadata with response headers while preserving provider HTML. Thanks @IdoHadar for PR #195.
498
578
  - Avoided MCP renderer crashes without a TUI theme and preserved status-bar updates with plain fallback text. Thanks @fankangsong for PR #183.
@@ -516,12 +596,15 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
516
596
  ## [2.11.0] - 2026-07-03
517
597
 
518
598
  ### Changed
599
+
519
600
  - Restored the tracked npm lockfile for reproducible installs and downstream packaging. Thanks @fmoda3 for issue #71.
520
601
 
521
602
  ### Added
603
+
522
604
  - Added default-on MCP output guarding with temp-file spillover for oversized text results, compact summaries for large proxy result details, and `settings.outputGuard` tuning. Thanks @tmustier for PR #160.
523
605
 
524
606
  ### Fixed
607
+
525
608
  - Defaulted stdio MCP servers without an explicit `cwd` to the Pi session cwd so relative server output lands in the workspace. Thanks @TimoFreiberg for PR #152.
526
609
  - Kept multiline/control MCP panel metadata from corrupting rows and made Keep & Close save dirty changes. Thanks @gpmarques for issue/PR #14, @Vahor for issue #115, and @markokocic for issue #134/PR #135.
527
610
  - Preserved `--` separators when resolving `npx` wrapper commands so subcommand flags are not consumed by tools like `dotenv-cli`. Thanks @sherif-fanous for issue #15.
@@ -538,9 +621,11 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
538
621
  ## [2.10.0] - 2026-06-13
539
622
 
540
623
  ### Added
624
+
541
625
  - Added manual remote/headless OAuth proxy actions for copying authorization URLs and completing pasted redirect URLs or codes. Thanks @Gabrielgvl for PR #120.
542
626
 
543
627
  ### Fixed
628
+
544
629
  - Honored user `tui.select.*` keybindings in MCP management, setup, and auth panels. Thanks @owenniles for PR #138.
545
630
  - Included configured OAuth scopes in authorization-code flows while preserving token endpoint authentication method selection. Thanks @carlosdagos for PR #140.
546
631
  - Fixed MCP elicitation on stock Pi, including form dialogs with validation and review, consent-based URL handling, URL-required errors, completion notifications, and TUI-only browser navigation. Thanks @dmmulroy for PR #139.
@@ -549,48 +634,59 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
549
634
  ## [2.9.0] - 2026-06-04
550
635
 
551
636
  ### Added
637
+
552
638
  - Added MCP elicitation support with Pi form prompts and browser-opening URL requests.
553
639
 
554
640
  ### Fixed
641
+
555
642
  - Rejected non-http/https MCP URL elicitations before prompting or opening a browser.
556
643
  - Preserved empty string form values for MCP string elicitations unless schema constraints reject them.
557
644
 
558
645
  ## [2.8.0] - 2026-05-25
559
646
 
560
647
  ### Added
648
+
561
649
  - Added per-server OAuth `redirectUri`, `clientName`, and `clientUri` overrides for pre-registered callbacks and dynamic client metadata.
562
650
 
563
651
  ### Fixed
652
+
564
653
  - Avoided OAuth callback port exhaustion by starting the callback server lazily and using OS-assigned ports for dynamic OAuth flows.
565
654
  - Re-register dynamic OAuth clients before browser auth when cached redirect URI metadata is missing or no longer matches the active callback URI.
566
655
 
567
656
  ## [2.7.0] - 2026-05-22
568
657
 
569
658
  ### Added
659
+
570
660
  - Added TUI call rendering for MCP proxy and direct tool inputs. Thanks @dmmulroy for PR #102.
571
661
 
572
662
  ### Fixed
663
+
573
664
  - Hardened OAuth credential storage paths against server-name path traversal without rejecting valid configured server names.
574
665
  - Rejected unsafe regex-mode MCP search patterns before executing them.
575
666
 
576
667
  ## [2.6.1] - 2026-05-13
577
668
 
578
669
  ### Added
670
+
579
671
  - Added `/mcp logout <server>` to clear stored OAuth credentials and disconnect the server. Thanks @mattzcarey for PR #96.
580
672
 
581
673
  ### Fixed
674
+
582
675
  - Cancel pending OAuth callbacks when logging out of an MCP server.
583
676
 
584
677
  ## [2.6.0] - 2026-05-10
585
678
 
586
679
  ### Added
680
+
587
681
  - Added a no-argument `/mcp-auth` OAuth picker and in-panel auth shortcut for OAuth-capable MCP servers.
588
682
  - Added compact collapsed rendering for MCP proxy and direct-tool result rows while keeping full tool results available when expanded.
589
683
 
590
684
  ### Changed
685
+
591
686
  - Migrated Pi runtime dependencies and imports from deprecated `@mariozechner/*` packages to `@earendil-works/*` packages.
592
687
 
593
688
  ### Fixed
689
+
594
690
  - Re-register dynamic OAuth clients during fresh auth when cached DCR client info exists without tokens, avoiding dead authorization URLs after server-side client invalidation.
595
691
  - Kept OAuth tokens, dynamic client info, PKCE verifiers, and OAuth state bound to the server URL so stale credentials cannot be reused after a server URL changes.
596
692
  - Kept the `/mcp-auth` OAuth picker search focused on OAuth server rows and prevented hidden panel shortcuts from unexpectedly launching auth.
@@ -599,35 +695,42 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
599
695
  ## [2.5.4] - 2026-05-04
600
696
 
601
697
  ### Changed
698
+
602
699
  - Ignored npm lockfiles and removed checked-in `package-lock.json` files.
603
700
 
604
701
  ### Fixed
702
+
605
703
  - Resolved `${VAR}` and `$env:VAR` placeholders in HTTP bearer tokens.
606
704
  - Honored MCP sampling `modelPreferences.hints` before falling back to the current/default model.
607
705
 
608
706
  ## [2.5.3] - 2026-05-01
609
707
 
610
708
  ### Added
709
+
611
710
  - Added environment variable and `~` expansion for stdio server `cwd` values.
612
711
 
613
712
  ## [2.5.2] - 2026-04-29
614
713
 
615
714
  ### Fixed
715
+
616
716
  - Respected `PI_CODING_AGENT_DIR` for Pi-owned MCP config and state files, including metadata cache, npx cache, onboarding state, OAuth credentials, and `pi-mcp-adapter init` writes.
617
717
 
618
718
  ## [2.5.1] - 2026-04-24
619
719
 
620
720
  ### Fixed
721
+
621
722
  - Changed OAuth browser callbacks to `http://localhost:<port>/callback` for pre-registered clients such as Slack MCP. Thanks @shenal for PR #53.
622
723
 
623
724
  ## [2.5.0] - 2026-04-24
624
725
 
625
726
  ### Added
727
+
626
728
  - Added MCP `sampling/createMessage` support with conservative human approval by default and opt-in `settings.samplingAutoApprove` for non-interactive flows.
627
729
  - Added configured Vitest coverage for OAuth provider authorization fallback behavior.
628
730
  - Added `test:oauth-provider` for running the root OAuth provider node test with the required TypeScript loader.
629
731
 
630
732
  ### Fixed
733
+
631
734
  - Applied `settings.authRequiredMessage` to proxy and direct-tool auth-required paths, including non-UI `autoAuth` failures.
632
735
  - Fixed `/mcp-auth <server>` reporting success for expired stored OAuth tokens without forcing the SDK refresh/re-auth flow.
633
736
  - Kept `mcp` search focused on MCP tools and added a direct-call hint when native Pi tools are accidentally routed through the proxy.
@@ -635,14 +738,17 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
635
738
  ## [2.4.2] - 2026-04-22
636
739
 
637
740
  ### Fixed
741
+
638
742
  - Migrated extension tool schemas from `@sinclair/typebox` to `typebox` 1.x so packaged installs follow Pi's current extension runtime contract.
639
743
 
640
744
  ### Changed
745
+
641
746
  - Replaced the legacy `@sinclair/typebox` runtime dependency with `typebox`.
642
747
 
643
748
  ## [2.4.1] - 2026-04-22
644
749
 
645
750
  ### Added
751
+
646
752
  - Added standard-MCP-first config discovery: `~/.config/mcp/mcp.json` and project `.mcp.json` now load automatically, with Pi-owned files preserved as override layers.
647
753
  - Added `pi-mcp-adapter init` as a native post-install helper that detects host-specific MCP configs and scaffolds Pi compatibility imports without using the old raw GitHub downloader flow.
648
754
  - Added first-run onboarding inside the extension: `/mcp` now shows shared-config hints or actionable empty states, and `/mcp setup` opens a guided setup flow for compatibility imports, minimal `.mcp.json` scaffolding, detected config paths, RepoPrompt quick-add, and exact before/after write previews.
@@ -650,6 +756,7 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
650
756
  - Added a dedicated Pi-owned onboarding state file so shared-config hints behave as one-time guidance instead of repeating every session.
651
757
 
652
758
  ### Changed
759
+
653
760
  - Updated config precedence to prefer shared MCP files first, then Pi overrides, with `.pi/mcp.json` acting as the final Pi-specific project override.
654
761
  - Updated Claude Code compatibility probing to prefer modern Claude MCP config locations before legacy paths.
655
762
  - Updated project scaffolding so generated `.mcp.json` files are safe minimal shells instead of fake placeholder servers that fail on first reload.
@@ -658,17 +765,20 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
658
765
  ## [2.4.0] - 2026-04-13
659
766
 
660
767
  ### Added
768
+
661
769
  - `settings.disableProxyTool` to hide the `mcp` proxy tool once configured direct tools are fully available from cache. Thanks @tanavamsikrishna for PR #41.
662
770
  - Per-server `excludeTools` to hide specific MCP tools/resources by original or prefixed name across direct tools, proxy discovery, and the `/mcp` panel. Thanks @ahmadaccino for issue #36.
663
771
  - `settings.autoAuth` to optionally trigger OAuth automatically from proxy/direct tool usage, then rerun the original blocked connect/tool operation once after authentication succeeds. Thanks @unimonkiez for issue #34.
664
772
 
665
773
  ### Fixed
774
+
666
775
  - Regenerated `package-lock.json` so the root lockfile metadata matches `package.json` again, including the declared `open`, `@types/bun`, `@types/open`, and `tsx` entries.
667
776
  - Kept the `mcp` proxy tool available as a first-session fallback when configured direct tools are still missing cache metadata, avoiding no-tool startup gaps.
668
777
 
669
778
  ## [2.3.5] - 2026-04-13
670
779
 
671
780
  ### Fixed
781
+
672
782
  - Session lifecycle now always tears down OAuth callback state on restart and shutdown, preventing callback-server leaks across session transitions.
673
783
  - OAuth callback server now calls `unref()` after successful bind so it no longer keeps sub-agent processes alive by itself.
674
784
  - Strict OAuth port mode now rebinds to the configured callback port when safe, while refusing to switch ports when authorizations are still pending.
@@ -678,20 +788,24 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
678
788
  ## [2.3.4] - 2026-04-12
679
789
 
680
790
  ### Fixed
791
+
681
792
  - OAuth callback handling now allows dynamic-registration flows to fall back to a free local port when the preferred callback port is busy, while keeping pre-registered clients on their exact configured redirect port.
682
793
  - Documented the new callback-port behavior and added focused auth-flow regression coverage.
683
794
 
684
795
  ## [2.3.3] - 2026-04-12
685
796
 
686
797
  ### Fixed
798
+
687
799
  - Remove the blank footer status line when no MCP servers are configured by clearing the MCP status entry instead of setting it to an empty string. Thanks @HazAT for PR #27.
688
800
 
689
801
  ## [2.3.2] - 2026-04-11
690
802
 
691
803
  ### Added
804
+
692
805
  - Optional `oauth.grantType: "client_credentials"` for non-interactive machine-to-machine OAuth on HTTP MCP servers.
693
806
 
694
807
  ### Fixed
808
+
695
809
  - `/mcp-auth <server>` now handles `client_credentials` without browser/callback flow.
696
810
  - MCP panel status no longer marks `client_credentials` servers as auth-blocked solely because no stored user tokens exist yet.
697
811
  - OAuth auth flow now closes temporary transports consistently on success, refresh, and auth removal paths.
@@ -700,14 +814,17 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
700
814
  ## [2.3.1] - 2026-04-11
701
815
 
702
816
  ### Fixed
817
+
703
818
  - Removed `/mcp-auth-callback`. OAuth auth now hard-cuts to `/mcp-auth <server>` only.
704
819
 
705
820
  ## [2.3.0] - 2026-04-11
706
821
 
707
822
  ### Added
823
+
708
824
  - OAuth callback server initialization on session start and a deprecated `/mcp-auth-callback` command that now points users to `/mcp-auth <server>`.
709
825
 
710
826
  ### Fixed
827
+
711
828
  - OAuth `needs-auth` handling across `/mcp` status/panel, `mcp({ connect })`, `mcp({ tool })`, reconnect flow, lazy/direct tool execution, and startup bootstrap.
712
829
  - OAuth callback cleanup now cancels by stored OAuth state and closes pending transports on failure/cancel paths.
713
830
  - Callback server now fails fast when the OAuth callback port is occupied by another process.
@@ -716,6 +833,7 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
716
833
  ## [2.2.2] - 2026-04-03
717
834
 
718
835
  ### Fixed
836
+
719
837
  - Session lifecycle teardown now handles repeated `session_start` transitions safely and prevents stale async init results from replacing newer state.
720
838
  - Shutdown now still runs `gracefulShutdown()` even if metadata cache flushing throws, avoiding leaked MCP processes.
721
839
  - Proxy/direct tool init error paths now preserve and surface underlying error messages instead of returning generic failures.
@@ -725,11 +843,13 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
725
843
  ## [2.2.1] - 2026-03-23
726
844
 
727
845
  ### Fixed
846
+
728
847
  - Added `promptSnippet` to MCP proxy tool and direct MCP tools so they appear in the system prompt's Available tools section (required since pi 0.59.0)
729
848
 
730
849
  ## [2.2.0] - 2026-03-16
731
850
 
732
851
  ### Added
852
+
733
853
  - **MCP UI Integration** - Support for the [MCP UI](https://github.com/MCP-UI-Org/mcp-ui) standard. Tools with `_meta.ui.resourceUri` open interactive UIs:
734
854
  - Bidirectional AppBridge communication (tool calls, messages, context updates)
735
855
  - Works with both stdio and HTTP MCP servers
@@ -751,10 +871,12 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
751
871
  - **Interactive visualizer example** (`examples/interactive-visualizer`) - Minimal MCP server demonstrating charts (bar/line/pie/doughnut via Chart.js), bidirectional messaging, and streaming.
752
872
 
753
873
  ### Fixed
874
+
754
875
  - Host-iframe timing: bridge now connects before loading iframe, fixing `ui/initialize` timeout on first load
755
876
  - All internal `log.info` calls demoted to `log.debug` to eliminate stdout noise during normal use
756
877
 
757
878
  ### Technical Notes
879
+
758
880
  - Uses local minified AppBridge bundle (408KB) to avoid CDN Zod bundling issues
759
881
  - Serves app HTML from `/ui-app` endpoint instead of blob URLs to avoid iframe issues
760
882
  - SSE for real-time tool result streaming to browser
@@ -762,11 +884,13 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
762
884
  ## [2.1.2] - 2026-02-03
763
885
 
764
886
  ### Changed
887
+
765
888
  - Added demo video and `pi.video` field to package.json for pi package browser.
766
889
 
767
890
  ## [2.1.0] - 2026-02-02
768
891
 
769
892
  ### Added
893
+
770
894
  - **Direct tool registration** - Promote specific MCP tools to first-class Pi tools via `directTools` config (per-server or global). Direct tools appear in the agent's tool list alongside builtins, so the LLM uses them without needing to search through the proxy first. Registers from cached metadata at startup — no server connections needed.
771
895
  - **`/mcp` interactive panel** - New TUI overlay replacing the text-based status dump. Shows server connection status, tool lists with direct/proxy toggles, token cost estimates, inline reconnect, and auth notices. Changes written to config on save.
772
896
  - **Auto-enriched proxy description** - The `mcp` proxy tool description now includes server names and tool counts from the metadata cache, so the LLM knows what's available without a search call (~30 extra tokens).
@@ -779,16 +903,19 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
779
903
  ## [2.0.1] - 2026-02-01
780
904
 
781
905
  ### Fixed
906
+
782
907
  - Adapt execute signature to pi v0.51.0: add signal, onUpdate, ctx parameters
783
908
 
784
909
  ## [2.0.0] - 2026-01-29
785
910
 
786
911
  ### Changed
912
+
787
913
  - **BREAKING: Lazy startup by default** - All servers now default to `lifecycle: "lazy"` and only connect when a tool call needs them. Previously all servers connected eagerly on session start. Set `lifecycle: "keep-alive"` or `lifecycle: "eager"` to restore the old behavior per-server.
788
914
  - **Idle timeout** - Connected servers are automatically disconnected after 10 minutes of inactivity (configurable via `settings.idleTimeout` or per-server `idleTimeout`). Cached metadata keeps search/list working after disconnect. Set `idleTimeout: 0` to disable.
789
915
  - `/mcp reconnect` accepts an optional server name to connect or reconnect a single server
790
916
 
791
917
  ### Added
918
+
792
919
  - **Metadata cache** - Tool and resource metadata persisted to `~/.pi/agent/mcp-cache.json`. Enables search/list/describe without live connections. Per-server config hashing with 7-day staleness. Multi-session safe via read-merge-write with per-process tmp files.
793
920
  - **npx binary resolution** - Resolves npx package binaries to direct paths, eliminating the ~143 MB npm parent process per server. Persistent cache at `~/.pi/agent/mcp-npx-cache.json` with 24h TTL.
794
921
  - **`mcp({ connect: "server-name" })` mode** - Explicitly trigger connection and metadata refresh for a named server
@@ -800,6 +927,7 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
800
927
  - First-run bootstrap: connects all servers on first session to populate the cache
801
928
 
802
929
  ### Fixed
930
+
803
931
  - Connection close race condition: concurrent close + connect no longer orphans server processes
804
932
  - **Fuzzy tool name matching** - Hyphens and underscores are treated as equivalent during tool lookup. MCP tools like `resolve-library-id` are now found when called as `resolve_library_id`, which LLMs naturally guess since the prefix separator is `_`.
805
933
  - **Better "tool not found" errors** - When a server is identified (via prefix match or override) but the tool isn't found, the error now lists that server's available tools so the LLM can self-correct immediately instead of needing a separate list call
@@ -807,6 +935,7 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
807
935
  ## [1.6.0] - 2026-01-29
808
936
 
809
937
  ### Added
938
+
810
939
  - **Unified pi tool search** - `mcp({ search: "..." })` now searches both MCP tools and Pi tools (from installed extensions)
811
940
  - Pi tools appear first in results with `[pi tool]` prefix
812
941
  - Details object includes `server: "pi"` for pi tools
@@ -815,24 +944,28 @@ The ranked search scoring, did-you-mean suggestions, approval patterns, endpoint
815
944
  ## [1.5.1] - 2026-01-26
816
945
 
817
946
  ### Changed
947
+
818
948
  - Added `pi-package` keyword for npm discoverability (pi v0.50.0 package system)
819
949
 
820
950
  ## [1.5.0] - 2026-01-22
821
951
 
822
952
  ### Changed
953
+
823
954
  - **BREAKING: `args` parameter is now a JSON string** - The `args` parameter which previously accepted an object now accepts a JSON string. This change was required for compatibility with Claude's Vertex AI API (`google-antigravity` provider) which rejects `patternProperties` in JSON schemas (generated by `Type.Record()`).
824
955
 
825
956
  ### Added
957
+
826
958
  - **Type validation for args** - Parsed args are now validated to ensure they're a JSON object (not null, array, or primitive). Clear error messages for invalid input.
827
959
  - **`isError: true` on error responses** - JSON parse errors and type validation errors now properly set `isError: true` to indicate failure to the LLM.
828
960
 
829
961
  ### Migration
962
+
830
963
  ```typescript
831
964
  // Before (1.4.x)
832
- mcp({ tool: "my_tool", args: { key: "value" } })
965
+ mcp({ tool: "my_tool", args: { key: "value" } });
833
966
 
834
967
  // After (1.5.0)
835
- mcp({ tool: "my_tool", args: '{"key": "value"}' })
968
+ mcp({ tool: "my_tool", args: '{"key": "value"}' });
836
969
  ```
837
970
 
838
971
  ## [1.4.1] - 2026-01-19