@cyanheads/mcp-ts-core 0.13.7 → 0.13.9

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 (274) hide show
  1. package/AGENTS.md +19 -15
  2. package/CLAUDE.md +19 -15
  3. package/README.md +4 -2
  4. package/changelog/0.13.x/0.13.8.md +101 -0
  5. package/changelog/0.13.x/0.13.9.md +113 -0
  6. package/dist/config/index.d.ts +9 -0
  7. package/dist/config/index.d.ts.map +1 -1
  8. package/dist/config/index.js +39 -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 +20 -6
  13. package/dist/core/app.js.map +1 -1
  14. package/dist/core/context.d.ts +25 -1
  15. package/dist/core/context.d.ts.map +1 -1
  16. package/dist/core/context.js +13 -3
  17. package/dist/core/context.js.map +1 -1
  18. package/dist/core/serverManifest.d.ts +6 -0
  19. package/dist/core/serverManifest.d.ts.map +1 -1
  20. package/dist/core/serverManifest.js +6 -0
  21. package/dist/core/serverManifest.js.map +1 -1
  22. package/dist/core/worker.d.ts +2 -0
  23. package/dist/core/worker.d.ts.map +1 -1
  24. package/dist/core/worker.js +2 -0
  25. package/dist/core/worker.js.map +1 -1
  26. package/dist/linter/rules/enrichment-rules.d.ts +3 -2
  27. package/dist/linter/rules/enrichment-rules.d.ts.map +1 -1
  28. package/dist/linter/rules/enrichment-rules.js +9 -2
  29. package/dist/linter/rules/enrichment-rules.js.map +1 -1
  30. package/dist/linter/rules/handler-body-rules.d.ts.map +1 -1
  31. package/dist/linter/rules/handler-body-rules.js +10 -4
  32. package/dist/linter/rules/handler-body-rules.js.map +1 -1
  33. package/dist/linter/rules/schema-rules.d.ts +5 -0
  34. package/dist/linter/rules/schema-rules.d.ts.map +1 -1
  35. package/dist/linter/rules/schema-rules.js +44 -17
  36. package/dist/linter/rules/schema-rules.js.map +1 -1
  37. package/dist/linter/rules/tool-rules.d.ts +2 -1
  38. package/dist/linter/rules/tool-rules.d.ts.map +1 -1
  39. package/dist/linter/rules/tool-rules.js +36 -1
  40. package/dist/linter/rules/tool-rules.js.map +1 -1
  41. package/dist/mcp-server/inputRequired.d.ts +14 -5
  42. package/dist/mcp-server/inputRequired.d.ts.map +1 -1
  43. package/dist/mcp-server/inputRequired.js +15 -8
  44. package/dist/mcp-server/inputRequired.js.map +1 -1
  45. package/dist/mcp-server/outputContract.d.ts +33 -0
  46. package/dist/mcp-server/outputContract.d.ts.map +1 -0
  47. package/dist/mcp-server/outputContract.js +43 -0
  48. package/dist/mcp-server/outputContract.js.map +1 -0
  49. package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts.map +1 -1
  50. package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +10 -2
  51. package/dist/mcp-server/resources/utils/resourceHandlerFactory.js.map +1 -1
  52. package/dist/mcp-server/tools/utils/inputPrevalidation.d.ts +163 -40
  53. package/dist/mcp-server/tools/utils/inputPrevalidation.d.ts.map +1 -1
  54. package/dist/mcp-server/tools/utils/inputPrevalidation.js +330 -114
  55. package/dist/mcp-server/tools/utils/inputPrevalidation.js.map +1 -1
  56. package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts +39 -15
  57. package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts.map +1 -1
  58. package/dist/mcp-server/tools/utils/toolHandlerFactory.js +361 -93
  59. package/dist/mcp-server/tools/utils/toolHandlerFactory.js.map +1 -1
  60. package/dist/mcp-server/transports/auth/lib/authUtils.js +4 -1
  61. package/dist/mcp-server/transports/auth/lib/authUtils.js.map +1 -1
  62. package/dist/mcp-server/transports/auth/strategies/jwtStrategy.d.ts.map +1 -1
  63. package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js +1 -1
  64. package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js.map +1 -1
  65. package/dist/mcp-server/transports/auth/strategies/oauthStrategy.d.ts.map +1 -1
  66. package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js +2 -5
  67. package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js.map +1 -1
  68. package/dist/mcp-server/transports/http/httpTransport.d.ts.map +1 -1
  69. package/dist/mcp-server/transports/http/httpTransport.js +65 -9
  70. package/dist/mcp-server/transports/http/httpTransport.js.map +1 -1
  71. package/dist/mcp-server/transports/http/sessionStore.d.ts.map +1 -1
  72. package/dist/mcp-server/transports/http/sessionStore.js +2 -2
  73. package/dist/mcp-server/transports/http/sessionStore.js.map +1 -1
  74. package/dist/mcp-server/transports/stdio/stdioTransport.d.ts +9 -5
  75. package/dist/mcp-server/transports/stdio/stdioTransport.d.ts.map +1 -1
  76. package/dist/mcp-server/transports/stdio/stdioTransport.js +9 -5
  77. package/dist/mcp-server/transports/stdio/stdioTransport.js.map +1 -1
  78. package/dist/services/canvas/core/CanvasRegistry.d.ts +6 -2
  79. package/dist/services/canvas/core/CanvasRegistry.d.ts.map +1 -1
  80. package/dist/services/canvas/core/CanvasRegistry.js +8 -4
  81. package/dist/services/canvas/core/CanvasRegistry.js.map +1 -1
  82. package/dist/services/canvas/core/DataCanvas.d.ts.map +1 -1
  83. package/dist/services/canvas/core/DataCanvas.js +7 -5
  84. package/dist/services/canvas/core/DataCanvas.js.map +1 -1
  85. package/dist/services/canvas/core/canvasFactory.d.ts.map +1 -1
  86. package/dist/services/canvas/core/canvasFactory.js +2 -2
  87. package/dist/services/canvas/core/canvasFactory.js.map +1 -1
  88. package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts +82 -18
  89. package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts.map +1 -1
  90. package/dist/services/canvas/providers/duckdb/DuckdbProvider.js +645 -344
  91. package/dist/services/canvas/providers/duckdb/DuckdbProvider.js.map +1 -1
  92. package/dist/services/canvas/providers/duckdb/exportWriter.d.ts +11 -7
  93. package/dist/services/canvas/providers/duckdb/exportWriter.d.ts.map +1 -1
  94. package/dist/services/canvas/providers/duckdb/exportWriter.js +19 -16
  95. package/dist/services/canvas/providers/duckdb/exportWriter.js.map +1 -1
  96. package/dist/services/llm/providers/openrouter.provider.js +1 -1
  97. package/dist/services/llm/providers/openrouter.provider.js.map +1 -1
  98. package/dist/services/mirror/core/defineMirror.d.ts +1 -0
  99. package/dist/services/mirror/core/defineMirror.d.ts.map +1 -1
  100. package/dist/services/mirror/core/defineMirror.js +1 -0
  101. package/dist/services/mirror/core/defineMirror.js.map +1 -1
  102. package/dist/services/speech/providers/elevenlabs.provider.js +3 -3
  103. package/dist/services/speech/providers/elevenlabs.provider.js.map +1 -1
  104. package/dist/services/speech/providers/whisper.provider.d.ts.map +1 -1
  105. package/dist/services/speech/providers/whisper.provider.js +5 -5
  106. package/dist/services/speech/providers/whisper.provider.js.map +1 -1
  107. package/dist/storage/core/StorageService.d.ts.map +1 -1
  108. package/dist/storage/core/StorageService.js +3 -6
  109. package/dist/storage/core/StorageService.js.map +1 -1
  110. package/dist/storage/core/storageFactory.d.ts.map +1 -1
  111. package/dist/storage/core/storageFactory.js +12 -15
  112. package/dist/storage/core/storageFactory.js.map +1 -1
  113. package/dist/storage/core/storageValidation.d.ts +13 -13
  114. package/dist/storage/core/storageValidation.d.ts.map +1 -1
  115. package/dist/storage/core/storageValidation.js +49 -125
  116. package/dist/storage/core/storageValidation.js.map +1 -1
  117. package/dist/storage/providers/cloudflare/d1Provider.d.ts.map +1 -1
  118. package/dist/storage/providers/cloudflare/d1Provider.js +5 -3
  119. package/dist/storage/providers/cloudflare/d1Provider.js.map +1 -1
  120. package/dist/storage/providers/cloudflare/kvProvider.d.ts.map +1 -1
  121. package/dist/storage/providers/cloudflare/kvProvider.js +1 -1
  122. package/dist/storage/providers/cloudflare/kvProvider.js.map +1 -1
  123. package/dist/storage/providers/cloudflare/r2Provider.d.ts.map +1 -1
  124. package/dist/storage/providers/cloudflare/r2Provider.js +3 -3
  125. package/dist/storage/providers/cloudflare/r2Provider.js.map +1 -1
  126. package/dist/storage/providers/fileSystem/fileSystemProvider.js +4 -4
  127. package/dist/storage/providers/fileSystem/fileSystemProvider.js.map +1 -1
  128. package/dist/storage/providers/inMemory/inMemoryProvider.d.ts +1 -1
  129. package/dist/storage/providers/inMemory/inMemoryProvider.d.ts.map +1 -1
  130. package/dist/storage/providers/inMemory/inMemoryProvider.js +6 -5
  131. package/dist/storage/providers/inMemory/inMemoryProvider.js.map +1 -1
  132. package/dist/testing/fuzz.d.ts.map +1 -1
  133. package/dist/testing/fuzz.js +7 -1
  134. package/dist/testing/fuzz.js.map +1 -1
  135. package/dist/testing/index.d.ts +15 -2
  136. package/dist/testing/index.d.ts.map +1 -1
  137. package/dist/testing/index.js +51 -6
  138. package/dist/testing/index.js.map +1 -1
  139. package/dist/types-global/errors.d.ts +7 -4
  140. package/dist/types-global/errors.d.ts.map +1 -1
  141. package/dist/types-global/errors.js.map +1 -1
  142. package/dist/utils/formatting/codeSpan.d.ts +27 -0
  143. package/dist/utils/formatting/codeSpan.d.ts.map +1 -0
  144. package/dist/utils/formatting/codeSpan.js +42 -0
  145. package/dist/utils/formatting/codeSpan.js.map +1 -0
  146. package/dist/utils/formatting/diffFormatter.d.ts.map +1 -1
  147. package/dist/utils/formatting/diffFormatter.js +7 -15
  148. package/dist/utils/formatting/diffFormatter.js.map +1 -1
  149. package/dist/utils/formatting/markdownBuilder.d.ts +12 -5
  150. package/dist/utils/formatting/markdownBuilder.d.ts.map +1 -1
  151. package/dist/utils/formatting/markdownBuilder.js +14 -2
  152. package/dist/utils/formatting/markdownBuilder.js.map +1 -1
  153. package/dist/utils/formatting/tableFormatter.d.ts.map +1 -1
  154. package/dist/utils/formatting/tableFormatter.js +5 -9
  155. package/dist/utils/formatting/tableFormatter.js.map +1 -1
  156. package/dist/utils/formatting/treeFormatter.d.ts.map +1 -1
  157. package/dist/utils/formatting/treeFormatter.js +5 -9
  158. package/dist/utils/formatting/treeFormatter.js.map +1 -1
  159. package/dist/utils/index.d.ts +1 -1
  160. package/dist/utils/index.d.ts.map +1 -1
  161. package/dist/utils/index.js.map +1 -1
  162. package/dist/utils/internal/error-handler/errorHandler.d.ts +17 -10
  163. package/dist/utils/internal/error-handler/errorHandler.d.ts.map +1 -1
  164. package/dist/utils/internal/error-handler/errorHandler.js +47 -26
  165. package/dist/utils/internal/error-handler/errorHandler.js.map +1 -1
  166. package/dist/utils/internal/error-handler/mappings.d.ts +17 -1
  167. package/dist/utils/internal/error-handler/mappings.d.ts.map +1 -1
  168. package/dist/utils/internal/error-handler/mappings.js +22 -1
  169. package/dist/utils/internal/error-handler/mappings.js.map +1 -1
  170. package/dist/utils/internal/error-handler/types.d.ts +2 -0
  171. package/dist/utils/internal/error-handler/types.d.ts.map +1 -1
  172. package/dist/utils/internal/logger.d.ts +75 -3
  173. package/dist/utils/internal/logger.d.ts.map +1 -1
  174. package/dist/utils/internal/logger.js +181 -52
  175. package/dist/utils/internal/logger.js.map +1 -1
  176. package/dist/utils/internal/performance.d.ts +11 -0
  177. package/dist/utils/internal/performance.d.ts.map +1 -1
  178. package/dist/utils/internal/performance.js +46 -12
  179. package/dist/utils/internal/performance.js.map +1 -1
  180. package/dist/utils/network/fetchWithTimeout.d.ts +11 -5
  181. package/dist/utils/network/fetchWithTimeout.d.ts.map +1 -1
  182. package/dist/utils/network/fetchWithTimeout.js +50 -23
  183. package/dist/utils/network/fetchWithTimeout.js.map +1 -1
  184. package/dist/utils/network/pacer.d.ts +38 -5
  185. package/dist/utils/network/pacer.d.ts.map +1 -1
  186. package/dist/utils/network/pacer.js +87 -25
  187. package/dist/utils/network/pacer.js.map +1 -1
  188. package/dist/utils/network/retry.d.ts +16 -8
  189. package/dist/utils/network/retry.d.ts.map +1 -1
  190. package/dist/utils/network/retry.js +19 -8
  191. package/dist/utils/network/retry.js.map +1 -1
  192. package/dist/utils/overflow/outlineOnOverflow.d.ts +18 -2
  193. package/dist/utils/overflow/outlineOnOverflow.d.ts.map +1 -1
  194. package/dist/utils/overflow/outlineOnOverflow.js +28 -3
  195. package/dist/utils/overflow/outlineOnOverflow.js.map +1 -1
  196. package/dist/utils/pagination/pagination.d.ts +3 -1
  197. package/dist/utils/pagination/pagination.d.ts.map +1 -1
  198. package/dist/utils/pagination/pagination.js +10 -2
  199. package/dist/utils/pagination/pagination.js.map +1 -1
  200. package/dist/utils/parsing/csvParser.d.ts.map +1 -1
  201. package/dist/utils/parsing/csvParser.js +4 -2
  202. package/dist/utils/parsing/csvParser.js.map +1 -1
  203. package/dist/utils/parsing/htmlExtractor.js +1 -1
  204. package/dist/utils/parsing/htmlExtractor.js.map +1 -1
  205. package/dist/utils/parsing/jsonParser.d.ts.map +1 -1
  206. package/dist/utils/parsing/jsonParser.js +3 -1
  207. package/dist/utils/parsing/jsonParser.js.map +1 -1
  208. package/dist/utils/parsing/xmlParser.d.ts.map +1 -1
  209. package/dist/utils/parsing/xmlParser.js +3 -1
  210. package/dist/utils/parsing/xmlParser.js.map +1 -1
  211. package/dist/utils/parsing/yamlParser.d.ts.map +1 -1
  212. package/dist/utils/parsing/yamlParser.js +3 -1
  213. package/dist/utils/parsing/yamlParser.js.map +1 -1
  214. package/dist/utils/security/idGenerator.d.ts.map +1 -1
  215. package/dist/utils/security/idGenerator.js +20 -4
  216. package/dist/utils/security/idGenerator.js.map +1 -1
  217. package/dist/utils/security/sanitization.d.ts +31 -0
  218. package/dist/utils/security/sanitization.d.ts.map +1 -1
  219. package/dist/utils/security/sanitization.js +98 -11
  220. package/dist/utils/security/sanitization.js.map +1 -1
  221. package/dist/utils/telemetry/attributes.d.ts +21 -2
  222. package/dist/utils/telemetry/attributes.d.ts.map +1 -1
  223. package/dist/utils/telemetry/attributes.js +21 -2
  224. package/dist/utils/telemetry/attributes.js.map +1 -1
  225. package/dist/utils/telemetry/instrumentation.d.ts +9 -3
  226. package/dist/utils/telemetry/instrumentation.d.ts.map +1 -1
  227. package/dist/utils/telemetry/instrumentation.js +85 -13
  228. package/dist/utils/telemetry/instrumentation.js.map +1 -1
  229. package/framework-skills/add-app-tool/SKILL.md +3 -3
  230. package/framework-skills/add-export/SKILL.md +5 -16
  231. package/framework-skills/add-prompt/SKILL.md +7 -3
  232. package/framework-skills/add-resource/SKILL.md +7 -5
  233. package/framework-skills/add-tool/SKILL.md +12 -10
  234. package/framework-skills/api-auth/SKILL.md +4 -2
  235. package/framework-skills/api-canvas/SKILL.md +19 -10
  236. package/framework-skills/api-config/SKILL.md +9 -6
  237. package/framework-skills/api-context/SKILL.md +16 -5
  238. package/framework-skills/api-errors/SKILL.md +23 -17
  239. package/framework-skills/api-linter/SKILL.md +32 -9
  240. package/framework-skills/api-mirror/SKILL.md +2 -1
  241. package/framework-skills/api-telemetry/SKILL.md +34 -14
  242. package/framework-skills/api-testing/SKILL.md +5 -3
  243. package/framework-skills/api-utils/SKILL.md +10 -10
  244. package/framework-skills/api-utils/references/formatting.md +1 -1
  245. package/framework-skills/api-utils/references/parsing.md +2 -2
  246. package/framework-skills/api-utils/references/security.md +6 -4
  247. package/framework-skills/design-mcp-server/SKILL.md +2 -2
  248. package/framework-skills/field-test/SKILL.md +4 -4
  249. package/framework-skills/git-wrapup/SKILL.md +12 -7
  250. package/framework-skills/maintenance/SKILL.md +2 -2
  251. package/framework-skills/orchestrations/SKILL.md +7 -6
  252. package/framework-skills/orchestrations/workflows/field-test-fix.md +9 -19
  253. package/framework-skills/orchestrations/workflows/fix-wrapup-release.md +7 -7
  254. package/framework-skills/orchestrations/workflows/greenfield-build.md +8 -5
  255. package/framework-skills/orchestrations/workflows/maintenance-release.md +8 -8
  256. package/framework-skills/polish-docs-meta/SKILL.md +4 -4
  257. package/framework-skills/polish-docs-meta/references/readme.md +1 -0
  258. package/framework-skills/release-and-publish/SKILL.md +7 -5
  259. package/framework-skills/release-pr-review/SKILL.md +37 -23
  260. package/framework-skills/report-issue-framework/SKILL.md +7 -5
  261. package/framework-skills/report-issue-local/SKILL.md +8 -6
  262. package/framework-skills/security-pass/SKILL.md +8 -8
  263. package/framework-skills/techniques/SKILL.md +1 -1
  264. package/framework-skills/techniques/references/outline-on-overflow.md +12 -7
  265. package/package.json +20 -5
  266. package/scripts/check-skill-versions.ts +103 -22
  267. package/scripts/devcheck.ts +11 -9
  268. package/scripts/lint-mcp.ts +87 -27
  269. package/scripts/lint-packaging.ts +99 -1
  270. package/scripts/release-github.ts +117 -5
  271. package/templates/.env.example +4 -0
  272. package/templates/Dockerfile +26 -6
  273. package/templates/_.mcpbignore +2 -0
  274. package/templates/package.json +1 -0
