@noodleseed/one 0.95.1 → 0.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (549) hide show
  1. package/dist/commands/auth-live-doctor.d.ts +1 -0
  2. package/dist/commands/auth-live-doctor.d.ts.map +1 -1
  3. package/dist/commands/auth-live-doctor.js +7 -6
  4. package/dist/commands/auth-live-doctor.js.map +1 -1
  5. package/dist/commands/auth-metadata-readiness.d.ts +2 -0
  6. package/dist/commands/auth-metadata-readiness.d.ts.map +1 -1
  7. package/dist/commands/auth-metadata-readiness.js +7 -0
  8. package/dist/commands/auth-metadata-readiness.js.map +1 -1
  9. package/dist/commands/auth-ops.d.ts +1 -0
  10. package/dist/commands/auth-ops.d.ts.map +1 -1
  11. package/dist/commands/auth-ops.js +26 -7
  12. package/dist/commands/auth-ops.js.map +1 -1
  13. package/dist/commands/author-loop.d.ts.map +1 -1
  14. package/dist/commands/author-loop.js +3 -2
  15. package/dist/commands/author-loop.js.map +1 -1
  16. package/dist/commands/catalog-data-auth-discovery.d.ts.map +1 -1
  17. package/dist/commands/catalog-data-auth-discovery.js +7 -0
  18. package/dist/commands/catalog-data-auth-discovery.js.map +1 -1
  19. package/dist/commands/connect-oauth.d.ts.map +1 -1
  20. package/dist/commands/connect-oauth.js +1 -0
  21. package/dist/commands/connect-oauth.js.map +1 -1
  22. package/dist/dev.d.ts +6 -1
  23. package/dist/dev.d.ts.map +1 -1
  24. package/dist/dev.js +120 -34
  25. package/dist/dev.js.map +1 -1
  26. package/dist/device-login.js +1 -0
  27. package/dist/device-login.js.map +1 -1
  28. package/dist/devtools-preview.d.ts.map +1 -1
  29. package/dist/devtools-preview.js +82 -8
  30. package/dist/devtools-preview.js.map +1 -1
  31. package/dist/plugin-mode/build-readiness-server.d.ts +1 -1
  32. package/dist/plugin-mode/build-readiness-server.d.ts.map +1 -1
  33. package/dist/plugin-mode/build-readiness-server.js +3 -4
  34. package/dist/plugin-mode/build-readiness-server.js.map +1 -1
  35. package/dist/plugin-mode/plugin-operation-contract.d.ts +1 -1
  36. package/dist/plugin-mode/plugin-operation-contract.d.ts.map +1 -1
  37. package/dist/plugin-mode/plugin-operation-tools.d.ts +1 -2
  38. package/dist/plugin-mode/plugin-operation-tools.d.ts.map +1 -1
  39. package/dist/plugin-mode/plugin-operation-tools.js.map +1 -1
  40. package/dist/saas-scaffold-template.d.ts.map +1 -1
  41. package/dist/saas-scaffold-template.js +2 -1
  42. package/dist/saas-scaffold-template.js.map +1 -1
  43. package/node_modules/@modelcontextprotocol/client/LICENSE +216 -0
  44. package/node_modules/@modelcontextprotocol/client/README.md +26 -0
  45. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-1b6pVpkg.cjs +7531 -0
  46. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-1b6pVpkg.cjs.map +1 -0
  47. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-97rDpkRx.mjs +7514 -0
  48. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-97rDpkRx.mjs.map +1 -0
  49. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-FOQRM7up.d.cts +1071 -0
  50. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-FOQRM7up.d.cts.map +1 -0
  51. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-INpkxUi1.d.mts +1071 -0
  52. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-INpkxUi1.d.mts.map +1 -0
  53. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3ZJEoRM.d.mts +74 -0
  54. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3ZJEoRM.d.mts.map +1 -0
  55. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3dvjU3F.cjs +986 -0
  56. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3dvjU3F.cjs.map +1 -0
  57. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-BylNJ1R5.mjs +981 -0
  58. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-BylNJ1R5.mjs.map +1 -0
  59. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-doTkZbTr.d.cts +74 -0
  60. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
  61. package/node_modules/@modelcontextprotocol/client/dist/chunk-Bnu9O96Y.cjs +60 -0
  62. package/node_modules/@modelcontextprotocol/client/dist/chunk-Br0eD_fh.mjs +42 -0
  63. package/node_modules/@modelcontextprotocol/client/dist/dialects-BGO_ZrYF.cjs +46 -0
  64. package/node_modules/@modelcontextprotocol/client/dist/dialects-BGO_ZrYF.cjs.map +1 -0
  65. package/node_modules/@modelcontextprotocol/client/dist/dialects-BOhdv1Fc.mjs +34 -0
  66. package/node_modules/@modelcontextprotocol/client/dist/dialects-BOhdv1Fc.mjs.map +1 -0
  67. package/node_modules/@modelcontextprotocol/client/dist/index-CHhhk6PQ.d.cts +2526 -0
  68. package/node_modules/@modelcontextprotocol/client/dist/index-CHhhk6PQ.d.cts.map +1 -0
  69. package/node_modules/@modelcontextprotocol/client/dist/index-D4xIIEF6.d.mts +2523 -0
  70. package/node_modules/@modelcontextprotocol/client/dist/index-D4xIIEF6.d.mts.map +1 -0
  71. package/node_modules/@modelcontextprotocol/client/dist/index.cjs +5690 -0
  72. package/node_modules/@modelcontextprotocol/client/dist/index.cjs.map +1 -0
  73. package/node_modules/@modelcontextprotocol/client/dist/index.d.cts +3252 -0
  74. package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -0
  75. package/node_modules/@modelcontextprotocol/client/dist/index.d.mts +3252 -0
  76. package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -0
  77. package/node_modules/@modelcontextprotocol/client/dist/index.mjs +5481 -0
  78. package/node_modules/@modelcontextprotocol/client/dist/index.mjs.map +1 -0
  79. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs +14 -0
  80. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs.map +1 -0
  81. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts +13 -0
  82. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts.map +1 -0
  83. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts +13 -0
  84. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts.map +1 -0
  85. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs +13 -0
  86. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs.map +1 -0
  87. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs +14 -0
  88. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs.map +1 -0
  89. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts +13 -0
  90. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts.map +1 -0
  91. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts +13 -0
  92. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts.map +1 -0
  93. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs +13 -0
  94. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs.map +1 -0
  95. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +21 -0
  96. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs.map +1 -0
  97. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts +13 -0
  98. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts.map +1 -0
  99. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts +13 -0
  100. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts.map +1 -0
  101. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +20 -0
  102. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs.map +1 -0
  103. package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs +7063 -0
  104. package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs.map +1 -0
  105. package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs +7431 -0
  106. package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs.map +1 -0
  107. package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +217 -0
  108. package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs.map +1 -0
  109. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts +96 -0
  110. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts.map +1 -0
  111. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts +96 -0
  112. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts.map +1 -0
  113. package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +212 -0
  114. package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs.map +1 -0
  115. package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts +1099 -0
  116. package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts.map +1 -0
  117. package/node_modules/@modelcontextprotocol/client/dist/types-mS0yxCL0.d.mts +1099 -0
  118. package/node_modules/@modelcontextprotocol/client/dist/types-mS0yxCL0.d.mts.map +1 -0
  119. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.cjs +5 -0
  120. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.cts +2 -0
  121. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.mts +2 -0
  122. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.mjs +3 -0
  123. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.cjs +3 -0
  124. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.cts +2 -0
  125. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.mts +2 -0
  126. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.mjs +3 -0
  127. package/node_modules/@modelcontextprotocol/client/package.json +166 -0
  128. package/node_modules/@modelcontextprotocol/core/LICENSE +216 -0
  129. package/node_modules/@modelcontextprotocol/core/README.md +40 -0
  130. package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts +8501 -0
  131. package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts.map +1 -0
  132. package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs +1678 -0
  133. package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs.map +1 -0
  134. package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs +2899 -0
  135. package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs.map +1 -0
  136. package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts +8501 -0
  137. package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts.map +1 -0
  138. package/node_modules/@modelcontextprotocol/core/dist/index.cjs +175 -0
  139. package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -0
  140. package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -0
  141. package/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
  142. package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +201 -0
  143. package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +99 -0
  144. package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -0
  145. package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +99 -0
  146. package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -0
  147. package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
  148. package/node_modules/@modelcontextprotocol/core/package.json +85 -0
  149. package/node_modules/@modelcontextprotocol/server/LICENSE +216 -0
  150. package/node_modules/@modelcontextprotocol/server/README.md +30 -0
  151. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs +7514 -0
  152. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs.map +1 -0
  153. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts +1071 -0
  154. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts.map +1 -0
  155. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts +1071 -0
  156. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts.map +1 -0
  157. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs +7531 -0
  158. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs.map +1 -0
  159. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs +986 -0
  160. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs.map +1 -0
  161. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts +74 -0
  162. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts.map +1 -0
  163. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts +74 -0
  164. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
  165. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs +981 -0
  166. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs.map +1 -0
  167. package/node_modules/@modelcontextprotocol/server/dist/chunk-Bnu9O96Y.cjs +60 -0
  168. package/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs +42 -0
  169. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts +4043 -0
  170. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts.map +1 -0
  171. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts +4045 -0
  172. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts.map +1 -0
  173. package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs +46 -0
  174. package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs.map +1 -0
  175. package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs +34 -0
  176. package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs.map +1 -0
  177. package/node_modules/@modelcontextprotocol/server/dist/index.cjs +2055 -0
  178. package/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -0
  179. package/node_modules/@modelcontextprotocol/server/dist/index.d.cts +739 -0
  180. package/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +1 -0
  181. package/node_modules/@modelcontextprotocol/server/dist/index.d.mts +739 -0
  182. package/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +1 -0
  183. package/node_modules/@modelcontextprotocol/server/dist/index.mjs +1870 -0
  184. package/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -0
  185. package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs +2022 -0
  186. package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs.map +1 -0
  187. package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs +1931 -0
  188. package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs.map +1 -0
  189. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +23 -0
  190. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs.map +1 -0
  191. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +11 -0
  192. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts.map +1 -0
  193. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +11 -0
  194. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts.map +1 -0
  195. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +22 -0
  196. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs.map +1 -0
  197. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +12 -0
  198. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +3 -0
  199. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +3 -0
  200. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +4 -0
  201. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +30 -0
  202. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs.map +1 -0
  203. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +10 -0
  204. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts.map +1 -0
  205. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +10 -0
  206. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts.map +1 -0
  207. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +29 -0
  208. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs.map +1 -0
  209. package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs +7606 -0
  210. package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs.map +1 -0
  211. package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs +8104 -0
  212. package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs.map +1 -0
  213. package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +564 -0
  214. package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +1 -0
  215. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +107 -0
  216. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +1 -0
  217. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +107 -0
  218. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +1 -0
  219. package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +562 -0
  220. package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +1 -0
  221. package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts +1099 -0
  222. package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts.map +1 -0
  223. package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts +1099 -0
  224. package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts.map +1 -0
  225. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +5 -0
  226. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +2 -0
  227. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +2 -0
  228. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +3 -0
  229. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +3 -0
  230. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +2 -0
  231. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +2 -0
  232. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +3 -0
  233. package/node_modules/@modelcontextprotocol/server/package.json +160 -0
  234. package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +4 -4
  235. package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js.map +1 -1
  236. package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-auth-ref.js +3 -3
  237. package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-auth-ref.js.map +1 -1
  238. package/node_modules/@noodle-borg/agent-kit/dist/skill-server-playbook-ref.d.ts.map +1 -1
  239. package/node_modules/@noodle-borg/agent-kit/dist/skill-server-playbook-ref.js +1 -0
  240. package/node_modules/@noodle-borg/agent-kit/dist/skill-server-playbook-ref.js.map +1 -1
  241. package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
  242. package/node_modules/@noodle-borg/capabilities/dist/index.d.ts.map +1 -1
  243. package/node_modules/@noodle-borg/capabilities/dist/index.js +11 -4
  244. package/node_modules/@noodle-borg/capabilities/dist/index.js.map +1 -1
  245. package/node_modules/@noodle-borg/developer-mcp/dist/prompts.d.ts +1 -1
  246. package/node_modules/@noodle-borg/developer-mcp/dist/prompts.d.ts.map +1 -1
  247. package/node_modules/@noodle-borg/developer-mcp/dist/resources.d.ts +1 -1
  248. package/node_modules/@noodle-borg/developer-mcp/dist/resources.d.ts.map +1 -1
  249. package/node_modules/@noodle-borg/developer-mcp/dist/server.d.ts +1 -1
  250. package/node_modules/@noodle-borg/developer-mcp/dist/server.d.ts.map +1 -1
  251. package/node_modules/@noodle-borg/developer-mcp/dist/server.js +3 -1
  252. package/node_modules/@noodle-borg/developer-mcp/dist/server.js.map +1 -1
  253. package/node_modules/@noodle-borg/developer-mcp/package.json +2 -1
  254. package/node_modules/@noodle-borg/module/dist/contract.d.ts +3 -1
  255. package/node_modules/@noodle-borg/module/dist/contract.d.ts.map +1 -1
  256. package/node_modules/@noodle-borg/module/dist/contract.js.map +1 -1
  257. package/node_modules/@noodle-borg/protocol/dist/error-codes.d.ts +11 -0
  258. package/node_modules/@noodle-borg/protocol/dist/error-codes.d.ts.map +1 -0
  259. package/node_modules/@noodle-borg/protocol/dist/error-codes.js +11 -0
  260. package/node_modules/@noodle-borg/protocol/dist/error-codes.js.map +1 -0
  261. package/node_modules/@noodle-borg/protocol/dist/handlers/prompts.d.ts +6 -0
  262. package/node_modules/@noodle-borg/protocol/dist/handlers/prompts.d.ts.map +1 -0
  263. package/node_modules/@noodle-borg/protocol/dist/handlers/prompts.js +31 -0
  264. package/node_modules/@noodle-borg/protocol/dist/handlers/prompts.js.map +1 -0
  265. package/node_modules/@noodle-borg/protocol/dist/handlers/resources.d.ts +6 -0
  266. package/node_modules/@noodle-borg/protocol/dist/handlers/resources.d.ts.map +1 -0
  267. package/node_modules/@noodle-borg/protocol/dist/handlers/resources.js +50 -0
  268. package/node_modules/@noodle-borg/protocol/dist/handlers/resources.js.map +1 -0
  269. package/node_modules/@noodle-borg/protocol/dist/handlers/tools.d.ts +6 -0
  270. package/node_modules/@noodle-borg/protocol/dist/handlers/tools.d.ts.map +1 -0
  271. package/node_modules/@noodle-borg/protocol/dist/handlers/tools.js +126 -0
  272. package/node_modules/@noodle-borg/protocol/dist/handlers/tools.js.map +1 -0
  273. package/node_modules/@noodle-borg/protocol/dist/index.d.ts +6 -2
  274. package/node_modules/@noodle-borg/protocol/dist/index.d.ts.map +1 -1
  275. package/node_modules/@noodle-borg/protocol/dist/index.js +4 -1
  276. package/node_modules/@noodle-borg/protocol/dist/index.js.map +1 -1
  277. package/node_modules/@noodle-borg/protocol/dist/interaction-envelope.d.ts +10 -0
  278. package/node_modules/@noodle-borg/protocol/dist/interaction-envelope.d.ts.map +1 -0
  279. package/node_modules/@noodle-borg/protocol/dist/interaction-envelope.js +66 -0
  280. package/node_modules/@noodle-borg/protocol/dist/interaction-envelope.js.map +1 -0
  281. package/node_modules/@noodle-borg/protocol/dist/jsonrpc.d.ts +1 -0
  282. package/node_modules/@noodle-borg/protocol/dist/jsonrpc.d.ts.map +1 -1
  283. package/node_modules/@noodle-borg/protocol/dist/jsonrpc.js +1 -0
  284. package/node_modules/@noodle-borg/protocol/dist/jsonrpc.js.map +1 -1
  285. package/node_modules/@noodle-borg/protocol/dist/observation.d.ts +27 -0
  286. package/node_modules/@noodle-borg/protocol/dist/observation.d.ts.map +1 -0
  287. package/node_modules/@noodle-borg/protocol/dist/observation.js +20 -0
  288. package/node_modules/@noodle-borg/protocol/dist/observation.js.map +1 -0
  289. package/node_modules/@noodle-borg/protocol/dist/request-deps.d.ts +6 -0
  290. package/node_modules/@noodle-borg/protocol/dist/request-deps.d.ts.map +1 -0
  291. package/node_modules/@noodle-borg/protocol/dist/request-deps.js +16 -0
  292. package/node_modules/@noodle-borg/protocol/dist/request-deps.js.map +1 -0
  293. package/node_modules/@noodle-borg/protocol/dist/request-state.d.ts +50 -0
  294. package/node_modules/@noodle-borg/protocol/dist/request-state.d.ts.map +1 -0
  295. package/node_modules/@noodle-borg/protocol/dist/request-state.js +195 -0
  296. package/node_modules/@noodle-borg/protocol/dist/request-state.js.map +1 -0
  297. package/node_modules/@noodle-borg/protocol/dist/sdk-server.d.ts +16 -23
  298. package/node_modules/@noodle-borg/protocol/dist/sdk-server.d.ts.map +1 -1
  299. package/node_modules/@noodle-borg/protocol/dist/sdk-server.js +7 -341
  300. package/node_modules/@noodle-borg/protocol/dist/sdk-server.js.map +1 -1
  301. package/node_modules/@noodle-borg/protocol/dist/tool-authorization.d.ts +1 -1
  302. package/node_modules/@noodle-borg/protocol/dist/tool-authorization.d.ts.map +1 -1
  303. package/node_modules/@noodle-borg/protocol/dist/tool-authorization.js +1 -1
  304. package/node_modules/@noodle-borg/protocol/dist/tool-authorization.js.map +1 -1
  305. package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts +7 -2
  306. package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts.map +1 -1
  307. package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js +8 -1
  308. package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js.map +1 -1
  309. package/node_modules/@noodle-borg/protocol/dist/tool-results.d.ts +7 -0
  310. package/node_modules/@noodle-borg/protocol/dist/tool-results.d.ts.map +1 -0
  311. package/node_modules/@noodle-borg/protocol/dist/tool-results.js +49 -0
  312. package/node_modules/@noodle-borg/protocol/dist/tool-results.js.map +1 -0
  313. package/node_modules/@noodle-borg/protocol/dist/v2/cache-hints.d.ts +11 -0
  314. package/node_modules/@noodle-borg/protocol/dist/v2/cache-hints.d.ts.map +1 -0
  315. package/node_modules/@noodle-borg/protocol/dist/v2/cache-hints.js +14 -0
  316. package/node_modules/@noodle-borg/protocol/dist/v2/cache-hints.js.map +1 -0
  317. package/node_modules/@noodle-borg/protocol/dist/v2/confirmation.d.ts +16 -0
  318. package/node_modules/@noodle-borg/protocol/dist/v2/confirmation.d.ts.map +1 -0
  319. package/node_modules/@noodle-borg/protocol/dist/v2/confirmation.js +57 -0
  320. package/node_modules/@noodle-borg/protocol/dist/v2/confirmation.js.map +1 -0
  321. package/node_modules/@noodle-borg/protocol/dist/v2/handler.d.ts +11 -0
  322. package/node_modules/@noodle-borg/protocol/dist/v2/handler.d.ts.map +1 -0
  323. package/node_modules/@noodle-borg/protocol/dist/v2/handler.js +154 -0
  324. package/node_modules/@noodle-borg/protocol/dist/v2/handler.js.map +1 -0
  325. package/node_modules/@noodle-borg/protocol/dist/v2/input-required.d.ts +12 -0
  326. package/node_modules/@noodle-borg/protocol/dist/v2/input-required.d.ts.map +1 -0
  327. package/node_modules/@noodle-borg/protocol/dist/v2/input-required.js +78 -0
  328. package/node_modules/@noodle-borg/protocol/dist/v2/input-required.js.map +1 -0
  329. package/node_modules/@noodle-borg/protocol/dist/v2/server.d.ts +5 -0
  330. package/node_modules/@noodle-borg/protocol/dist/v2/server.d.ts.map +1 -0
  331. package/node_modules/@noodle-borg/protocol/dist/v2/server.js +314 -0
  332. package/node_modules/@noodle-borg/protocol/dist/v2/server.js.map +1 -0
  333. package/node_modules/@noodle-borg/protocol/dist/v2/tool-list.d.ts +4 -0
  334. package/node_modules/@noodle-borg/protocol/dist/v2/tool-list.d.ts.map +1 -0
  335. package/node_modules/@noodle-borg/protocol/dist/v2/tool-list.js +25 -0
  336. package/node_modules/@noodle-borg/protocol/dist/v2/tool-list.js.map +1 -0
  337. package/node_modules/@noodle-borg/protocol/dist/v2/versions.d.ts +6 -0
  338. package/node_modules/@noodle-borg/protocol/dist/v2/versions.d.ts.map +1 -0
  339. package/node_modules/@noodle-borg/protocol/dist/v2/versions.js +11 -0
  340. package/node_modules/@noodle-borg/protocol/dist/v2/versions.js.map +1 -0
  341. package/node_modules/@noodle-borg/protocol/package.json +3 -0
  342. package/node_modules/@noodle-borg/service/dist/billing/usage-identity.d.ts +2 -0
  343. package/node_modules/@noodle-borg/service/dist/billing/usage-identity.d.ts.map +1 -1
  344. package/node_modules/@noodle-borg/service/dist/billing/usage-identity.js +15 -7
  345. package/node_modules/@noodle-borg/service/dist/billing/usage-identity.js.map +1 -1
  346. package/node_modules/@noodle-borg/service/dist/customer-auth-audience-binding.d.ts +37 -0
  347. package/node_modules/@noodle-borg/service/dist/customer-auth-audience-binding.d.ts.map +1 -0
  348. package/node_modules/@noodle-borg/service/dist/customer-auth-audience-binding.js +182 -0
  349. package/node_modules/@noodle-borg/service/dist/customer-auth-audience-binding.js.map +1 -0
  350. package/node_modules/@noodle-borg/service/dist/customer-auth-audience-quarantine.d.ts +5 -0
  351. package/node_modules/@noodle-borg/service/dist/customer-auth-audience-quarantine.d.ts.map +1 -0
  352. package/node_modules/@noodle-borg/service/dist/customer-auth-audience-quarantine.js +14 -0
  353. package/node_modules/@noodle-borg/service/dist/customer-auth-audience-quarantine.js.map +1 -0
  354. package/node_modules/@noodle-borg/service/dist/customer-verifier.js +5 -4
  355. package/node_modules/@noodle-borg/service/dist/customer-verifier.js.map +1 -1
  356. package/node_modules/@noodle-borg/service/dist/developer-mcp/mount.d.ts +2 -1
  357. package/node_modules/@noodle-borg/service/dist/developer-mcp/mount.d.ts.map +1 -1
  358. package/node_modules/@noodle-borg/service/dist/developer-mcp/mount.js +16 -14
  359. package/node_modules/@noodle-borg/service/dist/developer-mcp/mount.js.map +1 -1
  360. package/node_modules/@noodle-borg/service/dist/developer-mcp/service-options.d.ts.map +1 -1
  361. package/node_modules/@noodle-borg/service/dist/developer-mcp/service-options.js +1 -0
  362. package/node_modules/@noodle-borg/service/dist/developer-mcp/service-options.js.map +1 -1
  363. package/node_modules/@noodle-borg/service/dist/index.d.ts +2 -0
  364. package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
  365. package/node_modules/@noodle-borg/service/dist/index.js +2 -0
  366. package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
  367. package/node_modules/@noodle-borg/service/dist/main.js +3 -0
  368. package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
  369. package/node_modules/@noodle-borg/service/dist/mcp-confirmation-nonce-postgres.d.ts +14 -0
  370. package/node_modules/@noodle-borg/service/dist/mcp-confirmation-nonce-postgres.d.ts.map +1 -0
  371. package/node_modules/@noodle-borg/service/dist/mcp-confirmation-nonce-postgres.js +35 -0
  372. package/node_modules/@noodle-borg/service/dist/mcp-confirmation-nonce-postgres.js.map +1 -0
  373. package/node_modules/@noodle-borg/service/dist/mcp-protocol-runtime.d.ts +16 -0
  374. package/node_modules/@noodle-borg/service/dist/mcp-protocol-runtime.d.ts.map +1 -0
  375. package/node_modules/@noodle-borg/service/dist/mcp-protocol-runtime.js +21 -0
  376. package/node_modules/@noodle-borg/service/dist/mcp-protocol-runtime.js.map +1 -0
  377. package/node_modules/@noodle-borg/service/dist/oauth/app.d.ts.map +1 -1
  378. package/node_modules/@noodle-borg/service/dist/oauth/app.js +47 -0
  379. package/node_modules/@noodle-borg/service/dist/oauth/app.js.map +1 -1
  380. package/node_modules/@noodle-borg/service/dist/oauth/authorization-response.d.ts +4 -0
  381. package/node_modules/@noodle-borg/service/dist/oauth/authorization-response.d.ts.map +1 -0
  382. package/node_modules/@noodle-borg/service/dist/oauth/authorization-response.js +6 -0
  383. package/node_modules/@noodle-borg/service/dist/oauth/authorization-response.js.map +1 -0
  384. package/node_modules/@noodle-borg/service/dist/oauth/consent-decision.d.ts.map +1 -1
  385. package/node_modules/@noodle-borg/service/dist/oauth/consent-decision.js +2 -1
  386. package/node_modules/@noodle-borg/service/dist/oauth/consent-decision.js.map +1 -1
  387. package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-flow.js +2 -1
  388. package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-flow.js.map +1 -1
  389. package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.d.ts.map +1 -1
  390. package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js +1 -0
  391. package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js.map +1 -1
  392. package/node_modules/@noodle-borg/service/dist/oauth/metadata.d.ts.map +1 -1
  393. package/node_modules/@noodle-borg/service/dist/oauth/metadata.js +1 -0
  394. package/node_modules/@noodle-borg/service/dist/oauth/metadata.js.map +1 -1
  395. package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts.map +1 -1
  396. package/node_modules/@noodle-borg/service/dist/oauth/provider.js +1 -0
  397. package/node_modules/@noodle-borg/service/dist/oauth/provider.js.map +1 -1
  398. package/node_modules/@noodle-borg/service/dist/oauth/token-issuer.d.ts.map +1 -1
  399. package/node_modules/@noodle-borg/service/dist/oauth/token-issuer.js +2 -1
  400. package/node_modules/@noodle-borg/service/dist/oauth/token-issuer.js.map +1 -1
  401. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.d.ts.map +1 -1
  402. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js +1 -0
  403. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js.map +1 -1
  404. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts +1 -0
  405. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts.map +1 -1
  406. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js +2 -1
  407. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js.map +1 -1
  408. package/node_modules/@noodle-borg/service/dist/options.d.ts +10 -3
  409. package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
  410. package/node_modules/@noodle-borg/service/dist/platform-account-reset-quarantine-postgres.d.ts.map +1 -1
  411. package/node_modules/@noodle-borg/service/dist/platform-account-reset-quarantine-postgres.js +20 -8
  412. package/node_modules/@noodle-borg/service/dist/platform-account-reset-quarantine-postgres.js.map +1 -1
  413. package/node_modules/@noodle-borg/service/dist/platform-account-reset-rollback-postgres.d.ts +2 -0
  414. package/node_modules/@noodle-borg/service/dist/platform-account-reset-rollback-postgres.d.ts.map +1 -1
  415. package/node_modules/@noodle-borg/service/dist/platform-account-reset-rollback-postgres.js +58 -13
  416. package/node_modules/@noodle-borg/service/dist/platform-account-reset-rollback-postgres.js.map +1 -1
  417. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-transaction-postgres.d.ts +1 -0
  418. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-transaction-postgres.d.ts.map +1 -1
  419. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-transaction-postgres.js +3 -0
  420. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-transaction-postgres.js.map +1 -1
  421. package/node_modules/@noodle-borg/service/dist/platform-auth-operator.d.ts +24 -24
  422. package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts +2 -1
  423. package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts.map +1 -1
  424. package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js +4 -1
  425. package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js.map +1 -1
  426. package/node_modules/@noodle-borg/service/dist/registry-access.d.ts +5 -1
  427. package/node_modules/@noodle-borg/service/dist/registry-access.d.ts.map +1 -1
  428. package/node_modules/@noodle-borg/service/dist/registry-access.js +64 -15
  429. package/node_modules/@noodle-borg/service/dist/registry-access.js.map +1 -1
  430. package/node_modules/@noodle-borg/service/dist/registry-rollback.d.ts +19 -0
  431. package/node_modules/@noodle-borg/service/dist/registry-rollback.d.ts.map +1 -0
  432. package/node_modules/@noodle-borg/service/dist/registry-rollback.js +91 -0
  433. package/node_modules/@noodle-borg/service/dist/registry-rollback.js.map +1 -0
  434. package/node_modules/@noodle-borg/service/dist/registry-state.d.ts +18 -2
  435. package/node_modules/@noodle-borg/service/dist/registry-state.d.ts.map +1 -1
  436. package/node_modules/@noodle-borg/service/dist/registry-state.js +83 -7
  437. package/node_modules/@noodle-borg/service/dist/registry-state.js.map +1 -1
  438. package/node_modules/@noodle-borg/service/dist/registry-targets.d.ts +8 -0
  439. package/node_modules/@noodle-borg/service/dist/registry-targets.d.ts.map +1 -1
  440. package/node_modules/@noodle-borg/service/dist/registry-targets.js +24 -0
  441. package/node_modules/@noodle-borg/service/dist/registry-targets.js.map +1 -1
  442. package/node_modules/@noodle-borg/service/dist/registry-types.d.ts +1 -1
  443. package/node_modules/@noodle-borg/service/dist/registry-types.d.ts.map +1 -1
  444. package/node_modules/@noodle-borg/service/dist/registry.d.ts +2 -1
  445. package/node_modules/@noodle-borg/service/dist/registry.d.ts.map +1 -1
  446. package/node_modules/@noodle-borg/service/dist/registry.js +72 -83
  447. package/node_modules/@noodle-borg/service/dist/registry.js.map +1 -1
  448. package/node_modules/@noodle-borg/service/dist/routes/archive.d.ts.map +1 -1
  449. package/node_modules/@noodle-borg/service/dist/routes/archive.js +14 -0
  450. package/node_modules/@noodle-borg/service/dist/routes/archive.js.map +1 -1
  451. package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-dispatch.d.ts.map +1 -1
  452. package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-dispatch.js +4 -0
  453. package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-dispatch.js.map +1 -1
  454. package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.d.ts +1 -0
  455. package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.d.ts.map +1 -1
  456. package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.js +17 -4
  457. package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.js.map +1 -1
  458. package/node_modules/@noodle-borg/service/dist/routes/contracts.d.ts +9 -9
  459. package/node_modules/@noodle-borg/service/dist/routes/private-platform-auth-dispatch.d.ts.map +1 -1
  460. package/node_modules/@noodle-borg/service/dist/routes/private-platform-auth-dispatch.js +1 -1
  461. package/node_modules/@noodle-borg/service/dist/routes/private-platform-auth-dispatch.js.map +1 -1
  462. package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
  463. package/node_modules/@noodle-borg/service/dist/serve.js +19 -2
  464. package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
  465. package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
  466. package/node_modules/@noodle-borg/service/dist/service.js +5 -0
  467. package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
  468. package/node_modules/@noodle-borg/service/dist/store/in-memory.d.ts +5 -2
  469. package/node_modules/@noodle-borg/service/dist/store/in-memory.d.ts.map +1 -1
  470. package/node_modules/@noodle-borg/service/dist/store/in-memory.js +51 -8
  471. package/node_modules/@noodle-borg/service/dist/store/in-memory.js.map +1 -1
  472. package/node_modules/@noodle-borg/service/dist/store/json-file.d.ts +5 -2
  473. package/node_modules/@noodle-borg/service/dist/store/json-file.d.ts.map +1 -1
  474. package/node_modules/@noodle-borg/service/dist/store/json-file.js +55 -6
  475. package/node_modules/@noodle-borg/service/dist/store/json-file.js.map +1 -1
  476. package/node_modules/@noodle-borg/service/dist/store/postgres-apps.d.ts +2 -2
  477. package/node_modules/@noodle-borg/service/dist/store/postgres-apps.d.ts.map +1 -1
  478. package/node_modules/@noodle-borg/service/dist/store/postgres-apps.js +30 -15
  479. package/node_modules/@noodle-borg/service/dist/store/postgres-apps.js.map +1 -1
  480. package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience-schema.d.ts +16 -0
  481. package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience-schema.d.ts.map +1 -0
  482. package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience-schema.js +329 -0
  483. package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience-schema.js.map +1 -0
  484. package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience.d.ts +5 -0
  485. package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience.d.ts.map +1 -0
  486. package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience.js +24 -0
  487. package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience.js.map +1 -0
  488. package/node_modules/@noodle-borg/service/dist/store/postgres-deploy-records.d.ts.map +1 -1
  489. package/node_modules/@noodle-borg/service/dist/store/postgres-deploy-records.js +2 -1
  490. package/node_modules/@noodle-borg/service/dist/store/postgres-deploy-records.js.map +1 -1
  491. package/node_modules/@noodle-borg/service/dist/store/postgres-deployment-access.d.ts +9 -0
  492. package/node_modules/@noodle-borg/service/dist/store/postgres-deployment-access.d.ts.map +1 -0
  493. package/node_modules/@noodle-borg/service/dist/store/postgres-deployment-access.js +53 -0
  494. package/node_modules/@noodle-borg/service/dist/store/postgres-deployment-access.js.map +1 -0
  495. package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.d.ts.map +1 -1
  496. package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js +2 -1
  497. package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js.map +1 -1
  498. package/node_modules/@noodle-borg/service/dist/store/postgres-rows.d.ts +2 -1
  499. package/node_modules/@noodle-borg/service/dist/store/postgres-rows.d.ts.map +1 -1
  500. package/node_modules/@noodle-borg/service/dist/store/postgres-rows.js +2 -24
  501. package/node_modules/@noodle-borg/service/dist/store/postgres-rows.js.map +1 -1
  502. package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts +2 -1
  503. package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts.map +1 -1
  504. package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js +3 -0
  505. package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js.map +1 -1
  506. package/node_modules/@noodle-borg/service/dist/store/postgres.d.ts +7 -2
  507. package/node_modules/@noodle-borg/service/dist/store/postgres.d.ts.map +1 -1
  508. package/node_modules/@noodle-borg/service/dist/store/postgres.js +27 -31
  509. package/node_modules/@noodle-borg/service/dist/store/postgres.js.map +1 -1
  510. package/node_modules/@noodle-borg/service/dist/store/request-events-postgres.d.ts.map +1 -1
  511. package/node_modules/@noodle-borg/service/dist/store/request-events-postgres.js +9 -2
  512. package/node_modules/@noodle-borg/service/dist/store/request-events-postgres.js.map +1 -1
  513. package/node_modules/@noodle-borg/service/dist/store/request-events.d.ts.map +1 -1
  514. package/node_modules/@noodle-borg/service/dist/store/request-events.js +1 -0
  515. package/node_modules/@noodle-borg/service/dist/store/request-events.js.map +1 -1
  516. package/node_modules/@noodle-borg/service/dist/store.d.ts +20 -1
  517. package/node_modules/@noodle-borg/service/dist/store.d.ts.map +1 -1
  518. package/node_modules/@noodle-borg/transport-http/dist/handler.d.ts +19 -67
  519. package/node_modules/@noodle-borg/transport-http/dist/handler.d.ts.map +1 -1
  520. package/node_modules/@noodle-borg/transport-http/dist/handler.js +12 -281
  521. package/node_modules/@noodle-borg/transport-http/dist/handler.js.map +1 -1
  522. package/node_modules/@noodle-borg/transport-http/dist/index.d.ts +2 -1
  523. package/node_modules/@noodle-borg/transport-http/dist/index.d.ts.map +1 -1
  524. package/node_modules/@noodle-borg/transport-http/dist/index.js +1 -0
  525. package/node_modules/@noodle-borg/transport-http/dist/index.js.map +1 -1
  526. package/node_modules/@noodle-borg/transport-http/dist/request-capture.d.ts.map +1 -1
  527. package/node_modules/@noodle-borg/transport-http/dist/request-capture.js +38 -4
  528. package/node_modules/@noodle-borg/transport-http/dist/request-capture.js.map +1 -1
  529. package/node_modules/@noodle-borg/transport-http/dist/responses.d.ts +28 -0
  530. package/node_modules/@noodle-borg/transport-http/dist/responses.d.ts.map +1 -0
  531. package/node_modules/@noodle-borg/transport-http/dist/responses.js +50 -0
  532. package/node_modules/@noodle-borg/transport-http/dist/responses.js.map +1 -0
  533. package/node_modules/@noodle-borg/transport-http/dist/routing.d.ts +28 -0
  534. package/node_modules/@noodle-borg/transport-http/dist/routing.d.ts.map +1 -0
  535. package/node_modules/@noodle-borg/transport-http/dist/routing.js +52 -0
  536. package/node_modules/@noodle-borg/transport-http/dist/routing.js.map +1 -0
  537. package/node_modules/@noodle-borg/transport-http/dist/serve-request.d.ts +35 -0
  538. package/node_modules/@noodle-borg/transport-http/dist/serve-request.d.ts.map +1 -0
  539. package/node_modules/@noodle-borg/transport-http/dist/serve-request.js +190 -0
  540. package/node_modules/@noodle-borg/transport-http/dist/serve-request.js.map +1 -0
  541. package/node_modules/@noodle-borg/transport-http/dist/tool-dispatch.d.ts +1 -1
  542. package/node_modules/@noodle-borg/transport-http/dist/tool-dispatch.d.ts.map +1 -1
  543. package/node_modules/@noodle-borg/transport-http/dist/tool-dispatch.js +17 -5
  544. package/node_modules/@noodle-borg/transport-http/dist/tool-dispatch.js.map +1 -1
  545. package/node_modules/@noodle-borg/transport-http/dist/web-bridge.d.ts +9 -0
  546. package/node_modules/@noodle-borg/transport-http/dist/web-bridge.d.ts.map +1 -0
  547. package/node_modules/@noodle-borg/transport-http/dist/web-bridge.js +61 -0
  548. package/node_modules/@noodle-borg/transport-http/dist/web-bridge.js.map +1 -0
  549. package/package.json +6 -2
