@cyanheads/mcp-ts-core 0.13.8 → 0.13.10

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 (180) hide show
  1. package/AGENTS.md +51 -24
  2. package/CLAUDE.md +51 -24
  3. package/README.md +10 -10
  4. package/changelog/0.13.x/0.13.10.md +118 -0
  5. package/changelog/0.13.x/0.13.9.md +113 -0
  6. package/dist/config/index.d.ts +3 -0
  7. package/dist/config/index.d.ts.map +1 -1
  8. package/dist/config/index.js +31 -9
  9. package/dist/config/index.js.map +1 -1
  10. package/dist/core/app.d.ts +6 -3
  11. package/dist/core/app.d.ts.map +1 -1
  12. package/dist/core/app.js +21 -5
  13. package/dist/core/app.js.map +1 -1
  14. package/dist/core/context.d.ts +114 -21
  15. package/dist/core/context.d.ts.map +1 -1
  16. package/dist/core/context.js +40 -0
  17. package/dist/core/context.js.map +1 -1
  18. package/dist/core/index.d.ts +1 -1
  19. package/dist/core/index.d.ts.map +1 -1
  20. package/dist/core/index.js.map +1 -1
  21. package/dist/core/serverManifest.d.ts +6 -0
  22. package/dist/core/serverManifest.d.ts.map +1 -1
  23. package/dist/core/serverManifest.js +6 -0
  24. package/dist/core/serverManifest.js.map +1 -1
  25. package/dist/core/worker.d.ts +6 -0
  26. package/dist/core/worker.d.ts.map +1 -1
  27. package/dist/core/worker.js +1 -0
  28. package/dist/core/worker.js.map +1 -1
  29. package/dist/linter/rules/error-contract-rules.d.ts +3 -44
  30. package/dist/linter/rules/error-contract-rules.d.ts.map +1 -1
  31. package/dist/linter/rules/error-contract-rules.js +8 -144
  32. package/dist/linter/rules/error-contract-rules.js.map +1 -1
  33. package/dist/linter/rules/index.d.ts +1 -1
  34. package/dist/linter/rules/index.d.ts.map +1 -1
  35. package/dist/linter/rules/index.js +1 -1
  36. package/dist/linter/rules/index.js.map +1 -1
  37. package/dist/linter/rules/resource-rules.d.ts.map +1 -1
  38. package/dist/linter/rules/resource-rules.js +1 -2
  39. package/dist/linter/rules/resource-rules.js.map +1 -1
  40. package/dist/linter/rules/tool-rules.d.ts +2 -1
  41. package/dist/linter/rules/tool-rules.d.ts.map +1 -1
  42. package/dist/linter/rules/tool-rules.js +37 -3
  43. package/dist/linter/rules/tool-rules.js.map +1 -1
  44. package/dist/mcp-server/handlerContext.d.ts +26 -13
  45. package/dist/mcp-server/handlerContext.d.ts.map +1 -1
  46. package/dist/mcp-server/handlerContext.js +32 -17
  47. package/dist/mcp-server/handlerContext.js.map +1 -1
  48. package/dist/mcp-server/inputRequired.d.ts +133 -12
  49. package/dist/mcp-server/inputRequired.d.ts.map +1 -1
  50. package/dist/mcp-server/inputRequired.js +192 -20
  51. package/dist/mcp-server/inputRequired.js.map +1 -1
  52. package/dist/mcp-server/prompts/prompt-registration.d.ts +10 -2
  53. package/dist/mcp-server/prompts/prompt-registration.d.ts.map +1 -1
  54. package/dist/mcp-server/prompts/prompt-registration.js +49 -11
  55. package/dist/mcp-server/prompts/prompt-registration.js.map +1 -1
  56. package/dist/mcp-server/resources/resource-registration.d.ts +4 -2
  57. package/dist/mcp-server/resources/resource-registration.d.ts.map +1 -1
  58. package/dist/mcp-server/resources/resource-registration.js +6 -4
  59. package/dist/mcp-server/resources/resource-registration.js.map +1 -1
  60. package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts +4 -3
  61. package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts.map +1 -1
  62. package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +42 -14
  63. package/dist/mcp-server/resources/utils/resourceHandlerFactory.js.map +1 -1
  64. package/dist/mcp-server/server.d.ts +9 -0
  65. package/dist/mcp-server/server.d.ts.map +1 -1
  66. package/dist/mcp-server/server.js +14 -13
  67. package/dist/mcp-server/server.js.map +1 -1
  68. package/dist/mcp-server/tools/tool-registration.d.ts +7 -3
  69. package/dist/mcp-server/tools/tool-registration.d.ts.map +1 -1
  70. package/dist/mcp-server/tools/tool-registration.js +9 -5
  71. package/dist/mcp-server/tools/tool-registration.js.map +1 -1
  72. package/dist/mcp-server/tools/utils/inputPrevalidation.d.ts +163 -40
  73. package/dist/mcp-server/tools/utils/inputPrevalidation.d.ts.map +1 -1
  74. package/dist/mcp-server/tools/utils/inputPrevalidation.js +330 -114
  75. package/dist/mcp-server/tools/utils/inputPrevalidation.js.map +1 -1
  76. package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts +40 -19
  77. package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts.map +1 -1
  78. package/dist/mcp-server/tools/utils/toolHandlerFactory.js +387 -130
  79. package/dist/mcp-server/tools/utils/toolHandlerFactory.js.map +1 -1
  80. package/dist/mcp-server/transports/http/httpErrorHandler.d.ts.map +1 -1
  81. package/dist/mcp-server/transports/http/httpErrorHandler.js +7 -1
  82. package/dist/mcp-server/transports/http/httpErrorHandler.js.map +1 -1
  83. package/dist/mcp-server/transports/http/httpTransport.d.ts.map +1 -1
  84. package/dist/mcp-server/transports/http/httpTransport.js +65 -9
  85. package/dist/mcp-server/transports/http/httpTransport.js.map +1 -1
  86. package/dist/mcp-server/transports/stdio/stdioTransport.d.ts +9 -5
  87. package/dist/mcp-server/transports/stdio/stdioTransport.d.ts.map +1 -1
  88. package/dist/mcp-server/transports/stdio/stdioTransport.js +9 -5
  89. package/dist/mcp-server/transports/stdio/stdioTransport.js.map +1 -1
  90. package/dist/services/canvas/core/CanvasRegistry.d.ts +6 -2
  91. package/dist/services/canvas/core/CanvasRegistry.d.ts.map +1 -1
  92. package/dist/services/canvas/core/CanvasRegistry.js +7 -3
  93. package/dist/services/canvas/core/CanvasRegistry.js.map +1 -1
  94. package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts +82 -18
  95. package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts.map +1 -1
  96. package/dist/services/canvas/providers/duckdb/DuckdbProvider.js +620 -328
  97. package/dist/services/canvas/providers/duckdb/DuckdbProvider.js.map +1 -1
  98. package/dist/services/canvas/providers/duckdb/exportWriter.d.ts +11 -7
  99. package/dist/services/canvas/providers/duckdb/exportWriter.d.ts.map +1 -1
  100. package/dist/services/canvas/providers/duckdb/exportWriter.js +19 -16
  101. package/dist/services/canvas/providers/duckdb/exportWriter.js.map +1 -1
  102. package/dist/services/mirror/core/defineMirror.d.ts +1 -0
  103. package/dist/services/mirror/core/defineMirror.d.ts.map +1 -1
  104. package/dist/services/mirror/core/defineMirror.js +1 -0
  105. package/dist/services/mirror/core/defineMirror.js.map +1 -1
  106. package/dist/testing/index.d.ts +17 -2
  107. package/dist/testing/index.d.ts.map +1 -1
  108. package/dist/testing/index.js +21 -7
  109. package/dist/testing/index.js.map +1 -1
  110. package/dist/types-global/errors.d.ts +18 -15
  111. package/dist/types-global/errors.d.ts.map +1 -1
  112. package/dist/utils/index.d.ts +1 -1
  113. package/dist/utils/index.d.ts.map +1 -1
  114. package/dist/utils/index.js.map +1 -1
  115. package/dist/utils/internal/error-handler/errorHandler.d.ts +5 -4
  116. package/dist/utils/internal/error-handler/errorHandler.d.ts.map +1 -1
  117. package/dist/utils/internal/error-handler/errorHandler.js +9 -7
  118. package/dist/utils/internal/error-handler/errorHandler.js.map +1 -1
  119. package/dist/utils/internal/error-handler/types.d.ts +3 -1
  120. package/dist/utils/internal/error-handler/types.d.ts.map +1 -1
  121. package/dist/utils/internal/performance.d.ts +4 -2
  122. package/dist/utils/internal/performance.d.ts.map +1 -1
  123. package/dist/utils/internal/performance.js +8 -6
  124. package/dist/utils/internal/performance.js.map +1 -1
  125. package/dist/utils/internal/telemetryMessages.d.ts +0 -1
  126. package/dist/utils/internal/telemetryMessages.d.ts.map +1 -1
  127. package/dist/utils/internal/telemetryMessages.js +0 -1
  128. package/dist/utils/internal/telemetryMessages.js.map +1 -1
  129. package/dist/utils/network/pacer.d.ts +38 -5
  130. package/dist/utils/network/pacer.d.ts.map +1 -1
  131. package/dist/utils/network/pacer.js +87 -25
  132. package/dist/utils/network/pacer.js.map +1 -1
  133. package/dist/utils/telemetry/attributes.d.ts +10 -5
  134. package/dist/utils/telemetry/attributes.d.ts.map +1 -1
  135. package/dist/utils/telemetry/attributes.js +10 -5
  136. package/dist/utils/telemetry/attributes.js.map +1 -1
  137. package/framework-skills/add-app-tool/SKILL.md +3 -3
  138. package/framework-skills/add-export/SKILL.md +5 -16
  139. package/framework-skills/add-prompt/SKILL.md +7 -3
  140. package/framework-skills/add-resource/SKILL.md +7 -5
  141. package/framework-skills/add-service/SKILL.md +3 -12
  142. package/framework-skills/add-test/SKILL.md +6 -3
  143. package/framework-skills/add-tool/SKILL.md +40 -42
  144. package/framework-skills/api-auth/SKILL.md +2 -2
  145. package/framework-skills/api-canvas/SKILL.md +17 -8
  146. package/framework-skills/api-config/SKILL.md +5 -4
  147. package/framework-skills/api-context/SKILL.md +168 -42
  148. package/framework-skills/api-errors/SKILL.md +48 -51
  149. package/framework-skills/api-linter/SKILL.md +30 -35
  150. package/framework-skills/api-mirror/SKILL.md +2 -1
  151. package/framework-skills/api-telemetry/SKILL.md +14 -10
  152. package/framework-skills/api-testing/SKILL.md +43 -11
  153. package/framework-skills/api-utils/SKILL.md +2 -2
  154. package/framework-skills/api-workers/SKILL.md +3 -1
  155. package/framework-skills/design-mcp-server/SKILL.md +6 -6
  156. package/framework-skills/field-test/SKILL.md +5 -5
  157. package/framework-skills/git-wrapup/SKILL.md +8 -6
  158. package/framework-skills/orchestrations/SKILL.md +7 -6
  159. package/framework-skills/orchestrations/workflows/field-test-fix.md +9 -19
  160. package/framework-skills/orchestrations/workflows/fix-wrapup-release.md +7 -7
  161. package/framework-skills/orchestrations/workflows/greenfield-build.md +8 -5
  162. package/framework-skills/orchestrations/workflows/maintenance-release.md +8 -8
  163. package/framework-skills/polish-docs-meta/SKILL.md +4 -4
  164. package/framework-skills/release-and-publish/SKILL.md +8 -6
  165. package/framework-skills/release-pr-review/SKILL.md +38 -24
  166. package/framework-skills/report-issue-framework/SKILL.md +7 -5
  167. package/framework-skills/report-issue-local/SKILL.md +8 -6
  168. package/framework-skills/security-pass/SKILL.md +14 -13
  169. package/package.json +6 -5
  170. package/scripts/devcheck.ts +7 -6
  171. package/scripts/install-otel.ts +84 -0
  172. package/scripts/lint-mcp.ts +87 -27
  173. package/scripts/lint-packaging.ts +226 -4
  174. package/scripts/release-github.ts +117 -5
  175. package/templates/.env.example +2 -0
  176. package/templates/AGENTS.md +5 -4
  177. package/templates/CLAUDE.md +5 -4
  178. package/templates/Dockerfile +67 -50
  179. package/templates/_.mcpbignore +2 -0
  180. package/templates/src/mcp-server/tools/definitions/echo.tool.ts +3 -8
