@cyanheads/mcp-ts-core 0.11.5 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/AGENTS.md +27 -23
  2. package/CLAUDE.md +27 -23
  3. package/README.md +10 -10
  4. package/biome.json +1 -1
  5. package/changelog/0.12.x/0.12.0.md +96 -0
  6. package/changelog/0.12.x/0.12.1.md +26 -0
  7. package/dist/cli/init.js +1 -1
  8. package/dist/cli/init.js.map +1 -1
  9. package/dist/config/index.d.ts +9 -18
  10. package/dist/config/index.d.ts.map +1 -1
  11. package/dist/config/index.js +21 -28
  12. package/dist/config/index.js.map +1 -1
  13. package/dist/core/app.d.ts +27 -7
  14. package/dist/core/app.d.ts.map +1 -1
  15. package/dist/core/app.js +28 -28
  16. package/dist/core/app.js.map +1 -1
  17. package/dist/core/context.d.ts +90 -57
  18. package/dist/core/context.d.ts.map +1 -1
  19. package/dist/core/context.js +32 -33
  20. package/dist/core/context.js.map +1 -1
  21. package/dist/core/gcPressure.d.ts.map +1 -1
  22. package/dist/core/gcPressure.js +3 -4
  23. package/dist/core/gcPressure.js.map +1 -1
  24. package/dist/core/index.d.ts +6 -7
  25. package/dist/core/index.d.ts.map +1 -1
  26. package/dist/core/index.js +10 -2
  27. package/dist/core/index.js.map +1 -1
  28. package/dist/core/serverManifest.d.ts +6 -4
  29. package/dist/core/serverManifest.d.ts.map +1 -1
  30. package/dist/core/serverManifest.js +37 -14
  31. package/dist/core/serverManifest.js.map +1 -1
  32. package/dist/core/worker.d.ts.map +1 -1
  33. package/dist/core/worker.js +34 -37
  34. package/dist/core/worker.js.map +1 -1
  35. package/dist/linter/rules/enrichment-rules.d.ts.map +1 -1
  36. package/dist/linter/rules/enrichment-rules.js +5 -2
  37. package/dist/linter/rules/enrichment-rules.js.map +1 -1
  38. package/dist/linter/rules/portability-rules.d.ts +4 -2
  39. package/dist/linter/rules/portability-rules.d.ts.map +1 -1
  40. package/dist/linter/rules/portability-rules.js +33 -4
  41. package/dist/linter/rules/portability-rules.js.map +1 -1
  42. package/dist/linter/rules/schema-rules.d.ts +10 -3
  43. package/dist/linter/rules/schema-rules.d.ts.map +1 -1
  44. package/dist/linter/rules/schema-rules.js +52 -25
  45. package/dist/linter/rules/schema-rules.js.map +1 -1
  46. package/dist/linter/rules/tool-rules.d.ts.map +1 -1
  47. package/dist/linter/rules/tool-rules.js +5 -2
  48. package/dist/linter/rules/tool-rules.js.map +1 -1
  49. package/dist/linter/types.d.ts +2 -1
  50. package/dist/linter/types.d.ts.map +1 -1
  51. package/dist/logs/combined.log +10 -22
  52. package/dist/logs/error.log +6 -18
  53. package/dist/mcp-server/inputRequired.d.ts +52 -0
  54. package/dist/mcp-server/inputRequired.d.ts.map +1 -0
  55. package/dist/mcp-server/inputRequired.js +76 -0
  56. package/dist/mcp-server/inputRequired.js.map +1 -0
  57. package/dist/mcp-server/notifications.d.ts +103 -34
  58. package/dist/mcp-server/notifications.d.ts.map +1 -1
  59. package/dist/mcp-server/notifications.js +104 -29
  60. package/dist/mcp-server/notifications.js.map +1 -1
  61. package/dist/mcp-server/prompts/prompt-registration.d.ts +2 -2
  62. package/dist/mcp-server/prompts/prompt-registration.d.ts.map +1 -1
  63. package/dist/mcp-server/prompts/prompt-registration.js +15 -5
  64. package/dist/mcp-server/prompts/prompt-registration.js.map +1 -1
  65. package/dist/mcp-server/prompts/utils/promptDefinition.d.ts +1 -1
  66. package/dist/mcp-server/prompts/utils/promptDefinition.d.ts.map +1 -1
  67. package/dist/mcp-server/resources/resource-registration.d.ts +3 -3
  68. package/dist/mcp-server/resources/resource-registration.d.ts.map +1 -1
  69. package/dist/mcp-server/resources/resource-registration.js +9 -15
  70. package/dist/mcp-server/resources/resource-registration.js.map +1 -1
  71. package/dist/mcp-server/resources/resourceSubscriptions.d.ts +45 -0
  72. package/dist/mcp-server/resources/resourceSubscriptions.d.ts.map +1 -0
  73. package/dist/mcp-server/resources/resourceSubscriptions.js +51 -0
  74. package/dist/mcp-server/resources/resourceSubscriptions.js.map +1 -0
  75. package/dist/mcp-server/resources/utils/resourceDefinition.d.ts +3 -5
  76. package/dist/mcp-server/resources/utils/resourceDefinition.d.ts.map +1 -1
  77. package/dist/mcp-server/resources/utils/resourceDefinition.js +1 -1
  78. package/dist/mcp-server/resources/utils/resourceDefinition.js.map +1 -1
  79. package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts +18 -17
  80. package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts.map +1 -1
  81. package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +39 -39
  82. package/dist/mcp-server/resources/utils/resourceHandlerFactory.js.map +1 -1
  83. package/dist/mcp-server/server.d.ts +20 -21
  84. package/dist/mcp-server/server.d.ts.map +1 -1
  85. package/dist/mcp-server/server.js +42 -28
  86. package/dist/mcp-server/server.js.map +1 -1
  87. package/dist/mcp-server/tools/tool-registration.d.ts +11 -33
  88. package/dist/mcp-server/tools/tool-registration.d.ts.map +1 -1
  89. package/dist/mcp-server/tools/tool-registration.js +18 -243
  90. package/dist/mcp-server/tools/tool-registration.js.map +1 -1
  91. package/dist/mcp-server/tools/utils/schemaShape.d.ts +27 -0
  92. package/dist/mcp-server/tools/utils/schemaShape.d.ts.map +1 -0
  93. package/dist/mcp-server/tools/utils/schemaShape.js +43 -0
  94. package/dist/mcp-server/tools/utils/schemaShape.js.map +1 -0
  95. package/dist/mcp-server/tools/utils/toolDefinition.d.ts +28 -8
  96. package/dist/mcp-server/tools/utils/toolDefinition.d.ts.map +1 -1
  97. package/dist/mcp-server/tools/utils/toolDefinition.js +63 -1
  98. package/dist/mcp-server/tools/utils/toolDefinition.js.map +1 -1
  99. package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts +54 -20
  100. package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts.map +1 -1
  101. package/dist/mcp-server/tools/utils/toolHandlerFactory.js +156 -44
  102. package/dist/mcp-server/tools/utils/toolHandlerFactory.js.map +1 -1
  103. package/dist/mcp-server/transports/ITransport.d.ts +2 -2
  104. package/dist/mcp-server/transports/ITransport.d.ts.map +1 -1
  105. package/dist/mcp-server/transports/auth/authFactory.js +1 -1
  106. package/dist/mcp-server/transports/auth/authFactory.js.map +1 -1
  107. package/dist/mcp-server/transports/auth/lib/authTypes.d.ts +1 -1
  108. package/dist/mcp-server/transports/auth/lib/authTypes.d.ts.map +1 -1
  109. package/dist/mcp-server/transports/auth/lib/authUtils.d.ts.map +1 -1
  110. package/dist/mcp-server/transports/auth/lib/authUtils.js +5 -13
  111. package/dist/mcp-server/transports/auth/lib/authUtils.js.map +1 -1
  112. package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js +5 -11
  113. package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js.map +1 -1
  114. package/dist/mcp-server/transports/auth/strategies/oauthStrategy.d.ts.map +1 -1
  115. package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js +9 -22
  116. package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js.map +1 -1
  117. package/dist/mcp-server/transports/heartbeat.d.ts.map +1 -1
  118. package/dist/mcp-server/transports/heartbeat.js +4 -8
  119. package/dist/mcp-server/transports/heartbeat.js.map +1 -1
  120. package/dist/mcp-server/transports/http/eventStore.d.ts +57 -0
  121. package/dist/mcp-server/transports/http/eventStore.d.ts.map +1 -0
  122. package/dist/mcp-server/transports/http/eventStore.js +114 -0
  123. package/dist/mcp-server/transports/http/eventStore.js.map +1 -0
  124. package/dist/mcp-server/transports/http/httpErrorHandler.d.ts.map +1 -1
  125. package/dist/mcp-server/transports/http/httpErrorHandler.js +6 -24
  126. package/dist/mcp-server/transports/http/httpErrorHandler.js.map +1 -1
  127. package/dist/mcp-server/transports/http/httpServer.d.ts +4 -3
  128. package/dist/mcp-server/transports/http/httpServer.d.ts.map +1 -1
  129. package/dist/mcp-server/transports/http/httpServer.js +16 -33
  130. package/dist/mcp-server/transports/http/httpServer.js.map +1 -1
  131. package/dist/mcp-server/transports/http/httpTransport.d.ts +30 -8
  132. package/dist/mcp-server/transports/http/httpTransport.d.ts.map +1 -1
  133. package/dist/mcp-server/transports/http/httpTransport.js +180 -374
  134. package/dist/mcp-server/transports/http/httpTransport.js.map +1 -1
  135. package/dist/mcp-server/transports/http/landing-page/assets/styles.d.ts.map +1 -1
  136. package/dist/mcp-server/transports/http/landing-page/assets/styles.js +0 -1
  137. package/dist/mcp-server/transports/http/landing-page/assets/styles.js.map +1 -1
  138. package/dist/mcp-server/transports/http/landing-page/handler.d.ts.map +1 -1
  139. package/dist/mcp-server/transports/http/landing-page/handler.js +4 -8
  140. package/dist/mcp-server/transports/http/landing-page/handler.js.map +1 -1
  141. package/dist/mcp-server/transports/http/landing-page/sections/tools.js +22 -4
  142. package/dist/mcp-server/transports/http/landing-page/sections/tools.js.map +1 -1
  143. package/dist/mcp-server/transports/http/protectedResourceMetadata.d.ts.map +1 -1
  144. package/dist/mcp-server/transports/http/protectedResourceMetadata.js +2 -6
  145. package/dist/mcp-server/transports/http/protectedResourceMetadata.js.map +1 -1
  146. package/dist/mcp-server/transports/http/robotsTxt.js +2 -2
  147. package/dist/mcp-server/transports/http/robotsTxt.js.map +1 -1
  148. package/dist/mcp-server/transports/http/serverCard.d.ts.map +1 -1
  149. package/dist/mcp-server/transports/http/serverCard.js +2 -6
  150. package/dist/mcp-server/transports/http/serverCard.js.map +1 -1
  151. package/dist/mcp-server/transports/http/sessionStore.d.ts +46 -66
  152. package/dist/mcp-server/transports/http/sessionStore.d.ts.map +1 -1
  153. package/dist/mcp-server/transports/http/sessionStore.js +140 -238
  154. package/dist/mcp-server/transports/http/sessionStore.js.map +1 -1
  155. package/dist/mcp-server/transports/manager.d.ts +21 -4
  156. package/dist/mcp-server/transports/manager.d.ts.map +1 -1
  157. package/dist/mcp-server/transports/manager.js +40 -34
  158. package/dist/mcp-server/transports/manager.js.map +1 -1
  159. package/dist/mcp-server/transports/stdio/stdioTransport.d.ts +24 -31
  160. package/dist/mcp-server/transports/stdio/stdioTransport.d.ts.map +1 -1
  161. package/dist/mcp-server/transports/stdio/stdioTransport.js +23 -38
  162. package/dist/mcp-server/transports/stdio/stdioTransport.js.map +1 -1
  163. package/dist/mcp-server/types.d.ts +25 -0
  164. package/dist/mcp-server/types.d.ts.map +1 -0
  165. package/dist/mcp-server/types.js +10 -0
  166. package/dist/mcp-server/types.js.map +1 -0
  167. package/dist/services/canvas/core/CanvasInstance.d.ts +2 -2
  168. package/dist/services/canvas/core/CanvasInstance.d.ts.map +1 -1
  169. package/dist/services/canvas/core/CanvasInstance.js.map +1 -1
  170. package/dist/services/canvas/core/CanvasRegistry.d.ts +4 -4
  171. package/dist/services/canvas/core/CanvasRegistry.d.ts.map +1 -1
  172. package/dist/services/canvas/core/CanvasRegistry.js +8 -18
  173. package/dist/services/canvas/core/CanvasRegistry.js.map +1 -1
  174. package/dist/services/canvas/core/DataCanvas.d.ts +5 -5
  175. package/dist/services/canvas/core/DataCanvas.d.ts.map +1 -1
  176. package/dist/services/canvas/core/DataCanvas.js +2 -3
  177. package/dist/services/canvas/core/DataCanvas.js.map +1 -1
  178. package/dist/services/canvas/core/IDataCanvasProvider.d.ts +11 -11
  179. package/dist/services/canvas/core/IDataCanvasProvider.d.ts.map +1 -1
  180. package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts +11 -11
  181. package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts.map +1 -1
  182. package/dist/services/canvas/providers/duckdb/DuckdbProvider.js +4 -10
  183. package/dist/services/canvas/providers/duckdb/DuckdbProvider.js.map +1 -1
  184. package/dist/services/llm/providers/openrouter.provider.d.ts.map +1 -1
  185. package/dist/services/llm/providers/openrouter.provider.js +2 -5
  186. package/dist/services/llm/providers/openrouter.provider.js.map +1 -1
  187. package/dist/services/mirror/core/defineMirror.js +1 -1
  188. package/dist/services/mirror/core/defineMirror.js.map +1 -1
  189. package/dist/services/mirror/types.d.ts +5 -5
  190. package/dist/services/mirror/types.d.ts.map +1 -1
  191. package/dist/services/speech/providers/elevenlabs.provider.js +1 -1
  192. package/dist/services/speech/providers/elevenlabs.provider.js.map +1 -1
  193. package/dist/services/speech/providers/whisper.provider.js +1 -1
  194. package/dist/services/speech/providers/whisper.provider.js.map +1 -1
  195. package/dist/storage/core/StorageService.d.ts +1 -1
  196. package/dist/storage/core/StorageService.d.ts.map +1 -1
  197. package/dist/storage/core/StorageService.js +12 -20
  198. package/dist/storage/core/StorageService.js.map +1 -1
  199. package/dist/storage/core/storageFactory.d.ts.map +1 -1
  200. package/dist/storage/core/storageFactory.js.map +1 -1
  201. package/dist/storage/core/storageValidation.d.ts +1 -1
  202. package/dist/storage/core/storageValidation.d.ts.map +1 -1
  203. package/dist/storage/core/storageValidation.js +2 -2
  204. package/dist/storage/core/storageValidation.js.map +1 -1
  205. package/dist/storage/providers/cloudflare/d1Provider.d.ts +1 -1
  206. package/dist/storage/providers/cloudflare/d1Provider.d.ts.map +1 -1
  207. package/dist/storage/providers/cloudflare/d1Provider.js +4 -12
  208. package/dist/storage/providers/cloudflare/d1Provider.js.map +1 -1
  209. package/dist/storage/providers/cloudflare/kvProvider.d.ts +1 -1
  210. package/dist/storage/providers/cloudflare/kvProvider.d.ts.map +1 -1
  211. package/dist/storage/providers/cloudflare/kvProvider.js +3 -8
  212. package/dist/storage/providers/cloudflare/kvProvider.js.map +1 -1
  213. package/dist/storage/providers/cloudflare/r2Provider.d.ts +1 -1
  214. package/dist/storage/providers/cloudflare/r2Provider.d.ts.map +1 -1
  215. package/dist/storage/providers/cloudflare/r2Provider.js +3 -8
  216. package/dist/storage/providers/cloudflare/r2Provider.js.map +1 -1
  217. package/dist/storage/providers/inMemory/inMemoryProvider.d.ts +1 -1
  218. package/dist/storage/providers/inMemory/inMemoryProvider.d.ts.map +1 -1
  219. package/dist/storage/providers/inMemory/inMemoryProvider.js +2 -4
  220. package/dist/storage/providers/inMemory/inMemoryProvider.js.map +1 -1
  221. package/dist/testing/fuzz.d.ts +7 -4
  222. package/dist/testing/fuzz.d.ts.map +1 -1
  223. package/dist/testing/fuzz.js +13 -5
  224. package/dist/testing/fuzz.js.map +1 -1
  225. package/dist/testing/index.d.ts +35 -12
  226. package/dist/testing/index.d.ts.map +1 -1
  227. package/dist/testing/index.js +53 -38
  228. package/dist/testing/index.js.map +1 -1
  229. package/dist/testing/vitest.d.ts +1 -1
  230. package/dist/testing/vitest.d.ts.map +1 -1
  231. package/dist/types-global/errors.d.ts +28 -15
  232. package/dist/types-global/errors.d.ts.map +1 -1
  233. package/dist/types-global/errors.js +8 -1
  234. package/dist/types-global/errors.js.map +1 -1
  235. package/dist/utils/formatting/diffFormatter.d.ts +5 -5
  236. package/dist/utils/formatting/diffFormatter.d.ts.map +1 -1
  237. package/dist/utils/formatting/diffFormatter.js +7 -20
  238. package/dist/utils/formatting/diffFormatter.js.map +1 -1
  239. package/dist/utils/formatting/tableFormatter.d.ts +3 -3
  240. package/dist/utils/formatting/tableFormatter.d.ts.map +1 -1
  241. package/dist/utils/formatting/tableFormatter.js +6 -17
  242. package/dist/utils/formatting/tableFormatter.js.map +1 -1
  243. package/dist/utils/formatting/treeFormatter.d.ts +3 -3
  244. package/dist/utils/formatting/treeFormatter.d.ts.map +1 -1
  245. package/dist/utils/formatting/treeFormatter.js +5 -18
  246. package/dist/utils/formatting/treeFormatter.js.map +1 -1
  247. package/dist/utils/index.d.ts +4 -2
  248. package/dist/utils/index.d.ts.map +1 -1
  249. package/dist/utils/index.js +2 -2
  250. package/dist/utils/index.js.map +1 -1
  251. package/dist/utils/internal/error-handler/errorHandler.d.ts +1 -1
  252. package/dist/utils/internal/error-handler/errorHandler.d.ts.map +1 -1
  253. package/dist/utils/internal/error-handler/errorHandler.js +23 -11
  254. package/dist/utils/internal/error-handler/errorHandler.js.map +1 -1
  255. package/dist/utils/internal/error-handler/types.d.ts +10 -13
  256. package/dist/utils/internal/error-handler/types.d.ts.map +1 -1
  257. package/dist/utils/internal/logger.d.ts +3 -3
  258. package/dist/utils/internal/logger.d.ts.map +1 -1
  259. package/dist/utils/internal/logger.js +11 -5
  260. package/dist/utils/internal/logger.js.map +1 -1
  261. package/dist/utils/internal/performance.d.ts +13 -5
  262. package/dist/utils/internal/performance.d.ts.map +1 -1
  263. package/dist/utils/internal/performance.js +76 -17
  264. package/dist/utils/internal/performance.js.map +1 -1
  265. package/dist/utils/internal/requestContext.d.ts +92 -55
  266. package/dist/utils/internal/requestContext.d.ts.map +1 -1
  267. package/dist/utils/internal/requestContext.js +120 -40
  268. package/dist/utils/internal/requestContext.js.map +1 -1
  269. package/dist/utils/metrics/tokenCounter.d.ts +3 -3
  270. package/dist/utils/metrics/tokenCounter.d.ts.map +1 -1
  271. package/dist/utils/metrics/tokenCounter.js.map +1 -1
  272. package/dist/utils/network/fetchWithTimeout.d.ts +2 -2
  273. package/dist/utils/network/fetchWithTimeout.d.ts.map +1 -1
  274. package/dist/utils/network/fetchWithTimeout.js +8 -24
  275. package/dist/utils/network/fetchWithTimeout.js.map +1 -1
  276. package/dist/utils/network/retry.d.ts +2 -2
  277. package/dist/utils/network/retry.d.ts.map +1 -1
  278. package/dist/utils/overflow/outlineOnOverflow.d.ts +1 -1
  279. package/dist/utils/overflow/outlineOnOverflow.d.ts.map +1 -1
  280. package/dist/utils/pagination/pagination.d.ts +3 -3
  281. package/dist/utils/pagination/pagination.d.ts.map +1 -1
  282. package/dist/utils/pagination/pagination.js +3 -3
  283. package/dist/utils/pagination/pagination.js.map +1 -1
  284. package/dist/utils/parsing/csvParser.d.ts +2 -2
  285. package/dist/utils/parsing/csvParser.d.ts.map +1 -1
  286. package/dist/utils/parsing/csvParser.js +4 -8
  287. package/dist/utils/parsing/csvParser.js.map +1 -1
  288. package/dist/utils/parsing/dateParser.d.ts +3 -3
  289. package/dist/utils/parsing/dateParser.d.ts.map +1 -1
  290. package/dist/utils/parsing/dateParser.js +3 -2
  291. package/dist/utils/parsing/dateParser.js.map +1 -1
  292. package/dist/utils/parsing/frontmatterParser.d.ts +2 -2
  293. package/dist/utils/parsing/frontmatterParser.d.ts.map +1 -1
  294. package/dist/utils/parsing/frontmatterParser.js +7 -10
  295. package/dist/utils/parsing/frontmatterParser.js.map +1 -1
  296. package/dist/utils/parsing/htmlExtractor.d.ts +2 -2
  297. package/dist/utils/parsing/htmlExtractor.d.ts.map +1 -1
  298. package/dist/utils/parsing/htmlExtractor.js +6 -11
  299. package/dist/utils/parsing/htmlExtractor.js.map +1 -1
  300. package/dist/utils/parsing/jsonParser.d.ts +2 -2
  301. package/dist/utils/parsing/jsonParser.d.ts.map +1 -1
  302. package/dist/utils/parsing/jsonParser.js +4 -8
  303. package/dist/utils/parsing/jsonParser.js.map +1 -1
  304. package/dist/utils/parsing/pdfParser.d.ts +10 -10
  305. package/dist/utils/parsing/pdfParser.d.ts.map +1 -1
  306. package/dist/utils/parsing/pdfParser.js +26 -89
  307. package/dist/utils/parsing/pdfParser.js.map +1 -1
  308. package/dist/utils/parsing/xmlParser.d.ts +2 -2
  309. package/dist/utils/parsing/xmlParser.d.ts.map +1 -1
  310. package/dist/utils/parsing/xmlParser.js +4 -8
  311. package/dist/utils/parsing/xmlParser.js.map +1 -1
  312. package/dist/utils/parsing/yamlParser.d.ts +2 -2
  313. package/dist/utils/parsing/yamlParser.d.ts.map +1 -1
  314. package/dist/utils/parsing/yamlParser.js +4 -8
  315. package/dist/utils/parsing/yamlParser.js.map +1 -1
  316. package/dist/utils/scheduling/scheduler.d.ts.map +1 -1
  317. package/dist/utils/scheduling/scheduler.js +5 -6
  318. package/dist/utils/scheduling/scheduler.js.map +1 -1
  319. package/dist/utils/security/rateLimiter.d.ts +2 -2
  320. package/dist/utils/security/rateLimiter.d.ts.map +1 -1
  321. package/dist/utils/security/rateLimiter.js +1 -1
  322. package/dist/utils/security/rateLimiter.js.map +1 -1
  323. package/dist/utils/telemetry/attributes.d.ts +23 -7
  324. package/dist/utils/telemetry/attributes.d.ts.map +1 -1
  325. package/dist/utils/telemetry/attributes.js +23 -10
  326. package/dist/utils/telemetry/attributes.js.map +1 -1
  327. package/dist/utils/telemetry/trace.d.ts +3 -3
  328. package/dist/utils/telemetry/trace.d.ts.map +1 -1
  329. package/dist/utils/telemetry/trace.js +4 -2
  330. package/dist/utils/telemetry/trace.js.map +1 -1
  331. package/package.json +22 -26
  332. package/scripts/lint-mcp.ts +1 -3
  333. package/scripts/lint-packaging.ts +1 -1
  334. package/skills/add-service/SKILL.md +2 -2
  335. package/skills/add-test/SKILL.md +42 -20
  336. package/skills/add-tool/SKILL.md +103 -19
  337. package/skills/api-config/SKILL.md +4 -11
  338. package/skills/api-context/SKILL.md +216 -120
  339. package/skills/api-linter/SKILL.md +16 -3
  340. package/skills/api-telemetry/SKILL.md +10 -12
  341. package/skills/api-testing/SKILL.md +53 -52
  342. package/skills/api-workers/SKILL.md +9 -1
  343. package/skills/code-simplifier/SKILL.md +2 -2
  344. package/skills/design-mcp-server/SKILL.md +31 -17
  345. package/skills/field-test/SKILL.md +4 -2
  346. package/skills/polish-docs-meta/SKILL.md +1 -1
  347. package/skills/polish-docs-meta/references/agent-protocol.md +2 -2
  348. package/skills/polish-docs-meta/references/readme.md +1 -1
  349. package/skills/release-and-publish/SKILL.md +3 -1
  350. package/skills/report-issue-framework/SKILL.md +2 -2
  351. package/skills/report-issue-local/SKILL.md +2 -2
  352. package/skills/security-pass/SKILL.md +16 -14
  353. package/skills/tool-defs-analysis/SKILL.md +15 -5
  354. package/templates/.env.example +4 -0
  355. package/templates/AGENTS.md +6 -6
  356. package/templates/CLAUDE.md +6 -6
  357. package/templates/tests/resources/echo.resource.test.ts +16 -9
  358. package/dist/mcp-server/elicitation.d.ts +0 -64
  359. package/dist/mcp-server/elicitation.d.ts.map +0 -1
  360. package/dist/mcp-server/elicitation.js +0 -81
  361. package/dist/mcp-server/elicitation.js.map +0 -1
  362. package/dist/mcp-server/protocolSession.d.ts +0 -34
  363. package/dist/mcp-server/protocolSession.d.ts.map +0 -1
  364. package/dist/mcp-server/protocolSession.js +0 -13
  365. package/dist/mcp-server/protocolSession.js.map +0 -1
  366. package/dist/mcp-server/tasks/core/evictingTaskMessageQueue.d.ts +0 -53
  367. package/dist/mcp-server/tasks/core/evictingTaskMessageQueue.d.ts.map +0 -1
  368. package/dist/mcp-server/tasks/core/evictingTaskMessageQueue.js +0 -65
  369. package/dist/mcp-server/tasks/core/evictingTaskMessageQueue.js.map +0 -1
  370. package/dist/mcp-server/tasks/core/sessionAwareTaskStore.d.ts +0 -70
  371. package/dist/mcp-server/tasks/core/sessionAwareTaskStore.d.ts.map +0 -1
  372. package/dist/mcp-server/tasks/core/sessionAwareTaskStore.js +0 -130
  373. package/dist/mcp-server/tasks/core/sessionAwareTaskStore.js.map +0 -1
  374. package/dist/mcp-server/tasks/core/storageBackedTaskStore.d.ts +0 -109
  375. package/dist/mcp-server/tasks/core/storageBackedTaskStore.d.ts.map +0 -1
  376. package/dist/mcp-server/tasks/core/storageBackedTaskStore.js +0 -209
  377. package/dist/mcp-server/tasks/core/storageBackedTaskStore.js.map +0 -1
  378. package/dist/mcp-server/tasks/core/taskManager.d.ts +0 -91
  379. package/dist/mcp-server/tasks/core/taskManager.d.ts.map +0 -1
  380. package/dist/mcp-server/tasks/core/taskManager.js +0 -210
  381. package/dist/mcp-server/tasks/core/taskManager.js.map +0 -1
  382. package/dist/mcp-server/tasks/core/taskTypes.d.ts +0 -18
  383. package/dist/mcp-server/tasks/core/taskTypes.d.ts.map +0 -1
  384. package/dist/mcp-server/tasks/core/taskTypes.js +0 -20
  385. package/dist/mcp-server/tasks/core/taskTypes.js.map +0 -1
  386. package/dist/mcp-server/tasks/utils/taskToolDefinition.d.ts +0 -101
  387. package/dist/mcp-server/tasks/utils/taskToolDefinition.d.ts.map +0 -1
  388. package/dist/mcp-server/tasks/utils/taskToolDefinition.js +0 -14
  389. package/dist/mcp-server/tasks/utils/taskToolDefinition.js.map +0 -1
