@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.
- package/dist/commands/auth-live-doctor.d.ts +1 -0
- package/dist/commands/auth-live-doctor.d.ts.map +1 -1
- package/dist/commands/auth-live-doctor.js +7 -6
- package/dist/commands/auth-live-doctor.js.map +1 -1
- package/dist/commands/auth-metadata-readiness.d.ts +2 -0
- package/dist/commands/auth-metadata-readiness.d.ts.map +1 -1
- package/dist/commands/auth-metadata-readiness.js +7 -0
- package/dist/commands/auth-metadata-readiness.js.map +1 -1
- package/dist/commands/auth-ops.d.ts +1 -0
- package/dist/commands/auth-ops.d.ts.map +1 -1
- package/dist/commands/auth-ops.js +26 -7
- package/dist/commands/auth-ops.js.map +1 -1
- package/dist/commands/author-loop.d.ts.map +1 -1
- package/dist/commands/author-loop.js +3 -2
- package/dist/commands/author-loop.js.map +1 -1
- package/dist/commands/catalog-data-auth-discovery.d.ts.map +1 -1
- package/dist/commands/catalog-data-auth-discovery.js +7 -0
- package/dist/commands/catalog-data-auth-discovery.js.map +1 -1
- package/dist/commands/connect-oauth.d.ts.map +1 -1
- package/dist/commands/connect-oauth.js +1 -0
- package/dist/commands/connect-oauth.js.map +1 -1
- package/dist/dev.d.ts +6 -1
- package/dist/dev.d.ts.map +1 -1
- package/dist/dev.js +120 -34
- package/dist/dev.js.map +1 -1
- package/dist/device-login.js +1 -0
- package/dist/device-login.js.map +1 -1
- package/dist/devtools-preview.d.ts.map +1 -1
- package/dist/devtools-preview.js +82 -8
- package/dist/devtools-preview.js.map +1 -1
- package/dist/plugin-mode/build-readiness-server.d.ts +1 -1
- package/dist/plugin-mode/build-readiness-server.d.ts.map +1 -1
- package/dist/plugin-mode/build-readiness-server.js +3 -4
- package/dist/plugin-mode/build-readiness-server.js.map +1 -1
- package/dist/plugin-mode/plugin-operation-contract.d.ts +1 -1
- package/dist/plugin-mode/plugin-operation-contract.d.ts.map +1 -1
- package/dist/plugin-mode/plugin-operation-tools.d.ts +1 -2
- package/dist/plugin-mode/plugin-operation-tools.d.ts.map +1 -1
- package/dist/plugin-mode/plugin-operation-tools.js.map +1 -1
- package/dist/saas-scaffold-template.d.ts.map +1 -1
- package/dist/saas-scaffold-template.js +2 -1
- package/dist/saas-scaffold-template.js.map +1 -1
- package/node_modules/@modelcontextprotocol/client/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/client/README.md +26 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-1b6pVpkg.cjs +7531 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-1b6pVpkg.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-97rDpkRx.mjs +7514 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-97rDpkRx.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-FOQRM7up.d.cts +1071 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-FOQRM7up.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-INpkxUi1.d.mts +1071 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-INpkxUi1.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3ZJEoRM.d.mts +74 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3ZJEoRM.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3dvjU3F.cjs +986 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3dvjU3F.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-BylNJ1R5.mjs +981 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-BylNJ1R5.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-doTkZbTr.d.cts +74 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/chunk-Bnu9O96Y.cjs +60 -0
- package/node_modules/@modelcontextprotocol/client/dist/chunk-Br0eD_fh.mjs +42 -0
- package/node_modules/@modelcontextprotocol/client/dist/dialects-BGO_ZrYF.cjs +46 -0
- package/node_modules/@modelcontextprotocol/client/dist/dialects-BGO_ZrYF.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/dialects-BOhdv1Fc.mjs +34 -0
- package/node_modules/@modelcontextprotocol/client/dist/dialects-BOhdv1Fc.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-CHhhk6PQ.d.cts +2526 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-CHhhk6PQ.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-D4xIIEF6.d.mts +2523 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-D4xIIEF6.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +5690 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts +3252 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts +3252 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs +5481 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs +14 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs +14 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +21 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +20 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs +7063 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs +7431 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +217 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts +96 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts +96 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +212 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts +1099 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-mS0yxCL0.d.mts +1099 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-mS0yxCL0.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.cjs +5 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.mjs +3 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.cjs +3 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.mjs +3 -0
- package/node_modules/@modelcontextprotocol/client/package.json +166 -0
- package/node_modules/@modelcontextprotocol/core/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/core/README.md +40 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts +8501 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs +1678 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs +2899 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts +8501 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.cjs +175 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +201 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +99 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +99 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
- package/node_modules/@modelcontextprotocol/core/package.json +85 -0
- package/node_modules/@modelcontextprotocol/server/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/server/README.md +30 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs +7514 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts +1071 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts +1071 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs +7531 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs +986 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts +74 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts +74 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs +981 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/chunk-Bnu9O96Y.cjs +60 -0
- package/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs +42 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts +4043 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts +4045 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs +46 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs +34 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.cjs +2055 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.cts +739 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.mts +739 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.mjs +1870 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs +2022 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs +1931 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +23 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +11 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +11 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +22 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +12 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +4 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +30 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +10 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +10 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +29 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs +7606 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs +8104 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +564 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +107 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +107 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +562 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts +1099 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts +1099 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +5 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +3 -0
- package/node_modules/@modelcontextprotocol/server/package.json +160 -0
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +4 -4
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-auth-ref.js +3 -3
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-auth-ref.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-server-playbook-ref.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-server-playbook-ref.js +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/skill-server-playbook-ref.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/capabilities/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/capabilities/dist/index.js +11 -4
- package/node_modules/@noodle-borg/capabilities/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/prompts.d.ts +1 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/prompts.d.ts.map +1 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/resources.d.ts +1 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/resources.d.ts.map +1 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/server.d.ts +1 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/server.d.ts.map +1 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/server.js +3 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/server.js.map +1 -1
- package/node_modules/@noodle-borg/developer-mcp/package.json +2 -1
- package/node_modules/@noodle-borg/module/dist/contract.d.ts +3 -1
- package/node_modules/@noodle-borg/module/dist/contract.d.ts.map +1 -1
- package/node_modules/@noodle-borg/module/dist/contract.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/error-codes.d.ts +11 -0
- package/node_modules/@noodle-borg/protocol/dist/error-codes.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/error-codes.js +11 -0
- package/node_modules/@noodle-borg/protocol/dist/error-codes.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/prompts.d.ts +6 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/prompts.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/prompts.js +31 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/prompts.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/resources.d.ts +6 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/resources.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/resources.js +50 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/resources.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/tools.d.ts +6 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/tools.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/tools.js +126 -0
- package/node_modules/@noodle-borg/protocol/dist/handlers/tools.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/index.d.ts +6 -2
- package/node_modules/@noodle-borg/protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/index.js +4 -1
- package/node_modules/@noodle-borg/protocol/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/interaction-envelope.d.ts +10 -0
- package/node_modules/@noodle-borg/protocol/dist/interaction-envelope.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/interaction-envelope.js +66 -0
- package/node_modules/@noodle-borg/protocol/dist/interaction-envelope.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/jsonrpc.d.ts +1 -0
- package/node_modules/@noodle-borg/protocol/dist/jsonrpc.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/jsonrpc.js +1 -0
- package/node_modules/@noodle-borg/protocol/dist/jsonrpc.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/observation.d.ts +27 -0
- package/node_modules/@noodle-borg/protocol/dist/observation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/observation.js +20 -0
- package/node_modules/@noodle-borg/protocol/dist/observation.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/request-deps.d.ts +6 -0
- package/node_modules/@noodle-borg/protocol/dist/request-deps.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/request-deps.js +16 -0
- package/node_modules/@noodle-borg/protocol/dist/request-deps.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/request-state.d.ts +50 -0
- package/node_modules/@noodle-borg/protocol/dist/request-state.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/request-state.js +195 -0
- package/node_modules/@noodle-borg/protocol/dist/request-state.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.d.ts +16 -23
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.js +7 -341
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-authorization.d.ts +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-authorization.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-authorization.js +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-authorization.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts +7 -2
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js +8 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-results.d.ts +7 -0
- package/node_modules/@noodle-borg/protocol/dist/tool-results.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/tool-results.js +49 -0
- package/node_modules/@noodle-borg/protocol/dist/tool-results.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/cache-hints.d.ts +11 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/cache-hints.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/cache-hints.js +14 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/cache-hints.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/confirmation.d.ts +16 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/confirmation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/confirmation.js +57 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/confirmation.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/handler.d.ts +11 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/handler.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/handler.js +154 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/handler.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/input-required.d.ts +12 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/input-required.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/input-required.js +78 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/input-required.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/server.d.ts +5 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/server.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/server.js +314 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/server.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/tool-list.d.ts +4 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/tool-list.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/tool-list.js +25 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/tool-list.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/versions.d.ts +6 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/versions.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/versions.js +11 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/versions.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/package.json +3 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.js +15 -7
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/customer-auth-audience-binding.d.ts +37 -0
- package/node_modules/@noodle-borg/service/dist/customer-auth-audience-binding.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/customer-auth-audience-binding.js +182 -0
- package/node_modules/@noodle-borg/service/dist/customer-auth-audience-binding.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/customer-auth-audience-quarantine.d.ts +5 -0
- package/node_modules/@noodle-borg/service/dist/customer-auth-audience-quarantine.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/customer-auth-audience-quarantine.js +14 -0
- package/node_modules/@noodle-borg/service/dist/customer-auth-audience-quarantine.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/customer-verifier.js +5 -4
- package/node_modules/@noodle-borg/service/dist/customer-verifier.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/developer-mcp/mount.d.ts +2 -1
- package/node_modules/@noodle-borg/service/dist/developer-mcp/mount.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/developer-mcp/mount.js +16 -14
- package/node_modules/@noodle-borg/service/dist/developer-mcp/mount.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/developer-mcp/service-options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/developer-mcp/service-options.js +1 -0
- package/node_modules/@noodle-borg/service/dist/developer-mcp/service-options.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.js +2 -0
- package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/main.js +3 -0
- package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/mcp-confirmation-nonce-postgres.d.ts +14 -0
- package/node_modules/@noodle-borg/service/dist/mcp-confirmation-nonce-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/mcp-confirmation-nonce-postgres.js +35 -0
- package/node_modules/@noodle-borg/service/dist/mcp-confirmation-nonce-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/mcp-protocol-runtime.d.ts +16 -0
- package/node_modules/@noodle-borg/service/dist/mcp-protocol-runtime.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/mcp-protocol-runtime.js +21 -0
- package/node_modules/@noodle-borg/service/dist/mcp-protocol-runtime.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/app.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.js +47 -0
- package/node_modules/@noodle-borg/service/dist/oauth/app.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-response.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-response.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-response.js +6 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-response.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-decision.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-decision.js +2 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-decision.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-flow.js +2 -1
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-flow.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.js +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/provider.js +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/provider.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/token-issuer.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/token-issuer.js +2 -1
- package/node_modules/@noodle-borg/service/dist/oauth/token-issuer.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js +2 -1
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/options.d.ts +10 -3
- package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-account-reset-quarantine-postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-account-reset-quarantine-postgres.js +20 -8
- package/node_modules/@noodle-borg/service/dist/platform-account-reset-quarantine-postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-account-reset-rollback-postgres.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/platform-account-reset-rollback-postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-account-reset-rollback-postgres.js +58 -13
- package/node_modules/@noodle-borg/service/dist/platform-account-reset-rollback-postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-transaction-postgres.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-transaction-postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-transaction-postgres.js +3 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-transaction-postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.d.ts +24 -24
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts +2 -1
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js +4 -1
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-access.d.ts +5 -1
- package/node_modules/@noodle-borg/service/dist/registry-access.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-access.js +64 -15
- package/node_modules/@noodle-borg/service/dist/registry-access.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-rollback.d.ts +19 -0
- package/node_modules/@noodle-borg/service/dist/registry-rollback.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/registry-rollback.js +91 -0
- package/node_modules/@noodle-borg/service/dist/registry-rollback.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/registry-state.d.ts +18 -2
- package/node_modules/@noodle-borg/service/dist/registry-state.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-state.js +83 -7
- package/node_modules/@noodle-borg/service/dist/registry-state.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-targets.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/registry-targets.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-targets.js +24 -0
- package/node_modules/@noodle-borg/service/dist/registry-targets.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-types.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-types.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry.d.ts +2 -1
- package/node_modules/@noodle-borg/service/dist/registry.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry.js +72 -83
- package/node_modules/@noodle-borg/service/dist/registry.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/archive.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/archive.js +14 -0
- package/node_modules/@noodle-borg/service/dist/routes/archive.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-dispatch.js +4 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.js +17 -4
- package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/contracts.d.ts +9 -9
- package/node_modules/@noodle-borg/service/dist/routes/private-platform-auth-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/private-platform-auth-dispatch.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/private-platform-auth-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.js +19 -2
- package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +5 -0
- package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/in-memory.d.ts +5 -2
- package/node_modules/@noodle-borg/service/dist/store/in-memory.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/in-memory.js +51 -8
- package/node_modules/@noodle-borg/service/dist/store/in-memory.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/json-file.d.ts +5 -2
- package/node_modules/@noodle-borg/service/dist/store/json-file.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/json-file.js +55 -6
- package/node_modules/@noodle-borg/service/dist/store/json-file.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.d.ts +2 -2
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.js +30 -15
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience-schema.d.ts +16 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience-schema.js +329 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience.d.ts +5 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience.js +24 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-customer-auth-audience.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-deploy-records.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-deploy-records.js +2 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-deploy-records.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-deployment-access.d.ts +9 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-deployment-access.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-deployment-access.js +53 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-deployment-access.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js +2 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-rows.d.ts +2 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-rows.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-rows.js +2 -24
- package/node_modules/@noodle-borg/service/dist/store/postgres-rows.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts +2 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js +3 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres.d.ts +7 -2
- package/node_modules/@noodle-borg/service/dist/store/postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres.js +27 -31
- package/node_modules/@noodle-borg/service/dist/store/postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/request-events-postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/request-events-postgres.js +9 -2
- package/node_modules/@noodle-borg/service/dist/store/request-events-postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/request-events.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/request-events.js +1 -0
- package/node_modules/@noodle-borg/service/dist/store/request-events.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store.d.ts +20 -1
- package/node_modules/@noodle-borg/service/dist/store.d.ts.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/handler.d.ts +19 -67
- package/node_modules/@noodle-borg/transport-http/dist/handler.d.ts.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/handler.js +12 -281
- package/node_modules/@noodle-borg/transport-http/dist/handler.js.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/index.d.ts +2 -1
- package/node_modules/@noodle-borg/transport-http/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/index.js +1 -0
- package/node_modules/@noodle-borg/transport-http/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/request-capture.d.ts.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/request-capture.js +38 -4
- package/node_modules/@noodle-borg/transport-http/dist/request-capture.js.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/responses.d.ts +28 -0
- package/node_modules/@noodle-borg/transport-http/dist/responses.d.ts.map +1 -0
- package/node_modules/@noodle-borg/transport-http/dist/responses.js +50 -0
- package/node_modules/@noodle-borg/transport-http/dist/responses.js.map +1 -0
- package/node_modules/@noodle-borg/transport-http/dist/routing.d.ts +28 -0
- package/node_modules/@noodle-borg/transport-http/dist/routing.d.ts.map +1 -0
- package/node_modules/@noodle-borg/transport-http/dist/routing.js +52 -0
- package/node_modules/@noodle-borg/transport-http/dist/routing.js.map +1 -0
- package/node_modules/@noodle-borg/transport-http/dist/serve-request.d.ts +35 -0
- package/node_modules/@noodle-borg/transport-http/dist/serve-request.d.ts.map +1 -0
- package/node_modules/@noodle-borg/transport-http/dist/serve-request.js +190 -0
- package/node_modules/@noodle-borg/transport-http/dist/serve-request.js.map +1 -0
- package/node_modules/@noodle-borg/transport-http/dist/tool-dispatch.d.ts +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/tool-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/tool-dispatch.js +17 -5
- package/node_modules/@noodle-borg/transport-http/dist/tool-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/web-bridge.d.ts +9 -0
- package/node_modules/@noodle-borg/transport-http/dist/web-bridge.d.ts.map +1 -0
- package/node_modules/@noodle-borg/transport-http/dist/web-bridge.js +61 -0
- package/node_modules/@noodle-borg/transport-http/dist/web-bridge.js.map +1 -0
- package/package.json +6 -2
|
@@ -0,0 +1,739 @@
|
|
|
1
|
+
import { $ as Protocol, $a as OAuthError, $i as SubscriptionsAcknowledgedNotification, $n as InitializeRequestParams, $r as PaginatedResult, $t as BaseMetadata, A as ResourceMetadata, Aa as CLIENT_INFO_META_KEY, Ai as ResourceTemplateType, An as ElicitRequest, Ar as ListRootsResult, At as UnsupportedProtocolVersionError, B as STDIO_DEFAULT_MAX_BUFFER_SIZE, Ba as PROTOCOL_VERSION_META_KEY, Bi as SamplingMessage, Bn as GetPromptRequest, Br as MetaObject, Bt as StandardSchemaV1Sync, C as PromptCallback, Ca as UnsubscribeRequest, Ci as RequestTypeMap, Cn as CreateMessageRequestParamsWithTools, Cr as ListPromptsRequest, Ct as isJSONRPCResponse, D as RegisteredResource, Da as UntitledSingleSelectEnumSchema, Di as ResourceListChangedNotification, Dn as Cursor, Dr as ListResourcesRequest, Dt as MissingRequiredClientCapabilityError, E as RegisteredPrompt, Ea as UntitledMultiSelectEnumSchema, Ei as ResourceLink, En as CreateTaskResult, Er as ListResourceTemplatesResult, Et as parseJSONRPCMessage, F as preloadSchemas, Fa as JSONRPC_VERSION, Fi as ResultTypeMap, Fn as ElicitationCompleteNotification, Fr as LoggingLevel, Ft as acceptedContent, G as ProtocolEra, Ga as TRACEPARENT_META_KEY, Gi as ServerResult, Gn as GetTaskRequest, Gr as MultiSelectEnumSchema, Gt as InboundLegacyRoute, H as serializeMessage, Ha as SERVER_INFO_META_KEY, Hi as ServerCapabilities, Hn as GetPromptResult, Hr as MissingRequiredClientCapabilityErrorData, Ht as InboundClassificationOutcome, I as InMemoryTransport, Ia as LATEST_PROTOCOL_VERSION, Ii as Role, In as ElicitationCompleteNotificationParams, Ir as LoggingMessageNotification, It as inputRequired, J as BaseContext, Ja as resourceUrlFromServerUrl, Ji as SingleSelectEnumSchema, Jn as Icon, Jr as NotificationParams, Jt as InboundValidationRung, K as getDisplayName, Ka as TRACESTATE_META_KEY, Ki as SetLevelRequest, Kn as GetTaskResult, Kr as Notification, Kt as InboundLegacyRouteReason, L as UriTemplate, La as LOG_LEVEL_META_KEY, Li as Root, Ln as EmbeddedResource, Lr as LoggingMessageNotificationParams, Lt as inputResponse, M as ToolCallback, Ma as INTERNAL_ERROR, Mi as ResourceUpdatedNotificationParams, Mn as ElicitRequestParams, Mr as ListTasksResult, Mt as ProtocolErrorCode, N as Server, Na as INVALID_PARAMS, Ni as Result, Nn as ElicitRequestURLParams, Nr as ListToolsRequest, Nt as InputRequiredSpec, O as RegisteredResourceTemplate, Oa as BAGGAGE_META_KEY, Oi as ResourceRequestParams, On as DiscoverRequest, Or as ListResourcesResult, Ot as ProtocolError, P as ServerOptions, Pa as INVALID_REQUEST, Pi as ResultMetaObject, Pn as ElicitResult, Pr as ListToolsResult, Pt as InputResponseView, Q as ProgressCallback, Qa as SdkHttpErrorData, Qi as SubscriptionFilter, Qn as InitializeRequest, Qr as PaginatedRequestParams, Qt as AuthInfo, R as Variables, Ra as METHOD_NOT_FOUND, Ri as RootsListChangedNotification, Rn as EmptyResult, Rr as MessageClassification, Rt as ElicitInputParams, S as McpServer, Sa as ToolUseContent, Si as RequestParams, Sn as CreateMessageRequestParamsBase, Sr as ListChangedOptions, St as isJSONRPCRequest, T as ReadResourceTemplateCallback, Ta as UnsupportedProtocolVersionErrorData, Ti as ResourceContents, Tn as CreateMessageResultWithTools, Tr as ListResourceTemplatesRequest, Tt as isTaskAugmentedRequestParams, U as CacheHint, Ua as SUBSCRIPTION_ID_META_KEY, Ui as ServerNotification, Un as GetTaskPayloadRequest, Ur as ModelHint, Ut as InboundHttpRequest, V as deserializeMessage, Va as RELATED_TASK_META_KEY, Vi as SamplingMessageContentBlock, Vn as GetPromptRequestParams, Vr as MethodNotFoundError, Vt as StandardSchemaWithJSON, W as CacheScope, Wa as SUPPORTED_PROTOCOL_VERSIONS, Wi as ServerRequest, Wn as GetTaskPayloadResult, Wr as ModelPreferences, Wt as InboundLadderRejection, X as DEFAULT_REQUEST_TIMEOUT_MSEC, Xa as SdkErrorCode, Xi as SubscribeRequest, Xn as ImageContent, Xr as NumberSchema, Xt as Annotations, Y as ClientContext, Ya as SdkError, Yi as StringSchema, Yn as Icons, Yr as NotificationTypeMap, Yt as classifyInboundRequest, Z as NotificationOptions, Za as SdkHttpError, Zi as SubscribeRequestParams, Zn as Implementation, Zr as PaginatedRequest, Zt as AudioContent, _ as PerRequestResponseMode, _a as ToolAnnotations, _i as RequestId, _n as CompleteRequestResourceTemplate, _r as JSONRPCResultResponse, _t as isInitializeRequest, a as McpRequestContext, aa as Task, ai as ProgressNotificationParams, an as CancelTaskRequest, ao as OAuthClientInformationMixed, ar as InputResponse, at as mergeCapabilities, b as CompleteResourceTemplateCallback, ba as ToolListChangedNotification, bi as RequestMetaObject, bn as CreateMessageRequest, br as ListChangedCallback, bt as isJSONRPCErrorResponse, c as isLegacyRequest, ca as TaskMetadata, ci as PromptArgument, cn as CancelledNotificationParams, co as OAuthErrorResponse, cr as InvalidParamsError, ct as TransportSendOptions, d as ServerEvent, da as TaskStatusNotificationParams, di as PromptReference, dn as ClientRequest, do as OAuthTokenRevocationRequest, dr as JSONObject, dt as SpecTypes, ea as SubscriptionsAcknowledgedNotificationParams, ei as ParseError, en as BlobResourceContents, eo as OAuthErrorCode, er as InitializeResult, et as ProtocolOptions, f as ServerEventBus, fa as TextContent, fi as ReadResourceRequest, fn as ClientResult, fo as OAuthTokens, fr as JSONRPCErrorResponse, ft as isSpecType, g as PerRequestMessageExtra, ga as Tool, gi as Request$1, gn as CompleteRequestPrompt, go as StoredOAuthTokens, gr as JSONRPCResponse, gt as isCallToolResult, h as PerRequestHTTPServerTransportOptions, ha as TitledSingleSelectEnumSchema, hi as RelatedTaskMetadata, hn as CompleteRequestParams, ho as StoredOAuthClientInformation, hr as JSONRPCRequest, ht as assertCompleteRequestResourceTemplate, i as McpHttpHandler, ia as SubscriptionsListenResultMeta, ii as ProgressNotification, in as CallToolResult, io as OAuthClientInformationFull, ir as InputRequiredResult, it as ServerContext, j as ResourceTemplate, ja as DEFAULT_NEGOTIATED_PROTOCOL_VERSION, ji as ResourceUpdatedNotification, jn as ElicitRequestFormParams, jr as ListTasksRequest, jt as UrlElicitationRequiredError, k as RegisteredTool, ka as CLIENT_CAPABILITIES_META_KEY, ki as ResourceTemplateReference, kn as DiscoverResult, kr as ListRootsRequest, kt as ResourceNotFoundError, l as legacyStatelessFallback, la as TaskStatus, li as PromptListChangedNotification, ln as ClientCapabilities, lo as OAuthMetadata, lr as InvalidRequestError, lt as createFetchWithInit, m as PerRequestHTTPServerTransport, ma as TitledMultiSelectEnumSchema, mi as ReadResourceResult, mn as CompleteRequest, mo as OpenIdProviderMetadata, mr as JSONRPCNotification, mt as assertCompleteRequestPrompt, n as LegacyHttpHandler, na as SubscriptionsListenRequestParams, ni as PrimitiveSchemaDefinition, nn as CallToolRequest, no as IdJagTokenExchangeResponse, nr as InputRequest, nt as RequestOptions, o as McpServerFactory, oa as TaskAugmentedRequestParams, oi as ProgressToken, on as CancelTaskResult, oo as OAuthClientMetadata, or as InputResponses, ot as FetchLike, p as ServerNotifier, pa as TextResourceContents, pi as ReadResourceRequestParams, pn as CompatibilityCallToolResult, po as OpenIdProviderDiscoveryMetadata, pr as JSONRPCMessage, pt as specTypeSchemas, q as isJsonContentType, qa as checkResourceAllowed, qi as SetLevelRequestParams, qn as HandlerResultTypeMap, qr as NotificationMethod, qt as InboundModernRoute, r as McpHandlerRequestOptions, ra as SubscriptionsListenResult, ri as Progress, rn as CallToolRequestParams, ro as OAuthClientInformation, rr as InputRequests, rt as RequestStateAccessor, s as createMcpHandler, sa as TaskCreationParams, si as Prompt, sn as CancelledNotification, so as OAuthClientRegistrationError, sr as InternalError, st as Transport, t as CreateMcpHandlerOptions, ta as SubscriptionsListenRequest, ti as PingRequest, tn as BooleanSchema, to as AuthorizationServerMetadata, tr as InitializedNotification, tt as RequestHandlerSchemas, u as InMemoryServerEventBus, ua as TaskStatusNotification, ui as PromptMessage, un as ClientNotification, uo as OAuthProtectedResourceMetadata, ur as JSONArray, ut as SpecTypeName, v as AnyToolHandler, va as ToolChoice, vi as RequestMeta, vn as CompleteResult, vr as JSONValue, vt as isInitializedNotification, w as ReadResourceCallback, wa as UnsubscribeRequestParams, wi as Resource, wn as CreateMessageResult, wr as ListPromptsResult, wt as isJSONRPCResultResponse, x as ListResourcesCallback, xa as ToolResultContent, xi as RequestMethod, xn as CreateMessageRequestParams, xr as ListChangedHandlers, xt as isJSONRPCNotification, y as BaseToolCallback, ya as ToolExecution, yi as RequestMetaEnvelope, yn as ContentBlock, yr as LegacyTitledEnumSchema, yt as isInputRequiredResult, z as ReadBuffer, za as PARSE_ERROR, zi as SamplingContent, zn as EnumSchema, zr as MessageExtraInfo, zt as StandardSchemaV1 } from "./createMcpHandler-dBHMsxwf.cjs";
|
|
2
|
+
import { i as jsonSchemaValidator, n as JsonSchemaValidator, r as JsonSchemaValidatorResult, t as JsonSchemaType } from "./types-DsbMXNFL.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/server/completable.d.ts
|
|
5
|
+
declare const COMPLETABLE_SYMBOL: unique symbol;
|
|
6
|
+
type CompleteCallback<T extends StandardSchemaV1 = StandardSchemaV1> = (value: StandardSchemaV1.InferInput<T>, context?: {
|
|
7
|
+
arguments?: Record<string, string>;
|
|
8
|
+
}) => StandardSchemaV1.InferInput<T>[] | Promise<StandardSchemaV1.InferInput<T>[]>;
|
|
9
|
+
type CompletableMeta<T extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
10
|
+
complete: CompleteCallback<T>;
|
|
11
|
+
};
|
|
12
|
+
type CompletableSchema<T extends StandardSchemaV1> = T & {
|
|
13
|
+
[COMPLETABLE_SYMBOL]: CompletableMeta<T>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Wraps a schema to provide autocompletion capabilities. Useful for, e.g., prompt arguments in MCP.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts source="./completable.examples.ts#completable_basicUsage"
|
|
20
|
+
* server.registerPrompt(
|
|
21
|
+
* 'review-code',
|
|
22
|
+
* {
|
|
23
|
+
* title: 'Code Review',
|
|
24
|
+
* argsSchema: z.object({
|
|
25
|
+
* language: completable(z.string().describe('Programming language'), value =>
|
|
26
|
+
* ['typescript', 'javascript', 'python', 'rust', 'go'].filter(lang => lang.startsWith(value))
|
|
27
|
+
* )
|
|
28
|
+
* })
|
|
29
|
+
* },
|
|
30
|
+
* ({ language }) => ({
|
|
31
|
+
* messages: [
|
|
32
|
+
* {
|
|
33
|
+
* role: 'user' as const,
|
|
34
|
+
* content: {
|
|
35
|
+
* type: 'text' as const,
|
|
36
|
+
* text: `Review this ${language} code.`
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
* ]
|
|
40
|
+
* })
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @see {@linkcode server/mcp.McpServer.registerPrompt | McpServer.registerPrompt} for using completable schemas in prompt argument definitions
|
|
45
|
+
*/
|
|
46
|
+
declare function completable<T extends StandardSchemaV1>(schema: T, complete: CompleteCallback<T>): CompletableSchema<T>;
|
|
47
|
+
/**
|
|
48
|
+
* Checks if a schema is completable (has completion metadata).
|
|
49
|
+
*/
|
|
50
|
+
declare function isCompletable(schema: unknown): schema is CompletableSchema<StandardSchemaV1>;
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/server/middleware/bearerAuth.d.ts
|
|
53
|
+
/**
|
|
54
|
+
* Minimal token-verifier interface for MCP servers acting as an OAuth 2.0
|
|
55
|
+
* Resource Server. Implementations introspect or locally validate an access
|
|
56
|
+
* token and return the resulting {@link AuthInfo}, which the serving entry
|
|
57
|
+
* surfaces to MCP request handlers via `ctx.http.authInfo`.
|
|
58
|
+
*
|
|
59
|
+
* This is intentionally narrower than a full OAuth Authorization Server
|
|
60
|
+
* provider — it only covers the verification step a Resource Server needs.
|
|
61
|
+
*/
|
|
62
|
+
interface OAuthTokenVerifier {
|
|
63
|
+
/**
|
|
64
|
+
* Verifies an access token and returns information about it.
|
|
65
|
+
*
|
|
66
|
+
* Implementations should throw an {@link OAuthError} with
|
|
67
|
+
* `OAuthErrorCode.InvalidToken` when the token is unknown, revoked, or
|
|
68
|
+
* otherwise invalid; the bearer-auth helpers map that to a `401` with a
|
|
69
|
+
* `WWW-Authenticate` challenge.
|
|
70
|
+
*
|
|
71
|
+
* Note: bearer-auth verification rejects tokens whose
|
|
72
|
+
* `AuthInfo.expiresAt` is unset (matches v1 behavior). Ensure your
|
|
73
|
+
* verifier populates it (e.g. from RFC 7662 introspection `exp` or the
|
|
74
|
+
* JWT `exp` claim).
|
|
75
|
+
*/
|
|
76
|
+
verifyAccessToken(token: string): Promise<AuthInfo>;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Options for {@link verifyBearerToken}, {@link requireBearerAuth}, and
|
|
80
|
+
* {@link bearerAuthChallengeResponse}.
|
|
81
|
+
*/
|
|
82
|
+
interface BearerAuthOptions {
|
|
83
|
+
/**
|
|
84
|
+
* A verifier used to validate access tokens.
|
|
85
|
+
*/
|
|
86
|
+
verifier: OAuthTokenVerifier;
|
|
87
|
+
/**
|
|
88
|
+
* Optional scopes that the token must have. When any are missing the
|
|
89
|
+
* request is refused with `403 insufficient_scope`.
|
|
90
|
+
*/
|
|
91
|
+
requiredScopes?: string[];
|
|
92
|
+
/**
|
|
93
|
+
* Optional Protected Resource Metadata URL to advertise in the
|
|
94
|
+
* `WWW-Authenticate` header on 401/403 responses, per
|
|
95
|
+
* {@link https://datatracker.ietf.org/doc/html/rfc9728 | RFC 9728}.
|
|
96
|
+
*
|
|
97
|
+
* Typically built with `getOAuthProtectedResourceMetadataUrl`, exported
|
|
98
|
+
* from this package.
|
|
99
|
+
*/
|
|
100
|
+
resourceMetadataUrl?: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Validate a raw `Authorization` header value as a Bearer token and return
|
|
104
|
+
* the verified {@link AuthInfo}.
|
|
105
|
+
*
|
|
106
|
+
* The runtime-neutral core of Bearer authentication: it parses the header,
|
|
107
|
+
* runs the verifier, enforces `requiredScopes`, and rejects tokens without an
|
|
108
|
+
* expiration or past it. On any failure it throws an {@link OAuthError} —
|
|
109
|
+
* pass that to {@link bearerAuthChallengeResponse} for the matching HTTP
|
|
110
|
+
* answer, or use {@link requireBearerAuth} to get both steps as one call.
|
|
111
|
+
*
|
|
112
|
+
* Framework adapters build on this: `requireBearerAuth` from
|
|
113
|
+
* `@modelcontextprotocol/express` feeds it `req.headers.authorization`.
|
|
114
|
+
*/
|
|
115
|
+
declare function verifyBearerToken(authorizationHeader: string | null | undefined, options: BearerAuthOptions): Promise<AuthInfo>;
|
|
116
|
+
/**
|
|
117
|
+
* Build the HTTP answer for a Bearer authentication failure.
|
|
118
|
+
*
|
|
119
|
+
* Maps an {@link OAuthError} to its status — `401` for `invalid_token` and
|
|
120
|
+
* `403` for `insufficient_scope` (both carrying the `WWW-Authenticate: Bearer …`
|
|
121
|
+
* challenge, with `resource_metadata` when configured so clients can discover
|
|
122
|
+
* the Authorization Server), `500` for `server_error`, `400` for anything
|
|
123
|
+
* else. A non-`OAuthError` value answers `500 server_error`. The body is the
|
|
124
|
+
* OAuth error JSON.
|
|
125
|
+
*/
|
|
126
|
+
declare function bearerAuthChallengeResponse(error: unknown, options?: Pick<BearerAuthOptions, 'requiredScopes' | 'resourceMetadataUrl'>): Response;
|
|
127
|
+
/**
|
|
128
|
+
* Require a valid Bearer token on web-standard requests.
|
|
129
|
+
*
|
|
130
|
+
* The framework-free counterpart of `requireBearerAuth` from
|
|
131
|
+
* `@modelcontextprotocol/express`, for hosts whose HTTP surface is a
|
|
132
|
+
* `fetch(request)` handler — Cloudflare Workers, Deno, Bun, Hono. The
|
|
133
|
+
* returned gate resolves to the verified {@link AuthInfo}, or to the
|
|
134
|
+
* ready-to-return challenge `Response` when the request must be refused.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts source="./bearerAuth.examples.ts#requireBearerAuth_fetchGate"
|
|
138
|
+
* const gate = requireBearerAuth({ verifier, requiredScopes: ['mcp'] });
|
|
139
|
+
*
|
|
140
|
+
* async function fetchHandler(request: Request): Promise<Response> {
|
|
141
|
+
* const auth: AuthInfo | Response = await gate(request);
|
|
142
|
+
* if (auth instanceof Response) return auth;
|
|
143
|
+
* return handler.fetch(request, { authInfo: auth });
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
declare function requireBearerAuth(options: BearerAuthOptions): (request: Request) => Promise<AuthInfo | Response>;
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/server/middleware/hostHeaderValidation.d.ts
|
|
150
|
+
type HostHeaderValidationResult = {
|
|
151
|
+
ok: true;
|
|
152
|
+
hostname: string;
|
|
153
|
+
} | {
|
|
154
|
+
ok: false;
|
|
155
|
+
errorCode: 'missing_host' | 'invalid_host_header' | 'invalid_host';
|
|
156
|
+
message: string;
|
|
157
|
+
hostHeader?: string;
|
|
158
|
+
hostname?: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Parse and validate a `Host` header against an allowlist of hostnames (port-agnostic).
|
|
162
|
+
*
|
|
163
|
+
* - Input host header may include a port (e.g. `localhost:3000`) or IPv6 brackets (e.g. `[::1]:3000`).
|
|
164
|
+
* - Allowlist items should be hostnames only (no ports). For IPv6, include brackets (e.g. `[::1]`).
|
|
165
|
+
*/
|
|
166
|
+
declare function validateHostHeader(hostHeader: string | null | undefined, allowedHostnames: string[]): HostHeaderValidationResult;
|
|
167
|
+
/**
|
|
168
|
+
* Convenience allowlist for `localhost` DNS rebinding protection.
|
|
169
|
+
*/
|
|
170
|
+
declare function localhostAllowedHostnames(): string[];
|
|
171
|
+
/**
|
|
172
|
+
* Web-standard `Request` helper for DNS rebinding protection.
|
|
173
|
+
* @example
|
|
174
|
+
* ```ts source="./hostHeaderValidation.examples.ts#hostHeaderValidationResponse_basicUsage"
|
|
175
|
+
* const result = validateHostHeader(req.headers.get('host'), ['localhost']);
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
declare function hostHeaderValidationResponse(req: Request, allowedHostnames: string[]): Response | undefined;
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/server/middleware/oauthMetadata.d.ts
|
|
181
|
+
/**
|
|
182
|
+
* Options for {@link oauthMetadataResponse} and
|
|
183
|
+
* {@link buildOAuthProtectedResourceMetadata}.
|
|
184
|
+
*/
|
|
185
|
+
interface AuthMetadataOptions {
|
|
186
|
+
/**
|
|
187
|
+
* Authorization Server metadata (RFC 8414) for the AS this MCP server
|
|
188
|
+
* relies on. Served at `/.well-known/oauth-authorization-server` so
|
|
189
|
+
* legacy clients that probe the resource origin still discover the AS.
|
|
190
|
+
*/
|
|
191
|
+
oauthMetadata: OAuthMetadata;
|
|
192
|
+
/**
|
|
193
|
+
* The public URL of this MCP server, used as the `resource` value in the
|
|
194
|
+
* Protected Resource Metadata document. Any path component is reflected
|
|
195
|
+
* in the well-known route per RFC 9728.
|
|
196
|
+
*/
|
|
197
|
+
resourceServerUrl: URL;
|
|
198
|
+
/**
|
|
199
|
+
* Optional documentation URL advertised as `resource_documentation`.
|
|
200
|
+
*/
|
|
201
|
+
serviceDocumentationUrl?: URL;
|
|
202
|
+
/**
|
|
203
|
+
* Optional list of scopes this MCP server understands, advertised as
|
|
204
|
+
* `scopes_supported`.
|
|
205
|
+
*/
|
|
206
|
+
scopesSupported?: string[];
|
|
207
|
+
/**
|
|
208
|
+
* Optional human-readable name advertised as `resource_name`.
|
|
209
|
+
*/
|
|
210
|
+
resourceName?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Allow a non-HTTPS issuer URL. Local testing only — never enable in
|
|
213
|
+
* production. The Express adapter maps its
|
|
214
|
+
* `MCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL` environment variable here.
|
|
215
|
+
*/
|
|
216
|
+
dangerouslyAllowInsecureIssuerUrl?: boolean;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Derive the RFC 9728 Protected Resource Metadata document from
|
|
220
|
+
* {@link AuthMetadataOptions}, validating the Authorization Server issuer URL
|
|
221
|
+
* (HTTPS required outside localhost) in the process.
|
|
222
|
+
*
|
|
223
|
+
* `oauthMetadataResponse` and the Express `mcpAuthMetadataRouter` both build
|
|
224
|
+
* on this; use it directly when serving the document through your own
|
|
225
|
+
* routing — or call it once at startup to fail fast on a misconfigured
|
|
226
|
+
* issuer before any request arrives.
|
|
227
|
+
*/
|
|
228
|
+
declare function buildOAuthProtectedResourceMetadata(options: AuthMetadataOptions): OAuthProtectedResourceMetadata;
|
|
229
|
+
/**
|
|
230
|
+
* Builds the RFC 9728 Protected Resource Metadata URL for a given MCP server
|
|
231
|
+
* URL by inserting `/.well-known/oauth-protected-resource` ahead of the path.
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```ts
|
|
235
|
+
* getOAuthProtectedResourceMetadataUrl(new URL('https://api.example.com/mcp'))
|
|
236
|
+
* // → 'https://api.example.com/.well-known/oauth-protected-resource/mcp'
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
declare function getOAuthProtectedResourceMetadataUrl(serverUrl: URL): string;
|
|
240
|
+
/**
|
|
241
|
+
* Serve the two OAuth discovery documents an MCP server acting as a Resource
|
|
242
|
+
* Server exposes, from a web-standard `fetch(request)` handler:
|
|
243
|
+
*
|
|
244
|
+
* - `/.well-known/oauth-protected-resource[/<path>]` — RFC 9728 Protected
|
|
245
|
+
* Resource Metadata, derived from the supplied options (path-aware: the
|
|
246
|
+
* resource URL's path is reflected in the route).
|
|
247
|
+
* - `/.well-known/oauth-authorization-server` — RFC 8414 Authorization
|
|
248
|
+
* Server Metadata, passed through verbatim.
|
|
249
|
+
*
|
|
250
|
+
* Returns the matched document `Response` (JSON with permissive CORS, `405`
|
|
251
|
+
* with an `Allow` header for non-GET methods, `204` for CORS preflight), or
|
|
252
|
+
* `undefined` when the request path is neither well-known route — fall
|
|
253
|
+
* through to your own routing. The framework-free counterpart of
|
|
254
|
+
* `mcpAuthMetadataRouter` from `@modelcontextprotocol/express`; pair it with
|
|
255
|
+
* `requireBearerAuth` and `getOAuthProtectedResourceMetadataUrl` so
|
|
256
|
+
* unauthenticated clients can discover the AS from the `401` challenge.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```ts source="./oauthMetadata.examples.ts#oauthMetadataResponse_fetchHandler"
|
|
260
|
+
* async function fetchHandler(request: Request): Promise<Response> {
|
|
261
|
+
* return oauthMetadataResponse(request, options) ?? serveMcp(request);
|
|
262
|
+
* }
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
265
|
+
declare function oauthMetadataResponse(request: Request, options: AuthMetadataOptions): Response | undefined;
|
|
266
|
+
//#endregion
|
|
267
|
+
//#region src/server/middleware/originValidation.d.ts
|
|
268
|
+
/**
|
|
269
|
+
* Framework-agnostic Origin header validation helpers.
|
|
270
|
+
*
|
|
271
|
+
* Browsers attach an `Origin` header to cross-origin requests; validating it
|
|
272
|
+
* against an allowlist (alongside Host header validation) protects local and
|
|
273
|
+
* development MCP servers against DNS rebinding and cross-site request
|
|
274
|
+
* forgery. The framework middleware packages (`@modelcontextprotocol/express`,
|
|
275
|
+
* `@modelcontextprotocol/hono`, `@modelcontextprotocol/fastify`,
|
|
276
|
+
* `@modelcontextprotocol/node`) wrap these helpers; use them directly when
|
|
277
|
+
* mounting a handler bare on a fetch-native runtime.
|
|
278
|
+
*
|
|
279
|
+
* Validation is deny-on-failure: a present `Origin` value that cannot be
|
|
280
|
+
* parsed (including the opaque `null` origin) is rejected, never passed
|
|
281
|
+
* through. Requests without an `Origin` header pass — non-browser MCP clients
|
|
282
|
+
* do not send one.
|
|
283
|
+
*/
|
|
284
|
+
type OriginValidationResult = {
|
|
285
|
+
ok: true;
|
|
286
|
+
origin?: string;
|
|
287
|
+
hostname?: string;
|
|
288
|
+
} | {
|
|
289
|
+
ok: false;
|
|
290
|
+
errorCode: 'invalid_origin_header' | 'invalid_origin';
|
|
291
|
+
message: string;
|
|
292
|
+
originHeader?: string;
|
|
293
|
+
hostname?: string;
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* Validate an `Origin` header against an allowlist of hostnames (port-agnostic).
|
|
297
|
+
*
|
|
298
|
+
* - A missing/empty `Origin` header passes: non-browser clients do not send one,
|
|
299
|
+
* and only browser-originated requests carry the header this check defends against.
|
|
300
|
+
* - Allowlist items are hostnames only (no scheme, no port), the same convention as
|
|
301
|
+
* `validateHostHeader`. For IPv6, include brackets (e.g. `[::1]`).
|
|
302
|
+
* - Any present value that cannot be parsed as an origin URL — including the literal
|
|
303
|
+
* `null` origin browsers send for opaque contexts — is rejected (deny on failure).
|
|
304
|
+
*/
|
|
305
|
+
declare function validateOriginHeader(originHeader: string | null | undefined, allowedOriginHostnames: string[]): OriginValidationResult;
|
|
306
|
+
/**
|
|
307
|
+
* Convenience allowlist of localhost-class origin hostnames, mirroring
|
|
308
|
+
* `localhostAllowedHostnames`.
|
|
309
|
+
*/
|
|
310
|
+
declare function localhostAllowedOrigins(): string[];
|
|
311
|
+
/**
|
|
312
|
+
* Web-standard `Request` helper for Origin validation: returns a `403` JSON-RPC
|
|
313
|
+
* error response when the request's `Origin` header is not allowed, and
|
|
314
|
+
* `undefined` when the request may proceed.
|
|
315
|
+
*
|
|
316
|
+
* ```ts
|
|
317
|
+
* const rejected = originValidationResponse(request, localhostAllowedOrigins());
|
|
318
|
+
* if (rejected) return rejected;
|
|
319
|
+
* ```
|
|
320
|
+
*/
|
|
321
|
+
declare function originValidationResponse(req: Request, allowedOriginHostnames: string[]): Response | undefined;
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/server/requestStateCodec.d.ts
|
|
324
|
+
/**
|
|
325
|
+
* Options for {@linkcode createRequestStateCodec}.
|
|
326
|
+
*/
|
|
327
|
+
interface RequestStateCodecOptions {
|
|
328
|
+
/**
|
|
329
|
+
* The HMAC secret. A `string` value is UTF-8-encoded. MUST be at least
|
|
330
|
+
* 32 bytes (256 bits) long; a `RangeError` is thrown at
|
|
331
|
+
* construction otherwise. The same key must be available to every server
|
|
332
|
+
* instance that may receive an echoed `requestState` (so a per-process
|
|
333
|
+
* random key only works when one process serves every round of a flow).
|
|
334
|
+
*/
|
|
335
|
+
key: Uint8Array | string;
|
|
336
|
+
/**
|
|
337
|
+
* How long a minted `requestState` stays valid, in seconds. An echoed
|
|
338
|
+
* value past its expiry is rejected by {@linkcode RequestStateCodec.verify}.
|
|
339
|
+
* Defaults to `600` (ten minutes).
|
|
340
|
+
*/
|
|
341
|
+
ttlSeconds?: number;
|
|
342
|
+
/**
|
|
343
|
+
* Optional context binding. Called at mint time and again at verify time;
|
|
344
|
+
* a `requestState` minted under one binding value is rejected when echoed
|
|
345
|
+
* under a different one. Use this to bind state to the authenticated
|
|
346
|
+
* principal and/or the originating method (the spec's user-binding MUST
|
|
347
|
+
* for state that influences authorization), for example:
|
|
348
|
+
*
|
|
349
|
+
* ```ts
|
|
350
|
+
* bind: ctx => `${ctx.mcpReq.method}\0${ctx.http?.authInfo?.clientId ?? ''}`
|
|
351
|
+
* ```
|
|
352
|
+
*
|
|
353
|
+
* The returned value is stored in the envelope as a domain-separated HMAC
|
|
354
|
+
* tag (keyed by the codec's `key`), not the raw string — so a principal
|
|
355
|
+
* identifier in the binding does not appear in the wire value the client
|
|
356
|
+
* holds.
|
|
357
|
+
*
|
|
358
|
+
* When configured, {@linkcode RequestStateCodec.mint} requires its `ctx`
|
|
359
|
+
* argument.
|
|
360
|
+
*/
|
|
361
|
+
bind?: (ctx: ServerContext) => string;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* The codec returned by {@linkcode createRequestStateCodec}: `mint` seals a
|
|
365
|
+
* JSON-serializable payload into the wire string a handler returns from
|
|
366
|
+
* `inputRequired({ requestState })`; `verify` is the function to drop into
|
|
367
|
+
* {@linkcode server/server.ServerOptions | ServerOptions}`.requestState.verify`
|
|
368
|
+
* (it throws on any failure, which the seam answers as the frozen `-32602`).
|
|
369
|
+
* The decoded payload `verify` resolves with is handed to the handler by the
|
|
370
|
+
* seam via the typed `ctx.mcpReq.requestState<T>()` accessor — `mint<T>` and
|
|
371
|
+
* `requestState<T>()` are the typed encode/read pair.
|
|
372
|
+
*/
|
|
373
|
+
interface RequestStateCodec<T = unknown> {
|
|
374
|
+
/**
|
|
375
|
+
* Seal `payload` into an opaque wire string. The result is what the
|
|
376
|
+
* handler returns from `inputRequired({ requestState })`.
|
|
377
|
+
*
|
|
378
|
+
* @param ctx The handler's context. Required when the codec was created
|
|
379
|
+
* with a {@linkcode RequestStateCodecOptions.bind | bind}
|
|
380
|
+
* callback; ignored otherwise.
|
|
381
|
+
*/
|
|
382
|
+
mint(payload: T, ctx?: ServerContext): Promise<string>;
|
|
383
|
+
/**
|
|
384
|
+
* Verify an echoed `requestState` and return the original payload. Throws
|
|
385
|
+
* on any failure (bad MAC, expired, bind mismatch, malformed). The thrown
|
|
386
|
+
* message is a fixed opaque reason code (`'malformed'` / `'mac'` /
|
|
387
|
+
* `'expired'` / `'bind'`) — never the decoded payload, the binding value,
|
|
388
|
+
* or any other context-derived field.
|
|
389
|
+
*
|
|
390
|
+
* Pass this directly as `ServerOptions.requestState.verify`.
|
|
391
|
+
*/
|
|
392
|
+
verify(state: string, ctx: ServerContext): Promise<T>;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Create an opt-in HMAC-SHA256 codec for the multi-round-trip `requestState`
|
|
396
|
+
* (protocol revision 2026-07-28).
|
|
397
|
+
*
|
|
398
|
+
* `requestState` round-trips through the client and is attacker-controlled
|
|
399
|
+
* input on re-entry. The SDK applies no protection of its own; this helper is
|
|
400
|
+
* the convenience implementation of the spec's integrity MUST so authors don't
|
|
401
|
+
* hand-roll HMAC. Wire shape:
|
|
402
|
+
*
|
|
403
|
+
* "v1." b64url({"p":<payload>,"exp":<unixSeconds>,"b":<bindTag>?}) "." b64url(mac)
|
|
404
|
+
*
|
|
405
|
+
* where `bindTag` is `b64url(HMAC(key, "mcp.requestState.bind:" + bind(ctx))[:16])`
|
|
406
|
+
* — the binding value is never embedded raw.
|
|
407
|
+
*
|
|
408
|
+
* The codec is **signed, not encrypted**: the body is integrity-protected but
|
|
409
|
+
* the client can base64url-decode it and read the payload (`p`) in clear. Do
|
|
410
|
+
* not put secrets in the payload; use an AEAD construction if confidentiality
|
|
411
|
+
* is required. The handler reads its payload back via the typed
|
|
412
|
+
* `ctx.mcpReq.requestState<T>()` accessor — the seam has already run `verify`
|
|
413
|
+
* (integrity proven, payload decoded) by the time the handler is entered.
|
|
414
|
+
*
|
|
415
|
+
* Verification is fail-closed and constant-time (WebCrypto `subtle.verify` for
|
|
416
|
+
* the body MAC; a fixed-length XOR-accumulator compare for the bind tag).
|
|
417
|
+
* See `examples/mrtr/server.ts` for a worked end-to-end example.
|
|
418
|
+
*
|
|
419
|
+
* Design comparison (mcp.d `secureRequestState`, the peer SDK's reference
|
|
420
|
+
* implementation): mcp.d additionally offers an AES-256-GCM encrypted mode and
|
|
421
|
+
* derives independent cipher / bind-HMAC sub-keys from the operator secret via
|
|
422
|
+
* HKDF-SHA256, with an auto-generated per-process ephemeral key when none is
|
|
423
|
+
* supplied. This codec deliberately ships only the signed mode and a single
|
|
424
|
+
* keyed HMAC (domain-separated by input prefix) — HKDF sub-key derivation and
|
|
425
|
+
* an encrypted mode are intentionally out of scope for the initial release.
|
|
426
|
+
*/
|
|
427
|
+
declare function createRequestStateCodec<T = unknown>(options: RequestStateCodecOptions): RequestStateCodec<T>;
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region src/server/streamableHttp.d.ts
|
|
430
|
+
type StreamId = string;
|
|
431
|
+
type EventId = string;
|
|
432
|
+
/**
|
|
433
|
+
* Interface for resumability support via event storage
|
|
434
|
+
*/
|
|
435
|
+
interface EventStore {
|
|
436
|
+
/**
|
|
437
|
+
* Stores an event for later retrieval
|
|
438
|
+
* @param streamId ID of the stream the event belongs to
|
|
439
|
+
* @param message The JSON-RPC message to store
|
|
440
|
+
* @returns The generated event ID for the stored event
|
|
441
|
+
*/
|
|
442
|
+
storeEvent(streamId: StreamId, message: JSONRPCMessage): Promise<EventId>;
|
|
443
|
+
/**
|
|
444
|
+
* Get the stream ID associated with a given event ID.
|
|
445
|
+
* @param eventId The event ID to look up
|
|
446
|
+
* @returns The stream ID, or `undefined` if not found
|
|
447
|
+
*
|
|
448
|
+
* Optional: If not provided, the SDK will use the `streamId` returned by
|
|
449
|
+
* {@linkcode replayEventsAfter} for stream mapping.
|
|
450
|
+
*/
|
|
451
|
+
getStreamIdForEventId?(eventId: EventId): Promise<StreamId | undefined>;
|
|
452
|
+
replayEventsAfter(lastEventId: EventId, {
|
|
453
|
+
send
|
|
454
|
+
}: {
|
|
455
|
+
send: (eventId: EventId, message: JSONRPCMessage) => Promise<void>;
|
|
456
|
+
}): Promise<StreamId>;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Configuration options for {@linkcode WebStandardStreamableHTTPServerTransport}
|
|
460
|
+
*/
|
|
461
|
+
interface WebStandardStreamableHTTPServerTransportOptions {
|
|
462
|
+
/**
|
|
463
|
+
* Function that generates a session ID for the transport.
|
|
464
|
+
* The session ID SHOULD be globally unique and cryptographically secure (e.g., a securely generated UUID, a JWT, or a cryptographic hash)
|
|
465
|
+
*
|
|
466
|
+
* If not provided, session management is disabled (stateless mode).
|
|
467
|
+
*/
|
|
468
|
+
sessionIdGenerator?: (() => string) | undefined;
|
|
469
|
+
/**
|
|
470
|
+
* A callback for session initialization events
|
|
471
|
+
* This is called when the server initializes a new session.
|
|
472
|
+
* Useful in cases when you need to register multiple mcp sessions
|
|
473
|
+
* and need to keep track of them.
|
|
474
|
+
* @param sessionId The generated session ID
|
|
475
|
+
*/
|
|
476
|
+
onsessioninitialized?: ((sessionId: string) => void | Promise<void>) | undefined;
|
|
477
|
+
/**
|
|
478
|
+
* A callback for session close events
|
|
479
|
+
* This is called when the server closes a session due to a `DELETE` request.
|
|
480
|
+
* Useful in cases when you need to clean up resources associated with the session.
|
|
481
|
+
* Note that this is different from the transport closing, if you are handling
|
|
482
|
+
* HTTP requests from multiple nodes you might want to close each
|
|
483
|
+
* {@linkcode WebStandardStreamableHTTPServerTransport} after a request is completed while still keeping the
|
|
484
|
+
* session open/running.
|
|
485
|
+
* @param sessionId The session ID that was closed
|
|
486
|
+
*/
|
|
487
|
+
onsessionclosed?: ((sessionId: string) => void | Promise<void>) | undefined;
|
|
488
|
+
/**
|
|
489
|
+
* If `true`, the server will return JSON responses instead of starting an SSE stream.
|
|
490
|
+
* This can be useful for simple request/response scenarios without streaming.
|
|
491
|
+
* Default is `false` (SSE streams are preferred).
|
|
492
|
+
*/
|
|
493
|
+
enableJsonResponse?: boolean;
|
|
494
|
+
/**
|
|
495
|
+
* Event store for resumability support
|
|
496
|
+
* If provided, resumability will be enabled, allowing clients to reconnect and resume messages
|
|
497
|
+
*/
|
|
498
|
+
eventStore?: EventStore;
|
|
499
|
+
/**
|
|
500
|
+
* List of allowed `Host` header values for DNS rebinding protection.
|
|
501
|
+
* If not specified, host validation is disabled.
|
|
502
|
+
* @deprecated Use external middleware for host validation instead.
|
|
503
|
+
*/
|
|
504
|
+
allowedHosts?: string[];
|
|
505
|
+
/**
|
|
506
|
+
* List of allowed `Origin` header values for DNS rebinding protection.
|
|
507
|
+
* If not specified, origin validation is disabled.
|
|
508
|
+
* @deprecated Use external middleware for origin validation instead.
|
|
509
|
+
*/
|
|
510
|
+
allowedOrigins?: string[];
|
|
511
|
+
/**
|
|
512
|
+
* Enable DNS rebinding protection (requires `allowedHosts` and/or `allowedOrigins` to be configured).
|
|
513
|
+
* Default is `false` for backwards compatibility.
|
|
514
|
+
* @deprecated Use external middleware for DNS rebinding protection instead.
|
|
515
|
+
*/
|
|
516
|
+
enableDnsRebindingProtection?: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* Retry interval in milliseconds to suggest to clients in SSE `retry` field.
|
|
519
|
+
* When set, the server will send a `retry` field in SSE priming events to control
|
|
520
|
+
* client reconnection timing for polling behavior.
|
|
521
|
+
*/
|
|
522
|
+
retryInterval?: number;
|
|
523
|
+
/**
|
|
524
|
+
* Interval in milliseconds between SSE keep-alive comment frames.
|
|
525
|
+
* Defaults to `15000`; set to `0` to disable.
|
|
526
|
+
*/
|
|
527
|
+
keepAliveMs?: number;
|
|
528
|
+
/**
|
|
529
|
+
* List of protocol versions that this transport will accept.
|
|
530
|
+
* Used to validate the `mcp-protocol-version` header in incoming requests.
|
|
531
|
+
*
|
|
532
|
+
* Note: When using {@linkcode server/server.Server.connect | Server.connect()}, the server automatically passes its
|
|
533
|
+
* `supportedProtocolVersions` to the transport, so you typically don't need
|
|
534
|
+
* to set this option directly.
|
|
535
|
+
*
|
|
536
|
+
* @default {@linkcode SUPPORTED_PROTOCOL_VERSIONS}
|
|
537
|
+
*/
|
|
538
|
+
supportedProtocolVersions?: string[];
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Options for handling a request
|
|
542
|
+
*/
|
|
543
|
+
interface HandleRequestOptions {
|
|
544
|
+
/**
|
|
545
|
+
* Pre-parsed request body. If provided, the transport will use this instead of parsing `req.json()`.
|
|
546
|
+
* Useful when using body-parser middleware that has already parsed the body.
|
|
547
|
+
*/
|
|
548
|
+
parsedBody?: unknown;
|
|
549
|
+
/**
|
|
550
|
+
* Authentication info from middleware. If provided, will be passed to message handlers.
|
|
551
|
+
*/
|
|
552
|
+
authInfo?: AuthInfo;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Server transport for Web Standards Streamable HTTP: this implements the MCP Streamable HTTP transport specification
|
|
556
|
+
* using Web Standard APIs (`Request`, `Response`, `ReadableStream`).
|
|
557
|
+
*
|
|
558
|
+
* This transport works on any runtime that supports Web Standards: Node.js 18+, Cloudflare Workers, Deno, Bun, etc.
|
|
559
|
+
*
|
|
560
|
+
* In stateful mode:
|
|
561
|
+
* - Session ID is generated and included in response headers
|
|
562
|
+
* - Session ID is always included in initialization responses
|
|
563
|
+
* - Requests with invalid session IDs are rejected with `404 Not Found`
|
|
564
|
+
* - Non-initialization requests without a session ID are rejected with `400 Bad Request`
|
|
565
|
+
* - State is maintained in-memory (connections, message history)
|
|
566
|
+
*
|
|
567
|
+
* In stateless mode:
|
|
568
|
+
* - No Session ID is included in any responses
|
|
569
|
+
* - No session validation is performed
|
|
570
|
+
*
|
|
571
|
+
* @example Stateful setup
|
|
572
|
+
* ```ts source="./streamableHttp.examples.ts#WebStandardStreamableHTTPServerTransport_stateful"
|
|
573
|
+
* const server = new McpServer({ name: 'my-server', version: '1.0.0' });
|
|
574
|
+
*
|
|
575
|
+
* const transport = new WebStandardStreamableHTTPServerTransport({
|
|
576
|
+
* sessionIdGenerator: () => crypto.randomUUID()
|
|
577
|
+
* });
|
|
578
|
+
*
|
|
579
|
+
* await server.connect(transport);
|
|
580
|
+
* ```
|
|
581
|
+
*
|
|
582
|
+
* @example Stateless setup
|
|
583
|
+
* ```ts source="./streamableHttp.examples.ts#WebStandardStreamableHTTPServerTransport_stateless"
|
|
584
|
+
* const transport = new WebStandardStreamableHTTPServerTransport({
|
|
585
|
+
* sessionIdGenerator: undefined
|
|
586
|
+
* });
|
|
587
|
+
* ```
|
|
588
|
+
*
|
|
589
|
+
* @example Hono.js
|
|
590
|
+
* ```ts source="./streamableHttp.examples.ts#WebStandardStreamableHTTPServerTransport_hono"
|
|
591
|
+
* app.all('/mcp', async c => {
|
|
592
|
+
* return transport.handleRequest(c.req.raw);
|
|
593
|
+
* });
|
|
594
|
+
* ```
|
|
595
|
+
*
|
|
596
|
+
* @example Cloudflare Workers
|
|
597
|
+
* ```ts source="./streamableHttp.examples.ts#WebStandardStreamableHTTPServerTransport_workers"
|
|
598
|
+
* const worker = {
|
|
599
|
+
* async fetch(request: Request): Promise<Response> {
|
|
600
|
+
* return transport.handleRequest(request);
|
|
601
|
+
* }
|
|
602
|
+
* };
|
|
603
|
+
* ```
|
|
604
|
+
*/
|
|
605
|
+
declare class WebStandardStreamableHTTPServerTransport implements Transport {
|
|
606
|
+
private sessionIdGenerator;
|
|
607
|
+
private _started;
|
|
608
|
+
private _closed;
|
|
609
|
+
private _streamMapping;
|
|
610
|
+
private _requestToStreamMapping;
|
|
611
|
+
private _requestResponseMap;
|
|
612
|
+
private _initialized;
|
|
613
|
+
private _enableJsonResponse;
|
|
614
|
+
private _standaloneSseStreamId;
|
|
615
|
+
private _eventStore?;
|
|
616
|
+
private _onsessioninitialized?;
|
|
617
|
+
private _onsessionclosed?;
|
|
618
|
+
private _allowedHosts?;
|
|
619
|
+
private _allowedOrigins?;
|
|
620
|
+
private _enableDnsRebindingProtection;
|
|
621
|
+
private _retryInterval?;
|
|
622
|
+
private _supportedProtocolVersions;
|
|
623
|
+
private _keepAliveMs;
|
|
624
|
+
sessionId?: string;
|
|
625
|
+
onclose?: () => void;
|
|
626
|
+
onerror?: (error: Error) => void;
|
|
627
|
+
onmessage?: (message: JSONRPCMessage, extra?: MessageExtraInfo) => void;
|
|
628
|
+
constructor(options?: WebStandardStreamableHTTPServerTransportOptions);
|
|
629
|
+
private startKeepAlive;
|
|
630
|
+
/**
|
|
631
|
+
* Starts the transport. This is required by the {@linkcode Transport} interface but is a no-op
|
|
632
|
+
* for the Streamable HTTP transport as connections are managed per-request.
|
|
633
|
+
*/
|
|
634
|
+
start(): Promise<void>;
|
|
635
|
+
/**
|
|
636
|
+
* Sets the supported protocol versions for header validation.
|
|
637
|
+
* Called by the server during {@linkcode server/server.Server.connect | connect()} to pass its supported versions.
|
|
638
|
+
*/
|
|
639
|
+
setSupportedProtocolVersions(versions: string[]): void;
|
|
640
|
+
/**
|
|
641
|
+
* Helper to create a JSON error response
|
|
642
|
+
*/
|
|
643
|
+
private createJsonErrorResponse;
|
|
644
|
+
/**
|
|
645
|
+
* Validates request headers for DNS rebinding protection.
|
|
646
|
+
* @returns Error response if validation fails, `undefined` if validation passes.
|
|
647
|
+
*/
|
|
648
|
+
private validateRequestHeaders;
|
|
649
|
+
/**
|
|
650
|
+
* Handles an incoming HTTP request, whether `GET`, `POST`, or `DELETE`
|
|
651
|
+
* Returns a `Response` object (Web Standard)
|
|
652
|
+
*/
|
|
653
|
+
handleRequest(req: Request, options?: HandleRequestOptions): Promise<Response>;
|
|
654
|
+
/**
|
|
655
|
+
* Returns true if the client's protocol version supports empty SSE data in
|
|
656
|
+
* priming events (the fix shipped with protocol version `2025-11-25`).
|
|
657
|
+
*
|
|
658
|
+
* The version is checked for membership in this transport instance's
|
|
659
|
+
* supported protocol versions rather than with an open-ended
|
|
660
|
+
* `>= '2025-11-25'` comparison: the value may come from an `initialize`
|
|
661
|
+
* request body, which (unlike the `MCP-Protocol-Version` header) is not
|
|
662
|
+
* validated against `supportedProtocolVersions` before reaching this
|
|
663
|
+
* check. An unknown future version string must not silently enable
|
|
664
|
+
* behavior reserved for versions this transport actually supports.
|
|
665
|
+
*/
|
|
666
|
+
private supportsEmptySSEData;
|
|
667
|
+
/**
|
|
668
|
+
* Writes a priming event to establish resumption capability.
|
|
669
|
+
* Only sends if `eventStore` is configured (opt-in for resumability) and
|
|
670
|
+
* the client's protocol version supports empty SSE data (a supported
|
|
671
|
+
* version that is >= `2025-11-25`).
|
|
672
|
+
*/
|
|
673
|
+
private writePrimingEvent;
|
|
674
|
+
/**
|
|
675
|
+
* Handles `GET` requests for SSE stream
|
|
676
|
+
*/
|
|
677
|
+
private handleGetRequest;
|
|
678
|
+
/**
|
|
679
|
+
* Replays events that would have been sent after the specified event ID
|
|
680
|
+
* Only used when resumability is enabled
|
|
681
|
+
*/
|
|
682
|
+
private replayEvents;
|
|
683
|
+
/**
|
|
684
|
+
* Writes an event to an SSE stream via controller with proper formatting
|
|
685
|
+
*/
|
|
686
|
+
private writeSSEEvent;
|
|
687
|
+
/**
|
|
688
|
+
* Handles unsupported requests (`PUT`, `PATCH`, etc.)
|
|
689
|
+
*/
|
|
690
|
+
private handleUnsupportedRequest;
|
|
691
|
+
/**
|
|
692
|
+
* Handles `POST` requests containing JSON-RPC messages
|
|
693
|
+
*/
|
|
694
|
+
private handlePostRequest;
|
|
695
|
+
/**
|
|
696
|
+
* Handles `DELETE` requests to terminate sessions
|
|
697
|
+
*/
|
|
698
|
+
private handleDeleteRequest;
|
|
699
|
+
/**
|
|
700
|
+
* Validates session ID for non-initialization requests.
|
|
701
|
+
* Returns `Response` error if invalid, `undefined` otherwise
|
|
702
|
+
*/
|
|
703
|
+
private validateSession;
|
|
704
|
+
/**
|
|
705
|
+
* Validates the `MCP-Protocol-Version` header on incoming requests.
|
|
706
|
+
*
|
|
707
|
+
* For initialization: Version negotiation handles unknown versions gracefully
|
|
708
|
+
* (server responds with its supported version).
|
|
709
|
+
*
|
|
710
|
+
* For subsequent requests with `MCP-Protocol-Version` header:
|
|
711
|
+
* - Accept if in supported list
|
|
712
|
+
* - 400 if unsupported
|
|
713
|
+
*
|
|
714
|
+
* For HTTP requests without the `MCP-Protocol-Version` header:
|
|
715
|
+
* - Accept and default to the version negotiated at initialization
|
|
716
|
+
*/
|
|
717
|
+
private validateProtocolVersion;
|
|
718
|
+
close(): Promise<void>;
|
|
719
|
+
/**
|
|
720
|
+
* Close an SSE stream for a specific request, triggering client reconnection.
|
|
721
|
+
* Use this to implement polling behavior during long-running operations -
|
|
722
|
+
* client will reconnect after the retry interval specified in the priming event.
|
|
723
|
+
*/
|
|
724
|
+
closeSSEStream(requestId: RequestId): void;
|
|
725
|
+
/**
|
|
726
|
+
* Close the standalone `GET` SSE stream, triggering client reconnection.
|
|
727
|
+
* Use this to implement polling behavior for server-initiated notifications.
|
|
728
|
+
*/
|
|
729
|
+
closeStandaloneSSEStream(): void;
|
|
730
|
+
send(message: JSONRPCMessage, options?: {
|
|
731
|
+
relatedRequestId?: RequestId;
|
|
732
|
+
}): Promise<void>;
|
|
733
|
+
}
|
|
734
|
+
//#endregion
|
|
735
|
+
//#region src/fromJsonSchema.d.ts
|
|
736
|
+
declare function fromJsonSchema<T = unknown>(schema: JsonSchemaType, validator?: jsonSchemaValidator): StandardSchemaWithJSON<T, T>;
|
|
737
|
+
//#endregion
|
|
738
|
+
export { Annotations, type AnyToolHandler, AudioContent, AuthInfo, type AuthMetadataOptions, type AuthorizationServerMetadata, BAGGAGE_META_KEY, type BaseContext, BaseMetadata, type BaseToolCallback, type BearerAuthOptions, BlobResourceContents, BooleanSchema, CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, type CacheHint, type CacheScope, CallToolRequest, CallToolRequestParams, CallToolResult, CancelTaskRequest, CancelTaskResult, CancelledNotification, CancelledNotificationParams, ClientCapabilities, type ClientContext, ClientNotification, ClientRequest, ClientResult, CompatibilityCallToolResult, type CompletableSchema, type CompleteCallback, CompleteRequest, CompleteRequestParams, CompleteRequestPrompt, CompleteRequestResourceTemplate, type CompleteResourceTemplateCallback, CompleteResult, ContentBlock, type CreateMcpHandlerOptions, CreateMessageRequest, CreateMessageRequestParams, CreateMessageRequestParamsBase, CreateMessageRequestParamsWithTools, CreateMessageResult, CreateMessageResultWithTools, CreateTaskResult, Cursor, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, DEFAULT_REQUEST_TIMEOUT_MSEC, DiscoverRequest, DiscoverResult, type ElicitInputParams, ElicitRequest, ElicitRequestFormParams, ElicitRequestParams, ElicitRequestURLParams, ElicitResult, ElicitationCompleteNotification, ElicitationCompleteNotificationParams, EmbeddedResource, EmptyResult, EnumSchema, type EventId, type EventStore, type FetchLike, GetPromptRequest, GetPromptRequestParams, GetPromptResult, GetTaskPayloadRequest, GetTaskPayloadResult, GetTaskRequest, GetTaskResult, type HandleRequestOptions, HandlerResultTypeMap, type HostHeaderValidationResult, INTERNAL_ERROR, INVALID_PARAMS, INVALID_REQUEST, Icon, Icons, type IdJagTokenExchangeResponse, ImageContent, Implementation, InMemoryServerEventBus, InMemoryTransport, type InboundClassificationOutcome, type InboundHttpRequest, type InboundLadderRejection, type InboundLegacyRoute, type InboundLegacyRouteReason, type InboundModernRoute, type InboundValidationRung, InitializeRequest, InitializeRequestParams, InitializeResult, InitializedNotification, InputRequest, InputRequests, InputRequiredResult, type InputRequiredSpec, InputResponse, type InputResponseView, InputResponses, InternalError, InvalidParamsError, InvalidRequestError, JSONArray, JSONObject, JSONRPCErrorResponse, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONRPCResultResponse, JSONRPC_VERSION, JSONValue, type JsonSchemaType, type JsonSchemaValidator, type JsonSchemaValidatorResult, LATEST_PROTOCOL_VERSION, LOG_LEVEL_META_KEY, type LegacyHttpHandler, LegacyTitledEnumSchema, ListChangedCallback, ListChangedHandlers, ListChangedOptions, ListPromptsRequest, ListPromptsResult, ListResourceTemplatesRequest, ListResourceTemplatesResult, type ListResourcesCallback, ListResourcesRequest, ListResourcesResult, ListRootsRequest, ListRootsResult, ListTasksRequest, ListTasksResult, ListToolsRequest, ListToolsResult, LoggingLevel, LoggingMessageNotification, LoggingMessageNotificationParams, METHOD_NOT_FOUND, type McpHandlerRequestOptions, type McpHttpHandler, type McpRequestContext, McpServer, type McpServerFactory, MessageClassification, MessageExtraInfo, MetaObject, MethodNotFoundError, MissingRequiredClientCapabilityError, MissingRequiredClientCapabilityErrorData, ModelHint, ModelPreferences, MultiSelectEnumSchema, Notification, NotificationMethod, type NotificationOptions, NotificationParams, NotificationTypeMap, NumberSchema, type OAuthClientInformation, type OAuthClientInformationFull, type OAuthClientInformationMixed, type OAuthClientMetadata, type OAuthClientRegistrationError, OAuthError, OAuthErrorCode, type OAuthErrorResponse, type OAuthMetadata, type OAuthProtectedResourceMetadata, type OAuthTokenRevocationRequest, type OAuthTokenVerifier, type OAuthTokens, type OpenIdProviderDiscoveryMetadata, type OpenIdProviderMetadata, type OriginValidationResult, PARSE_ERROR, PROTOCOL_VERSION_META_KEY, PaginatedRequest, PaginatedRequestParams, PaginatedResult, ParseError, PerRequestHTTPServerTransport, type PerRequestHTTPServerTransportOptions, type PerRequestMessageExtra, type PerRequestResponseMode, PingRequest, PrimitiveSchemaDefinition, Progress, type ProgressCallback, ProgressNotification, ProgressNotificationParams, ProgressToken, Prompt, PromptArgument, type PromptCallback, PromptListChangedNotification, PromptMessage, PromptReference, Protocol, type ProtocolEra, ProtocolError, ProtocolErrorCode, type ProtocolOptions, RELATED_TASK_META_KEY, ReadBuffer, type ReadResourceCallback, ReadResourceRequest, ReadResourceRequestParams, ReadResourceResult, type ReadResourceTemplateCallback, type RegisteredPrompt, type RegisteredResource, type RegisteredResourceTemplate, type RegisteredTool, RelatedTaskMetadata, Request$1 as Request, type RequestHandlerSchemas, RequestId, RequestMeta, RequestMetaEnvelope, RequestMetaObject, RequestMethod, type RequestOptions, RequestParams, type RequestStateAccessor, type RequestStateCodec, type RequestStateCodecOptions, RequestTypeMap, Resource, ResourceContents, ResourceLink, ResourceListChangedNotification, type ResourceMetadata, ResourceNotFoundError, ResourceRequestParams, ResourceTemplate, ResourceTemplateReference, ResourceTemplateType, ResourceUpdatedNotification, ResourceUpdatedNotificationParams, Result, ResultMetaObject, ResultTypeMap, Role, Root, RootsListChangedNotification, SERVER_INFO_META_KEY, STDIO_DEFAULT_MAX_BUFFER_SIZE, SUBSCRIPTION_ID_META_KEY, SUPPORTED_PROTOCOL_VERSIONS, SamplingContent, SamplingMessage, SamplingMessageContentBlock, SdkError, SdkErrorCode, SdkHttpError, type SdkHttpErrorData, Server, ServerCapabilities, type ServerContext, type ServerEvent, type ServerEventBus, ServerNotification, type ServerNotifier, type ServerOptions, ServerRequest, ServerResult, SetLevelRequest, SetLevelRequestParams, SingleSelectEnumSchema, type SpecTypeName, type SpecTypes, type StandardSchemaV1, type StandardSchemaV1Sync, type StandardSchemaWithJSON, type StoredOAuthClientInformation, type StoredOAuthTokens, type StreamId, StringSchema, SubscribeRequest, SubscribeRequestParams, SubscriptionFilter, SubscriptionsAcknowledgedNotification, SubscriptionsAcknowledgedNotificationParams, SubscriptionsListenRequest, SubscriptionsListenRequestParams, SubscriptionsListenResult, SubscriptionsListenResultMeta, TRACEPARENT_META_KEY, TRACESTATE_META_KEY, Task, TaskAugmentedRequestParams, TaskCreationParams, TaskMetadata, TaskStatus, TaskStatusNotification, TaskStatusNotificationParams, TextContent, TextResourceContents, TitledMultiSelectEnumSchema, TitledSingleSelectEnumSchema, Tool, ToolAnnotations, type ToolCallback, ToolChoice, ToolExecution, ToolListChangedNotification, ToolResultContent, ToolUseContent, type Transport, type TransportSendOptions, UnsubscribeRequest, UnsubscribeRequestParams, UnsupportedProtocolVersionError, UnsupportedProtocolVersionErrorData, UntitledMultiSelectEnumSchema, UntitledSingleSelectEnumSchema, UriTemplate, UrlElicitationRequiredError, type Variables, WebStandardStreamableHTTPServerTransport, type WebStandardStreamableHTTPServerTransportOptions, acceptedContent, assertCompleteRequestPrompt, assertCompleteRequestResourceTemplate, bearerAuthChallengeResponse, buildOAuthProtectedResourceMetadata, checkResourceAllowed, classifyInboundRequest, completable, createFetchWithInit, createMcpHandler, createRequestStateCodec, deserializeMessage, fromJsonSchema, getDisplayName, getOAuthProtectedResourceMetadataUrl, hostHeaderValidationResponse, inputRequired, inputResponse, isCallToolResult, isCompletable, isInitializeRequest, isInitializedNotification, isInputRequiredResult, isJSONRPCErrorResponse, isJSONRPCNotification, isJSONRPCRequest, isJSONRPCResponse, isJSONRPCResultResponse, isJsonContentType, isLegacyRequest, isSpecType, isTaskAugmentedRequestParams, type jsonSchemaValidator, legacyStatelessFallback, localhostAllowedHostnames, localhostAllowedOrigins, mergeCapabilities, oauthMetadataResponse, originValidationResponse, parseJSONRPCMessage, preloadSchemas, requireBearerAuth, resourceUrlFromServerUrl, serializeMessage, specTypeSchemas, validateHostHeader, validateOriginHeader, verifyBearerToken };
|
|
739
|
+
//# sourceMappingURL=index.d.cts.map
|