@@ -0,0 +1,118 @@
1
+ ---
2
+ summary: "A client can no longer pre-answer a consent gate with a response its declared capabilities do not cover, framework-built errors carry their request ID and fill a declared recovery hint, and multi-arch Docker builds stop running Bun under QEMU."
3
+ breaking: false
4
+ security: true
5
+ agent-notes: |
6
+ Adoption steps for a consumer upgrading from 0.13.9.
7
+
8
+ 1. Dockerfile — move every install into a `deps` stage. These steps
9
+ replace 0.13.8's agent-notes step 7. A production stage that copies
10
+ `bunfig.toml` (the 0.13.8 / 0.13.9 scaffold) fails `lint:packaging`
11
+ check 15 once `scripts/lint-packaging.ts` is resynced, and its
12
+ multi-arch build aborts on the non-native leg. `init` never overwrites
13
+ `Dockerfile`, so port by hand:
14
+ a. Resync the framework scripts (maintenance Phase C, or `init` in
15
+ place) so `scripts/install-otel.ts` exists. Commit it, and keep
16
+ `scripts/` out of `.dockerignore`: the image build copies it.
17
+ b. Copy the scaffold `Dockerfile`'s `deps` stage — its
18
+ `FROM --platform=$BUILDPLATFORM` on the build stage's `oven/bun` tag,
19
+ manifest copy, scanner seed, `TARGETARCH` → `.bun-cpu` mapping,
20
+ cross-install, `install-otel.ts` step, and scanner removal — in
21
+ between the build and production stages.
22
+ c. In the production stage, delete the `package.json`/`bun.lock`/
23
+ `bunfig.toml` copy, the scanner seed, the `bun install`,
24
+ `ARG OTEL_ENABLED`, and the OTel `RUN` (the `bun -e` range lookup
25
+ plus `bun add`, or an older plain `bun add` list). Before the `dist`
26
+ copy, add `COPY package.json ./` and
27
+ `COPY --from=deps /usr/src/app/node_modules ./node_modules`. Keep
28
+ everything else.
29
+ d. Move any other build-time `bun` / `bunx` call out of a stage not
30
+ pinned to `$BUILDPLATFORM`; check 15 names each line. Verify with
31
+ `bun run lint:packaging`.
32
+ A server still on the pre-0.13.8 production stage lints clean, but its
33
+ image installs skip the release-age gate and scanner; port it too.
34
+ 2. Drop redundant recovery forwards. `ctx.fail('x', msg, ctx.recoveryFor('x'))`
35
+ becomes `ctx.fail('x', msg)`, and a service throw keeps only
36
+ `{ reason: 'x', … }` (a service that took `ctx` only for the spread can
37
+ drop it). Keep explicit `recovery: { hint }` overrides, deliberate
38
+ cross-reason forwards, and forwards a test asserts on a direct
39
+ `definition.handler(...)` throw — or move that assertion to
40
+ `runToolContract`, which applies the fill. The lint rule
41
+ `error-contract-recovery-unforwarded` is gone: swap its mentions in
42
+ `CLAUDE.md` / `AGENTS.md` for the template's Errors wording, and drop it
43
+ from any script that greps lint output.
44
+ 3. Tests pinning exact error text or `data`: a tool error's `content[]`
45
+ now closes with `request <id>`, and tool, resource, and prompt error
46
+ `data` gain `requestId` (a classified plain `Error` returns
47
+ `data: { requestId }`). Assert with the envelope's own value or
48
+ `expect.any(String)`. `runToolContract` adds no request id but now
49
+ fills a declared hint, adding a `Recovery:` line. A server that put an
50
+ upstream id in `data.requestId` renames it (`upstreamRequestId`); one
51
+ that copied `ctx.requestId` there drops it.
52
+ 4. Alerts: `invalid_arguments` and `client_capability_missing` records
53
+ now log at `notice`, tagged `mcp.error.severity: "notice"`. The
54
+ `Prompt generation failed.` record is gone — key prompt alerts on
55
+ `Error in prompt:<name>`.
56
+ 5. Consent gates: a destructive handler that acts on `ctx.inputs` alone,
57
+ compares a target carried in `requestState`, or stores a record without
58
+ the operation and caller moves to the `api-context` § Consent gates
59
+ pattern: redeem a `ctx.state` record
60
+ `{ operation, clientId, subject, target, contentHash }` first and ask
61
+ again on any mismatch. Keep the record where every instance a retry
62
+ reaches can read it (`filesystem`, `supabase`, or `cloudflare-d1`,
63
+ never `cloudflare-kv`), and make an action that must not repeat
64
+ idempotent per record until an atomic `ctx.state.take` exists (#593).
65
+ Tests copy the round-one record into the round-two mock context
66
+ (`api-testing` § Mock inputs).
67
+ 6. Set `MCP_REQUEST_STATE_KEY` (≥ 32 bytes, e.g. `openssl rand -base64 32`,
68
+ the same on every instance and Worker isolate) on any server whose
69
+ `requestState` drives a mutation or carries ids across rounds. A
70
+ startup `info` record naming the variable confirms it took. A client
71
+ or test that builds `requestState` by hand then gets `-32602`
72
+ `invalid_request_state`.
73
+ 7. Replace a catch of `client_capability_missing` used to fall through to
74
+ another source with a `ctx.clientCapabilities` check before
75
+ `ctx.requestInput`, after reading `ctx.inputs`. Treat `undefined` as
76
+ cannot-ask, and never use it to skip a consent prompt.
77
+ 8. `Context` gains a required `clientCapabilities` key, so a hand-built
78
+ `Context` literal (a custom mock typed `Context`) needs it.
79
+ `createMockContext` tests change only when they seed
80
+ `clientCapabilities`, which applies the production filter.
81
+ ---
82
+
83
+ # 0.13.10 — 2026-09-26
84
+
85
+ ## Added
86
+
87
+ - **`ctx.clientCapabilities`** ([#580](https://github.com/cyanheads/mcp-ts-core/issues/580)) — what the client declared for this request (`undefined` for a 2025-era request under stateless HTTP), for deciding whether to ask for optional context, never whether to skip a consent prompt. `ClientCapabilities` is exported from the main entry, and `createMockContext({ clientCapabilities })` seeds it.
88
+ - **`MCP_REQUEST_STATE_KEY`** ([#496](https://github.com/cyanheads/mcp-ts-core/issues/496)) — opt-in key (≥ 32 bytes, the same on every instance) that seals the `requestState` a handler returns, bound to the caller for 900 s. Any other state is rejected as `-32602` `invalid_request_state` before the handler runs; also a Worker core binding.
89
+ - **`scripts/install-otel.ts`** ([#578](https://github.com/cyanheads/mcp-ts-core/issues/578)) — ships in the package and the scaffold, installing every `@opentelemetry/*` peer plus `@hono/otel` at the framework's declared ranges and passing extra arguments (`--os`, `--cpu`) to its `bun install`. The Dockerfiles run it in place of a hand-kept list.
90
+
91
+ ## Changed
92
+
93
+ - **A declared `recovery` reaches the wire without `ctx.recoveryFor`** ([#579](https://github.com/cyanheads/mcp-ts-core/issues/579)) — a tool or resource failure whose `data.reason` names an `errors[]` entry and carries no `data.recovery` gets that entry's hint, service throws included, and `runToolContract` does the same. A throw-site hint still wins.
94
+ - **Error envelopes carry `data.requestId`** ([#576](https://github.com/cyanheads/mcp-ts-core/issues/576)) — tool, resource, prompt, and `httpErrorHandler` errors return the `requestId` their log records carry, and a tool's `content[]` closes with `request <id>`. A resource `-32602` whose `data` is exactly `{ uri }` and `runToolContract` results go without.
95
+ - **Framework refusals log at `notice`** ([#567](https://github.com/cyanheads/mcp-ts-core/issues/567)) — `Error in tool:<name>` for `invalid_arguments` and `client_capability_missing` drops from `error` to `notice`, and `mcp.errors.classified` tags them `mcp.error.severity: "notice"`. A declared `severity` naming either reason still wins.
96
+ - **`lint:packaging` check 15 flags JavaScript in any target-platform stage** ([#575](https://github.com/cyanheads/mcp-ts-core/issues/575)) — a Dockerfile stage not starting `FROM --platform=$BUILDPLATFORM` fails when a `RUN` invokes `bun` for anything but `install`/`add`, or installs once `bunfig.toml` is in the stage, naming each line.
97
+ - **The release review pass may ship caller-handed work** — `release-pr-review` commits uncommitted work the caller explicitly hands over on top of the stack and adds it to the changelog entry; `release-and-publish` admits those commits above the release commit.
98
+ - Skill versions: `add-service` 1.11 → 1.12, `add-test` 1.7 → 1.8, `add-tool` 2.31 → 2.32, `api-config` 1.22 → 1.23, `api-context` 2.8 → 2.9, `api-errors` 1.18 → 1.19, `api-linter` 1.20 → 1.21, `api-telemetry` 1.15 → 1.16, `api-testing` 1.12 → 1.13, `api-workers` 1.8 → 1.9, `design-mcp-server` 2.30 → 2.31, `field-test` 2.17 → 2.18, `polish-docs-meta` 2.20 → 2.21, `release-and-publish` 2.22 → 2.23, `release-pr-review` 1.6 → 1.7, `security-pass` 1.11 → 1.12.
99
+
100
+ ## Removed
101
+
102
+ - **`error-contract-recovery-unforwarded`** ([#579](https://github.com/cyanheads/mcp-ts-core/issues/579)) — the lint rule is gone; with the recovery fill, a bare `ctx.fail('<reason>')` reaches the client with its hint.
103
+
104
+ ## Fixed
105
+
106
+ - **Multi-arch Docker builds no longer run Bun under QEMU** ([#575](https://github.com/cyanheads/mcp-ts-core/issues/575)) — the framework and scaffold Dockerfiles install production dependencies in a `deps` stage on `$BUILDPLATFORM`, cross-installing with `--os`/`--cpu`, so the production stage's only Bun calls are `HEALTHCHECK` and `CMD`. Existing servers port by hand.
107
+ - **An argless prompt's `generate` receives `{}`** ([#581](https://github.com/cyanheads/mcp-ts-core/issues/581)) — not the SDK's request context, and its input measures 0 bytes.
108
+ - **A failed prompt writes one error record, under its own request id** ([#582](https://github.com/cyanheads/mcp-ts-core/issues/582)) — `Error in prompt:<name>` at `error`, and a completion record of `Prompt generation finished.` at `info` with `metrics.isSuccess: false` in place of `Prompt generation failed.` at `error`. Each `prompts/get` logs under its own `requestId`.
109
+
110
+ ## Security
111
+
112
+ - **`ctx.inputs` keeps only responses the client declared** ([#496](https://github.com/cyanheads/mcp-ts-core/issues/496)) — a client that did not declare `elicitation`, or declared only its URL mode, could pre-answer a consent gate on its first call. A response now reaches `ctx.inputs` only when the client's declared capabilities and modes cover it, on both protocol eras.
113
+ - **Consent gates redeem a server record** — a client that declared `elicitation` can still pre-answer, so `api-context` § *Consent gates* documents storing `{ operation, clientId, subject, target, contentHash }` in `ctx.state` under a random id and redeeming it before acting. That stops a sequential replay, not concurrent retries, until an atomic `ctx.state.take` exists ([#593](https://github.com/cyanheads/mcp-ts-core/issues/593)).
114
+
115
+ ## Dependencies
116
+
117
+ - `hono` ^4.13.8 → ^4.13.9.
118
+ - Dev: `@cloudflare/workers-types` 5.20260922.1 → 5.20260924.1.
@@ -0,0 +1,113 @@
1
+ ---
2
+ summary: "Canvas scratch files move into a private directory, a JSON-stringified object or an integer sent for a string is repaired before the schema rejects it, and argument rejections name the field paths and key rewrites behind them."
3
+ breaking: false
4
+ security: true
5
+ agent-notes: |
6
+ Adoption steps for a consumer upgrading from 0.13.8.
7
+
8
+ 1. `lint:mcp` (and so `devcheck`) now fails on three conditions it used to
9
+ pass: a definition file that fails to import (`definition-import-failed`),
10
+ a `server.json` that exists but does not parse (`server-json-parse`), and
11
+ an `inputAliases` entry whose target is a `headerParam` field
12
+ (`input-alias-conflict`). The first two arrive with the maintenance
13
+ resync of `scripts/lint-mcp.ts`, the third with the package itself. Run
14
+ `bun run lint:mcp` once both are in: a server that passes needs no
15
+ change. Otherwise, for an import failure install the missing optional
16
+ peer where lint runs (a devDependency is enough) or make the import lazy
17
+ (`await import()` inside the handler or service, with module-load work
18
+ moved into `setup()` or a service's init); fix the `server.json` syntax;
19
+ and remove the dead alias, or drop the header designation.
20
+ 2. A `runToolContract` / `toolContractSuite` case that expects
21
+ `InvalidParams` for an integer sent to a string field, or for a
22
+ JSON-stringified object sent to an object field, now succeeds: the
23
+ framework repairs both before the handler runs. Change such a case to
24
+ send a boolean so it keeps its wrong-type intent.
25
+ 3. `CANVAS_TEMP_PATH` now names a parent directory. The DuckDB provider
26
+ creates a private `mcp-canvas-XXXXXX` directory inside it (or inside the
27
+ OS temp directory when unset), so a value pointing at a dedicated mount
28
+ keeps working. A leftover `<tmpdir>/mcp-canvas` from earlier versions is
29
+ never used again and can be deleted once no older server shares the
30
+ host. A process that exits abnormally leaves its `mcp-canvas-XXXXXX`
31
+ behind, still private; nothing sweeps it on the next start.
32
+ 4. A tool whose handler has a non-elicitation path, where its own
33
+ arguments can stand in for what `ctx.requestInput` asks, passes one:
34
+ `ctx.requestInput(spec, { fallbackHint: 'Or call again with <field> supplied.' })`.
35
+ Without it, a 2025-era client lacking the capability is told only to
36
+ reconnect. A consent gate passes none.
37
+ 5. MCP SDK 2.1.0 changes what callers see on the transports. A 2026-07-28
38
+ POST without `MCP-Protocol-Version` is refused `400` / `-32020`, as is a
39
+ 2026-07-28 `tasks/get`, `tasks/update`, or `tasks/cancel` without an
40
+ `Mcp-Name` matching `params.taskId`. A JSON-RPC batch of more than 100
41
+ messages is refused whole, `400` / `-32600`. `notifications/cancelled`
42
+ with `requestId: 0` now aborts the handler. On stdio, stdin EOF aborts
43
+ requests still in flight, and they are never answered.
44
+ `MCP_HTTP_MAX_BODY_BYTES` remains the only request-body limit. Update
45
+ any client code or test that relied on the old answers.
46
+ 6. The pre-validation repair's debug log field `coercion` is now
47
+ `coercions`, an array of repair kinds (`stringified_array`,
48
+ `stringified_object`, `integer_as_string`). Update any log query that
49
+ reads it.
50
+ 7. A server with a `.mcpbignore` adds `/docs/idea.md` and `/logs/` to it,
51
+ as the scaffold now does.
52
+ 8. `lint:packaging` (and so `devcheck`) now fails two conditions it used to
53
+ pass: a `manifest.json` whose `version` differs from `package.json`'s —
54
+ set it to the package version — and a Dockerfile stage that runs
55
+ `bun run build` without `FROM --platform=$BUILDPLATFORM` — start that
56
+ stage with `FROM --platform=$BUILDPLATFORM` and copy `dist/` into a
57
+ separate runtime stage, as the scaffold's `Dockerfile` does. Both arrive
58
+ with the maintenance resync of `scripts/lint-packaging.ts`. Run
59
+ `bun run lint:packaging` once it is in: a server that passes needs no
60
+ change.
61
+ 9. `bun run release:github`, once `scripts/release-github.ts` is resynced,
62
+ refuses a tag that breaks the `release-and-publish` step 4 format before
63
+ any `gh` call. Run `bun run release:github -- --check` after
64
+ `git tag -a` and before pushing the tag, and recreate a tag it rejects.
65
+ ---
66
+
67
+ # 0.13.9 — 2026-09-26
68
+
69
+ ## Added
70
+
71
+ - **Stringified objects and integers sent for strings are repaired** ([#479](https://github.com/cyanheads/mcp-ts-core/issues/479), [#487](https://github.com/cyanheads/mcp-ts-core/issues/487)) — after a failed parse, a JSON-stringified object is decoded and a safe integer sent for a string becomes its digits (`8654467` → `"8654467"`), each kept only if the re-parse passes. `mcp.input.coercion` gains `stringified_object` and `integer_as_string`.
72
+ - **Argument rejections name pre-validation's rewrites** ([#468](https://github.com/cyanheads/mcp-ts-core/issues/468)) — when an alias rewrite or an underscore-rule drop touched a rejected call's keys, `data.input` names them (`{ aliased: [{ alias, target }], ignored }`) and the hint closes with `Validated q as query.` or `Dropped undeclared key _search.` (ignore-list drops never appear).
73
+ - **`pacer.cooldown`** ([#467](https://github.com/cyanheads/mcp-ts-core/issues/467)) — samples the shared gate as `PacerCooldownState` `{ remainingMs, consecutive }`, exported from `/utils`, so a task's rejection handler can report the wait on its own error. Both stay 0 without a `cooldown` option.
74
+ - **`lint:packaging` checks the manifest version and the Dockerfile build platform** — a `manifest.json` `version` other than `package.json`'s fails, as does a Dockerfile stage that runs `bun run build` without `FROM --platform=$BUILDPLATFORM`. `devcheck` runs the step when a `Dockerfile` is its only input.
75
+ - **`release:github` validates the tag before publishing** — a lightweight tag, a subject over 72 characters or carrying the version or a `;`, a section header, a leaked signature block, or a final line other than the changelog link is refused before any `gh` call; `-- --check` runs only that validation.
76
+
77
+ ## Changed
78
+
79
+ - **Capability refusals end at reconnecting** ([#495](https://github.com/cyanheads/mcp-ts-core/issues/495)) — the `client_capability_missing` hint no longer offers to take the answer as an argument, which a consent gate cannot. A handler whose arguments can stand in passes `ctx.requestInput(spec, { fallbackHint })`, a sentence appended to the hint.
80
+ - **`CanvasIdSchema` says what a canvas ID is** ([#483](https://github.com/cyanheads/mcp-ts-core/issues/483)) — a rejected `canvas_id` reads "Expected a canvas ID exactly as an earlier response on this server returned it…" in the message and hint instead of the bare regex. The advertised JSON Schema is unchanged.
81
+ - **MCP SDK 2.1.0 transport behavior** — a 2026-07-28 POST without `MCP-Protocol-Version` is refused `400` / `-32020`, and a JSON-RPC batch over 100 messages `400` / `-32600`. `notifications/cancelled` with `requestId: 0` now cancels, and stdin EOF on stdio aborts in-flight requests unanswered.
82
+ - **Release workflow skills** — `git-wrapup`'s gate adds `rebuild`; `release-pr-review` waits on code scanning in bounded calls, reads the PR's merge-ref alerts, and reports `finished` or `halted`; the greenfield workflow disables CodeQL while the repo is private, then reopens the release PR once it is public so the first scan runs; `security-pass` flags catching `client_capability_missing` to run a side effect. `release-and-publish` runs `release:github -- --check` before the push, and the orchestration workflows defer the tag format to it and drop the tag-moving protocol.
83
+ - **Skill corrections** — issue reads fetch the body and the thread separately, since `gh issue view --comments` prints no body without a TTY; smoke tests run `start:stdio < /dev/null` and check the `Core services constructed` record's `tools` / `resources` / `prompts` fields; the `add-resource` and `add-prompt` barrel snippets add to the `createApp()` array; `security-pass` greps use `grep -E`.
84
+ - **Scaffold `.mcpbignore`** — excludes `docs/idea.md` and `logs/` from the bundle.
85
+ - Skill versions: `add-app-tool` 1.6 → 1.7, `add-export` 1.1 → 1.2, `add-prompt` 1.4 → 1.5, `add-resource` 1.7 → 1.8, `add-tool` 2.30 → 2.31, `api-auth` 1.4 → 1.5, `api-canvas` 2.5 → 2.6, `api-config` 1.21 → 1.22, `api-context` 2.7 → 2.8, `api-errors` 1.17 → 1.18, `api-linter` 1.19 → 1.20, `api-mirror` 1.2 → 1.3, `api-telemetry` 1.14 → 1.15, `api-utils` 2.13 → 2.14, `design-mcp-server` 2.29 → 2.30, `field-test` 2.16 → 2.17, `git-wrapup` 1.26 → 1.27, `orchestrations` 1.11 → 1.12 (workflows `field-test-fix` 1.1 → 1.2, `fix-wrapup-release` 1.1 → 1.2, `greenfield-build` 1.2 → 1.3, `maintenance-release` 1.2 → 1.3), `polish-docs-meta` 2.19 → 2.20, `release-and-publish` 2.21 → 2.22, `release-pr-review` 1.5 → 1.6, `report-issue-framework` 1.13 → 1.14, `report-issue-local` 1.11 → 1.12, `security-pass` 1.10 → 1.11.
86
+
87
+ ## Fixed
88
+
89
+ - **Underscore-prefixed keys reach their alias** ([#563](https://github.com/cyanheads/mcp-ts-core/issues/563)) — when a call fails after the drop stage discarded a key, pre-validation retries alias-first and keeps the retry only if it validates, so a declared `_q` alias or an undeclared `_query` reaches `query`. A call that fails both ways is rejected as the retry saw it: the value's own failure, closed by `Validated _q as query.`
90
+ - **One-or-many unions render like the field they wrap** ([#492](https://github.com/cyanheads/mcp-ts-core/issues/492)) — a bad element in `z.union([z.array(Item), Item])` reports `items.1.name: …` with the typed hint `Send items.1.name as a string, not a boolean.`, as a plain array field does.
91
+ - **Argument hints keep field paths** ([#493](https://github.com/cyanheads/mcp-ts-core/issues/493)) — a constraint or refinement restated in the hint carries its path (`start: Must be …, end: Must be …`) and repeats collapse, so a consumer test pinning a path-less hint moves.
92
+ - **A fractional number on an integer field names the fix** ([#499](https://github.com/cyanheads/mcp-ts-core/issues/499)) — `Send rows as an integer, not a fractional number.` instead of `as an int, not a number`.
93
+ - **Nested unknown keys are hinted from their own object** ([#566](https://github.com/cyanheads/mcp-ts-core/issues/566)) — `Unknown key opts.b. opts accepts: a.` instead of the root's key list.
94
+ - **The pacer's cooldown streak decays** ([#471](https://github.com/cyanheads/mcp-ts-core/issues/471)) — a rate limit arriving once the gate has stood open for `cooldown.maxMs` restarts the doubling at `baseMs`.
95
+ - **Pacer sheds report their kind and a usable `retryAfter`** ([#472](https://github.com/cyanheads/mcp-ts-core/issues/472)) — sheds carry `data.shedKind` (`queue_full` / `wait_projected` / `wait_elapsed`, type `PacerShedKind`), and `retryAfter` counts every remaining waiter and, under a saturated `maxConcurrent`, is at least the longest queued wait and 1. A due waiter starts before a new arrival meets `maxQueueDepth`.
96
+ - **A nested pacer's shed leaves the outer gate open** ([#559](https://github.com/cyanheads/mcp-ts-core/issues/559)) — a task error with `data.reason: 'pacer_shed'` neither closes the cooldown gate nor touches the streak.
97
+ - **`maxQueueDepth` bounds waiters, not arrivals** ([#560](https://github.com/cyanheads/mcp-ts-core/issues/560)) — an arrival whose slot is open starts at once, so `maxQueueDepth: 0` means "run when a slot is free, never wait".
98
+ - **A `baseMs: 0` cooldown keeps pacing** ([#564](https://github.com/cyanheads/mcp-ts-core/issues/564)) — the doubling exponent is capped, so a streak past 1,024 rate limits no longer computes `NaN` and switches off every window, gap, and gate.
99
+ - **Concurrent canvas spills no longer corrupt each other** ([#561](https://github.com/cyanheads/mcp-ts-core/issues/561)) — each canvas spills into its own `temp_directory`, removed when the canvas is dropped or evicted, once the calls still running on it settle.
100
+ - **DuckDB errors classify by DuckDB's error class and redact host paths** ([#565](https://github.com/cyanheads/mcp-ts-core/issues/565)) — `sql_read_only` needs a `Permission Error` or a read-only-mode message and `sql_parse_error` a `Parser Error`, so an `IO Error` such as an unwritable export directory is `DatabaseError` (`-32010`) without a reason. The export root and scratch paths read `[path]` in engine error messages.
101
+ - **`lint:mcp` fails on definitions it cannot load** ([#516](https://github.com/cyanheads/mcp-ts-core/issues/516)) — a definition file whose `import()` rejects is a `definition-import-failed` error and an unparseable `server.json` a `server-json-parse` error, both exiting 1, while the remaining files are still linted.
102
+ - **`input-alias-conflict` covers `headerParam` targets** ([#569](https://github.com/cyanheads/mcp-ts-core/issues/569)) — an alias onto a header-mirrored field, which the rewrite never targets, now fails lint.
103
+ - **The CORS preflight allows the 2026-07-28 request headers** ([#571](https://github.com/cyanheads/mcp-ts-core/issues/571)) — an origin the Origin guard admits may also send `Mcp-Method`, `Mcp-Name`, `Last-Event-ID`, and each registered tool's `Mcp-Param-<Name>` (the manifest's new `headerParams`); other origins keep the 2025-era set. Every CORS response carries `Vary: Origin`.
104
+ - **Mirror examples pass `table`** — the `api-mirror` skill and the `defineMirror` JSDoc give `sqliteMirrorStore` its required `table` option.
105
+
106
+ ## Security
107
+
108
+ - **Canvas scratch files live in a private directory** ([#554](https://github.com/cyanheads/mcp-ts-core/issues/554)) — the DuckDB provider no longer uses the fixed `<tmpdir>/mcp-canvas`, which other local users could read or pre-create. It creates a private `mkdtemp` directory (`0700` on POSIX) inside `CANVAS_TEMP_PATH`, now a parent directory, and removes it at shutdown; one it cannot create fails canvas creation as `ConfigurationError`.
109
+
110
+ ## Dependencies
111
+
112
+ - `@modelcontextprotocol/server` ^2.0.0 → ^2.1.0 (transport behavior under Changed).
113
+ - Dev: `@modelcontextprotocol/client` ^2.0.0 → ^2.1.0.
@@ -60,6 +60,7 @@ declare const ConfigSchema: z.ZodObject<{
60
60
  mcpGcPressureIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
61
61
  mcpAllowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
62
62
  mcpAuthSecretKey: z.ZodOptional<z.ZodString>;
63
+ mcpRequestStateKey: z.ZodOptional<z.ZodString>;
63
64
  mcpJwtExpectedIssuer: z.ZodOptional<z.ZodString>;
64
65
  mcpJwtExpectedAudience: z.ZodOptional<z.ZodString>;
65
66
  mcpAuthMode: z.ZodPreprocess<z.ZodDefault<z.ZodEnum<{
@@ -197,6 +198,7 @@ declare const parseConfig: (envOverrides?: Record<string, string | undefined>) =
197
198
  mcpGcPressureIntervalMs: number;
198
199
  mcpAllowedOrigins?: string[] | undefined;
199
200
  mcpAuthSecretKey?: string | undefined;
201
+ mcpRequestStateKey?: string | undefined;
200
202
  mcpJwtExpectedIssuer?: string | undefined;
201
203
  mcpJwtExpectedAudience?: string | undefined;
202
204
  mcpAuthMode: "jwt" | "none" | "oauth";
@@ -325,6 +327,7 @@ declare const config: {
325
327
  mcpGcPressureIntervalMs: number;
326
328
  mcpAllowedOrigins?: string[] | undefined;
327
329
  mcpAuthSecretKey?: string | undefined;
330
+ mcpRequestStateKey?: string | undefined;
328
331
  mcpJwtExpectedIssuer?: string | undefined;
329
332
  mcpJwtExpectedAudience?: string | undefined;
330
333
  mcpAuthMode: "jwt" | "none" | "oauth";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,wEAAwE;AACxE,eAAO,MAAM,cAAc,2BAA2B,CAAC;AACvD,eAAO,MAAM,iBAAiB,QAAkC,CAAC;AA6DjE,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2Yd,CAAC;AAGL,QAAA,MAAM,WAAW,kBAAmB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+MrE,CAAC;AAIF;;;;;;;;GAQG;AACH,QAAA,MAAM,WAAW,kBAAmB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,KAAG,IAExE,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBV,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAErD;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
@@ -154,6 +154,9 @@ const ConfigSchema = z
154
154
  * much data they stage. Default 1 MiB; raise only for servers whose tools
155
155
  * accept large payloads in the request body itself (base64 media, pasted
156
156
  * documents). Set to `0` to disable and defer to the runtime/reverse proxy.
157
+ * The only request-body limit the transport applies: the SDK's own 4 MiB
158
+ * read cap never engages, since it is handed the already-parsed body, so a
159
+ * value above 4 MiB holds as set.
157
160
  */
158
161
  mcpHttpMaxBodyBytes: z.coerce
159
162
  .number()
@@ -201,6 +204,16 @@ const ConfigSchema = z
201
204
  mcpGcPressureIntervalMs: z.coerce.number().min(0).default(0),
202
205
  mcpAllowedOrigins: z.array(z.string()).optional(),
203
206
  mcpAuthSecretKey: z.string().optional(),
207
+ /**
208
+ * Opt-in HMAC key for multi-round-trip `requestState`. When set, the
209
+ * framework seals the state a handler returns with `ctx.requestInput` and
210
+ * the SDK verifies every echoed state before the handler runs, so a retry
211
+ * can only carry state this server minted, for the same principal, within
212
+ * 900 s. Every instance a retry can reach needs the same key. Unset, state
213
+ * round-trips raw. At least 32 bytes; the length is checked where the
214
+ * codec is built, so the startup error names this variable.
215
+ */
216
+ mcpRequestStateKey: z.string().optional(),
204
217
  mcpJwtExpectedIssuer: z.string().optional(),
205
218
  mcpJwtExpectedAudience: z.string().optional(),
206
219
  mcpAuthMode: z.preprocess(emptyStringAsUndefined, z.enum(['jwt', 'oauth', 'none']).default('none')),
@@ -281,16 +294,24 @@ const ConfigSchema = z
281
294
  */
282
295
  exportRootPath: z.string().default('./.canvas-exports'),
283
296
  /**
284
- * Root for scratch I/O: DuckDB's `temp_directory` (where a query
285
- * exceeding `memory_limit` spills) and the transient files behind
286
- * stream exports and the spillover round-trip.
297
+ * Parent directory for canvas scratch I/O. On first use the DuckDB
298
+ * provider creates a private `mcp-canvas-XXXXXX` directory inside it
299
+ * (`mkdtemp`, mode `0700` on POSIX) holding each canvas's own DuckDB
300
+ * `temp_directory` (where a query exceeding `memory_limit` spills)
301
+ * and the transient files behind stream exports and `importFrom`;
302
+ * shutdown removes it once the calls still running against it
303
+ * settle.
287
304
  *
288
- * Left unset, the DuckDB provider resolves it under the OS temp
289
- * directory. It must not fall back to the process cwd — DuckDB's own
290
- * default for an in-memory database is a cwd-relative `.tmp`, which
291
- * fails outright under a non-root or read-only container rootfs.
292
- * Distinct from `CANVAS_EXPORT_PATH`, which holds user-requested
293
- * export files and stays where the caller asked for them.
305
+ * Left unset, the parent is the OS temp directory — never the process
306
+ * cwd, since DuckDB's own default for an in-memory database is a
307
+ * cwd-relative `.tmp`, which fails outright under a non-root or
308
+ * read-only container rootfs. A configured parent is created if
309
+ * missing and gets no ownership or mode check, so it must not be a
310
+ * directory another local user controls. On Windows the private
311
+ * directory inherits the parent's ACL, so there the parent must also
312
+ * not grant other users access. Distinct from
313
+ * `CANVAS_EXPORT_PATH`, which holds user-requested export files and
314
+ * stays where the caller asked for them.
294
315
  */
295
316
  tempRootPath: z.string().optional(),
296
317
  /** Maximum active canvases per tenant before `RateLimited`. */
@@ -470,6 +491,7 @@ const parseConfig = (envOverrides) => {
470
491
  .map((o) => o.trim())
471
492
  .filter(Boolean),
472
493
  mcpAuthSecretKey: env.MCP_AUTH_SECRET_KEY,
494
+ mcpRequestStateKey: env.MCP_REQUEST_STATE_KEY,
473
495
  mcpJwtExpectedIssuer: env.MCP_JWT_EXPECTED_ISSUER,
474
496
  mcpJwtExpectedAudience: env.MCP_JWT_EXPECTED_AUDIENCE,
475
497
  mcpAuthMode: env.MCP_AUTH_MODE,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,WAAW,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAwB,cAAc,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,YAAY,GAAG,WAA8B,CAAC;AAEpD,wEAAwE;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAC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C,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;CACF,CAAC,CAAC;AAOH;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
@@ -117,8 +117,11 @@ export interface CreateAppOptions<TSupabaseClient extends object = SupabaseClien
117
117
  icons?: Implementation['icons'];
118
118
  /**
119
119
  * Switches for the pre-validation step every `tools/call` argument object
120
- * passes through: dropping client-added root keys, rewriting key aliases, and
121
- * repairing a stringified array after a failed parse.
120
+ * passes through: dropping client-added root keys, then rewriting key
121
+ * aliases, and, after a failed parse, repairing a JSON-stringified array or
122
+ * object or an integer sent for a string. When that still fails and the drop
123
+ * discarded a key, the stages rerun alias-first, kept only if the call then
124
+ * validates.
122
125
  *
123
126
  * Every stage is on with no configuration. An entry here either extends a
124
127
  * stage or turns it off for the whole server; nothing about the advertised
@@ -129,7 +132,7 @@ export interface CreateAppOptions<TSupabaseClient extends object = SupabaseClien
129
132
  * input: {
130
133
  * ignoreKeys: ['some_client_field'], // adds to the built-in list; `false` disables the stage
131
134
  * caseStyleAliases: false, // declared `inputAliases` only
132
- * coerce: false, // never retry a failed parse
135
+ * coerce: false, // never repair an argument value
133
136
  * }
134
137
  * ```
135
138
  */
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/core/app.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,MAAM,EAA6B,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAC;AAClC,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G,oBAAoB,EACzF,OAAO,GAAE,gBAAgB,CAAC,eAAe,CAAM,GAC9C,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAiNvC;AAsDD;;;;;;;;;GASG;AACH,wBAAsB,SAAS,CAAC,eAAe,SAAS,MAAM,GAAG,oBAAoB,EACnF,OAAO,GAAE,gBAAgB,CAAC,eAAe,CAAM,GAC9C,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CA8axC"}
package/dist/core/app.js CHANGED
@@ -11,6 +11,7 @@ import { config, normalizeEnv, resetConfig } from '../config/index.js';
11
11
  import { startGcPressureLoop } from './gcPressure.js';
12
12
  import { buildServerManifest, } from './serverManifest.js';
13
13
  import { assertValidCacheHints } from '../mcp-server/cacheHints.js';
14
+ import { createRequestStateSealer } from '../mcp-server/inputRequired.js';
14
15
  import { notifierFor } from '../mcp-server/notifications.js';
15
16
  import { PromptRegistry } from '../mcp-server/prompts/prompt-registration.js';
16
17
  import { ResourceRegistry } from '../mcp-server/resources/resource-registration.js';
@@ -129,6 +130,16 @@ export async function composeServices(options = {}) {
129
130
  // Fail before any service is constructed, on the parsed config the server
130
131
  // will actually run with.
131
132
  assertSessionModeRequirement(sessionMode.require, seedsSessionMode);
133
+ // One codec for the process when `MCP_REQUEST_STATE_KEY` is set: every
134
+ // server instance verifies with it and every handler factory seals with it,
135
+ // so a round minted by one instance verifies on any other holding the key.
136
+ // A short key fails here, naming the variable. Config reads a blank value as
137
+ // unset, so the record below is how an operator confirms a key took; it
138
+ // names the variable and never carries the key.
139
+ const requestState = createRequestStateSealer(config.mcpRequestStateKey);
140
+ if (requestState) {
141
+ logger.info('requestState sealing is on (MCP_REQUEST_STATE_KEY): input_required state is signed on the way out and verified on every retry.', requestContextService.createRequestContext({ operation: 'ServerInit' }));
142
+ }
132
143
  // --- Core services ---
133
144
  let supabaseClient;
134
145
  if (config.storage.providerType === 'supabase') {
@@ -209,17 +220,20 @@ export async function composeServices(options = {}) {
209
220
  storage: storageService,
210
221
  exposeStatelessSessionId,
211
222
  ...(options.input && { input: options.input }),
223
+ ...(requestState && { requestState }),
212
224
  });
213
225
  const resourceRegistry = new ResourceRegistry(resources, {
214
226
  logger,
215
227
  storage: storageService,
216
228
  exposeStatelessSessionId,
229
+ ...(requestState && { requestState }),
217
230
  });
218
- const promptRegistry = new PromptRegistry(prompts, logger);
231
+ const promptRegistry = new PromptRegistry(prompts, logger, requestState);
219
232
  const createServer = (ctx) => createMcpServerInstance({
220
233
  config,
221
234
  era: ctx.era,
222
235
  notifier: notify,
236
+ ...(requestState && { requestState }),
223
237
  ...(cacheHints && { cacheHints }),
224
238
  ...(description && { description }),
225
239
  ...(extensions && { extensions }),
@@ -540,10 +554,12 @@ export async function createApp(options = {}) {
540
554
  };
541
555
  /**
542
556
  * Stdin EOF is a stdio client hanging up — a transport disconnect, handled
543
- * like a signal. Left unobserved, the process instead runs out of ref'd
544
- * handles and drains: shutdown never runs, the OTel export never leaves, and
545
- * a handle server code forgot to `unref()` keeps the server resident long
546
- * after its client is gone (#322).
557
+ * like a signal. The SDK transport closes itself on the same EOF, aborting
558
+ * requests still in flight, but that is the connection alone. Left
559
+ * unobserved, the process instead runs out of ref'd handles and drains:
560
+ * shutdown never runs, the OTel export never leaves, and a handle server
561
+ * code forgot to `unref()` keeps the server resident long after its client
562
+ * is gone (#322).
547
563
  *
548
564
  * The backstop is ref'd, unlike `fatalShutdown`'s. It holds the loop open for
549
565
  * the duration — that same drain would otherwise exit mid-cleanup — and caps