@@ -14,25 +14,43 @@
14
14
  * in another case style (`max_results` for `maxResults`). Rewritten to the
15
15
  * canonical key before parsing. A one-to-one mapping fixed ahead of time, not
16
16
  * the nearest-key guess #232 rejected.
17
- * 3. **Representation repair (#234)** — a JSON-stringified array where an array
18
- * was declared. Applied only *after* the parse has already failed, and kept
19
- * only when it flips the arguments from invalid to valid: the author's schema
20
- * is the sole arbiter, so a repair can never touch input that was already
21
- * valid.
17
+ * 3. **Representation repair (#234, #479, #487)** — a JSON-stringified array or
18
+ * object where one was declared, or an integer where a string was. Applied
19
+ * only *after* the parse has already failed, and kept only when it flips the
20
+ * arguments from invalid to valid: the author's schema is the sole arbiter,
21
+ * so a repair can never touch input that was already valid.
22
+ *
23
+ * The drop runs first, so it also discards a key the alias stage would have
24
+ * resolved: an underscore spelling of a declared key (`_query`), a declared
25
+ * `_q` alias, an ignore-listed key a declared alias names. When the arguments
26
+ * then fail, repair included, the two stages run once more with the alias
27
+ * stage first, and that retry — with its own repair — is kept only if it
28
+ * validates (#563). A call the first order validates never reaches the retry,
29
+ * so the retry never changes which calls validate. A call neither order
30
+ * validates carries the retry's rejection, where the discarded keys reached
31
+ * their targets: a declared `_q` alias with a bad value is reported as
32
+ * validated under `query`, with the value's own failure, not as a dropped key
33
+ * beside a missing field.
22
34
  *
23
35
  * All three are on by default and each has a server-level switch on
24
36
  * `createApp({ input })` / `createWorkerHandler({ input })`. None of them
25
- * changes what `tools/list` advertises, and none appears in a response: a drop,
26
- * a rewrite, and a repair each emit one debug log and one counter increment
27
- * instead.
37
+ * changes what `tools/list` advertises. A call they rescue carries nothing
38
+ * about them in its response: a drop, a rewrite, and a repair each emit one
39
+ * debug log and one counter increment instead — for the attempt whose
40
+ * arguments the handler receives, never one the parse discarded. A call they
41
+ * cannot rescue is rejected with the rewrites and underscore-rule drops of the
42
+ * attempt whose rejection it carries reported (#468), since without them the caller cannot
43
+ * tell a bad value from a key that was moved or discarded; a repair the
44
+ * re-parse discarded leaves no trace there.
28
45
  *
29
- * The split between the two is deliberate. Counter attributes are bounded and
30
- * author- or framework-defined — the ignore-list entry that matched, the
31
- * declared key a rewrite resolved to — because a metric label carrying the
32
- * caller's own key text mints a permanent time series per spelling a client
33
- * invents (#114). The raw key and alias go to the debug log, which is where an
34
- * operator looks when a counter shows a new client artifact and where
35
- * cardinality costs nothing.
46
+ * The split between log and counter is deliberate. Counter attributes are
47
+ * bounded and author- or framework-defined — the ignore-list entry that
48
+ * matched, the declared key a rewrite resolved to — because a metric label
49
+ * carrying the caller's own key text mints a permanent time series per spelling
50
+ * a client invents (#114). The raw key and alias go to the debug log, which is
51
+ * where an operator looks when a counter shows a new client artifact and where
52
+ * cardinality costs nothing — and, on a rejection, back to the caller who sent
53
+ * them, since an error payload is per call rather than a permanent series.
36
54
  *
37
55
  * @module src/mcp-server/tools/utils/inputPrevalidation
38
56
  */
@@ -48,8 +66,16 @@ import { inputVariants, isDiscriminatedUnionSchema, zodDef } from './schemaShape
48
66
  * on `params`, not inside `arguments`; the other two are call bookkeeping.
49
67
  */
50
68
  const BUILT_IN_IGNORED_KEYS = ['_meta', 'tool_call_description', 'toolCallId'];
51
- /** The one repair {@link repairRepresentations} performs, as the counter labels it. */
52
- const COERCION_KIND_STRINGIFIED_ARRAY = 'stringified_array';
69
+ /**
70
+ * The repairs {@link repairRepresentations} performs, as `mcp.input.coercion`
71
+ * labels them, in the order a call's debug log names them — paired with how
72
+ * that log reads each one.
73
+ */
74
+ const COERCION_KINDS = {
75
+ stringified_array: 'a stringified array',
76
+ stringified_object: 'a stringified object',
77
+ integer_as_string: 'an integer sent for a string',
78
+ };
53
79
  /**
54
80
  * What the ignored-key counter reports for a key the underscore heuristic
55
81
  * dropped. The key itself is caller-supplied and stays in the debug log.
@@ -90,19 +116,63 @@ function countAliased(toolName, target, kind) {
90
116
  [ATTR_MCP_INPUT_ALIAS_KIND]: kind,
91
117
  });
92
118
  }
93
- /** One increment per repaired call, not per repaired value. */
94
- export function countCoerced(toolName, context) {
119
+ /**
120
+ * Emits one counter increment and one debug log per change an attempt made, in
121
+ * the order its stages made them. {@link parseToolArguments} calls it once per
122
+ * call, for the attempt whose arguments the handler receives — or, on a
123
+ * rejection, the first attempt, the one the rejection reports — so a key the
124
+ * alias-first retry rewrote never also counts as dropped (#563).
125
+ */
126
+ export function recordPrevalidation(def, attempt, context) {
127
+ for (const change of attempt.changes) {
128
+ if (change.kind === 'aliased') {
129
+ const { alias, aliasKind, target } = change;
130
+ countAliased(def.name, target, aliasKind);
131
+ debugLog(`Tool '${def.name}': rewrote argument key '${alias}' to '${target}'.`, context, {
132
+ toolName: def.name,
133
+ alias,
134
+ target,
135
+ aliasKind,
136
+ });
137
+ }
138
+ else {
139
+ countIgnoredKey(def.name, change.rule);
140
+ debugLog(`Tool '${def.name}': dropped client-added argument key '${change.key}'.`, context, {
141
+ toolName: def.name,
142
+ ignoredKey: change.key,
143
+ ignoreRule: change.rule,
144
+ });
145
+ }
146
+ }
147
+ }
148
+ /**
149
+ * One increment per repaired call and kind — a call repairing an array and an
150
+ * object adds one to each series, and one repairing three arrays adds one — and
151
+ * one debug log per call naming every kind that fired.
152
+ */
153
+ export function countCoerced(toolName, kinds, context) {
95
154
  coercedCounter ??= createCounter('mcp.input.coerced', 'Tool calls that validated only after a representation repair', '{calls}');
96
- coercedCounter.add(1, {
97
- [ATTR_MCP_TOOL_NAME]: toolName,
98
- [ATTR_MCP_INPUT_COERCION]: COERCION_KIND_STRINGIFIED_ARRAY,
155
+ for (const kind of kinds) {
156
+ coercedCounter.add(1, {
157
+ [ATTR_MCP_TOOL_NAME]: toolName,
158
+ [ATTR_MCP_INPUT_COERCION]: kind,
159
+ });
160
+ }
161
+ const phrases = kinds.map((kind) => COERCION_KINDS[kind]);
162
+ const named = phrases.length < 2
163
+ ? phrases.join('')
164
+ : `${phrases.slice(0, -1).join(', ')} and ${phrases.at(-1)}`;
165
+ debugLog(`Tool '${toolName}': arguments validated after repairing ${named}.`, context, {
166
+ toolName,
167
+ coercions: kinds,
99
168
  });
100
- debugLog(`Tool '${toolName}': arguments validated after repairing a stringified array.`, context, { toolName, coercion: COERCION_KIND_STRINGIFIED_ARRAY });
101
169
  }
102
170
  /**
103
- * The step's own debug channel. A pre-validation decision is invisible in the
104
- * response by design, so the log is the only place a server operator sees that
105
- * a key was dropped or moved.
171
+ * The step's own debug channel. A call the step rescues carries nothing about
172
+ * it in its response, so the log is where a server operator sees which key was
173
+ * dropped or moved; the counters say only that one was. A rejected call also
174
+ * reports its rewrites and underscore-rule drops to the caller (#468); an
175
+ * ignore-list drop never reaches the caller at all.
106
176
  */
107
177
  function debugLog(message, context, extra) {
108
178
  const base = context ?? requestContextService.createRequestContext({ operation: 'ToolInputPrevalidation' });
@@ -199,51 +269,18 @@ function selectVariant(plan, args) {
199
269
  }
200
270
  return undefined;
201
271
  }
202
- // ---------------------------------------------------------------------------
203
- // Stage 1 — drop client-added keys (#453)
204
- // ---------------------------------------------------------------------------
205
272
  /**
206
- * Drops a root key the tool does not declare when it is either underscore-
207
- * prefixed or on the ignore list. Three boundaries:
208
- *
209
- * - **A declared key is never dropped**, including a declared underscore-prefixed
210
- * one. On a union root "declared" is every variant's root keys, since the
211
- * matching variant is unknown until the discriminator is read.
212
- * - **An author-opened root is untouched** — its extra keys reach the handler
213
- * today, and dropping them would delete data the author accepts on purpose.
214
- * - **The underscore rule is off for a tool declaring any underscore-prefixed
215
- * key.** Otherwise a misspelled `_cursor` would be silently dropped instead of
216
- * rejected by name, which is the failure #232 removed. The ignore list still
217
- * applies there.
273
+ * The keys the drop stage discards whenever the tool does not declare them: the
274
+ * built-in client artifacts plus the server's own `input.ignoreKeys`. Empty
275
+ * when the stage is off, since nothing is then treated as a client artifact.
218
276
  */
219
- function dropIgnoredKeys(def, args, plan, options, context) {
220
- if (options?.ignoreKeys === false || plan.anyOpen)
221
- return args;
222
- const ignored = new Set([...BUILT_IN_IGNORED_KEYS, ...(options?.ignoreKeys ?? [])]);
223
- const underscoreRule = !plan.underscoreDeclared;
224
- let kept;
225
- for (const key of Object.keys(args)) {
226
- if (plan.allKeys.has(key))
227
- continue;
228
- const listed = ignored.has(key);
229
- if (!listed && !(underscoreRule && key.startsWith('_')))
230
- continue;
231
- // Spread copies own properties by definition, so a caller's own `__proto__`
232
- // survives as a key instead of re-prototyping the copy; `delete` on that own
233
- // property is equally safe.
234
- kept ??= { ...args };
235
- delete kept[key];
236
- countIgnoredKey(def.name, listed ? key : UNDERSCORE_RULE);
237
- debugLog(`Tool '${def.name}': dropped client-added argument key '${key}'.`, context, {
238
- toolName: def.name,
239
- ignoredKey: key,
240
- ignoreRule: listed ? key : UNDERSCORE_RULE,
241
- });
242
- }
243
- return kept ?? args;
277
+ function ignoreListFor(options) {
278
+ if (options?.ignoreKeys === false)
279
+ return new Set();
280
+ return new Set([...BUILT_IN_IGNORED_KEYS, ...(options?.ignoreKeys ?? [])]);
244
281
  }
245
282
  // ---------------------------------------------------------------------------
246
- // Stage 2 — key aliases (#452)
283
+ // Stage — key aliases (#452)
247
284
  // ---------------------------------------------------------------------------
248
285
  /**
249
286
  * Rewrites root keys to their canonical spelling in two passes: the definition's
@@ -257,17 +294,28 @@ function dropIgnoredKeys(def, args, plan, options, context) {
257
294
  * *to*: the SDK cross-checks the `Mcp-Param-<Name>` header against the raw body
258
295
  * before dispatch, so a later rewrite would hand the handler a value no
259
296
  * intermediary attested.
297
+ *
298
+ * `unfolded` names keys the case-style pass never folds. The alias-first retry
299
+ * passes the ignore list, since there the drop has not yet removed a client
300
+ * artifact: `_meta` stays the client's, whatever a tool declares as `meta`. A
301
+ * declared alias still fires for one — naming it is the author's call, as
302
+ * declaring the key itself is (#563).
303
+ *
304
+ * Returns the rewrites in the order they were made, and again in argument order
305
+ * for the rejection report.
260
306
  */
261
- function applyAliases(def, args, plan, options, context) {
307
+ function applyAliases(def, args, plan, options, unfolded) {
308
+ const changes = [];
262
309
  const declared = def.inputAliases;
263
310
  const caseStyle = options?.caseStyleAliases !== false;
264
311
  if (plan.anyOpen || (!declared && !caseStyle))
265
- return args;
312
+ return { args, aliased: [], changes };
266
313
  const variant = selectVariant(plan, args);
267
314
  if (!variant)
268
- return args;
315
+ return { args, aliased: [], changes };
269
316
  let rewritten;
270
317
  const current = () => rewritten ?? args;
318
+ const moved = new Map();
271
319
  const rewritable = (alias, target) => Object.hasOwn(current(), alias) &&
272
320
  !variant.keys.has(alias) &&
273
321
  variant.keys.has(target) &&
@@ -283,13 +331,8 @@ function applyAliases(def, args, plan, options, context) {
283
331
  rewritten ??= { ...args };
284
332
  rewritten[target] = rewritten[alias];
285
333
  delete rewritten[alias];
286
- countAliased(def.name, target, kind);
287
- debugLog(`Tool '${def.name}': rewrote argument key '${alias}' to '${target}'.`, context, {
288
- toolName: def.name,
289
- alias,
290
- target,
291
- aliasKind: kind,
292
- });
334
+ moved.set(alias, target);
335
+ changes.push({ kind: 'aliased', alias, target, aliasKind: kind });
293
336
  };
294
337
  for (const [alias, target] of Object.entries(declared ?? {})) {
295
338
  if (rewritable(alias, target))
@@ -299,39 +342,151 @@ function applyAliases(def, args, plan, options, context) {
299
342
  // Snapshot first: `move` only ever removes an undeclared key and adds a
300
343
  // declared one, so the remaining candidates are unaffected.
301
344
  for (const key of Object.keys(current())) {
302
- if (variant.keys.has(key))
345
+ if (variant.keys.has(key) || unfolded.has(key))
303
346
  continue;
304
347
  const target = variant.folded.get(foldArgumentKey(key));
305
348
  if (target && rewritable(key, target))
306
349
  move(key, target, 'case_style');
307
350
  }
308
351
  }
309
- return rewritten ?? args;
352
+ const aliased = Object.keys(args).flatMap((alias) => {
353
+ const target = moved.get(alias);
354
+ return target === undefined ? [] : [{ alias, target }];
355
+ });
356
+ return { args: rewritten ?? args, aliased, changes };
310
357
  }
311
358
  // ---------------------------------------------------------------------------
312
- // Public entry points
359
+ // Stage — drop client-added keys (#453)
313
360
  // ---------------------------------------------------------------------------
314
361
  /**
315
- * Runs the pre-parse half of the step — drop client-added keys, then rewrite
316
- * key aliases — and returns the arguments to parse.
362
+ * Drops a root key the tool does not declare when it is either underscore-
363
+ * prefixed or on the ignore list. Three boundaries:
317
364
  *
318
- * Returns the caller's own object unchanged when nothing applied, so the common
319
- * path allocates nothing. Non-object arguments are handed straight back: the
320
- * schema's own rejection already says what arrived.
365
+ * - **A declared key is never dropped**, including a declared underscore-prefixed
366
+ * one. On a union root "declared" is every variant's root keys, since the
367
+ * matching variant is unknown until the discriminator is read.
368
+ * - **An author-opened root is untouched** — its extra keys reach the handler
369
+ * today, and dropping them would delete data the author accepts on purpose.
370
+ * - **The underscore rule is off for a tool declaring any underscore-prefixed
371
+ * key.** Otherwise a misspelled `_cursor` would be silently dropped instead of
372
+ * rejected by name, which is the failure #232 removed. The ignore list still
373
+ * applies there.
374
+ *
375
+ * A key the alias stage would have rewritten is dropped here like any other on
376
+ * the first attempt; the alias-first retry is what reaches it (#563).
377
+ *
378
+ * Returns every drop in argument order, and the underscore-rule drops again for
379
+ * the rejection report — an ignore-list drop is a client artifact and is never
380
+ * reported.
321
381
  */
322
- export function prevalidateToolArguments(def, args, options, context) {
323
- if (args === null || typeof args !== 'object' || Array.isArray(args))
324
- return args;
382
+ function dropIgnoredKeys(args, plan, options, ignoreList) {
383
+ const changes = [];
384
+ const ignored = [];
385
+ if (options?.ignoreKeys === false || plan.anyOpen)
386
+ return { args, changes, ignored };
387
+ const underscoreRule = !plan.underscoreDeclared;
388
+ let kept;
389
+ for (const key of Object.keys(args)) {
390
+ if (plan.allKeys.has(key))
391
+ continue;
392
+ const listed = ignoreList.has(key);
393
+ if (!listed && !(underscoreRule && key.startsWith('_')))
394
+ continue;
395
+ // Spread copies own properties by definition, so a caller's own `__proto__`
396
+ // survives as a key instead of re-prototyping the copy; `delete` on that own
397
+ // property is equally safe.
398
+ kept ??= { ...args };
399
+ delete kept[key];
400
+ if (!listed)
401
+ ignored.push(key);
402
+ changes.push({ kind: 'dropped', key, rule: listed ? key : UNDERSCORE_RULE });
403
+ }
404
+ return { args: kept ?? args, changes, ignored };
405
+ }
406
+ // ---------------------------------------------------------------------------
407
+ // Public entry points
408
+ // ---------------------------------------------------------------------------
409
+ /** No key the case-style pass declines to fold. */
410
+ const NO_KEYS = new Set();
411
+ /**
412
+ * Runs both pre-parse stages in one order and collects what they changed.
413
+ * Emits nothing: the parse has not yet decided which attempt the handler
414
+ * receives.
415
+ */
416
+ function runStages(def, args, options, order) {
417
+ if (args === null || typeof args !== 'object' || Array.isArray(args)) {
418
+ return { args, changes: [] };
419
+ }
325
420
  const plan = planFor(def.input);
326
421
  if (plan.variants.length === 0)
327
- return args;
422
+ return { args, changes: [] };
423
+ const ignoreList = ignoreListFor(options);
328
424
  const record = args;
329
- return applyAliases(def, dropIgnoredKeys(def, record, plan, options, context), plan, options, context);
425
+ if (order === 'drop-first') {
426
+ // The drop has already removed every undeclared ignore-listed key, so the
427
+ // case-style pass folds whatever is left, exactly as it always has.
428
+ const drop = dropIgnoredKeys(record, plan, options, ignoreList);
429
+ const rewrite = applyAliases(def, drop.args, plan, options, NO_KEYS);
430
+ const changes = [...drop.changes, ...rewrite.changes];
431
+ return attempt(rewrite.args, changes, rewrite.aliased, drop.ignored);
432
+ }
433
+ const rewrite = applyAliases(def, record, plan, options, ignoreList);
434
+ const drop = dropIgnoredKeys(rewrite.args, plan, options, ignoreList);
435
+ return attempt(drop.args, [...rewrite.changes, ...drop.changes], rewrite.aliased, drop.ignored);
436
+ }
437
+ /** One attempt, carrying a report only when a rewrite or an underscore-rule drop happened. */
438
+ function attempt(args, changes, aliased, ignored) {
439
+ if (aliased.length === 0 && ignored.length === 0)
440
+ return { args, changes };
441
+ return { args, changes, report: { aliased, ignored } };
330
442
  }
331
443
  /**
332
- * Parses back a string whose trimmed form is a JSON array, at each path the
333
- * failed parse's issues named. Keys are never added, dropped, or renamed, and
334
- * a value no issue points at is returned untouched.
444
+ * Runs the pre-parse half of the step in its first order — drop client-added
445
+ * keys, then rewrite key aliases — and returns the arguments to parse, with
446
+ * what the two stages changed that the caller wrote.
447
+ *
448
+ * `args` is the caller's own object when nothing applied. Non-object arguments
449
+ * are handed straight back: the schema's own rejection already says what
450
+ * arrived.
451
+ */
452
+ export function prevalidateToolArguments(def, args, options) {
453
+ return runStages(def, args, options, 'drop-first');
454
+ }
455
+ /**
456
+ * The retry for a call whose first attempt failed (#563): the same stages with
457
+ * the alias stage first, so a key the drop discarded — an underscore spelling
458
+ * of a declared key, a declared `_q` alias, an ignore-listed key a declared
459
+ * alias names — reaches the rewrite. An underscore-prefixed key the alias stage
460
+ * cannot resolve is still dropped after it.
461
+ *
462
+ * `undefined` when there is nothing to retry: the first attempt dropped no key,
463
+ * or this order hands the parse the same arguments, which would only repeat
464
+ * the first attempt's failure.
465
+ */
466
+ export function prevalidateAliasFirst(def, args, first, options) {
467
+ if (!first.changes.some((change) => change.kind === 'dropped'))
468
+ return undefined;
469
+ const retry = runStages(def, args, options, 'alias-first');
470
+ // A drop means the arguments were an object, and both orders hand back one.
471
+ const same = sameArguments(retry.args, first.args);
472
+ return same ? undefined : retry;
473
+ }
474
+ /**
475
+ * Whether two orderings of the stages produced the same arguments. Both only
476
+ * move and delete keys of one caller object, never touching a value, so the
477
+ * same key set holding the same values is the same parse.
478
+ */
479
+ function sameArguments(a, b) {
480
+ const keys = Object.keys(a);
481
+ return (keys.length === Object.keys(b).length &&
482
+ keys.every((key) => Object.hasOwn(b, key) && Object.is(a[key], b[key])));
483
+ }
484
+ /**
485
+ * Undoes a representation slip at each path the failed parse's issues named:
486
+ * a string whose trimmed form is a JSON array or object is parsed back into
487
+ * what it encodes (#234, #479), and a safe integer where a string was expected
488
+ * becomes its decimal string (#487). Keys are never added, dropped, or renamed,
489
+ * and a value no issue points at is returned untouched.
335
490
  *
336
491
  * **Targeted, not a full walk.** A rejection names exactly the values the schema
337
492
  * could not accept, and repairing anything else loses repairs that should have
@@ -339,43 +494,104 @@ export function prevalidateToolArguments(def, args, options, context) {
339
494
  * free-text field legitimately holding `"[1,2]"` would have both rewritten, the
340
495
  * re-parse would fail on the free-text field, and the whole call would be
341
496
  * rejected over a value that was valid all along. An `invalid_union` issue's
342
- * outer path counts like any other — that is the value the union rejected.
497
+ * outer path counts like any other — that is the value the union rejected, and
498
+ * the only one read: a number inside one branch of a union field stays as sent.
343
499
  *
344
- * `JSON.parse` is the exact inverse of the `JSON.stringify` that produced the
345
- * value, so this undoes a known encoding rather than matching a nearest
346
- * candidate — the distinction that makes it safe where nearest-key matching is
347
- * not (#232). Safety does not rest on that alone: {@link parseToolArguments}
348
- * runs this only after validation has already failed and keeps the result only
349
- * when it then passes.
500
+ * **One pass, no stacking.** Only a value the first parse rejected is repaired,
501
+ * and at most once, so a value one repair produced is never repaired again — an
502
+ * integer inside a stringified array, a stringified field inside a stringified
503
+ * object. The caller re-parses once.
350
504
  *
351
- * Returns the argument itself when nothing was repairable, which is the signal
352
- * the caller uses to skip the second parse.
505
+ * `JSON.parse` is the exact inverse of the `JSON.stringify` that produced a
506
+ * string, and `String(n)` of a safe integer is the digits the caller sent, so
507
+ * each repair undoes a known encoding rather than matching a nearest candidate —
508
+ * the distinction that makes it safe where nearest-key matching is not (#232).
509
+ * Safety does not rest on that alone: {@link parseToolArguments} runs this only
510
+ * after validation has already failed and keeps the result only when it then
511
+ * passes.
512
+ *
513
+ * `args` is the argument itself when nothing was repairable, which is the
514
+ * signal the caller uses to skip the second parse.
353
515
  */
354
516
  export function repairRepresentations(args, issues) {
355
517
  let repaired = args;
518
+ const fired = new Set();
356
519
  for (const issue of issues) {
357
520
  if (issue.path.length === 0)
358
521
  continue;
359
522
  const current = readAt(repaired, issue.path);
360
- const next = repairValue(current);
361
- if (next !== current)
362
- repaired = writeAt(repaired, issue.path, next);
523
+ const repair = repairValue(current, issue);
524
+ if (repair) {
525
+ repaired = writeAt(repaired, issue.path, repair.value);
526
+ fired.add(repair.kind);
527
+ }
363
528
  }
364
- return repaired;
529
+ return {
530
+ args: repaired,
531
+ kinds: Object.keys(COERCION_KINDS).filter((kind) => fired.has(kind)),
532
+ };
365
533
  }
366
- /** The one repair: a JSON-array string back into the array it encodes. */
367
- function repairValue(value) {
534
+ /**
535
+ * The repair for one value the parse rejected, or `undefined` when none applies.
536
+ *
537
+ * A string is decoded only when its trimmed form opens a JSON array or object —
538
+ * the grammar then guarantees the decoded kind. A number becomes a string only
539
+ * when it is a safe integer other than `-0` (`String(-0)` is `"0"`, and an
540
+ * unsafe integer already lost digits in `JSON.parse`), and only when the issue
541
+ * says it failed for being a number ({@link failedAsNumber}).
542
+ */
543
+ function repairValue(value, issue) {
544
+ if (typeof value === 'number') {
545
+ return Number.isSafeInteger(value) && !Object.is(value, -0) && failedAsNumber(issue)
546
+ ? { kind: 'integer_as_string', value: String(value) }
547
+ : undefined;
548
+ }
368
549
  if (typeof value !== 'string')
369
- return value;
550
+ return undefined;
370
551
  const trimmed = value.trim();
371
- if (!trimmed.startsWith('['))
372
- return value;
552
+ const kind = trimmed.startsWith('[')
553
+ ? 'stringified_array'
554
+ : trimmed.startsWith('{')
555
+ ? 'stringified_object'
556
+ : undefined;
557
+ if (!kind)
558
+ return undefined;
373
559
  try {
374
- const parsed = JSON.parse(trimmed);
375
- return Array.isArray(parsed) ? parsed : value;
560
+ return { kind, value: JSON.parse(trimmed) };
376
561
  }
377
562
  catch {
378
- return value;
563
+ return undefined;
564
+ }
565
+ }
566
+ /**
567
+ * Whether an issue says its value failed for being a number, rather than for
568
+ * failing a number's own check — the gate that keeps the integer repair from
569
+ * laundering a number into a string branch (#487).
570
+ *
571
+ * - `invalid_type` — the value's type is what the schema there refused.
572
+ * - `invalid_value` listing only strings — a `z.enum` or string literal.
573
+ * - `invalid_union` whose every branch failed one of those two ways at its own
574
+ * root.
575
+ *
576
+ * Anything else keeps its rejection. `-1` against
577
+ * `z.union([z.number().int().positive(), z.string()])` arrives as the number
578
+ * branch's own `too_small` — that union takes numbers, and `"-1"` would slip
579
+ * past the author's constraint through the string branch — and `6` against
580
+ * `z.union([z.literal(5), z.string()])` fails a branch that lists a number. A
581
+ * discriminator mismatch reports no branches and never passes.
582
+ */
583
+ function failedAsNumber(issue) {
584
+ switch (issue.code) {
585
+ case 'invalid_type':
586
+ return true;
587
+ case 'invalid_value':
588
+ return issue.values.length > 0 && issue.values.every((value) => typeof value === 'string');
589
+ case 'invalid_union':
590
+ return (issue.errors.length > 0 &&
591
+ issue.errors.every((branch) => branch.length > 0 &&
592
+ branch.every((branchIssue) => branchIssue.path.length === 0 && failedAsNumber(branchIssue))));
593
+ default:
594
+ return false;
379
595
  }
380
596
  }
381
597
  /** The value at `path`, or `undefined` when nothing owns one there. */
@@ -1 +1 @@
1
- {"version":3,"file":"inputPrevalidation.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/utils/inputPrevalidation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAKH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAEL,qBAAqB,EACrB,SAAS,GACV,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAoCrF;;;;GAIG;AACH,MAAM,qBAAqB,GAAsB,CAAC,OAAO,EAAE,uBAAuB,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