@@ -4,7 +4,7 @@
4
4
  **Version:** 0.1.0
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^{{FRAMEWORK_VERSION}}`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/sdk` {{MCP_SDK_VERSION}}
7
+ **MCP SDK:** `@modelcontextprotocol/server` {{MCP_SDK_VERSION}}
8
8
  **Zod:** {{ZOD_VERSION}}
9
9
 
10
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
@@ -48,7 +48,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
48
48
  - **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
49
49
  - **Use `ctx.log`** for request-scoped logging. No `console` calls.
50
50
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
51
- - **Check `ctx.elicit`** for presence before calling.
51
+ - **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler.
52
52
  - **Secrets in env vars only** — never hardcoded.
53
53
  - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
54
54
 
@@ -181,13 +181,13 @@ Handlers receive a unified `ctx` object. Key properties:
181
181
 
182
182
  | Property | Description |
183
183
  |:---------|:------------|
184
- | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
184
+ | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. Dual-sink: Pino **and** `notifications/message` to the client, so treat it as client-visible. |
185
185
  | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
186
- | `ctx.elicit` | Ask user for structured input — form call `(message, schema)` or `.url(message, url)` for an external link. **Check for presence first:** `if (ctx.elicit) { ... }` |
186
+ | `ctx.requestInput` | Suspend and ask the caller for more input — `return ctx.requestInput({ inputRequests: { key: inputRequired.elicit({ message, requestedSchema }) } })`. Never returns; the handler is re-entered with the answers. Always present. |
187
+ | `ctx.inputs` | Reader over a retried request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped`. Empty on the first round. |
187
188
  | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
188
189
  | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
189
190
  | `ctx.signal` | `AbortSignal` for cancellation. |
190
- | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
191
191
  | `ctx.requestId` | Unique request ID. |
192
192
  | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
193
193
 
@@ -303,7 +303,7 @@ Available skills:
303
303
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
304
304
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
305
305
  | `api-config` | AppConfig, parseConfig, env vars |
306
- | `api-context` | Context interface, logger, state, progress |
306
+ | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
307
307
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
308
308
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
309
309
  | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
@@ -4,7 +4,7 @@
4
4
  **Version:** 0.1.0
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^{{FRAMEWORK_VERSION}}`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/sdk` {{MCP_SDK_VERSION}}
7
+ **MCP SDK:** `@modelcontextprotocol/server` {{MCP_SDK_VERSION}}
8
8
  **Zod:** {{ZOD_VERSION}}
9
9
 
10
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
@@ -48,7 +48,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
48
48
  - **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
49
49
  - **Use `ctx.log`** for request-scoped logging. No `console` calls.
50
50
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
51
- - **Check `ctx.elicit`** for presence before calling.
51
+ - **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler.
52
52
  - **Secrets in env vars only** — never hardcoded.
53
53
  - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
54
54
 
@@ -181,13 +181,13 @@ Handlers receive a unified `ctx` object. Key properties:
181
181
 
182
182
  | Property | Description |
183
183
  |:---------|:------------|
184
- | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
184
+ | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. Dual-sink: Pino **and** `notifications/message` to the client, so treat it as client-visible. |
185
185
  | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
186
- | `ctx.elicit` | Ask user for structured input — form call `(message, schema)` or `.url(message, url)` for an external link. **Check for presence first:** `if (ctx.elicit) { ... }` |
186
+ | `ctx.requestInput` | Suspend and ask the caller for more input — `return ctx.requestInput({ inputRequests: { key: inputRequired.elicit({ message, requestedSchema }) } })`. Never returns; the handler is re-entered with the answers. Always present. |
187
+ | `ctx.inputs` | Reader over a retried request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped`. Empty on the first round. |
187
188
  | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