@@ -0,0 +1,1678 @@
1
+ import * as z from "zod/v4";
2
+
3
+ //#region src/constants.ts
4
+ const LATEST_PROTOCOL_VERSION = "2025-11-25";
5
+ const DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
6
+ const SUPPORTED_PROTOCOL_VERSIONS = [
7
+ LATEST_PROTOCOL_VERSION,
8
+ "2025-06-18",
9
+ "2025-03-26",
10
+ "2024-11-05",
11
+ "2024-10-07"
12
+ ];
13
+ /**
14
+ * `_meta` key associating a message with a 2025-11-25 task.
15
+ *
16
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
17
+ */
18
+ const RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
19
+ /**
20
+ * `_meta` key carrying the MCP protocol version governing a request.
21
+ *
22
+ * For the HTTP transport, the value must match the `MCP-Protocol-Version` header.
23
+ */
24
+ const PROTOCOL_VERSION_META_KEY = "io.modelcontextprotocol/protocolVersion";
25
+ /**
26
+ * `_meta` key identifying the client software making a request.
27
+ *
28
+ * Clients SHOULD include it on every request; the value is self-reported and
29
+ * intended for display, logging, and debugging — servers should not rely on
30
+ * it for behavior or security decisions.
31
+ */
32
+ const CLIENT_INFO_META_KEY = "io.modelcontextprotocol/clientInfo";
33
+ /**
34
+ * `_meta` key identifying the server software producing a response.
35
+ *
36
+ * Servers SHOULD include it on every response; the value is self-reported and
37
+ * intended for display, logging, and debugging — clients should not rely on
38
+ * it for behavior or security decisions.
39
+ */
40
+ const SERVER_INFO_META_KEY = "io.modelcontextprotocol/serverInfo";
41
+ /**
42
+ * `_meta` key carrying the client's capabilities for a request.
43
+ *
44
+ * Capabilities are declared per request rather than once at initialization;
45
+ * servers must not infer capabilities from prior requests.
46
+ */
47
+ const CLIENT_CAPABILITIES_META_KEY = "io.modelcontextprotocol/clientCapabilities";
48
+ /**
49
+ * `_meta` key carrying the JSON-RPC ID of the `subscriptions/listen` request
50
+ * that opened the stream a notification was delivered on.
51
+ *
52
+ * Stamped by the server on every notification delivered via a
53
+ * `subscriptions/listen` stream (including the leading
54
+ * `notifications/subscriptions/acknowledged`); on stdio, where all messages
55
+ * share one channel, clients use it to correlate notifications with their
56
+ * originating subscription. The value is the listen request's JSON-RPC ID
57
+ * verbatim.
58
+ */
59
+ const SUBSCRIPTION_ID_META_KEY = "io.modelcontextprotocol/subscriptionId";
60
+ /**
61
+ * `_meta` key carrying the desired log level for a request.
62
+ *
63
+ * When absent, the server must not send `notifications/message` notifications
64
+ * for the request.
65
+ *
66
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
67
+ * in the specification for at least twelve months.
68
+ */
69
+ const LOG_LEVEL_META_KEY = "io.modelcontextprotocol/logLevel";
70
+ /**
71
+ * `_meta` key carrying W3C Trace Context for distributed tracing (SEP-414).
72
+ *
73
+ * When present, the value MUST follow the W3C `traceparent` header format,
74
+ * e.g. `00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01`.
75
+ *
76
+ * @see https://www.w3.org/TR/trace-context/#traceparent-header
77
+ */
78
+ const TRACEPARENT_META_KEY = "traceparent";
79
+ /**
80
+ * `_meta` key carrying vendor-specific trace state for distributed tracing (SEP-414).
81
+ *
82
+ * When present, the value MUST follow the W3C `tracestate` header format,
83
+ * e.g. `vendor1=value1,vendor2=value2`.
84
+ *
85
+ * @see https://www.w3.org/TR/trace-context/#tracestate-header
86
+ */
87
+ const TRACESTATE_META_KEY = "tracestate";
88
+ /**
89
+ * `_meta` key carrying cross-cutting propagation values for distributed tracing (SEP-414).
90
+ *
91
+ * When present, the value MUST follow the W3C Baggage header format,
92
+ * e.g. `userId=alice,serverRegion=us-east-1`.
93
+ *
94
+ * @see https://www.w3.org/TR/baggage/
95
+ */
96
+ const BAGGAGE_META_KEY = "baggage";
97
+ const JSONRPC_VERSION = "2.0";
98
+ const PARSE_ERROR = -32700;
99
+ const INVALID_REQUEST = -32600;
100
+ const METHOD_NOT_FOUND = -32601;
101
+ const INVALID_PARAMS = -32602;
102
+ const INTERNAL_ERROR = -32603;
103
+
104
+ //#endregion
105
+ //#region src/schemas.ts
106
+ const JSONValueSchema = z.lazy(() => z.union([
107
+ z.string(),
108
+ z.number(),
109
+ z.boolean(),
110
+ z.null(),
111
+ z.record(z.string(), JSONValueSchema),
112
+ z.array(JSONValueSchema)
113
+ ]));
114
+ const JSONObjectSchema = z.record(z.string(), JSONValueSchema);
115
+ const JSONArraySchema = z.array(JSONValueSchema);
116
+ /**
117
+ * A progress token, used to associate progress notifications with the original request.
118
+ */
119
+ const ProgressTokenSchema = z.union([z.string(), z.number().int()]);
120
+ /**
121
+ * An opaque token used to represent a cursor for pagination.
122
+ */
123
+ const CursorSchema = z.string();
124
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
125
+ const TaskMetadataSchema = z.object({ ttl: z.number().optional() });
126
+ /**
127
+ * Metadata for associating messages with a task.
128
+ * Include this in the `_meta` field under the key `io.modelcontextprotocol/related-task`.
129
+ *
130
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
131
+ */
132
+ const RelatedTaskMetadataSchema = z.object({ taskId: z.string() });
133
+ const RequestMetaSchema = z.looseObject({
134
+ progressToken: ProgressTokenSchema.optional(),
135
+ [RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
136
+ });
137
+ /**
138
+ * Common params for any request.
139
+ */
140
+ const BaseRequestParamsSchema = z.object({ _meta: RequestMetaSchema.optional() });
141
+ /**
142
+ * Common params for any task-augmented request.
143
+ *
144
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
145
+ */
146
+ const TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({ task: TaskMetadataSchema.optional() });
147
+ const RequestSchema = z.object({
148
+ method: z.string(),
149
+ params: BaseRequestParamsSchema.loose().optional()
150
+ });
151
+ const NotificationsParamsSchema = z.object({ _meta: RequestMetaSchema.optional() });
152
+ const NotificationSchema = z.object({
153
+ method: z.string(),
154
+ params: NotificationsParamsSchema.loose().optional()
155
+ });
156
+ /**
157
+ * The contents of a result's `_meta` field (the 2026-07-28 `ResultMetaObject`).
158
+ * Loose — implementation-specific keys pass through.
159
+ *
160
+ * The serverInfo key identifies the server software producing the response
161
+ * (servers SHOULD include it on every response; the value is self-reported
162
+ * and intended for display, logging, and debugging). The getter defers the
163
+ * `ImplementationSchema` reference, which is declared later in this file.
164
+ */
165
+ const ResultMetaObjectSchema = z.looseObject({ get [SERVER_INFO_META_KEY]() {
166
+ return ImplementationSchema.optional().catch(void 0);
167
+ } });
168
+ const ResultSchema = z.looseObject({ _meta: ResultMetaObjectSchema.optional() });
169
+ /**
170
+ * A uniquely identifying ID for a request in JSON-RPC.
171
+ */
172
+ const RequestIdSchema = z.union([z.string(), z.number().int()]);
173
+ /**
174
+ * A request that expects a response.
175
+ */
176
+ const JSONRPCRequestSchema = z.object({
177
+ jsonrpc: z.literal(JSONRPC_VERSION),
178
+ id: RequestIdSchema,
179
+ ...RequestSchema.shape
180
+ }).strict();
181
+ /**
182
+ * A notification which does not expect a response.
183
+ */
184
+ const JSONRPCNotificationSchema = z.object({
185
+ jsonrpc: z.literal(JSONRPC_VERSION),
186
+ ...NotificationSchema.shape
187
+ }).strict();
188
+ /**
189
+ * A successful (non-error) response to a request.
190
+ */
191
+ const JSONRPCResultResponseSchema = z.object({
192
+ jsonrpc: z.literal(JSONRPC_VERSION),
193
+ id: RequestIdSchema,
194
+ result: ResultSchema
195
+ }).strict();
196
+ /**
197
+ * A response to a request that indicates an error occurred.
198
+ */
199
+ const JSONRPCErrorResponseSchema = z.object({
200
+ jsonrpc: z.literal(JSONRPC_VERSION),
201
+ id: RequestIdSchema.optional(),
202
+ error: z.object({
203
+ code: z.number().int(),
204
+ message: z.string(),
205
+ data: z.unknown().optional()
206
+ })
207
+ }).strict();
208
+ const JSONRPCMessageSchema = z.union([
209
+ JSONRPCRequestSchema,
210
+ JSONRPCNotificationSchema,
211
+ JSONRPCResultResponseSchema,
212
+ JSONRPCErrorResponseSchema
213
+ ]);
214
+ const JSONRPCResponseSchema = z.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
215
+ /**
216
+ * A response that indicates success but carries no data.
217
+ */
218
+ const EmptyResultSchema = ResultSchema.strict();
219
+ const CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
220
+ requestId: RequestIdSchema.optional(),
221
+ reason: z.string().optional()
222
+ });
223
+ /**
224
+ * This notification can be sent by either side to indicate that it is cancelling a previously-issued request.
225
+ *
226
+ * The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.
227
+ *
228
+ * This notification indicates that the result will be unused, so any associated processing SHOULD cease.
229
+ *
230
+ * A client MUST NOT attempt to cancel its {@linkcode InitializeRequest | initialize} request.
231
+ */
232
+ const CancelledNotificationSchema = NotificationSchema.extend({
233
+ method: z.literal("notifications/cancelled"),
234
+ params: CancelledNotificationParamsSchema
235
+ });
236
+ /**
237
+ * Icon schema for use in {@link Tool | tools}, {@link Prompt | prompts}, {@link Resource | resources}, and {@link Implementation | implementations}.
238
+ */
239
+ const IconSchema = z.object({
240
+ src: z.string(),
241
+ mimeType: z.string().optional(),
242
+ sizes: z.array(z.string()).optional(),
243
+ theme: z.enum(["light", "dark"]).optional()
244
+ });
245
+ /**
246
+ * Base schema to add `icons` property.
247
+ *
248
+ */
249
+ const IconsSchema = z.object({ icons: z.array(IconSchema).optional() });
250
+ /**
251
+ * Base metadata interface for common properties across {@link Resource | resources}, {@link Tool | tools}, {@link Prompt | prompts}, and {@link Implementation | implementations}.
252
+ */
253
+ const BaseMetadataSchema = z.object({
254
+ name: z.string(),
255
+ title: z.string().optional()
256
+ });
257
+ /**
258
+ * Describes the name and version of an MCP implementation.
259
+ */
260
+ const ImplementationSchema = BaseMetadataSchema.extend({
261
+ ...BaseMetadataSchema.shape,
262
+ ...IconsSchema.shape,
263
+ version: z.string(),
264
+ websiteUrl: z.string().optional(),
265
+ description: z.string().optional()
266
+ });
267
+ const FormElicitationCapabilitySchema = z.intersection(z.object({ applyDefaults: z.boolean().optional() }), JSONObjectSchema);
268
+ const ElicitationCapabilitySchema = z.preprocess((value) => {
269
+ if (value && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0) return { form: {} };
270
+ return value;
271
+ }, z.intersection(z.object({
272
+ form: FormElicitationCapabilitySchema.optional(),
273
+ url: JSONObjectSchema.optional()
274
+ }), JSONObjectSchema.optional()));
275
+ /**
276
+ * Task capabilities for clients, indicating which request types support task creation.
277
+ *
278
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
279
+ */
280
+ const ClientTasksCapabilitySchema = z.looseObject({
281
+ list: JSONObjectSchema.optional(),
282
+ cancel: JSONObjectSchema.optional(),
283
+ requests: z.looseObject({
284
+ sampling: z.looseObject({ createMessage: JSONObjectSchema.optional() }).optional(),
285
+ elicitation: z.looseObject({ create: JSONObjectSchema.optional() }).optional()
286
+ }).optional()
287
+ });
288
+ /**
289
+ * Task capabilities for servers, indicating which request types support task creation.
290
+ *
291
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
292
+ */
293
+ const ServerTasksCapabilitySchema = z.looseObject({
294
+ list: JSONObjectSchema.optional(),
295
+ cancel: JSONObjectSchema.optional(),
296
+ requests: z.looseObject({ tools: z.looseObject({ call: JSONObjectSchema.optional() }).optional() }).optional()
297
+ });
298
+ /**
299
+ * Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.
300
+ */
301
+ const ClientCapabilitiesSchema = z.object({
302
+ experimental: z.record(z.string(), JSONObjectSchema).optional(),
303
+ sampling: z.object({
304
+ context: JSONObjectSchema.optional(),
305
+ tools: JSONObjectSchema.optional()
306
+ }).optional(),
307
+ elicitation: ElicitationCapabilitySchema.optional(),
308
+ roots: z.object({ listChanged: z.boolean().optional() }).optional(),
309
+ tasks: ClientTasksCapabilitySchema.optional(),
310
+ extensions: z.record(z.string(), JSONObjectSchema).optional()
311
+ });
312
+ const InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
313
+ protocolVersion: z.string(),
314
+ capabilities: ClientCapabilitiesSchema,
315
+ clientInfo: ImplementationSchema
316
+ });
317
+ /**
318
+ * This request is sent from the client to the server when it first connects, asking it to begin initialization.
319
+ */
320
+ const InitializeRequestSchema = RequestSchema.extend({
321
+ method: z.literal("initialize"),
322
+ params: InitializeRequestParamsSchema
323
+ });
324
+ /**
325
+ * Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.
326
+ */
327
+ const ServerCapabilitiesSchema = z.object({
328
+ experimental: z.record(z.string(), JSONObjectSchema).optional(),
329
+ logging: JSONObjectSchema.optional(),
330
+ completions: JSONObjectSchema.optional(),
331
+ prompts: z.object({ listChanged: z.boolean().optional() }).optional(),
332
+ resources: z.object({
333
+ subscribe: z.boolean().optional(),
334
+ listChanged: z.boolean().optional()
335
+ }).optional(),
336
+ tools: z.object({ listChanged: z.boolean().optional() }).optional(),
337
+ tasks: ServerTasksCapabilitySchema.optional(),
338
+ extensions: z.record(z.string(), JSONObjectSchema).optional()
339
+ });
340
+ /**
341
+ * After receiving an initialize request from the client, the server sends this response.
342
+ */
343
+ const InitializeResultSchema = ResultSchema.extend({
344
+ protocolVersion: z.string(),
345
+ capabilities: ServerCapabilitiesSchema,
346
+ serverInfo: ImplementationSchema,
347
+ instructions: z.string().optional()
348
+ });
349
+ /**
350
+ * This notification is sent from the client to the server after initialization has finished.
351
+ */
352
+ const InitializedNotificationSchema = NotificationSchema.extend({
353
+ method: z.literal("notifications/initialized"),
354
+ params: NotificationsParamsSchema.optional()
355
+ });
356
+ /**
357
+ * A request from the client asking the server to advertise its supported protocol
358
+ * versions, capabilities, and other metadata (protocol revision 2026-07-28). Servers
359
+ * MUST implement `server/discover`. Clients MAY call it but are not required to —
360
+ * version negotiation can also happen inline via the per-request `_meta` envelope.
361
+ */
362
+ const DiscoverRequestSchema = RequestSchema.extend({
363
+ method: z.literal("server/discover"),
364
+ params: BaseRequestParamsSchema.optional()
365
+ });
366
+ /**
367
+ * The result returned by the server for a `server/discover` request.
368
+ */
369
+ const DiscoverResultSchema = ResultSchema.extend({
370
+ supportedVersions: z.array(z.string()),
371
+ capabilities: ServerCapabilitiesSchema,
372
+ instructions: z.string().optional()
373
+ });
374
+ /**
375
+ * A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.
376
+ */
377
+ const PingRequestSchema = RequestSchema.extend({
378
+ method: z.literal("ping"),
379
+ params: BaseRequestParamsSchema.optional()
380
+ });
381
+ const ProgressSchema = z.object({
382
+ progress: z.number(),
383
+ total: z.optional(z.number()),
384
+ message: z.optional(z.string())
385
+ });
386
+ const ProgressNotificationParamsSchema = z.object({
387
+ ...NotificationsParamsSchema.shape,
388
+ ...ProgressSchema.shape,
389
+ progressToken: ProgressTokenSchema
390
+ });
391
+ /**
392
+ * An out-of-band notification used to inform the receiver of a progress update for a long-running request.
393
+ *
394
+ * @category notifications/progress
395
+ */
396
+ const ProgressNotificationSchema = NotificationSchema.extend({
397
+ method: z.literal("notifications/progress"),
398
+ params: ProgressNotificationParamsSchema
399
+ });
400
+ const PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({ cursor: CursorSchema.optional() });
401
+ const PaginatedRequestSchema = RequestSchema.extend({ params: PaginatedRequestParamsSchema.optional() });
402
+ const PaginatedResultSchema = ResultSchema.extend({ nextCursor: CursorSchema.optional() });
403
+ /**
404
+ * The contents of a specific resource or sub-resource.
405
+ */
406
+ const ResourceContentsSchema = z.object({
407
+ uri: z.string(),
408
+ mimeType: z.optional(z.string()),
409
+ _meta: z.record(z.string(), z.unknown()).optional()
410
+ });
411
+ const TextResourceContentsSchema = ResourceContentsSchema.extend({ text: z.string() });
412
+ /**
413
+ * A Zod schema for validating Base64 strings that is more performant and
414
+ * robust for very large inputs than the default regex-based check. It avoids
415
+ * stack overflows by using the native `atob` function for validation.
416
+ */
417
+ const Base64Schema = z.string().refine((val) => {
418
+ try {
419
+ atob(val);
420
+ return true;
421
+ } catch {
422
+ return false;
423
+ }
424
+ }, { message: "Invalid Base64 string" });
425
+ const BlobResourceContentsSchema = ResourceContentsSchema.extend({ blob: Base64Schema });
426
+ /**
427
+ * The sender or recipient of messages and data in a conversation.
428
+ */
429
+ const RoleSchema = z.enum(["user", "assistant"]);
430
+ /**
431
+ * Optional annotations providing clients additional context about a resource.
432
+ */
433
+ const AnnotationsSchema = z.object({
434
+ audience: z.array(RoleSchema).optional(),
435
+ priority: z.number().min(0).max(1).optional(),
436
+ lastModified: z.iso.datetime({ offset: true }).optional()
437
+ });
438
+ /**
439
+ * A known resource that the server is capable of reading.
440
+ */
441
+ const ResourceSchema = z.object({
442
+ ...BaseMetadataSchema.shape,
443
+ ...IconsSchema.shape,
444
+ uri: z.string(),
445
+ description: z.optional(z.string()),
446
+ mimeType: z.optional(z.string()),
447
+ size: z.optional(z.number()),
448
+ annotations: AnnotationsSchema.optional(),
449
+ _meta: z.optional(z.looseObject({}))
450
+ });
451
+ /**
452
+ * A template description for resources available on the server.
453
+ */
454
+ const ResourceTemplateSchema = z.object({
455
+ ...BaseMetadataSchema.shape,
456
+ ...IconsSchema.shape,
457
+ uriTemplate: z.string(),
458
+ description: z.optional(z.string()),
459
+ mimeType: z.optional(z.string()),
460
+ annotations: AnnotationsSchema.optional(),
461
+ _meta: z.optional(z.looseObject({}))
462
+ });
463
+ /**
464
+ * Sent from the client to request a list of resources the server has.
465
+ */
466
+ const ListResourcesRequestSchema = PaginatedRequestSchema.extend({ method: z.literal("resources/list") });
467
+ /**
468
+ * The server's response to a {@linkcode ListResourcesRequest | resources/list} request from the client.
469
+ */
470
+ const ListResourcesResultSchema = PaginatedResultSchema.extend({ resources: z.array(ResourceSchema) });
471
+ /**
472
+ * Sent from the client to request a list of resource templates the server has.
473
+ */
474
+ const ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ method: z.literal("resources/templates/list") });
475
+ /**
476
+ * The server's response to a {@linkcode ListResourceTemplatesRequest | resources/templates/list} request from the client.
477
+ */
478
+ const ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({ resourceTemplates: z.array(ResourceTemplateSchema) });
479
+ const ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({ uri: z.string() });
480
+ /**
481
+ * Parameters for a {@linkcode ReadResourceRequest | resources/read} request.
482
+ */
483
+ const ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
484
+ /**
485
+ * Sent from the client to the server, to read a specific resource URI.
486
+ */
487
+ const ReadResourceRequestSchema = RequestSchema.extend({
488
+ method: z.literal("resources/read"),
489
+ params: ReadResourceRequestParamsSchema
490
+ });
491
+ /**
492
+ * The server's response to a {@linkcode ReadResourceRequest | resources/read} request from the client.
493
+ */
494
+ const ReadResourceResultSchema = ResultSchema.extend({ contents: z.array(z.union([TextResourceContentsSchema, BlobResourceContentsSchema])) });
495
+ /**
496
+ * An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.
497
+ */
498
+ const ResourceListChangedNotificationSchema = NotificationSchema.extend({
499
+ method: z.literal("notifications/resources/list_changed"),
500
+ params: NotificationsParamsSchema.optional()
501
+ });
502
+ const SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
503
+ /**
504
+ * Sent from the client to request `resources/updated` notifications from the server whenever a particular resource changes.
505
+ */
506
+ const SubscribeRequestSchema = RequestSchema.extend({
507
+ method: z.literal("resources/subscribe"),
508
+ params: SubscribeRequestParamsSchema
509
+ });
510
+ const UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
511
+ /**
512
+ * Sent from the client to request cancellation of {@linkcode ResourceUpdatedNotification | resources/updated} notifications from the server. This should follow a previous {@linkcode SubscribeRequest | resources/subscribe} request.
513
+ */
514
+ const UnsubscribeRequestSchema = RequestSchema.extend({
515
+ method: z.literal("resources/unsubscribe"),
516
+ params: UnsubscribeRequestParamsSchema
517
+ });
518
+ /**
519
+ * The set of notification types a client opts in to on a `subscriptions/listen`
520
+ * request. Each type is opt-in; the server MUST NOT send a notification type
521
+ * the client has not explicitly requested here.
522
+ */
523
+ const SubscriptionFilterSchema = z.object({
524
+ toolsListChanged: z.boolean().optional(),
525
+ promptsListChanged: z.boolean().optional(),
526
+ resourcesListChanged: z.boolean().optional(),
527
+ resourceSubscriptions: z.array(z.string()).optional()
528
+ });
529
+ const SubscriptionsListenRequestParamsSchema = BaseRequestParamsSchema.extend({ notifications: SubscriptionFilterSchema });
530
+ /**
531
+ * Sent from the client to open a long-lived channel for receiving notifications
532
+ * outside the context of a specific request (protocol revision 2026-07-28).
533
+ * Replaces the previous HTTP GET endpoint and `resources/subscribe`.
534
+ */
535
+ const SubscriptionsListenRequestSchema = RequestSchema.extend({
536
+ method: z.literal("subscriptions/listen"),
537
+ params: SubscriptionsListenRequestParamsSchema
538
+ });
539
+ const SubscriptionsAcknowledgedNotificationParamsSchema = NotificationsParamsSchema.extend({ notifications: SubscriptionFilterSchema });
540
+ /**
541
+ * Sent by the server as the first message on a `subscriptions/listen` stream
542
+ * to acknowledge that the subscription has been established and report which
543
+ * notification types it agreed to honor (protocol revision 2026-07-28).
544
+ */
545
+ const SubscriptionsAcknowledgedNotificationSchema = NotificationSchema.extend({
546
+ method: z.literal("notifications/subscriptions/acknowledged"),
547
+ params: SubscriptionsAcknowledgedNotificationParamsSchema
548
+ });
549
+ /**
550
+ * `_meta` for a {@linkcode SubscriptionsListenResult}: the listen request's
551
+ * JSON-RPC ID under the canonical subscription-id key (mirroring the same key
552
+ * on every notification delivered on the stream). Extends
553
+ * {@linkcode ResultMetaObjectSchema}, so the optional serverInfo key is typed
554
+ * here too.
555
+ */
556
+ const SubscriptionsListenResultMetaSchema = ResultMetaObjectSchema.extend({ [SUBSCRIPTION_ID_META_KEY]: RequestIdSchema });
557
+ /**
558
+ * The response to a `subscriptions/listen` request, signalling that the
559
+ * subscription has ended gracefully (for example, during server shutdown).
560
+ * Because the listen stream is long-lived, this result is sent only when the
561
+ * server tears the subscription down; an abrupt transport close carries no
562
+ * response. The result body is otherwise empty.
563
+ */
564
+ const SubscriptionsListenResultSchema = ResultSchema.extend({ _meta: SubscriptionsListenResultMetaSchema });
565
+ /**
566
+ * Parameters for a {@linkcode ResourceUpdatedNotification | notifications/resources/updated} notification.
567
+ */
568
+ const ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({ uri: z.string() });
569
+ /**
570
+ * A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a {@linkcode SubscribeRequest | resources/subscribe} request.
571
+ */
572
+ const ResourceUpdatedNotificationSchema = NotificationSchema.extend({
573
+ method: z.literal("notifications/resources/updated"),
574
+ params: ResourceUpdatedNotificationParamsSchema
575
+ });
576
+ /**
577
+ * Describes an argument that a prompt can accept.
578
+ */
579
+ const PromptArgumentSchema = z.object({
580
+ name: z.string(),
581
+ description: z.optional(z.string()),
582
+ required: z.optional(z.boolean())
583
+ });
584
+ /**
585
+ * A prompt or prompt template that the server offers.
586
+ */
587
+ const PromptSchema = z.object({
588
+ ...BaseMetadataSchema.shape,
589
+ ...IconsSchema.shape,
590
+ description: z.optional(z.string()),
591
+ arguments: z.optional(z.array(PromptArgumentSchema)),
592
+ _meta: z.optional(z.looseObject({}))
593
+ });
594
+ /**
595
+ * Sent from the client to request a list of prompts and prompt templates the server has.
596
+ */
597
+ const ListPromptsRequestSchema = PaginatedRequestSchema.extend({ method: z.literal("prompts/list") });
598
+ /**
599
+ * The server's response to a {@linkcode ListPromptsRequest | prompts/list} request from the client.
600
+ */
601
+ const ListPromptsResultSchema = PaginatedResultSchema.extend({ prompts: z.array(PromptSchema) });
602
+ /**
603
+ * Parameters for a {@linkcode GetPromptRequest | prompts/get} request.
604
+ */
605
+ const GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
606
+ name: z.string(),
607
+ arguments: z.record(z.string(), z.string()).optional()
608
+ });
609
+ /**
610
+ * Used by the client to get a prompt provided by the server.
611
+ */
612
+ const GetPromptRequestSchema = RequestSchema.extend({
613
+ method: z.literal("prompts/get"),
614
+ params: GetPromptRequestParamsSchema
615
+ });
616
+ /**
617
+ * Text provided to or from an LLM.
618
+ */
619
+ const TextContentSchema = z.object({
620
+ type: z.literal("text"),
621
+ text: z.string(),
622
+ annotations: AnnotationsSchema.optional(),
623
+ _meta: z.record(z.string(), z.unknown()).optional()
624
+ });
625
+ /**
626
+ * An image provided to or from an LLM.
627
+ */
628
+ const ImageContentSchema = z.object({
629
+ type: z.literal("image"),
630
+ data: Base64Schema,
631
+ mimeType: z.string(),
632
+ annotations: AnnotationsSchema.optional(),
633
+ _meta: z.record(z.string(), z.unknown()).optional()
634
+ });
635
+ /**
636
+ * Audio content provided to or from an LLM.
637
+ */
638
+ const AudioContentSchema = z.object({
639
+ type: z.literal("audio"),
640
+ data: Base64Schema,
641
+ mimeType: z.string(),
642
+ annotations: AnnotationsSchema.optional(),
643
+ _meta: z.record(z.string(), z.unknown()).optional()
644
+ });
645
+ /**
646
+ * A tool call request from an assistant (LLM).
647
+ * Represents the assistant's request to use a tool.
648
+ *
649
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
650
+ * in the specification for at least twelve months. Migrate to calling LLM
651
+ * provider APIs directly.
652
+ */
653
+ const ToolUseContentSchema = z.object({
654
+ type: z.literal("tool_use"),
655
+ name: z.string(),
656
+ id: z.string(),
657
+ input: z.record(z.string(), z.unknown()),
658
+ _meta: z.record(z.string(), z.unknown()).optional()
659
+ });
660
+ /**
661
+ * The contents of a resource, embedded into a prompt or tool call result.
662
+ */
663
+ const EmbeddedResourceSchema = z.object({
664
+ type: z.literal("resource"),
665
+ resource: z.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
666
+ annotations: AnnotationsSchema.optional(),
667
+ _meta: z.record(z.string(), z.unknown()).optional()
668
+ });
669
+ /**
670
+ * A resource that the server is capable of reading, included in a prompt or tool call result.
671
+ *
672
+ * Note: resource links returned by tools are not guaranteed to appear in the results of {@linkcode ListResourcesRequest | resources/list} requests.
673
+ */
674
+ const ResourceLinkSchema = ResourceSchema.extend({ type: z.literal("resource_link") });
675
+ /**
676
+ * A content block that can be used in prompts and tool results.
677
+ */
678
+ const ContentBlockSchema = z.union([
679
+ TextContentSchema,
680
+ ImageContentSchema,
681
+ AudioContentSchema,
682
+ ResourceLinkSchema,
683
+ EmbeddedResourceSchema
684
+ ]);
685
+ /**
686
+ * Describes a message returned as part of a prompt.
687
+ */
688
+ const PromptMessageSchema = z.object({
689
+ role: RoleSchema,
690
+ content: ContentBlockSchema
691
+ });
692
+ /**
693
+ * The server's response to a {@linkcode GetPromptRequest | prompts/get} request from the client.
694
+ */
695
+ const GetPromptResultSchema = ResultSchema.extend({
696
+ description: z.string().optional(),
697
+ messages: z.array(PromptMessageSchema)
698
+ });
699
+ /**
700
+ * An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.
701
+ */
702
+ const PromptListChangedNotificationSchema = NotificationSchema.extend({
703
+ method: z.literal("notifications/prompts/list_changed"),
704
+ params: NotificationsParamsSchema.optional()
705
+ });
706
+ /**
707
+ * Additional properties describing a `Tool` to clients.
708
+ *
709
+ * NOTE: all properties in {@linkcode ToolAnnotations} are **hints**.
710
+ * They are not guaranteed to provide a faithful description of
711
+ * tool behavior (including descriptive properties like `title`).
712
+ *
713
+ * Clients should never make tool use decisions based on `ToolAnnotations`
714
+ * received from untrusted servers.
715
+ */
716
+ const ToolAnnotationsSchema = z.object({
717
+ title: z.string().optional(),
718
+ readOnlyHint: z.boolean().optional(),
719
+ destructiveHint: z.boolean().optional(),
720
+ idempotentHint: z.boolean().optional(),
721
+ openWorldHint: z.boolean().optional()
722
+ });
723
+ /**
724
+ * Execution-related properties for a tool.
725
+ */
726
+ const ToolExecutionSchema = z.object({ taskSupport: z.enum([
727
+ "required",
728
+ "optional",
729
+ "forbidden"
730
+ ]).optional() });
731
+ /**
732
+ * Definition for a tool the client can call.
733
+ */
734
+ const ToolSchema = z.object({
735
+ ...BaseMetadataSchema.shape,
736
+ ...IconsSchema.shape,
737
+ description: z.string().optional(),
738
+ inputSchema: z.object({
739
+ type: z.literal("object"),
740
+ properties: z.record(z.string(), JSONValueSchema).optional(),
741
+ required: z.array(z.string()).optional()
742
+ }).catchall(z.unknown()),
743
+ outputSchema: z.looseObject({ $schema: z.string().optional() }).optional(),
744
+ annotations: ToolAnnotationsSchema.optional(),
745
+ execution: ToolExecutionSchema.optional(),
746
+ _meta: z.record(z.string(), z.unknown()).optional()
747
+ });
748
+ /**
749
+ * Sent from the client to request a list of tools the server has.
750
+ */
751
+ const ListToolsRequestSchema = PaginatedRequestSchema.extend({ method: z.literal("tools/list") });
752
+ /**
753
+ * The server's response to a {@linkcode ListToolsRequest | tools/list} request from the client.
754
+ */
755
+ const ListToolsResultSchema = PaginatedResultSchema.extend({ tools: z.array(ToolSchema) });
756
+ /**
757
+ * The server's response to a tool call.
758
+ */
759
+ const CallToolResultSchema = ResultSchema.extend({
760
+ content: z.array(ContentBlockSchema).default([]),
761
+ structuredContent: z.unknown().optional(),
762
+ isError: z.boolean().optional()
763
+ });
764
+ /**
765
+ * {@linkcode CallToolResultSchema} extended with backwards compatibility to protocol version 2024-10-07.
766
+ */
767
+ const CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({ toolResult: z.unknown() }));
768
+ /**
769
+ * Parameters for a `tools/call` request.
770
+ */
771
+ const CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
772
+ name: z.string(),
773
+ arguments: z.record(z.string(), z.unknown()).optional()
774
+ });
775
+ /**
776
+ * Used by the client to invoke a tool provided by the server.
777
+ */
778
+ const CallToolRequestSchema = RequestSchema.extend({
779
+ method: z.literal("tools/call"),
780
+ params: CallToolRequestParamsSchema
781
+ });
782
+ /**
783
+ * An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.
784
+ */
785
+ const ToolListChangedNotificationSchema = NotificationSchema.extend({
786
+ method: z.literal("notifications/tools/list_changed"),
787
+ params: NotificationsParamsSchema.optional()
788
+ });
789
+ /**
790
+ * Base schema for list changed subscription options (without callback).
791
+ * Used internally for Zod validation of `autoRefresh` and `debounceMs`.
792
+ */
793
+ const ListChangedOptionsBaseSchema = z.object({
794
+ autoRefresh: z.boolean().default(true),
795
+ debounceMs: z.number().int().nonnegative().default(300)
796
+ });
797
+ /**
798
+ * The severity of a log message.
799
+ *
800
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
801
+ * in the specification for at least twelve months. Migrate to stderr logging
802
+ * (STDIO servers) or OpenTelemetry.
803
+ */
804
+ const LoggingLevelSchema = z.enum([
805
+ "debug",
806
+ "info",
807
+ "notice",
808
+ "warning",
809
+ "error",
810
+ "critical",
811
+ "alert",
812
+ "emergency"
813
+ ]);
814
+ /**
815
+ * Parameters for a `logging/setLevel` request.
816
+ *
817
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
818
+ * in the specification for at least twelve months. Migrate to stderr logging
819
+ * (STDIO servers) or OpenTelemetry.
820
+ */
821
+ const SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({ level: LoggingLevelSchema });
822
+ /**
823
+ * A request from the client to the server, to enable or adjust logging.
824
+ *
825
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
826
+ * in the specification for at least twelve months. Migrate to stderr logging
827
+ * (STDIO servers) or OpenTelemetry.
828
+ */
829
+ const SetLevelRequestSchema = RequestSchema.extend({
830
+ method: z.literal("logging/setLevel"),
831
+ params: SetLevelRequestParamsSchema
832
+ });
833
+ /**
834
+ * Parameters for a `notifications/message` notification.
835
+ *
836
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
837
+ * in the specification for at least twelve months. Migrate to stderr logging
838
+ * (STDIO servers) or OpenTelemetry.
839
+ */
840
+ const LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
841
+ level: LoggingLevelSchema,
842
+ logger: z.string().optional(),
843
+ data: z.unknown()
844
+ });
845
+ /**
846
+ * Notification of a log message passed from server to client. If no `logging/setLevel` request has been sent from the client, the server MAY decide which messages to send automatically.
847
+ *
848
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
849
+ * in the specification for at least twelve months. Migrate to stderr logging
850
+ * (STDIO servers) or OpenTelemetry.
851
+ */
852
+ const LoggingMessageNotificationSchema = NotificationSchema.extend({
853
+ method: z.literal("notifications/message"),
854
+ params: LoggingMessageNotificationParamsSchema
855
+ });
856
+ /**
857
+ * Hints to use for model selection.
858
+ *
859
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
860
+ * in the specification for at least twelve months. Migrate to calling LLM
861
+ * provider APIs directly.
862
+ */
863
+ const ModelHintSchema = z.object({ name: z.string().optional() });
864
+ /**
865
+ * The server's preferences for model selection, requested of the client during sampling.
866
+ *
867
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
868
+ * in the specification for at least twelve months. Migrate to calling LLM
869
+ * provider APIs directly.
870
+ */
871
+ const ModelPreferencesSchema = z.object({
872
+ hints: z.array(ModelHintSchema).optional(),
873
+ costPriority: z.number().min(0).max(1).optional(),
874
+ speedPriority: z.number().min(0).max(1).optional(),
875
+ intelligencePriority: z.number().min(0).max(1).optional()
876
+ });
877
+ /**
878
+ * Controls tool usage behavior in sampling requests.
879
+ *
880
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
881
+ * in the specification for at least twelve months. Migrate to calling LLM
882
+ * provider APIs directly.
883
+ */
884
+ const ToolChoiceSchema = z.object({ mode: z.enum([
885
+ "auto",
886
+ "required",
887
+ "none"
888
+ ]).optional() });
889
+ /**
890
+ * The result of a tool execution, provided by the user (server).
891
+ * Represents the outcome of invoking a tool requested via `ToolUseContent`.
892
+ *
893
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
894
+ * in the specification for at least twelve months. Migrate to calling LLM
895
+ * provider APIs directly.
896
+ */
897
+ const ToolResultContentSchema = z.object({
898
+ type: z.literal("tool_result"),
899
+ toolUseId: z.string().describe("The unique identifier for the corresponding tool call."),
900
+ content: z.array(ContentBlockSchema),
901
+ structuredContent: z.unknown().optional(),
902
+ isError: z.boolean().optional(),
903
+ _meta: z.record(z.string(), z.unknown()).optional()
904
+ });
905
+ /**
906
+ * Basic content types for sampling responses (without tool use).
907
+ * Used for backwards-compatible {@linkcode CreateMessageResult} when tools are not used.
908
+ *
909
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
910
+ * in the specification for at least twelve months. Migrate to calling LLM
911
+ * provider APIs directly.
912
+ */
913
+ const SamplingContentSchema = z.discriminatedUnion("type", [
914
+ TextContentSchema,
915
+ ImageContentSchema,
916
+ AudioContentSchema
917
+ ]);
918
+ /**
919
+ * Content block types allowed in sampling messages.
920
+ * This includes text, image, audio, tool use requests, and tool results.
921
+ *
922
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
923
+ * in the specification for at least twelve months. Migrate to calling LLM
924
+ * provider APIs directly.
925
+ */
926
+ const SamplingMessageContentBlockSchema = z.discriminatedUnion("type", [
927
+ TextContentSchema,
928
+ ImageContentSchema,
929
+ AudioContentSchema,
930
+ ToolUseContentSchema,
931
+ ToolResultContentSchema
932
+ ]);
933
+ /**
934
+ * Describes a message issued to or received from an LLM API.
935
+ *
936
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
937
+ * in the specification for at least twelve months. Migrate to calling LLM
938
+ * provider APIs directly.
939
+ */
940
+ const SamplingMessageSchema = z.object({
941
+ role: RoleSchema,
942
+ content: z.union([SamplingMessageContentBlockSchema, z.array(SamplingMessageContentBlockSchema)]),
943
+ _meta: z.record(z.string(), z.unknown()).optional()
944
+ });
945
+ /**
946
+ * Parameters for a `sampling/createMessage` request.
947
+ *
948
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
949
+ * in the specification for at least twelve months. Migrate to calling LLM
950
+ * provider APIs directly.
951
+ */
952
+ const CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
953
+ messages: z.array(SamplingMessageSchema),
954
+ modelPreferences: ModelPreferencesSchema.optional(),
955
+ systemPrompt: z.string().optional(),
956
+ includeContext: z.enum([
957
+ "none",
958
+ "thisServer",
959
+ "allServers"
960
+ ]).optional(),
961
+ temperature: z.number().optional(),
962
+ maxTokens: z.number().int(),
963
+ stopSequences: z.array(z.string()).optional(),
964
+ metadata: JSONObjectSchema.optional(),
965
+ tools: z.array(ToolSchema).optional(),
966
+ toolChoice: ToolChoiceSchema.optional()
967
+ });
968
+ /**
969
+ * A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.
970
+ *
971
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
972
+ * in the specification for at least twelve months. Migrate to calling LLM
973
+ * provider APIs directly.
974
+ */
975
+ const CreateMessageRequestSchema = RequestSchema.extend({
976
+ method: z.literal("sampling/createMessage"),
977
+ params: CreateMessageRequestParamsSchema
978
+ });
979
+ /**
980
+ * The client's response to a `sampling/create_message` request from the server.
981
+ * This is the backwards-compatible version that returns single content (no arrays).
982
+ * Used when the request does not include tools.
983
+ *
984
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
985
+ * in the specification for at least twelve months. Migrate to calling LLM
986
+ * provider APIs directly.
987
+ */
988
+ const CreateMessageResultSchema = ResultSchema.extend({
989
+ model: z.string(),
990
+ stopReason: z.optional(z.enum([
991
+ "endTurn",
992
+ "stopSequence",
993
+ "maxTokens"
994
+ ]).or(z.string())),
995
+ role: RoleSchema,
996
+ content: SamplingContentSchema
997
+ });
998
+ /**
999
+ * The client's response to a `sampling/create_message` request when tools were provided.
1000
+ * This version supports array content for tool use flows.
1001
+ *
1002
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
1003
+ * in the specification for at least twelve months. Migrate to calling LLM
1004
+ * provider APIs directly.
1005
+ */
1006
+ const CreateMessageResultWithToolsSchema = ResultSchema.extend({
1007
+ model: z.string(),
1008
+ stopReason: z.optional(z.enum([
1009
+ "endTurn",
1010
+ "stopSequence",
1011
+ "maxTokens",
1012
+ "toolUse"
1013
+ ]).or(z.string())),
1014
+ role: RoleSchema,
1015
+ content: z.union([SamplingMessageContentBlockSchema, z.array(SamplingMessageContentBlockSchema)])
1016
+ });
1017
+ /**
1018
+ * Primitive schema definition for boolean fields.
1019
+ */
1020
+ const BooleanSchemaSchema = z.object({
1021
+ type: z.literal("boolean"),
1022
+ title: z.string().optional(),
1023
+ description: z.string().optional(),
1024
+ default: z.boolean().optional()
1025
+ });
1026
+ /**
1027
+ * Primitive schema definition for string fields.
1028
+ */
1029
+ const StringSchemaSchema = z.object({
1030
+ type: z.literal("string"),
1031
+ title: z.string().optional(),
1032
+ description: z.string().optional(),
1033
+ minLength: z.number().optional(),
1034
+ maxLength: z.number().optional(),
1035
+ format: z.enum([
1036
+ "email",
1037
+ "uri",
1038
+ "date",
1039
+ "date-time"
1040
+ ]).optional(),
1041
+ default: z.string().optional()
1042
+ });
1043
+ /**
1044
+ * Primitive schema definition for number fields.
1045
+ */
1046
+ const NumberSchemaSchema = z.object({
1047
+ type: z.enum(["number", "integer"]),
1048
+ title: z.string().optional(),
1049
+ description: z.string().optional(),
1050
+ minimum: z.number().optional(),
1051
+ maximum: z.number().optional(),
1052
+ default: z.number().optional()
1053
+ });
1054
+ /**
1055
+ * Schema for single-selection enumeration without display titles for options.
1056
+ */
1057
+ const UntitledSingleSelectEnumSchemaSchema = z.object({
1058
+ type: z.literal("string"),
1059
+ title: z.string().optional(),
1060
+ description: z.string().optional(),
1061
+ enum: z.array(z.string()),
1062
+ default: z.string().optional()
1063
+ });
1064
+ /**
1065
+ * Schema for single-selection enumeration with display titles for each option.
1066
+ */
1067
+ const TitledSingleSelectEnumSchemaSchema = z.object({
1068
+ type: z.literal("string"),
1069
+ title: z.string().optional(),
1070
+ description: z.string().optional(),
1071
+ oneOf: z.array(z.object({
1072
+ const: z.string(),
1073
+ title: z.string()
1074
+ })),
1075
+ default: z.string().optional()
1076
+ });
1077
+ /**
1078
+ * Use {@linkcode TitledSingleSelectEnumSchema} instead.
1079
+ * This interface will be removed in a future version.
1080
+ */
1081
+ const LegacyTitledEnumSchemaSchema = z.object({
1082
+ type: z.literal("string"),
1083
+ title: z.string().optional(),
1084
+ description: z.string().optional(),
1085
+ enum: z.array(z.string()),
1086
+ enumNames: z.array(z.string()).optional(),
1087
+ default: z.string().optional()
1088
+ });
1089
+ const SingleSelectEnumSchemaSchema = z.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
1090
+ /**
1091
+ * Schema for multiple-selection enumeration without display titles for options.
1092
+ */
1093
+ const UntitledMultiSelectEnumSchemaSchema = z.object({
1094
+ type: z.literal("array"),
1095
+ title: z.string().optional(),
1096
+ description: z.string().optional(),
1097
+ minItems: z.number().optional(),
1098
+ maxItems: z.number().optional(),
1099
+ items: z.object({
1100
+ type: z.literal("string"),
1101
+ enum: z.array(z.string())
1102
+ }),
1103
+ default: z.array(z.string()).optional()
1104
+ });
1105
+ /**
1106
+ * Schema for multiple-selection enumeration with display titles for each option.
1107
+ */
1108
+ const TitledMultiSelectEnumSchemaSchema = z.object({
1109
+ type: z.literal("array"),
1110
+ title: z.string().optional(),
1111
+ description: z.string().optional(),
1112
+ minItems: z.number().optional(),
1113
+ maxItems: z.number().optional(),
1114
+ items: z.object({ anyOf: z.array(z.object({
1115
+ const: z.string(),
1116
+ title: z.string()
1117
+ })) }),
1118
+ default: z.array(z.string()).optional()
1119
+ });
1120
+ /**
1121
+ * Combined schema for multiple-selection enumeration
1122
+ */
1123
+ const MultiSelectEnumSchemaSchema = z.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
1124
+ /**
1125
+ * Primitive schema definition for enum fields.
1126
+ */
1127
+ const EnumSchemaSchema = z.union([
1128
+ LegacyTitledEnumSchemaSchema,
1129
+ SingleSelectEnumSchemaSchema,
1130
+ MultiSelectEnumSchemaSchema
1131
+ ]);
1132
+ /**
1133
+ * Union of all primitive schema definitions.
1134
+ */
1135
+ const PrimitiveSchemaDefinitionSchema = z.union([
1136
+ EnumSchemaSchema,
1137
+ BooleanSchemaSchema,
1138
+ StringSchemaSchema,
1139
+ NumberSchemaSchema
1140
+ ]);
1141
+ /**
1142
+ * Parameters for an `elicitation/create` request for form-based elicitation.
1143
+ */
1144
+ const ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
1145
+ mode: z.literal("form").optional(),
1146
+ message: z.string(),
1147
+ requestedSchema: z.object({
1148
+ type: z.literal("object"),
1149
+ properties: z.record(z.string(), PrimitiveSchemaDefinitionSchema),
1150
+ required: z.array(z.string()).optional()
1151
+ }).catchall(z.unknown())
1152
+ });
1153
+ /**
1154
+ * Parameters for an {@linkcode ElicitRequest | elicitation/create} request for URL-based elicitation.
1155
+ */
1156
+ const ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
1157
+ mode: z.literal("url"),
1158
+ message: z.string(),
1159
+ elicitationId: z.string(),
1160
+ url: z.string().url()
1161
+ });
1162
+ /**
1163
+ * The parameters for a request to elicit additional information from the user via the client.
1164
+ */
1165
+ const ElicitRequestParamsSchema = z.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
1166
+ /**
1167
+ * A request from the server to elicit user input via the client.
1168
+ * The client should present the message and form fields to the user (form mode)
1169
+ * or navigate to a URL (URL mode).
1170
+ */
1171
+ const ElicitRequestSchema = RequestSchema.extend({
1172
+ method: z.literal("elicitation/create"),
1173
+ params: ElicitRequestParamsSchema
1174
+ });
1175
+ /**
1176
+ * Parameters for a {@linkcode ElicitationCompleteNotification | notifications/elicitation/complete} notification.
1177
+ *
1178
+ * @deprecated Removed from the spec by #2891 (2026-07-28). The client learns the outcome
1179
+ * of an out-of-band interaction by retrying the original request; no server-initiated
1180
+ * completion signal exists in the 2026-07-28 revision. Kept here for the 2025-era flow
1181
+ * only. The 2026-07-28 wire codec excludes this notification.
1182
+ * @category notifications/elicitation/complete
1183
+ */
1184
+ const ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({ elicitationId: z.string() });
1185
+ /**
1186
+ * A notification from the server to the client, informing it of a completion of an out-of-band elicitation request.
1187
+ *
1188
+ * @deprecated Removed from the spec by #2891 (2026-07-28). The client learns the outcome
1189
+ * of an out-of-band interaction by retrying the original request; no server-initiated
1190
+ * completion signal exists in the 2026-07-28 revision. Kept here for the 2025-era flow
1191
+ * only. The 2026-07-28 wire codec excludes this notification.
1192
+ * @category notifications/elicitation/complete
1193
+ */
1194
+ const ElicitationCompleteNotificationSchema = NotificationSchema.extend({
1195
+ method: z.literal("notifications/elicitation/complete"),
1196
+ params: ElicitationCompleteNotificationParamsSchema
1197
+ });
1198
+ /**
1199
+ * The client's response to an {@linkcode ElicitRequest | elicitation/create} request from the server.
1200
+ */
1201
+ const ElicitResultSchema = ResultSchema.extend({
1202
+ action: z.enum([
1203
+ "accept",
1204
+ "decline",
1205
+ "cancel"
1206
+ ]),
1207
+ content: z.preprocess((val) => val === null ? void 0 : val, z.record(z.string(), z.union([
1208
+ z.string(),
1209
+ z.number(),
1210
+ z.boolean(),
1211
+ z.array(z.string())
1212
+ ])).optional())
1213
+ });
1214
+ /**
1215
+ * A reference to a resource or resource template definition.
1216
+ */
1217
+ const ResourceTemplateReferenceSchema = z.object({
1218
+ type: z.literal("ref/resource"),
1219
+ uri: z.string()
1220
+ });
1221
+ /**
1222
+ * Identifies a prompt.
1223
+ */
1224
+ const PromptReferenceSchema = z.object({
1225
+ type: z.literal("ref/prompt"),
1226
+ name: z.string()
1227
+ });
1228
+ /**
1229
+ * Parameters for a {@linkcode CompleteRequest | completion/complete} request.
1230
+ */
1231
+ const CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
1232
+ ref: z.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
1233
+ argument: z.object({
1234
+ name: z.string(),
1235
+ value: z.string()
1236
+ }),
1237
+ context: z.object({ arguments: z.record(z.string(), z.string()).optional() }).optional()
1238
+ });
1239
+ /**
1240
+ * A request from the client to the server, to ask for completion options.
1241
+ */
1242
+ const CompleteRequestSchema = RequestSchema.extend({
1243
+ method: z.literal("completion/complete"),
1244
+ params: CompleteRequestParamsSchema
1245
+ });
1246
+ /**
1247
+ * The server's response to a {@linkcode CompleteRequest | completion/complete} request
1248
+ */
1249
+ const CompleteResultSchema = ResultSchema.extend({ completion: z.looseObject({
1250
+ values: z.array(z.string()).max(100),
1251
+ total: z.optional(z.number().int()),
1252
+ hasMore: z.optional(z.boolean())
1253
+ }) });
1254
+ /**
1255
+ * Represents a root directory or file that the server can operate on.
1256
+ *
1257
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
1258
+ * in the specification for at least twelve months. Migrate to passing paths via
1259
+ * tool parameters, resource URIs, or configuration.
1260
+ */
1261
+ const RootSchema = z.object({
1262
+ uri: z.string().startsWith("file://"),
1263
+ name: z.string().optional(),
1264
+ _meta: z.record(z.string(), z.unknown()).optional()
1265
+ });
1266
+ /**
1267
+ * Sent from the server to request a list of root URIs from the client.
1268
+ *
1269
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
1270
+ * in the specification for at least twelve months. Migrate to passing paths via
1271
+ * tool parameters, resource URIs, or configuration.
1272
+ */
1273
+ const ListRootsRequestSchema = RequestSchema.extend({
1274
+ method: z.literal("roots/list"),
1275
+ params: BaseRequestParamsSchema.optional()
1276
+ });
1277
+ /**
1278
+ * The client's response to a `roots/list` request from the server.
1279
+ *
1280
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
1281
+ * in the specification for at least twelve months. Migrate to passing paths via
1282
+ * tool parameters, resource URIs, or configuration.
1283
+ */
1284
+ const ListRootsResultSchema = ResultSchema.extend({ roots: z.array(RootSchema) });
1285
+ /**
1286
+ * A notification from the client to the server, informing it that the list of roots has changed.
1287
+ *
1288
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
1289
+ * in the specification for at least twelve months. Migrate to passing paths via
1290
+ * tool parameters, resource URIs, or configuration.
1291
+ */
1292
+ const RootsListChangedNotificationSchema = NotificationSchema.extend({
1293
+ method: z.literal("notifications/roots/list_changed"),
1294
+ params: NotificationsParamsSchema.optional()
1295
+ });
1296
+ /**
1297
+ * Task creation parameters, used to ask that the server create a task to represent a request.
1298
+ *
1299
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1300
+ */
1301
+ const TaskCreationParamsSchema = z.looseObject({
1302
+ ttl: z.number().optional(),
1303
+ pollInterval: z.number().optional()
1304
+ });
1305
+ /**
1306
+ * The status of a task.
1307
+ *
1308
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1309
+ */
1310
+ const TaskStatusSchema = z.enum([
1311
+ "working",
1312
+ "input_required",
1313
+ "completed",
1314
+ "failed",
1315
+ "cancelled"
1316
+ ]);
1317
+ /**
1318
+ * A pollable state object associated with a request.
1319
+ *
1320
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1321
+ */
1322
+ const TaskSchema = z.object({
1323
+ taskId: z.string(),
1324
+ status: TaskStatusSchema,
1325
+ ttl: z.union([z.number(), z.null()]),
1326
+ createdAt: z.string(),
1327
+ lastUpdatedAt: z.string(),
1328
+ pollInterval: z.optional(z.number()),
1329
+ statusMessage: z.optional(z.string())
1330
+ });
1331
+ /**
1332
+ * Result returned when a task is created, containing the task data wrapped in a `task` field.
1333
+ *
1334
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1335
+ */
1336
+ const CreateTaskResultSchema = ResultSchema.extend({ task: TaskSchema });
1337
+ /**
1338
+ * Parameters for task status notification.
1339
+ *
1340
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1341
+ */
1342
+ const TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema);
1343
+ /**
1344
+ * A notification sent when a task's status changes.
1345
+ *
1346
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1347
+ */
1348
+ const TaskStatusNotificationSchema = NotificationSchema.extend({
1349
+ method: z.literal("notifications/tasks/status"),
1350
+ params: TaskStatusNotificationParamsSchema
1351
+ });
1352
+ /**
1353
+ * A request to get the state of a specific task.
1354
+ *
1355
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1356
+ */
1357
+ const GetTaskRequestSchema = RequestSchema.extend({
1358
+ method: z.literal("tasks/get"),
1359
+ params: BaseRequestParamsSchema.extend({ taskId: z.string() })
1360
+ });
1361
+ /**
1362
+ * The response to a {@linkcode GetTaskRequest | tasks/get} request.
1363
+ *
1364
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1365
+ */
1366
+ const GetTaskResultSchema = ResultSchema.merge(TaskSchema);
1367
+ /**
1368
+ * A request to get the result of a specific task.
1369
+ *
1370
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1371
+ */
1372
+ const GetTaskPayloadRequestSchema = RequestSchema.extend({
1373
+ method: z.literal("tasks/result"),
1374
+ params: BaseRequestParamsSchema.extend({ taskId: z.string() })
1375
+ });
1376
+ /**
1377
+ * The response to a `tasks/result` request.
1378
+ * The structure matches the result type of the original request.
1379
+ * For example, a {@linkcode CallToolRequest | tools/call} task would return the `CallToolResult` structure.
1380
+ *
1381
+ *
1382
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1383
+ */
1384
+ const GetTaskPayloadResultSchema = ResultSchema.loose();
1385
+ /**
1386
+ * A request to list tasks.
1387
+ *
1388
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1389
+ */
1390
+ const ListTasksRequestSchema = PaginatedRequestSchema.extend({ method: z.literal("tasks/list") });
1391
+ /**
1392
+ * The response to a {@linkcode ListTasksRequest | tasks/list} request.
1393
+ *
1394
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1395
+ */
1396
+ const ListTasksResultSchema = PaginatedResultSchema.extend({ tasks: z.array(TaskSchema) });
1397
+ /**
1398
+ * A request to cancel a specific task.
1399
+ *
1400
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1401
+ */
1402
+ const CancelTaskRequestSchema = RequestSchema.extend({
1403
+ method: z.literal("tasks/cancel"),
1404
+ params: BaseRequestParamsSchema.extend({ taskId: z.string() })
1405
+ });
1406
+ /**
1407
+ * The response to a {@linkcode CancelTaskRequest | tasks/cancel} request.
1408
+ *
1409
+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
1410
+ */
1411
+ const CancelTaskResultSchema = ResultSchema.merge(TaskSchema);
1412
+ const ClientRequestSchema = z.union([
1413
+ PingRequestSchema,
1414
+ InitializeRequestSchema,
1415
+ DiscoverRequestSchema,
1416
+ CompleteRequestSchema,
1417
+ SetLevelRequestSchema,
1418
+ GetPromptRequestSchema,
1419
+ ListPromptsRequestSchema,
1420
+ ListResourcesRequestSchema,
1421
+ ListResourceTemplatesRequestSchema,
1422
+ ReadResourceRequestSchema,
1423
+ SubscribeRequestSchema,
1424
+ UnsubscribeRequestSchema,
1425
+ SubscriptionsListenRequestSchema,
1426
+ CallToolRequestSchema,
1427
+ ListToolsRequestSchema
1428
+ ]);
1429
+ const ClientNotificationSchema = z.union([
1430
+ CancelledNotificationSchema,
1431
+ ProgressNotificationSchema,
1432
+ InitializedNotificationSchema,
1433
+ RootsListChangedNotificationSchema
1434
+ ]);
1435
+ const ClientResultSchema = z.union([
1436
+ EmptyResultSchema,
1437
+ CreateMessageResultSchema,
1438
+ CreateMessageResultWithToolsSchema,
1439
+ ElicitResultSchema,
1440
+ ListRootsResultSchema
1441
+ ]);
1442
+ const ServerRequestSchema = z.union([
1443
+ PingRequestSchema,
1444
+ CreateMessageRequestSchema,
1445
+ ElicitRequestSchema,
1446
+ ListRootsRequestSchema
1447
+ ]);
1448
+ const ServerNotificationSchema = z.union([
1449
+ CancelledNotificationSchema,
1450
+ ProgressNotificationSchema,
1451
+ LoggingMessageNotificationSchema,
1452
+ ResourceUpdatedNotificationSchema,
1453
+ ResourceListChangedNotificationSchema,
1454
+ ToolListChangedNotificationSchema,
1455
+ PromptListChangedNotificationSchema,
1456
+ SubscriptionsAcknowledgedNotificationSchema,
1457
+ ElicitationCompleteNotificationSchema
1458
+ ]);
1459
+ const ServerResultSchema = z.union([
1460
+ EmptyResultSchema,
1461
+ InitializeResultSchema,
1462
+ DiscoverResultSchema,
1463
+ CompleteResultSchema,
1464
+ GetPromptResultSchema,
1465
+ ListPromptsResultSchema,
1466
+ ListResourcesResultSchema,
1467
+ ListResourceTemplatesResultSchema,
1468
+ ReadResourceResultSchema,
1469
+ CallToolResultSchema,
1470
+ ListToolsResultSchema,
1471
+ SubscriptionsListenResultSchema
1472
+ ]);
1473
+
1474
+ //#endregion
1475
+ //#region src/auth.ts
1476
+ /**
1477
+ * Reusable URL validation that disallows `javascript:` scheme
1478
+ */
1479
+ const SafeUrlSchema = z.url().superRefine((val, ctx) => {
1480
+ if (!URL.canParse(val)) {
1481
+ ctx.addIssue({
1482
+ code: z.ZodIssueCode.custom,
1483
+ message: "URL must be parseable",
1484
+ fatal: true
1485
+ });
1486
+ return z.NEVER;
1487
+ }
1488
+ }).refine((url) => {
1489
+ const u = new URL(url);
1490
+ return u.protocol !== "javascript:" && u.protocol !== "data:" && u.protocol !== "vbscript:";
1491
+ }, { message: "URL cannot use javascript:, data:, or vbscript: scheme" });
1492
+ /**
1493
+ * RFC 9728 OAuth Protected Resource Metadata
1494
+ */
1495
+ const OAuthProtectedResourceMetadataSchema = z.looseObject({
1496
+ resource: z.string().url(),
1497
+ authorization_servers: z.array(SafeUrlSchema).optional(),
1498
+ jwks_uri: z.string().url().optional(),
1499
+ scopes_supported: z.array(z.string()).optional(),
1500
+ bearer_methods_supported: z.array(z.string()).optional(),
1501
+ resource_signing_alg_values_supported: z.array(z.string()).optional(),
1502
+ resource_name: z.string().optional(),
1503
+ resource_documentation: z.string().optional(),
1504
+ resource_policy_uri: z.string().url().optional(),
1505
+ resource_tos_uri: z.string().url().optional(),
1506
+ tls_client_certificate_bound_access_tokens: z.boolean().optional(),
1507
+ authorization_details_types_supported: z.array(z.string()).optional(),
1508
+ dpop_signing_alg_values_supported: z.array(z.string()).optional(),
1509
+ dpop_bound_access_tokens_required: z.boolean().optional()
1510
+ });
1511
+ /**
1512
+ * RFC 8414 OAuth 2.0 Authorization Server Metadata
1513
+ */
1514
+ const OAuthMetadataSchema = z.looseObject({
1515
+ issuer: z.string(),
1516
+ authorization_endpoint: SafeUrlSchema,
1517
+ token_endpoint: SafeUrlSchema,
1518
+ registration_endpoint: SafeUrlSchema.optional(),
1519
+ scopes_supported: z.array(z.string()).optional(),
1520
+ response_types_supported: z.array(z.string()),
1521
+ response_modes_supported: z.array(z.string()).optional(),
1522
+ grant_types_supported: z.array(z.string()).optional(),
1523
+ token_endpoint_auth_methods_supported: z.array(z.string()).optional(),
1524
+ token_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),
1525
+ service_documentation: SafeUrlSchema.optional(),
1526
+ revocation_endpoint: SafeUrlSchema.optional(),
1527
+ revocation_endpoint_auth_methods_supported: z.array(z.string()).optional(),
1528
+ revocation_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),
1529
+ introspection_endpoint: z.string().optional(),
1530
+ introspection_endpoint_auth_methods_supported: z.array(z.string()).optional(),
1531
+ introspection_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),
1532
+ code_challenge_methods_supported: z.array(z.string()).optional(),
1533
+ client_id_metadata_document_supported: z.boolean().optional(),
1534
+ authorization_response_iss_parameter_supported: z.boolean().optional().catch(void 0)
1535
+ });
1536
+ /**
1537
+ * OpenID Connect Discovery 1.0 Provider Metadata
1538
+ *
1539
+ * @see https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
1540
+ */
1541
+ const OpenIdProviderMetadataSchema = z.looseObject({
1542
+ issuer: z.string(),
1543
+ authorization_endpoint: SafeUrlSchema,
1544
+ token_endpoint: SafeUrlSchema,
1545
+ userinfo_endpoint: SafeUrlSchema.optional(),
1546
+ jwks_uri: SafeUrlSchema,
1547
+ registration_endpoint: SafeUrlSchema.optional(),
1548
+ scopes_supported: z.array(z.string()).optional(),
1549
+ response_types_supported: z.array(z.string()),
1550
+ response_modes_supported: z.array(z.string()).optional(),
1551
+ grant_types_supported: z.array(z.string()).optional(),
1552
+ acr_values_supported: z.array(z.string()).optional(),
1553
+ subject_types_supported: z.array(z.string()),
1554
+ id_token_signing_alg_values_supported: z.array(z.string()),
1555
+ id_token_encryption_alg_values_supported: z.array(z.string()).optional(),
1556
+ id_token_encryption_enc_values_supported: z.array(z.string()).optional(),
1557
+ userinfo_signing_alg_values_supported: z.array(z.string()).optional(),
1558
+ userinfo_encryption_alg_values_supported: z.array(z.string()).optional(),
1559
+ userinfo_encryption_enc_values_supported: z.array(z.string()).optional(),
1560
+ request_object_signing_alg_values_supported: z.array(z.string()).optional(),
1561
+ request_object_encryption_alg_values_supported: z.array(z.string()).optional(),
1562
+ request_object_encryption_enc_values_supported: z.array(z.string()).optional(),
1563
+ token_endpoint_auth_methods_supported: z.array(z.string()).optional(),
1564
+ token_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),
1565
+ display_values_supported: z.array(z.string()).optional(),
1566
+ claim_types_supported: z.array(z.string()).optional(),
1567
+ claims_supported: z.array(z.string()).optional(),
1568
+ service_documentation: z.string().optional(),
1569
+ claims_locales_supported: z.array(z.string()).optional(),
1570
+ ui_locales_supported: z.array(z.string()).optional(),
1571
+ claims_parameter_supported: z.boolean().optional(),
1572
+ request_parameter_supported: z.boolean().optional(),
1573
+ request_uri_parameter_supported: z.boolean().optional(),
1574
+ require_request_uri_registration: z.boolean().optional(),
1575
+ op_policy_uri: SafeUrlSchema.optional(),
1576
+ op_tos_uri: SafeUrlSchema.optional(),
1577
+ client_id_metadata_document_supported: z.boolean().optional(),
1578
+ authorization_response_iss_parameter_supported: z.boolean().optional().catch(void 0)
1579
+ });
1580
+ /**
1581
+ * OpenID Connect Discovery metadata that may include OAuth 2.0 fields
1582
+ * This schema represents the real-world scenario where OIDC providers
1583
+ * return a mix of OpenID Connect and OAuth 2.0 metadata fields
1584
+ */
1585
+ const OpenIdProviderDiscoveryMetadataSchema = z.object({
1586
+ ...OpenIdProviderMetadataSchema.shape,
1587
+ ...OAuthMetadataSchema.pick({ code_challenge_methods_supported: true }).shape
1588
+ });
1589
+ /**
1590
+ * OAuth 2.1 token response
1591
+ */
1592
+ const OAuthTokensSchema = z.object({
1593
+ access_token: z.string(),
1594
+ id_token: z.string().optional(),
1595
+ token_type: z.string(),
1596
+ expires_in: z.coerce.number().optional(),
1597
+ scope: z.string().optional(),
1598
+ refresh_token: z.string().optional()
1599
+ }).strip();
1600
+ /**
1601
+ * RFC 8693 §2.2.1 Token Exchange response for ID-JAG tokens.
1602
+ *
1603
+ * `token_type` is intentionally optional: per RFC 8693 §2.2.1 it is informational when
1604
+ * the issued token is not an access token, and per RFC 6749 §5.1 it is case-insensitive,
1605
+ * so strict checking rejects conformant IdPs.
1606
+ */
1607
+ const IdJagTokenExchangeResponseSchema = z.object({
1608
+ issued_token_type: z.literal("urn:ietf:params:oauth:token-type:id-jag"),
1609
+ access_token: z.string(),
1610
+ token_type: z.string().optional(),
1611
+ expires_in: z.number().optional(),
1612
+ scope: z.string().optional()
1613
+ }).strip();
1614
+ /**
1615
+ * OAuth 2.1 error response
1616
+ */
1617
+ const OAuthErrorResponseSchema = z.object({
1618
+ error: z.string(),
1619
+ error_description: z.string().optional(),
1620
+ error_uri: z.string().optional()
1621
+ });
1622
+ /**
1623
+ * Optional version of {@linkcode SafeUrlSchema} that allows empty string for backward compatibility on `tos_uri` and `logo_uri`
1624
+ */
1625
+ const OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z.literal("").transform(() => void 0));
1626
+ /**
1627
+ * RFC 7591 OAuth 2.0 Dynamic Client Registration metadata
1628
+ */
1629
+ const OAuthClientMetadataSchema = z.object({
1630
+ redirect_uris: z.array(SafeUrlSchema),
1631
+ token_endpoint_auth_method: z.string().optional(),
1632
+ grant_types: z.array(z.string()).optional(),
1633
+ response_types: z.array(z.string()).optional(),
1634
+ application_type: z.string().optional(),
1635
+ client_name: z.string().optional(),
1636
+ client_uri: SafeUrlSchema.optional(),
1637
+ logo_uri: OptionalSafeUrlSchema,
1638
+ scope: z.string().optional(),
1639
+ contacts: z.array(z.string()).optional(),
1640
+ tos_uri: OptionalSafeUrlSchema,
1641
+ policy_uri: z.string().optional(),
1642
+ jwks_uri: SafeUrlSchema.optional(),
1643
+ jwks: z.any().optional(),
1644
+ software_id: z.string().optional(),
1645
+ software_version: z.string().optional(),
1646
+ software_statement: z.string().optional()
1647
+ }).strip();
1648
+ /**
1649
+ * RFC 7591 OAuth 2.0 Dynamic Client Registration client information
1650
+ */
1651
+ const OAuthClientInformationSchema = z.object({
1652
+ client_id: z.string(),
1653
+ client_secret: z.string().optional(),
1654
+ client_id_issued_at: z.number().optional(),
1655
+ client_secret_expires_at: z.number().optional()
1656
+ }).strip();
1657
+ /**
1658
+ * RFC 7591 OAuth 2.0 Dynamic Client Registration full response (client information plus metadata)
1659
+ */
1660
+ const OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
1661
+ /**
1662
+ * RFC 7591 OAuth 2.0 Dynamic Client Registration error response
1663
+ */
1664
+ const OAuthClientRegistrationErrorSchema = z.object({
1665
+ error: z.string(),
1666
+ error_description: z.string().optional()
1667
+ }).strip();
1668
+ /**
1669
+ * RFC 7009 OAuth 2.0 Token Revocation request
1670
+ */
1671
+ const OAuthTokenRevocationRequestSchema = z.object({
1672
+ token: z.string(),
1673
+ token_type_hint: z.string().optional()
1674
+ }).strip();
1675
+
1676
+ //#endregion
1677
+ export { EmbeddedResourceSchema as $, TaskMetadataSchema as $n, PrimitiveSchemaDefinitionSchema as $t, ClientRequestSchema as A, SamplingContentSchema as An, PARSE_ERROR as Ar, ListResourceTemplatesRequestSchema as At, CreateMessageResultSchema as B, SingleSelectEnumSchemaSchema as Bn, LoggingLevelSchema as Bt, CallToolResultSchema as C, ResourceUpdatedNotificationParamsSchema as Cn, INTERNAL_ERROR as Cr, JSONRPCResponseSchema as Ct, CancelledNotificationSchema as D, RoleSchema as Dn, LATEST_PROTOCOL_VERSION as Dr, ListChangedOptionsBaseSchema as Dt, CancelledNotificationParamsSchema as E, ResultSchema as En, JSONRPC_VERSION as Er, LegacyTitledEnumSchemaSchema as Et, CompleteRequestSchema as F, ServerRequestSchema as Fn, SUPPORTED_PROTOCOL_VERSIONS as Fr, ListRootsResultSchema as Ft, DiscoverResultSchema as G, SubscriptionsAcknowledgedNotificationParamsSchema as Gn, MultiSelectEnumSchemaSchema as Gt, CreateTaskResultSchema as H, SubscribeRequestParamsSchema as Hn, LoggingMessageNotificationSchema as Ht, CompleteResultSchema as I, ServerResultSchema as In, TRACEPARENT_META_KEY as Ir, ListTasksRequestSchema as It, ElicitRequestSchema as J, SubscriptionsListenRequestSchema as Jn, NumberSchemaSchema as Jt, ElicitRequestFormParamsSchema as K, SubscriptionsAcknowledgedNotificationSchema as Kn, NotificationSchema as Kt, ContentBlockSchema as L, ServerTasksCapabilitySchema as Ln, TRACESTATE_META_KEY as Lr, ListTasksResultSchema as Lt, ClientTasksCapabilitySchema as M, SamplingMessageSchema as Mn, RELATED_TASK_META_KEY as Mr, ListResourcesRequestSchema as Mt, CompatibilityCallToolResultSchema as N, ServerCapabilitiesSchema as Nn, SERVER_INFO_META_KEY as Nr, ListResourcesResultSchema as Nt, ClientCapabilitiesSchema as O, RootSchema as On, LOG_LEVEL_META_KEY as Or, ListPromptsRequestSchema as Ot, CompleteRequestParamsSchema as P, ServerNotificationSchema as Pn, SUBSCRIPTION_ID_META_KEY as Pr, ListRootsRequestSchema as Pt, ElicitationCompleteNotificationSchema as Q, TaskCreationParamsSchema as Qn, PingRequestSchema as Qt, CreateMessageRequestParamsSchema as R, SetLevelRequestParamsSchema as Rn, ListToolsRequestSchema as Rt, CallToolRequestSchema as S, ResourceTemplateSchema as Sn, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as Sr, JSONRPCRequestSchema as St, CancelTaskResultSchema as T, ResultMetaObjectSchema as Tn, INVALID_REQUEST as Tr, JSONValueSchema as Tt, CursorSchema as U, SubscribeRequestSchema as Un, ModelHintSchema as Ut, CreateMessageResultWithToolsSchema as V, StringSchemaSchema as Vn, LoggingMessageNotificationParamsSchema as Vt, DiscoverRequestSchema as W, SubscriptionFilterSchema as Wn, ModelPreferencesSchema as Wt, ElicitResultSchema as X, SubscriptionsListenResultSchema as Xn, PaginatedRequestSchema as Xt, ElicitRequestURLParamsSchema as Y, SubscriptionsListenResultMetaSchema as Yn, PaginatedRequestParamsSchema as Yt, ElicitationCompleteNotificationParamsSchema as Z, TaskAugmentedRequestParamsSchema as Zn, PaginatedResultSchema as Zt, BaseMetadataSchema as _, ResourceLinkSchema as _n, UntitledMultiSelectEnumSchemaSchema as _r, JSONArraySchema as _t, OAuthClientRegistrationErrorSchema as a, PromptListChangedNotificationSchema as an, TextResourceContentsSchema as ar, GetTaskPayloadRequestSchema as at, BooleanSchemaSchema as b, ResourceSchema as bn, CLIENT_CAPABILITIES_META_KEY as br, JSONRPCMessageSchema as bt, OAuthProtectedResourceMetadataSchema as c, PromptSchema as cn, ToolAnnotationsSchema as cr, GetTaskResultSchema as ct, OpenIdProviderDiscoveryMetadataSchema as d, ReadResourceResultSchema as dn, ToolListChangedNotificationSchema as dr, ImageContentSchema as dt, ProgressNotificationParamsSchema as en, TaskSchema as er, EmptyResultSchema as et, OpenIdProviderMetadataSchema as f, RelatedTaskMetadataSchema as fn, ToolResultContentSchema as fr, ImplementationSchema as ft, AudioContentSchema as g, ResourceContentsSchema as gn, UnsubscribeRequestSchema as gr, InitializedNotificationSchema as gt, AnnotationsSchema as h, RequestSchema as hn, UnsubscribeRequestParamsSchema as hr, InitializeResultSchema as ht, OAuthClientMetadataSchema as i, PromptArgumentSchema as in, TextContentSchema as ir, GetPromptResultSchema as it, ClientResultSchema as j, SamplingMessageContentBlockSchema as jn, PROTOCOL_VERSION_META_KEY as jr, ListResourceTemplatesResultSchema as jt, ClientNotificationSchema as k, RootsListChangedNotificationSchema as kn, METHOD_NOT_FOUND as kr, ListPromptsResultSchema as kt, OAuthTokenRevocationRequestSchema as l, ReadResourceRequestParamsSchema as ln, ToolChoiceSchema as lr, IconSchema as lt, SafeUrlSchema as m, RequestMetaSchema as mn, ToolUseContentSchema as mr, InitializeRequestSchema as mt, OAuthClientInformationFullSchema as n, ProgressSchema as nn, TaskStatusNotificationSchema as nr, GetPromptRequestParamsSchema as nt, OAuthErrorResponseSchema as o, PromptMessageSchema as on, TitledMultiSelectEnumSchemaSchema as or, GetTaskPayloadResultSchema as ot, OptionalSafeUrlSchema as p, RequestIdSchema as pn, ToolSchema as pr, InitializeRequestParamsSchema as pt, ElicitRequestParamsSchema as q, SubscriptionsListenRequestParamsSchema as qn, NotificationsParamsSchema as qt, OAuthClientInformationSchema as r, ProgressTokenSchema as rn, TaskStatusSchema as rr, GetPromptRequestSchema as rt, OAuthMetadataSchema as s, PromptReferenceSchema as sn, TitledSingleSelectEnumSchemaSchema as sr, GetTaskRequestSchema as st, IdJagTokenExchangeResponseSchema as t, ProgressNotificationSchema as tn, TaskStatusNotificationParamsSchema as tr, EnumSchemaSchema as tt, OAuthTokensSchema as u, ReadResourceRequestSchema as un, ToolExecutionSchema as ur, IconsSchema as ut, BaseRequestParamsSchema as v, ResourceListChangedNotificationSchema as vn, UntitledSingleSelectEnumSchemaSchema as vr, JSONObjectSchema as vt, CancelTaskRequestSchema as w, ResourceUpdatedNotificationSchema as wn, INVALID_PARAMS as wr, JSONRPCResultResponseSchema as wt, CallToolRequestParamsSchema as x, ResourceTemplateReferenceSchema as xn, CLIENT_INFO_META_KEY as xr, JSONRPCNotificationSchema as xt, BlobResourceContentsSchema as y, ResourceRequestParamsSchema as yn, BAGGAGE_META_KEY as yr, JSONRPCErrorResponseSchema as yt, CreateMessageRequestSchema as z, SetLevelRequestSchema as zn, ListToolsResultSchema as zt };
1678
+ //# sourceMappingURL=auth-CUe6YdwF.mjs.map