188
189
  | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
189
190
  | `ctx.signal` | `AbortSignal` for cancellation. |
190
- | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
191
191
  | `ctx.requestId` | Unique request ID. |
192
192
  | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
193
193
 
@@ -303,7 +303,7 @@ Available skills:
303
303
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
304
304
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
305
305
  | `api-config` | AppConfig, parseConfig, env vars |
306
- | `api-context` | Context interface, logger, state, progress |
306
+ | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
307
307
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
308
308
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
309
309
  | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
@@ -16,15 +16,22 @@ describe('echoResource', () => {
16
16
  });
17
17
 
18
18
  it('lists available resources', async () => {
19
- // `list` receives the SDK's request-handler extra, not a Context, and may be
20
- // async — a minimal literal is enough for a listing that ignores it.
21
- const extra = {
22
- signal: new AbortController().signal,
23
- requestId: 'test',
24
- sendNotification: () => Promise.resolve(),
25
- sendRequest: () => Promise.resolve({} as never),
26
- };
27
- const listing = await echoResource.list!(extra);
19
+ // `list` receives the SDK's `ServerContext`, not a handler `Context`, and
20
+ // may be async — a minimal literal is enough for a listing that ignores it.
21
+ const serverContext = {
22
+ mcpReq: {
23
+ id: 'test',
24
+ method: 'resources/list',
25
+ signal: new AbortController().signal,
26
+ requestState: () => undefined,
27
+ send: () => Promise.resolve({} as never),
28
+ notify: () => Promise.resolve(),
29
+ log: () => Promise.resolve(),
30
+ elicitInput: () => Promise.resolve({ action: 'cancel' as const }),
31
+ requestSampling: () => Promise.reject(new Error('not supported')),
32
+ },
33
+ } as unknown as Parameters<NonNullable<typeof echoResource.list>>[0];
34
+ const listing = await echoResource.list!(serverContext);
28
35
  expect(listing.resources).toHaveLength(1);
29
36
  expect(listing.resources[0]).toMatchObject({
30
37
  uri: 'echo://hello',
@@ -1,64 +0,0 @@
1
- /**
2
- * @fileoverview Shared elicitation plumbing for the tool and resource handler
3
- * factories.
4
- * @module src/mcp-server/elicitation
5
- */
6
- import type { RequestHandlerExtra } from '@modelcontextprotocol/sdk/shared/protocol.js';
7
- import { type ElicitRequestFormParams, type ElicitRequestURLParams, type ElicitResult, type ServerNotification, type ServerRequest } from '@modelcontextprotocol/sdk/types.js';
8
- import { type ZodObject, type ZodRawShape } from 'zod';
9
- import type { ElicitFn } from '../core/context.js';
10
- type SdkExtra = RequestHandlerExtra<ServerRequest, ServerNotification>;
11
- /**
12
- * The elicitation slice of the tool and resource notifier bundles.
13
- *
14
- * `elicitInput` and `getClientCapabilities` are bound at registration time to
15
- * the per-server `Server` instance so `wrapElicit` can gate `ctx.elicit` on the
16
- * client's advertised capability and forward elicitation requests on the wire.
17
- * Both are undefined where no connected client is available (the auto-task
18
- * background path).
19
- */
20
- export interface ElicitationNotifiers {
21
- /** Bound to `server.server.elicitInput.bind(server.server)`. */
22
- elicitInput?: (params: ElicitRequestFormParams | ElicitRequestURLParams) => Promise<ElicitResult>;
23
- /** Bound to `server.server.getClientCapabilities.bind(server.server)`. */
24
- getClientCapabilities?: () => {
25
- elicitation?: unknown;
26
- } | undefined;
27
- /** Route elicitation through RequestHandlerExtra.sendRequest on per-request servers. */
28
- requestScopedElicitation?: boolean;
29
- }
30
- /**
31
- * Validate an accepted elicitation payload against the schema its request
32
- * advertised.
33
- *
34
- * `Server.elicitInput` runs this check itself, but a per-request HTTP server
35
- * reaches the client through `RequestHandlerExtra.sendRequest` instead and so
36
- * bypasses it. Raising the SDK's own `InvalidParams` shape here keeps
37
- * `ctx.elicit`'s failure contract identical on both transports.
38
- *
39
- * @param schema - The Zod object the elicitation request was built from.
40
- * @param content - The `content` of an `accept` response.
41
- * @throws {McpError} `InvalidParams` when the payload does not satisfy `schema`.
42
- */
43
- export declare function assertElicitedContent(schema: ZodObject<ZodRawShape>, content: unknown): void;
44
- /**
45
- * Builds `ctx.elicit` from the notifiers bound at registration time.
46
- *
47
- * Returns `undefined` when:
48
- * - `elicitInput` was not bound (auto-task background path, or no server),
49
- * - the client did not advertise the elicitation capability (checked at
50
- * request time, after the initialize handshake populates capabilities).
51
- *
52
- * When defined, the returned function is an `ElicitFn`: directly callable for
53
- * form-mode elicitation (schema converted from ZodObject to the restricted
54
- * flat JSON Schema the MCP spec requires), plus a `.url(message, url)` helper
55
- * for URL-mode elicitation (elicitationId generated internally).
56
- *
57
- * CRITICAL: `requestedSchema` must be a plain JSON Schema object in the spec's
58
- * restricted flat form — passing a raw ZodObject causes AJV validation to
59
- * reject the request on the SDK side. `z.toJSONSchema(schema)` produces the
60
- * correct shape.
61
- */
62
- export declare function wrapElicit(notifiers: ElicitationNotifiers, sdkContext: SdkExtra): ElicitFn | undefined;
63
- export {};
64
- //# sourceMappingURL=elicitation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"elicitation.d.ts","sourceRoot":"","sources":["../../src/mcp-server/elicitation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EAEjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAgB,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAErE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,KAAK,QAAQ,GAAG,mBAAmB,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;AAEvE;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC,gEAAgE;IAChE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,uBAAuB,GAAG,sBAAsB,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAClG,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,MAAM;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;IACpE,wFAAwF;IACxF,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAU5F;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,oBAAoB,EAC/B,UAAU,EAAE,QAAQ,GACnB,QAAQ,GAAG,SAAS,CAgCtB"}
@@ -1,81 +0,0 @@
1
- /**
2
- * @fileoverview Shared elicitation plumbing for the tool and resource handler
3
- * factories.
4
- * @module src/mcp-server/elicitation
5
- */
6
- import { ElicitResultSchema, } from '@modelcontextprotocol/sdk/types.js';
7
- import { toJSONSchema } from 'zod';
8
- import { invalidParams } from '../types-global/errors.js';
9
- /**
10
- * Validate an accepted elicitation payload against the schema its request
11
- * advertised.
12
- *
13
- * `Server.elicitInput` runs this check itself, but a per-request HTTP server
14
- * reaches the client through `RequestHandlerExtra.sendRequest` instead and so
15
- * bypasses it. Raising the SDK's own `InvalidParams` shape here keeps
16
- * `ctx.elicit`'s failure contract identical on both transports.
17
- *
18
- * @param schema - The Zod object the elicitation request was built from.
19
- * @param content - The `content` of an `accept` response.
20
- * @throws {McpError} `InvalidParams` when the payload does not satisfy `schema`.
21
- */
22
- export function assertElicitedContent(schema, content) {
23
- const parsed = schema.safeParse(content);
24
- if (parsed.success)
25
- return;
26
- throw invalidParams('Elicitation response content does not match the requested schema.', {
27
- reason: 'elicitation_response_invalid',
28
- issues: parsed.error.issues.map((issue) => ({
29
- path: issue.path.join('.'),
30
- code: issue.code,
31
- })),
32
- });
33
- }
34
- /**
35
- * Builds `ctx.elicit` from the notifiers bound at registration time.
36
- *
37
- * Returns `undefined` when:
38
- * - `elicitInput` was not bound (auto-task background path, or no server),
39
- * - the client did not advertise the elicitation capability (checked at
40
- * request time, after the initialize handshake populates capabilities).
41
- *
42
- * When defined, the returned function is an `ElicitFn`: directly callable for
43
- * form-mode elicitation (schema converted from ZodObject to the restricted
44
- * flat JSON Schema the MCP spec requires), plus a `.url(message, url)` helper
45
- * for URL-mode elicitation (elicitationId generated internally).
46
- *
47
- * CRITICAL: `requestedSchema` must be a plain JSON Schema object in the spec's
48
- * restricted flat form — passing a raw ZodObject causes AJV validation to
49
- * reject the request on the SDK side. `z.toJSONSchema(schema)` produces the
50
- * correct shape.
51
- */
52
- export function wrapElicit(notifiers, sdkContext) {
53
- const { elicitInput, getClientCapabilities } = notifiers;
54
- if (typeof elicitInput !== 'function')
55
- return;
56
- // Capability check runs at request time (not registration time) so that
57
- // capabilities populated during the initialize handshake are visible.
58
- if (!getClientCapabilities?.()?.elicitation)
59
- return;
60
- const send = (params) => {
61
- if (!notifiers.requestScopedElicitation)
62
- return elicitInput(params);
63
- return sdkContext.sendRequest({ method: 'elicitation/create', params }, ElicitResultSchema);
64
- };
65
- const formFn = async (msg, schema) => {
66
- const requestedSchema = toJSONSchema(schema);
67
- const result = await send({ mode: 'form', message: msg, requestedSchema });
68
- if (notifiers.requestScopedElicitation && result.action === 'accept' && result.content) {
69
- assertElicitedContent(schema, result.content);
70
- }
71
- return result;
72
- };
73
- const urlFn = (msg, url) => {
74
- const elicitationId = crypto.randomUUID();
75
- return send({ mode: 'url', message: msg, elicitationId, url });
76
- };
77
- const elicitFn = formFn;
78
- elicitFn.url = urlFn;
79
- return elicitFn;
80
- }
81
- //# sourceMappingURL=elicitation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"elicitation.js","sourceRoot":"","sources":["../../src/mcp-server/elicitation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAIL,kBAAkB,GAGnB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAoC,MAAM,KAAK,CAAC;AAGrE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAsBzD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAA8B,EAAE,OAAgB;IACpF,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO;IAC3B,MAAM,aAAa,CAAC,mEAAmE,EAAE;QACvF,MAAM,EAAE,8BAA8B;QACtC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC1C,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;YAC1B,IAAI,EAAE,KAAK,CAAC,IAAI;SACjB,CAAC,CAAC;KACJ,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,UAAU,CACxB,SAA+B,EAC/B,UAAoB;IAEpB,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,GAAG,SAAS,CAAC;IACzD,IAAI,OAAO,WAAW,KAAK,UAAU;QAAE,OAAO;IAE9C,wEAAwE;IACxE,sEAAsE;IACtE,IAAI,CAAC,qBAAqB,EAAE,EAAE,EAAE,WAAW;QAAE,OAAO;IAEpD,MAAM,IAAI,GAAG,CACX,MAAwD,EACjC,EAAE;QACzB,IAAI,CAAC,SAAS,CAAC,wBAAwB;YAAE,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;QACpE,OAAO,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC;IAC9F,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,KAAK,EAAE,GAAW,EAAE,MAA8B,EAAyB,EAAE;QAC1F,MAAM,eAAe,GAAG,YAAY,CAAC,MAAM,CAA+C,CAAC;QAC3F,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC,CAAC;QAC3E,IAAI,SAAS,CAAC,wBAAwB,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACvF,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IAEF,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,GAAW,EAAyB,EAAE;QAChE,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;IACjE,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAkB,CAAC;IACpC,QAAQ,CAAC,GAAG,GAAG,KAAK,CAAC;IACrB,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,34 +0,0 @@
1
- /**
2
- * @fileoverview Request-spanning protocol state hooks for transports that
3
- * create a fresh MCP SDK server for every request.
4
- *
5
- * The SDK stores negotiated capabilities and cancellation controllers on a
6
- * `Server` instance. Streamable HTTP deliberately cannot reuse that instance
7
- * across requests (GHSA-345p-7cg4-v4c7), so the framework carries only the
8
- * minimal session state needed by handler contexts through these hooks.
9
- *
10
- * @module src/mcp-server/protocolSession
11
- */
12
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
13
- import type { ClientCapabilities, RequestId } from '@modelcontextprotocol/sdk/types.js';
14
- /** A cancellation signal registered for one in-flight JSON-RPC request. */
15
- export interface ProtocolRequestRegistration {
16
- /** Aborted when a matching `notifications/cancelled` reaches the session. */
17
- signal: AbortSignal;
18
- /** Removes only this registration; safe to call more than once. */
19
- unregister: () => void;
20
- }
21
- /**
22
- * State restored onto a per-request server from its durable HTTP session.
23
- * Undefined for stdio and stateless HTTP, where no cross-request restoration
24
- * is necessary or possible.
25
- */
26
- export interface ProtocolSessionHooks {
27
- /** Capabilities captured from the successful initialize request. */
28
- clientCapabilities?: ClientCapabilities;
29
- /** Registers a tool/resource request for cross-request cancellation. */
30
- registerRequest?: (requestId: RequestId) => ProtocolRequestRegistration;
31
- }
32
- /** Factory shared by stdio (no hooks) and per-request HTTP servers. */
33
- export type McpServerFactory = (session?: ProtocolSessionHooks) => Promise<McpServer>;
34
- //# sourceMappingURL=protocolSession.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protocolSession.d.ts","sourceRoot":"","sources":["../../src/mcp-server/protocolSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAExF,2EAA2E;AAC3E,MAAM,WAAW,2BAA2B;IAC1C,6EAA6E;IAC7E,MAAM,EAAE,WAAW,CAAC;IACpB,mEAAmE;IACnE,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,wEAAwE;IACxE,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,2BAA2B,CAAC;CACzE;AAED,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,CAAC,EAAE,oBAAoB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * @fileoverview Request-spanning protocol state hooks for transports that
3
- * create a fresh MCP SDK server for every request.
4
- *
5
- * The SDK stores negotiated capabilities and cancellation controllers on a
6
- * `Server` instance. Streamable HTTP deliberately cannot reuse that instance
7
- * across requests (GHSA-345p-7cg4-v4c7), so the framework carries only the
8
- * minimal session state needed by handler contexts through these hooks.
9
- *
10
- * @module src/mcp-server/protocolSession
11
- */
12
- export {};
13
- //# sourceMappingURL=protocolSession.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protocolSession.js","sourceRoot":"","sources":["../../src/mcp-server/protocolSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
@@ -1,53 +0,0 @@
1
- /**
2
- * @fileoverview A TaskMessageQueue wrapper that expires a task's queue on the
3
- * same schedule as the task itself.
4
- *
5
- * The SDK's `InMemoryTaskMessageQueue` deletes a queue only in `dequeueAll`,
6
- * which the SDK calls on `tasks/result` retrieval and `tasks/cancel`. Both
7
- * `enqueue` and `dequeue` allocate-and-keep a queue for any taskId they touch,
8
- * so a client that abandons a task — never fetching its result, never
9
- * cancelling — strands that queue and any messages in it for the life of the
10
- * process. Nothing in the SDK parallels the task store's TTL.
11
- *
12
- * @experimental These APIs are experimental and may change without notice.
13
- * @module src/mcp-server/tasks/core/evictingTaskMessageQueue
14
- */
15
- import type { QueuedMessage, TaskMessageQueue } from './taskTypes.js';
16
- /**
17
- * Wraps a {@link TaskMessageQueue} so each task's queue is reclaimed once its
18
- * TTL elapses.
19
- *
20
- * Eviction is lazy and traffic-driven rather than timer-based: a deadline is
21
- * refreshed whenever a task's queue is touched, expired queues are dropped on
22
- * the next operation, and `dequeueAll` releases the deadline outright. That
23
- * keeps the wrapper free of per-task timers and correct on runtimes where a
24
- * timer would never fire.
25
- *
26
- * @experimental
27
- */
28
- export declare class EvictingTaskMessageQueue implements TaskMessageQueue {
29
- private readonly inner;
30
- private readonly ttlMs;
31
- private readonly deadlines;
32
- /**
33
- * @param inner - Queue to delegate to.
34
- * @param ttlMs - Lifetime of an untouched queue. A non-positive value
35
- * disables eviction, matching a task store configured without a TTL.
36
- */
37
- constructor(inner: TaskMessageQueue, ttlMs: number);
38
- private get evicts();
39
- /**
40
- * Drain queues whose deadline has passed, then extend `taskId`'s.
41
- *
42
- * `dequeueAll` is the inner queue's only delete path, so it doubles as the
43
- * eviction primitive here — dropping the messages and the map entry in one
44
- * call.
45
- */
46
- private expireAndTouch;
47
- enqueue(taskId: string, message: QueuedMessage, sessionId?: string, maxSize?: number): Promise<void>;
48
- dequeue(taskId: string, sessionId?: string): Promise<QueuedMessage | undefined>;
49
- dequeueAll(taskId: string, sessionId?: string): Promise<QueuedMessage[]>;
50
- /** Number of queues currently tracked for eviction. Exposed for tests. */
51
- get trackedCount(): number;
52
- }
53
- //# sourceMappingURL=evictingTaskMessageQueue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"evictingTaskMessageQueue.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tasks/core/evictingTaskMessageQueue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAyB,YAAW,gBAAgB;IAS7D,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,KAAK;IATxB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6B;IAEvD;;;;OAIG;IACH,YACmB,KAAK,EAAE,gBAAgB,EACvB,KAAK,EAAE,MAAM,EAC5B;IAEJ,OAAO,KAAK,MAAM,GAEjB;IAED;;;;;;OAMG;YACW,cAAc;IAatB,OAAO,CACX,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,aAAa,EACtB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAGf;IAEK,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAGpF;IAEK,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAG7E;IAED,0EAA0E;IAC1E,IAAI,YAAY,IAAI,MAAM,CAEzB;CACF"}
@@ -1,65 +0,0 @@
1
- /**
2
- * Wraps a {@link TaskMessageQueue} so each task's queue is reclaimed once its
3
- * TTL elapses.
4
- *
5
- * Eviction is lazy and traffic-driven rather than timer-based: a deadline is
6
- * refreshed whenever a task's queue is touched, expired queues are dropped on
7
- * the next operation, and `dequeueAll` releases the deadline outright. That
8
- * keeps the wrapper free of per-task timers and correct on runtimes where a
9
- * timer would never fire.
10
- *
11
- * @experimental
12
- */
13
- export class EvictingTaskMessageQueue {
14
- inner;
15
- ttlMs;
16
- deadlines = new Map();
17
- /**
18
- * @param inner - Queue to delegate to.
19
- * @param ttlMs - Lifetime of an untouched queue. A non-positive value
20
- * disables eviction, matching a task store configured without a TTL.
21
- */
22
- constructor(inner, ttlMs) {
23
- this.inner = inner;
24
- this.ttlMs = ttlMs;
25
- }
26
- get evicts() {
27
- return this.ttlMs > 0;
28
- }
29
- /**
30
- * Drain queues whose deadline has passed, then extend `taskId`'s.
31
- *
32
- * `dequeueAll` is the inner queue's only delete path, so it doubles as the
33
- * eviction primitive here — dropping the messages and the map entry in one
34
- * call.
35
- */
36
- async expireAndTouch(taskId) {
37
- if (!this.evicts)
38
- return;
39
- const now = Date.now();
40
- for (const [id, deadline] of this.deadlines) {
41
- if (now < deadline)
42
- continue;
43
- this.deadlines.delete(id);
44
- await this.inner.dequeueAll(id);
45
- }
46
- this.deadlines.set(taskId, now + this.ttlMs);
47
- }
48
- async enqueue(taskId, message, sessionId, maxSize) {
49
- await this.expireAndTouch(taskId);
50
- await this.inner.enqueue(taskId, message, sessionId, maxSize);
51
- }
52
- async dequeue(taskId, sessionId) {
53
- await this.expireAndTouch(taskId);
54
- return await this.inner.dequeue(taskId, sessionId);
55
- }
56
- async dequeueAll(taskId, sessionId) {
57
- this.deadlines.delete(taskId);
58
- return await this.inner.dequeueAll(taskId, sessionId);
59
- }
60
- /** Number of queues currently tracked for eviction. Exposed for tests. */
61
- get trackedCount() {
62
- return this.deadlines.size;
63
- }
64
- }
65
- //# sourceMappingURL=evictingTaskMessageQueue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"evictingTaskMessageQueue.js","sourceRoot":"","sources":["../../../../src/mcp-server/tasks/core/evictingTaskMessageQueue.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,wBAAwB;IAShB,KAAK;IACL,KAAK;IATP,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEvD;;;;OAIG;IACH,YACmB,KAAuB,EACvB,KAAa;qBADb,KAAK;qBACL,KAAK;IACrB,CAAC;IAEJ,IAAY,MAAM;QAChB,OAAO,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACxB,CAAC;IAED;;;;;;OAMG;IACK,KAAK,CAAC,cAAc,CAAC,MAAc;QACzC,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO;QAEzB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,KAAK,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC5C,IAAI,GAAG,GAAG,QAAQ;gBAAE,SAAS;YAC7B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAC1B,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAClC,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,OAAO,CACX,MAAc,EACd,OAAsB,EACtB,SAAkB,EAClB,OAAgB;QAEhB,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,SAAkB;QAC9C,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAClC,OAAO,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,MAAc,EAAE,SAAkB;QACjD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9B,OAAO,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACxD,CAAC;IAED,0EAA0E;IAC1E,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;IAC7B,CAAC;CACF"}
@@ -1,70 +0,0 @@
1
- /**
2
- * @fileoverview A TaskStore wrapper that enforces session ownership on top of
3
- * the SDK's InMemoryTaskStore (which ignores sessionId parameters).
4
- *
5
- * This ensures that in HTTP mode, tasks created by one session cannot be
6
- * accessed by another session, even when using the in-memory store.
7
- *
8
- * @experimental These APIs are experimental and may change without notice.
9
- * @module src/mcp-server/tasks/core/sessionAwareTaskStore
10
- */
11
- import type { Request, RequestId, Result } from '@modelcontextprotocol/sdk/types.js';
12
- import { type CreateTaskOptions, type Task, type TaskStore } from './taskTypes.js';
13
- /**
14
- * Wraps an InMemoryTaskStore to add session ownership enforcement.
15
- *
16
- * Tracks which session created each task and rejects access from
17
- * non-owning sessions. Tasks created without a sessionId are accessible
18
- * by any session (backwards-compatible with stdio/unauth flows).
19
- *
20
- * @experimental
21
- */
22
- export declare class SessionAwareTaskStore implements TaskStore {
23
- private readonly inner;
24
- /**
25
- * Maps taskId -> owning sessionId and the deadline past which the row is
26
- * reclaimable.
27
- *
28
- * The inner store drops a task once its TTL elapses, so an ownership row
29
- * that outlives it is pure leak — one permanent entry per task call, since
30
- * every HTTP request transport carries a sessionId. Mirroring the inner
31
- * store's own expiry keeps this map's lifetime bounded by the tasks it
32
- * describes. `Infinity` covers a task created without a TTL, which the
33
- * inner store likewise never evicts.
34
- */
35
- private readonly ownership;
36
- constructor(inner: TaskStore);
37
- /**
38
- * Owning session for a task, or `undefined` when unowned or expired.
39
- * Prunes the row on the way past — a lazy sweep costs one comparison on a
40
- * path that is already touching the entry.
41
- */
42
- private ownerOf;
43
- /**
44
- * Refresh a row's deadline, mirroring the inner store's TTL reset. The TTL
45
- * is fixed when the task is created, so this needs no read of the inner
46
- * store.
47
- */
48
- private touch;
49
- /** Drop every expired row. Runs on task creation, where the map grows. */
50
- private sweepExpired;
51
- createTask(taskParams: CreateTaskOptions, requestId: RequestId, request: Request, sessionId?: string): Promise<Task>;
52
- getTask(taskId: string, sessionId?: string): Promise<Task | null>;
53
- storeTaskResult(taskId: string, status: 'completed' | 'failed', result: Result, sessionId?: string): Promise<void>;
54
- getTaskResult(taskId: string, sessionId?: string): Promise<Result>;
55
- updateTaskStatus(taskId: string, status: Task['status'], statusMessage?: string, sessionId?: string): Promise<void>;
56
- listTasks(cursor?: string, sessionId?: string): Promise<{
57
- tasks: Task[];
58
- nextCursor?: string;
59
- }>;
60
- /**
61
- * Validates that the caller's session matches the task's owner.
62
- * Tasks created without a sessionId are accessible by any session.
63
- *
64
- * Once the row expires this falls through rather than throwing, so a probe
65
- * for an evicted taskId gets the inner store's uniform not-found instead of
66
- * a `Forbidden` that would confirm the id had once existed.
67
- */
68
- private assertOwnership;
69
- }
70
- //# sourceMappingURL=sessionAwareTaskStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sessionAwareTaskStore.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tasks/core/sessionAwareTaskStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAGrF,OAAO,EAAE,KAAK,iBAAiB,EAAc,KAAK,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE/F;;;;;;;;GAQG;AACH,qBAAa,qBAAsB,YAAW,SAAS;IAiBzC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAhBlC;;;;;;;;;;OAUG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAGtB;IAEJ,YAA6B,KAAK,EAAE,SAAS,EAAI;IAEjD;;;;OAIG;IACH,OAAO,CAAC,OAAO;IAUf;;;;OAIG;IACH,OAAO,CAAC,KAAK;IAMb,0EAA0E;IAC1E,OAAO,CAAC,YAAY;IAOd,UAAU,CACd,UAAU,EAAE,iBAAiB,EAC7B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAYf;IAEK,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAGtE;IAEK,eAAe,CACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,WAAW,GAAG,QAAQ,EAC9B,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAMf;IAEK,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGvE;IAEK,gBAAgB,CACpB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,EACtB,aAAa,CAAC,EAAE,MAAM,EACtB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAKf;IAEK,SAAS,CACb,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC;QAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAYjD;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;CAOxB"}