ostacky 0.9.4 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/README.md +27 -25
  2. package/assets/agents/ostacky.md +3 -3
  3. package/assets/commands/install-stack.md +2 -2
  4. package/assets/mcp/ostacky-controller/index.js +80 -19
  5. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/{auth-CVhIKulL.d.mts → auth--n_Yzytt.d.cts} +14 -9
  6. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/{auth-CVhIKulL.d.mts.map → auth--n_Yzytt.d.cts.map} +1 -1
  7. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/{auth-CfDMXiII.cjs → auth-4-zilcqg.cjs} +3 -2
  8. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-4-zilcqg.cjs.map +1 -0
  9. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/{auth-CUe6YdwF.mjs → auth-CGP0BDVq.mjs} +3 -2
  10. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CGP0BDVq.mjs.map +1 -0
  11. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/{auth-B2Q9_Vxp.d.cts → auth-YUQV3RRv.d.mts} +14 -9
  12. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/{auth-B2Q9_Vxp.d.cts.map → auth-YUQV3RRv.d.mts.map} +1 -1
  13. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.cjs +1 -1
  14. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.d.cts +1 -1
  15. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.d.mts +1 -1
  16. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.mjs +1 -1
  17. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.cjs +1 -1
  18. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +1 -1
  19. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +1 -1
  20. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.mjs +1 -1
  21. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/package.json +1 -1
  22. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/README.md +3 -3
  23. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{ajvProvider-CplOkyLC.mjs → ajvProvider-CEoC__sr.mjs} +483 -38
  24. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs.map +1 -0
  25. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{ajvProvider-BdSo9BII.d.mts → ajvProvider-CgI-5L6O.d.mts} +25 -8
  26. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{ajvProvider-BdSo9BII.d.mts.map → ajvProvider-CgI-5L6O.d.mts.map} +1 -1
  27. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{ajvProvider-B_4czhCS.d.cts → ajvProvider-FOQRM7up.d.cts} +24 -7
  28. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{ajvProvider-B_4czhCS.d.cts.map → ajvProvider-FOQRM7up.d.cts.map} +1 -1
  29. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{ajvProvider-Brn-Q2J_.cjs → ajvProvider-ZaoO9afR.cjs} +483 -38
  30. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs.map +1 -0
  31. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{cfWorkerProvider-ojcZaap3.cjs → cfWorkerProvider-BwbPzsdI.cjs} +25 -15
  32. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs.map +1 -0
  33. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{cfWorkerProvider-BYRW5af5.d.mts → cfWorkerProvider-C03CSigr.d.mts} +21 -6
  34. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts.map +1 -0
  35. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{cfWorkerProvider-D9GAttn8.d.cts → cfWorkerProvider-doTkZbTr.d.cts} +20 -5
  36. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
  37. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{cfWorkerProvider-Bd-iTHAF.mjs → cfWorkerProvider-p3WaZPqB.mjs} +26 -15
  38. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs.map +1 -0
  39. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{createMcpHandler-DzBzpE4_.d.cts → createMcpHandler-BLVe3qmU.d.cts} +137 -32
  40. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-BLVe3qmU.d.cts.map +1 -0
  41. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{createMcpHandler-CEckaSEs.d.mts → createMcpHandler-Bt6U_Fqb.d.mts} +138 -33
  42. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-Bt6U_Fqb.d.mts.map +1 -0
  43. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs +46 -0
  44. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs.map +1 -0
  45. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs +34 -0
  46. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs.map +1 -0
  47. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.cjs +209 -257
  48. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -1
  49. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.d.cts +45 -3
  50. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +1 -1
  51. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.d.mts +46 -4
  52. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +1 -1
  53. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.mjs +201 -252
  54. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -1
  55. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{mcp-DM1iHYFo.cjs → mcp-DUcCQSTW.cjs} +458 -35
  56. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-DUcCQSTW.cjs.map +1 -0
  57. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{mcp-IJurDZVN.mjs → mcp-Dw2OlZ1f.mjs} +389 -32
  58. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-Dw2OlZ1f.mjs.map +1 -0
  59. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +1 -1
  60. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +1 -1
  61. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +1 -1
  62. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +1 -1
  63. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +1 -1
  64. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +1 -1
  65. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +1 -1
  66. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +1 -1
  67. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +2 -2
  68. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +1 -1
  69. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +1 -1
  70. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +2 -2
  71. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{src-BX_fm-dB.cjs → src-CgFsfg3E.cjs} +161 -48
  72. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-CgFsfg3E.cjs.map +1 -0
  73. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{src-D86MbS1I.mjs → src-D-y6h4N7.mjs} +161 -48
  74. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D-y6h4N7.mjs.map +1 -0
  75. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +30 -3
  76. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +1 -1
  77. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +9 -1
  78. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +1 -1
  79. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +9 -1
  80. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +1 -1
  81. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +30 -3
  82. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +1 -1
  83. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{types-mS0yxCL0.d.mts → types-DUs7mGBv.d.mts} +1 -1
  84. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/{types-mS0yxCL0.d.mts.map → types-DUs7mGBv.d.mts.map} +1 -1
  85. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +1 -1
  86. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +1 -1
  87. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +1 -1
  88. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +1 -1
  89. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +1 -1
  90. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +1 -1
  91. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +1 -1
  92. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +1 -1
  93. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/package.json +4 -4
  94. package/assets/mcp/ostacky-controller/package.json +1 -1
  95. package/assets/plugins/ostacky-controller/index.ts +43 -8
  96. package/dist/cli.js +130 -74
  97. package/manifest.json +29 -29
  98. package/package.json +7 -2
  99. package/assets/mcp/openspec/bun.lock +0 -20
  100. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs.map +0 -1
  101. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs.map +0 -1
  102. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-Brn-Q2J_.cjs.map +0 -1
  103. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CplOkyLC.mjs.map +0 -1
  104. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BYRW5af5.d.mts.map +0 -1
  105. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-Bd-iTHAF.mjs.map +0 -1
  106. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-D9GAttn8.d.cts.map +0 -1
  107. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-ojcZaap3.cjs.map +0 -1
  108. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CEckaSEs.d.mts.map +0 -1
  109. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-DzBzpE4_.d.cts.map +0 -1
  110. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-DM1iHYFo.cjs.map +0 -1
  111. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-IJurDZVN.mjs.map +0 -1
  112. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-BX_fm-dB.cjs.map +0 -1
  113. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D86MbS1I.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cfWorkerProvider-p3WaZPqB.mjs","names":["regex","keywordLocation"],"sources":["../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/pointer.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/dereference.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validate.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validator.js","../../core-internal/src/validators/cfWorkerProvider.ts"],"sourcesContent":["export function deepCompareStrict(a, b) {\n const typeofa = typeof a;\n if (typeofa !== typeof b) {\n return false;\n }\n if (Array.isArray(a)) {\n if (!Array.isArray(b)) {\n return false;\n }\n const length = a.length;\n if (length !== b.length) {\n return false;\n }\n for (let i = 0; i < length; i++) {\n if (!deepCompareStrict(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n if (typeofa === 'object') {\n if (!a || !b) {\n return a === b;\n }\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n const length = aKeys.length;\n if (length !== bKeys.length) {\n return false;\n }\n for (const k of aKeys) {\n if (!deepCompareStrict(a[k], b[k])) {\n return false;\n }\n }\n return true;\n }\n return a === b;\n}\n","export function encodePointer(p) {\n return encodeURI(escapePointer(p));\n}\nexport function escapePointer(p) {\n return p.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n","import { encodePointer } from './pointer.js';\nexport const schemaKeyword = {\n additionalItems: true,\n unevaluatedItems: true,\n items: true,\n contains: true,\n additionalProperties: true,\n unevaluatedProperties: true,\n propertyNames: true,\n not: true,\n if: true,\n then: true,\n else: true\n};\nexport const schemaArrayKeyword = {\n prefixItems: true,\n items: true,\n allOf: true,\n anyOf: true,\n oneOf: true\n};\nexport const schemaMapKeyword = {\n $defs: true,\n definitions: true,\n properties: true,\n patternProperties: true,\n dependentSchemas: true\n};\nexport const ignoredKeyword = {\n id: true,\n $id: true,\n $ref: true,\n $schema: true,\n $anchor: true,\n $vocabulary: true,\n $comment: true,\n default: true,\n enum: true,\n const: true,\n required: true,\n type: true,\n maximum: true,\n minimum: true,\n exclusiveMaximum: true,\n exclusiveMinimum: true,\n multipleOf: true,\n maxLength: true,\n minLength: true,\n pattern: true,\n format: true,\n maxItems: true,\n minItems: true,\n uniqueItems: true,\n maxProperties: true,\n minProperties: true\n};\nexport let initialBaseURI = typeof self !== 'undefined' &&\n self.location &&\n self.location.origin !== 'null'\n ?\n new URL(self.location.origin + self.location.pathname + location.search)\n : new URL('https://github.com/cfworker');\nexport function dereference(schema, lookup = Object.create(null), baseURI = initialBaseURI, basePointer = '') {\n if (schema && typeof schema === 'object' && !Array.isArray(schema)) {\n const id = schema.$id || schema.id;\n if (id) {\n const url = new URL(id, baseURI.href);\n if (url.hash.length > 1) {\n lookup[url.href] = schema;\n }\n else {\n url.hash = '';\n if (basePointer === '') {\n baseURI = url;\n }\n else {\n dereference(schema, lookup, baseURI);\n }\n }\n }\n }\n else if (schema !== true && schema !== false) {\n return lookup;\n }\n const schemaURI = baseURI.href + (basePointer ? '#' + basePointer : '');\n if (lookup[schemaURI] !== undefined) {\n throw new Error(`Duplicate schema URI \"${schemaURI}\".`);\n }\n lookup[schemaURI] = schema;\n if (schema === true || schema === false) {\n return lookup;\n }\n if (schema.__absolute_uri__ === undefined) {\n Object.defineProperty(schema, '__absolute_uri__', {\n enumerable: false,\n value: schemaURI\n });\n }\n if (schema.$ref && schema.__absolute_ref__ === undefined) {\n const url = new URL(schema.$ref, baseURI.href);\n url.hash = url.hash;\n Object.defineProperty(schema, '__absolute_ref__', {\n enumerable: false,\n value: url.href\n });\n }\n if (schema.$recursiveRef && schema.__absolute_recursive_ref__ === undefined) {\n const url = new URL(schema.$recursiveRef, baseURI.href);\n url.hash = url.hash;\n Object.defineProperty(schema, '__absolute_recursive_ref__', {\n enumerable: false,\n value: url.href\n });\n }\n if (schema.$anchor) {\n const url = new URL('#' + schema.$anchor, baseURI.href);\n lookup[url.href] = schema;\n }\n for (let key in schema) {\n if (ignoredKeyword[key]) {\n continue;\n }\n const keyBase = `${basePointer}/${encodePointer(key)}`;\n const subSchema = schema[key];\n if (Array.isArray(subSchema)) {\n if (schemaArrayKeyword[key]) {\n const length = subSchema.length;\n for (let i = 0; i < length; i++) {\n dereference(subSchema[i], lookup, baseURI, `${keyBase}/${i}`);\n }\n }\n }\n else if (schemaMapKeyword[key]) {\n for (let subKey in subSchema) {\n dereference(subSchema[subKey], lookup, baseURI, `${keyBase}/${encodePointer(subKey)}`);\n }\n }\n else {\n dereference(subSchema, lookup, baseURI, keyBase);\n }\n }\n return lookup;\n}\n","const DATE = /^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/;\nconst DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst TIME = /^(\\d\\d):(\\d\\d):(\\d\\d)(\\.\\d+)?(z|[+-]\\d\\d(?::?\\d\\d)?)?$/i;\nconst HOSTNAME = /^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i;\nconst URIREF = /^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a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a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i;\nconst URL_ = /^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu;\nconst UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;\nconst JSON_POINTER = /^(?:\\/(?:[^~/]|~0|~1)*)*$/;\nconst JSON_POINTER_URI_FRAGMENT = /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;\nconst RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/;\nconst EMAIL = (input) => {\n if (input[0] === '\"')\n return false;\n const [name, host, ...rest] = input.split('@');\n if (!name ||\n !host ||\n rest.length !== 0 ||\n name.length > 64 ||\n host.length > 253)\n return false;\n if (name[0] === '.' || name.endsWith('.') || name.includes('..'))\n return false;\n if (!/^[a-z0-9.-]+$/i.test(host) ||\n !/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(name))\n return false;\n return host\n .split('.')\n .every(part => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(part));\n};\nconst IPV4 = /^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/;\nconst IPV6 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i;\nconst DURATION = (input) => input.length > 1 &&\n input.length < 80 &&\n (/^P\\d+([.,]\\d+)?W$/.test(input) ||\n (/^P[\\dYMDTHS]*(\\d[.,]\\d+)?[YMDHS]$/.test(input) &&\n /^P([.,\\d]+Y)?([.,\\d]+M)?([.,\\d]+D)?(T([.,\\d]+H)?([.,\\d]+M)?([.,\\d]+S)?)?$/.test(input)));\nfunction bind(r) {\n return r.test.bind(r);\n}\nexport const format = {\n date,\n time: time.bind(undefined, false),\n 'date-time': date_time,\n duration: DURATION,\n uri,\n 'uri-reference': bind(URIREF),\n 'uri-template': bind(URITEMPLATE),\n url: bind(URL_),\n email: EMAIL,\n hostname: bind(HOSTNAME),\n ipv4: bind(IPV4),\n ipv6: bind(IPV6),\n regex: regex,\n uuid: bind(UUID),\n 'json-pointer': bind(JSON_POINTER),\n 'json-pointer-uri-fragment': bind(JSON_POINTER_URI_FRAGMENT),\n 'relative-json-pointer': bind(RELATIVE_JSON_POINTER)\n};\nfunction isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\nfunction date(str) {\n const matches = str.match(DATE);\n if (!matches)\n return false;\n const year = +matches[1];\n const month = +matches[2];\n const day = +matches[3];\n return (month >= 1 &&\n month <= 12 &&\n day >= 1 &&\n day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]));\n}\nfunction time(full, str) {\n const matches = str.match(TIME);\n if (!matches)\n return false;\n const hour = +matches[1];\n const minute = +matches[2];\n const second = +matches[3];\n const timeZone = !!matches[5];\n return (((hour <= 23 && minute <= 59 && second <= 59) ||\n (hour == 23 && minute == 59 && second == 60)) &&\n (!full || timeZone));\n}\nconst DATE_TIME_SEPARATOR = /t|\\s/i;\nfunction date_time(str) {\n const dateTime = str.split(DATE_TIME_SEPARATOR);\n return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]);\n}\nconst NOT_URI_FRAGMENT = /\\/|:/;\nconst URI_PATTERN = /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\nfunction uri(str) {\n return NOT_URI_FRAGMENT.test(str) && URI_PATTERN.test(str);\n}\nconst Z_ANCHOR = /[^\\\\]\\\\Z/;\nfunction regex(str) {\n if (Z_ANCHOR.test(str))\n return false;\n try {\n new RegExp(str, 'u');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n","export function ucs2length(s) {\n let result = 0;\n let length = s.length;\n let index = 0;\n let charCode;\n while (index < length) {\n result++;\n charCode = s.charCodeAt(index++);\n if (charCode >= 0xd800 && charCode <= 0xdbff && index < length) {\n charCode = s.charCodeAt(index);\n if ((charCode & 0xfc00) == 0xdc00) {\n index++;\n }\n }\n }\n return result;\n}\n","import { deepCompareStrict } from './deep-compare-strict.js';\nimport { dereference } from './dereference.js';\nimport { format } from './format.js';\nimport { encodePointer } from './pointer.js';\nimport { ucs2length } from './ucs2-length.js';\nexport function validate(instance, schema, draft = '2019-09', lookup = dereference(schema), shortCircuit = true, recursiveAnchor = null, instanceLocation = '#', schemaLocation = '#', evaluated = Object.create(null)) {\n if (schema === true) {\n return { valid: true, errors: [] };\n }\n if (schema === false) {\n return {\n valid: false,\n errors: [\n {\n instanceLocation,\n keyword: 'false',\n keywordLocation: instanceLocation,\n error: 'False boolean schema.'\n }\n ]\n };\n }\n const rawInstanceType = typeof instance;\n let instanceType;\n switch (rawInstanceType) {\n case 'boolean':\n case 'number':\n case 'string':\n instanceType = rawInstanceType;\n break;\n case 'object':\n if (instance === null) {\n instanceType = 'null';\n }\n else if (Array.isArray(instance)) {\n instanceType = 'array';\n }\n else {\n instanceType = 'object';\n }\n break;\n default:\n throw new Error(`Instances of \"${rawInstanceType}\" type are not supported.`);\n }\n const { $ref, $recursiveRef, $recursiveAnchor, type: $type, const: $const, enum: $enum, required: $required, not: $not, anyOf: $anyOf, allOf: $allOf, oneOf: $oneOf, if: $if, then: $then, else: $else, format: $format, properties: $properties, patternProperties: $patternProperties, additionalProperties: $additionalProperties, unevaluatedProperties: $unevaluatedProperties, minProperties: $minProperties, maxProperties: $maxProperties, propertyNames: $propertyNames, dependentRequired: $dependentRequired, dependentSchemas: $dependentSchemas, dependencies: $dependencies, prefixItems: $prefixItems, items: $items, additionalItems: $additionalItems, unevaluatedItems: $unevaluatedItems, contains: $contains, minContains: $minContains, maxContains: $maxContains, minItems: $minItems, maxItems: $maxItems, uniqueItems: $uniqueItems, minimum: $minimum, maximum: $maximum, exclusiveMinimum: $exclusiveMinimum, exclusiveMaximum: $exclusiveMaximum, multipleOf: $multipleOf, minLength: $minLength, maxLength: $maxLength, pattern: $pattern, __absolute_ref__, __absolute_recursive_ref__ } = schema;\n const errors = [];\n if ($recursiveAnchor === true && recursiveAnchor === null) {\n recursiveAnchor = schema;\n }\n if ($recursiveRef === '#') {\n const refSchema = recursiveAnchor === null\n ? lookup[__absolute_recursive_ref__]\n : recursiveAnchor;\n const keywordLocation = `${schemaLocation}/$recursiveRef`;\n const result = validate(instance, recursiveAnchor === null ? schema : recursiveAnchor, draft, lookup, shortCircuit, refSchema, instanceLocation, keywordLocation, evaluated);\n if (!result.valid) {\n errors.push({\n instanceLocation,\n keyword: '$recursiveRef',\n keywordLocation,\n error: 'A subschema had errors.'\n }, ...result.errors);\n }\n }\n if ($ref !== undefined) {\n const uri = __absolute_ref__ || $ref;\n const refSchema = lookup[uri];\n if (refSchema === undefined) {\n let message = `Unresolved $ref \"${$ref}\".`;\n if (__absolute_ref__ && __absolute_ref__ !== $ref) {\n message += ` Absolute URI \"${__absolute_ref__}\".`;\n }\n message += `\\nKnown schemas:\\n- ${Object.keys(lookup).join('\\n- ')}`;\n throw new Error(message);\n }\n const keywordLocation = `${schemaLocation}/$ref`;\n const result = validate(instance, refSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated);\n if (!result.valid) {\n errors.push({\n instanceLocation,\n keyword: '$ref',\n keywordLocation,\n error: 'A subschema had errors.'\n }, ...result.errors);\n }\n if (draft === '4' || draft === '7') {\n return { valid: errors.length === 0, errors };\n }\n }\n if (Array.isArray($type)) {\n let length = $type.length;\n let valid = false;\n for (let i = 0; i < length; i++) {\n if (instanceType === $type[i] ||\n ($type[i] === 'integer' &&\n instanceType === 'number' &&\n instance % 1 === 0 &&\n instance === instance)) {\n valid = true;\n break;\n }\n }\n if (!valid) {\n errors.push({\n instanceLocation,\n keyword: 'type',\n keywordLocation: `${schemaLocation}/type`,\n error: `Instance type \"${instanceType}\" is invalid. Expected \"${$type.join('\", \"')}\".`\n });\n }\n }\n else if ($type === 'integer') {\n if (instanceType !== 'number' || instance % 1 || instance !== instance) {\n errors.push({\n instanceLocation,\n keyword: 'type',\n keywordLocation: `${schemaLocation}/type`,\n error: `Instance type \"${instanceType}\" is invalid. Expected \"${$type}\".`\n });\n }\n }\n else if ($type !== undefined && instanceType !== $type) {\n errors.push({\n instanceLocation,\n keyword: 'type',\n keywordLocation: `${schemaLocation}/type`,\n error: `Instance type \"${instanceType}\" is invalid. Expected \"${$type}\".`\n });\n }\n if ($const !== undefined) {\n if (instanceType === 'object' || instanceType === 'array') {\n if (!deepCompareStrict(instance, $const)) {\n errors.push({\n instanceLocation,\n keyword: 'const',\n keywordLocation: `${schemaLocation}/const`,\n error: `Instance does not match ${JSON.stringify($const)}.`\n });\n }\n }\n else if (instance !== $const) {\n errors.push({\n instanceLocation,\n keyword: 'const',\n keywordLocation: `${schemaLocation}/const`,\n error: `Instance does not match ${JSON.stringify($const)}.`\n });\n }\n }\n if ($enum !== undefined) {\n if (instanceType === 'object' || instanceType === 'array') {\n if (!$enum.some(value => deepCompareStrict(instance, value))) {\n errors.push({\n instanceLocation,\n keyword: 'enum',\n keywordLocation: `${schemaLocation}/enum`,\n error: `Instance does not match any of ${JSON.stringify($enum)}.`\n });\n }\n }\n else if (!$enum.some(value => instance === value)) {\n errors.push({\n instanceLocation,\n keyword: 'enum',\n keywordLocation: `${schemaLocation}/enum`,\n error: `Instance does not match any of ${JSON.stringify($enum)}.`\n });\n }\n }\n if ($not !== undefined) {\n const keywordLocation = `${schemaLocation}/not`;\n const result = validate(instance, $not, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation);\n if (result.valid) {\n errors.push({\n instanceLocation,\n keyword: 'not',\n keywordLocation,\n error: 'Instance matched \"not\" schema.'\n });\n }\n }\n let subEvaluateds = [];\n if ($anyOf !== undefined) {\n const keywordLocation = `${schemaLocation}/anyOf`;\n const errorsLength = errors.length;\n let anyValid = false;\n for (let i = 0; i < $anyOf.length; i++) {\n const subSchema = $anyOf[i];\n const subEvaluated = Object.create(evaluated);\n const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);\n errors.push(...result.errors);\n anyValid = anyValid || result.valid;\n if (result.valid) {\n subEvaluateds.push(subEvaluated);\n }\n }\n if (anyValid) {\n errors.length = errorsLength;\n }\n else {\n errors.splice(errorsLength, 0, {\n instanceLocation,\n keyword: 'anyOf',\n keywordLocation,\n error: 'Instance does not match any subschemas.'\n });\n }\n }\n if ($allOf !== undefined) {\n const keywordLocation = `${schemaLocation}/allOf`;\n const errorsLength = errors.length;\n let allValid = true;\n for (let i = 0; i < $allOf.length; i++) {\n const subSchema = $allOf[i];\n const subEvaluated = Object.create(evaluated);\n const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);\n errors.push(...result.errors);\n allValid = allValid && result.valid;\n if (result.valid) {\n subEvaluateds.push(subEvaluated);\n }\n }\n if (allValid) {\n errors.length = errorsLength;\n }\n else {\n errors.splice(errorsLength, 0, {\n instanceLocation,\n keyword: 'allOf',\n keywordLocation,\n error: `Instance does not match every subschema.`\n });\n }\n }\n if ($oneOf !== undefined) {\n const keywordLocation = `${schemaLocation}/oneOf`;\n const errorsLength = errors.length;\n const matches = $oneOf.filter((subSchema, i) => {\n const subEvaluated = Object.create(evaluated);\n const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);\n errors.push(...result.errors);\n if (result.valid) {\n subEvaluateds.push(subEvaluated);\n }\n return result.valid;\n }).length;\n if (matches === 1) {\n errors.length = errorsLength;\n }\n else {\n errors.splice(errorsLength, 0, {\n instanceLocation,\n keyword: 'oneOf',\n keywordLocation,\n error: `Instance does not match exactly one subschema (${matches} matches).`\n });\n }\n }\n if (instanceType === 'object' || instanceType === 'array') {\n Object.assign(evaluated, ...subEvaluateds);\n }\n if ($if !== undefined) {\n const keywordLocation = `${schemaLocation}/if`;\n const conditionResult = validate(instance, $if, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated).valid;\n if (conditionResult) {\n if ($then !== undefined) {\n const thenResult = validate(instance, $then, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/then`, evaluated);\n if (!thenResult.valid) {\n errors.push({\n instanceLocation,\n keyword: 'if',\n keywordLocation,\n error: `Instance does not match \"then\" schema.`\n }, ...thenResult.errors);\n }\n }\n }\n else if ($else !== undefined) {\n const elseResult = validate(instance, $else, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/else`, evaluated);\n if (!elseResult.valid) {\n errors.push({\n instanceLocation,\n keyword: 'if',\n keywordLocation,\n error: `Instance does not match \"else\" schema.`\n }, ...elseResult.errors);\n }\n }\n }\n if (instanceType === 'object') {\n if ($required !== undefined) {\n for (const key of $required) {\n if (!(key in instance)) {\n errors.push({\n instanceLocation,\n keyword: 'required',\n keywordLocation: `${schemaLocation}/required`,\n error: `Instance does not have required property \"${key}\".`\n });\n }\n }\n }\n const keys = Object.keys(instance);\n if ($minProperties !== undefined && keys.length < $minProperties) {\n errors.push({\n instanceLocation,\n keyword: 'minProperties',\n keywordLocation: `${schemaLocation}/minProperties`,\n error: `Instance does not have at least ${$minProperties} properties.`\n });\n }\n if ($maxProperties !== undefined && keys.length > $maxProperties) {\n errors.push({\n instanceLocation,\n keyword: 'maxProperties',\n keywordLocation: `${schemaLocation}/maxProperties`,\n error: `Instance does not have at least ${$maxProperties} properties.`\n });\n }\n if ($propertyNames !== undefined) {\n const keywordLocation = `${schemaLocation}/propertyNames`;\n for (const key in instance) {\n const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;\n const result = validate(key, $propertyNames, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);\n if (!result.valid) {\n errors.push({\n instanceLocation,\n keyword: 'propertyNames',\n keywordLocation,\n error: `Property name \"${key}\" does not match schema.`\n }, ...result.errors);\n }\n }\n }\n if ($dependentRequired !== undefined) {\n const keywordLocation = `${schemaLocation}/dependantRequired`;\n for (const key in $dependentRequired) {\n if (key in instance) {\n const required = $dependentRequired[key];\n for (const dependantKey of required) {\n if (!(dependantKey in instance)) {\n errors.push({\n instanceLocation,\n keyword: 'dependentRequired',\n keywordLocation,\n error: `Instance has \"${key}\" but does not have \"${dependantKey}\".`\n });\n }\n }\n }\n }\n }\n if ($dependentSchemas !== undefined) {\n for (const key in $dependentSchemas) {\n const keywordLocation = `${schemaLocation}/dependentSchemas`;\n if (key in instance) {\n const result = validate(instance, $dependentSchemas[key], draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`, evaluated);\n if (!result.valid) {\n errors.push({\n instanceLocation,\n keyword: 'dependentSchemas',\n keywordLocation,\n error: `Instance has \"${key}\" but does not match dependant schema.`\n }, ...result.errors);\n }\n }\n }\n }\n if ($dependencies !== undefined) {\n const keywordLocation = `${schemaLocation}/dependencies`;\n for (const key in $dependencies) {\n if (key in instance) {\n const propsOrSchema = $dependencies[key];\n if (Array.isArray(propsOrSchema)) {\n for (const dependantKey of propsOrSchema) {\n if (!(dependantKey in instance)) {\n errors.push({\n instanceLocation,\n keyword: 'dependencies',\n keywordLocation,\n error: `Instance has \"${key}\" but does not have \"${dependantKey}\".`\n });\n }\n }\n }\n else {\n const result = validate(instance, propsOrSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`);\n if (!result.valid) {\n errors.push({\n instanceLocation,\n keyword: 'dependencies',\n keywordLocation,\n error: `Instance has \"${key}\" but does not match dependant schema.`\n }, ...result.errors);\n }\n }\n }\n }\n }\n const thisEvaluated = Object.create(null);\n let stop = false;\n if ($properties !== undefined) {\n const keywordLocation = `${schemaLocation}/properties`;\n for (const key in $properties) {\n if (!(key in instance)) {\n continue;\n }\n const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;\n const result = validate(instance[key], $properties[key], draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(key)}`);\n if (result.valid) {\n evaluated[key] = thisEvaluated[key] = true;\n }\n else {\n stop = shortCircuit;\n errors.push({\n instanceLocation,\n keyword: 'properties',\n keywordLocation,\n error: `Property \"${key}\" does not match schema.`\n }, ...result.errors);\n if (stop)\n break;\n }\n }\n }\n if (!stop && $patternProperties !== undefined) {\n const keywordLocation = `${schemaLocation}/patternProperties`;\n for (const pattern in $patternProperties) {\n const regex = new RegExp(pattern, 'u');\n const subSchema = $patternProperties[pattern];\n for (const key in instance) {\n if (!regex.test(key)) {\n continue;\n }\n const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;\n const result = validate(instance[key], subSchema, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(pattern)}`);\n if (result.valid) {\n evaluated[key] = thisEvaluated[key] = true;\n }\n else {\n stop = shortCircuit;\n errors.push({\n instanceLocation,\n keyword: 'patternProperties',\n keywordLocation,\n error: `Property \"${key}\" matches pattern \"${pattern}\" but does not match associated schema.`\n }, ...result.errors);\n }\n }\n }\n }\n if (!stop && $additionalProperties !== undefined) {\n const keywordLocation = `${schemaLocation}/additionalProperties`;\n for (const key in instance) {\n if (thisEvaluated[key]) {\n continue;\n }\n const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;\n const result = validate(instance[key], $additionalProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);\n if (result.valid) {\n evaluated[key] = true;\n }\n else {\n stop = shortCircuit;\n errors.push({\n instanceLocation,\n keyword: 'additionalProperties',\n keywordLocation,\n error: `Property \"${key}\" does not match additional properties schema.`\n }, ...result.errors);\n }\n }\n }\n else if (!stop && $unevaluatedProperties !== undefined) {\n const keywordLocation = `${schemaLocation}/unevaluatedProperties`;\n for (const key in instance) {\n if (!evaluated[key]) {\n const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;\n const result = validate(instance[key], $unevaluatedProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);\n if (result.valid) {\n evaluated[key] = true;\n }\n else {\n errors.push({\n instanceLocation,\n keyword: 'unevaluatedProperties',\n keywordLocation,\n error: `Property \"${key}\" does not match unevaluated properties schema.`\n }, ...result.errors);\n }\n }\n }\n }\n }\n else if (instanceType === 'array') {\n if ($maxItems !== undefined && instance.length > $maxItems) {\n errors.push({\n instanceLocation,\n keyword: 'maxItems',\n keywordLocation: `${schemaLocation}/maxItems`,\n error: `Array has too many items (${instance.length} > ${$maxItems}).`\n });\n }\n if ($minItems !== undefined && instance.length < $minItems) {\n errors.push({\n instanceLocation,\n keyword: 'minItems',\n keywordLocation: `${schemaLocation}/minItems`,\n error: `Array has too few items (${instance.length} < ${$minItems}).`\n });\n }\n const length = instance.length;\n let i = 0;\n let stop = false;\n if ($prefixItems !== undefined) {\n const keywordLocation = `${schemaLocation}/prefixItems`;\n const length2 = Math.min($prefixItems.length, length);\n for (; i < length2; i++) {\n const result = validate(instance[i], $prefixItems[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`);\n evaluated[i] = true;\n if (!result.valid) {\n stop = shortCircuit;\n errors.push({\n instanceLocation,\n keyword: 'prefixItems',\n keywordLocation,\n error: `Items did not match schema.`\n }, ...result.errors);\n if (stop)\n break;\n }\n }\n }\n if ($items !== undefined) {\n const keywordLocation = `${schemaLocation}/items`;\n if (Array.isArray($items)) {\n const length2 = Math.min($items.length, length);\n for (; i < length2; i++) {\n const result = validate(instance[i], $items[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`);\n evaluated[i] = true;\n if (!result.valid) {\n stop = shortCircuit;\n errors.push({\n instanceLocation,\n keyword: 'items',\n keywordLocation,\n error: `Items did not match schema.`\n }, ...result.errors);\n if (stop)\n break;\n }\n }\n }\n else {\n for (; i < length; i++) {\n const result = validate(instance[i], $items, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);\n evaluated[i] = true;\n if (!result.valid) {\n stop = shortCircuit;\n errors.push({\n instanceLocation,\n keyword: 'items',\n keywordLocation,\n error: `Items did not match schema.`\n }, ...result.errors);\n if (stop)\n break;\n }\n }\n }\n if (!stop && $additionalItems !== undefined) {\n const keywordLocation = `${schemaLocation}/additionalItems`;\n for (; i < length; i++) {\n const result = validate(instance[i], $additionalItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);\n evaluated[i] = true;\n if (!result.valid) {\n stop = shortCircuit;\n errors.push({\n instanceLocation,\n keyword: 'additionalItems',\n keywordLocation,\n error: `Items did not match additional items schema.`\n }, ...result.errors);\n }\n }\n }\n }\n if ($contains !== undefined) {\n if (length === 0 && $minContains === undefined) {\n errors.push({\n instanceLocation,\n keyword: 'contains',\n keywordLocation: `${schemaLocation}/contains`,\n error: `Array is empty. It must contain at least one item matching the schema.`\n });\n }\n else if ($minContains !== undefined && length < $minContains) {\n errors.push({\n instanceLocation,\n keyword: 'minContains',\n keywordLocation: `${schemaLocation}/minContains`,\n error: `Array has less items (${length}) than minContains (${$minContains}).`\n });\n }\n else {\n const keywordLocation = `${schemaLocation}/contains`;\n const errorsLength = errors.length;\n let contained = 0;\n for (let j = 0; j < length; j++) {\n const result = validate(instance[j], $contains, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${j}`, keywordLocation);\n if (result.valid) {\n evaluated[j] = true;\n contained++;\n }\n else {\n errors.push(...result.errors);\n }\n }\n if (contained >= ($minContains || 0)) {\n errors.length = errorsLength;\n }\n if ($minContains === undefined &&\n $maxContains === undefined &&\n contained === 0) {\n errors.splice(errorsLength, 0, {\n instanceLocation,\n keyword: 'contains',\n keywordLocation,\n error: `Array does not contain item matching schema.`\n });\n }\n else if ($minContains !== undefined && contained < $minContains) {\n errors.push({\n instanceLocation,\n keyword: 'minContains',\n keywordLocation: `${schemaLocation}/minContains`,\n error: `Array must contain at least ${$minContains} items matching schema. Only ${contained} items were found.`\n });\n }\n else if ($maxContains !== undefined && contained > $maxContains) {\n errors.push({\n instanceLocation,\n keyword: 'maxContains',\n keywordLocation: `${schemaLocation}/maxContains`,\n error: `Array may contain at most ${$maxContains} items matching schema. ${contained} items were found.`\n });\n }\n }\n }\n if (!stop && $unevaluatedItems !== undefined) {\n const keywordLocation = `${schemaLocation}/unevaluatedItems`;\n for (i; i < length; i++) {\n if (evaluated[i]) {\n continue;\n }\n const result = validate(instance[i], $unevaluatedItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);\n evaluated[i] = true;\n if (!result.valid) {\n errors.push({\n instanceLocation,\n keyword: 'unevaluatedItems',\n keywordLocation,\n error: `Items did not match unevaluated items schema.`\n }, ...result.errors);\n }\n }\n }\n if ($uniqueItems) {\n for (let j = 0; j < length; j++) {\n const a = instance[j];\n const ao = typeof a === 'object' && a !== null;\n for (let k = 0; k < length; k++) {\n if (j === k) {\n continue;\n }\n const b = instance[k];\n const bo = typeof b === 'object' && b !== null;\n if (a === b || (ao && bo && deepCompareStrict(a, b))) {\n errors.push({\n instanceLocation,\n keyword: 'uniqueItems',\n keywordLocation: `${schemaLocation}/uniqueItems`,\n error: `Duplicate items at indexes ${j} and ${k}.`\n });\n j = Number.MAX_SAFE_INTEGER;\n k = Number.MAX_SAFE_INTEGER;\n }\n }\n }\n }\n }\n else if (instanceType === 'number') {\n if (draft === '4') {\n if ($minimum !== undefined &&\n (($exclusiveMinimum === true && instance <= $minimum) ||\n instance < $minimum)) {\n errors.push({\n instanceLocation,\n keyword: 'minimum',\n keywordLocation: `${schemaLocation}/minimum`,\n error: `${instance} is less than ${$exclusiveMinimum ? 'or equal to ' : ''} ${$minimum}.`\n });\n }\n if ($maximum !== undefined &&\n (($exclusiveMaximum === true && instance >= $maximum) ||\n instance > $maximum)) {\n errors.push({\n instanceLocation,\n keyword: 'maximum',\n keywordLocation: `${schemaLocation}/maximum`,\n error: `${instance} is greater than ${$exclusiveMaximum ? 'or equal to ' : ''} ${$maximum}.`\n });\n }\n }\n else {\n if ($minimum !== undefined && instance < $minimum) {\n errors.push({\n instanceLocation,\n keyword: 'minimum',\n keywordLocation: `${schemaLocation}/minimum`,\n error: `${instance} is less than ${$minimum}.`\n });\n }\n if ($maximum !== undefined && instance > $maximum) {\n errors.push({\n instanceLocation,\n keyword: 'maximum',\n keywordLocation: `${schemaLocation}/maximum`,\n error: `${instance} is greater than ${$maximum}.`\n });\n }\n if ($exclusiveMinimum !== undefined && instance <= $exclusiveMinimum) {\n errors.push({\n instanceLocation,\n keyword: 'exclusiveMinimum',\n keywordLocation: `${schemaLocation}/exclusiveMinimum`,\n error: `${instance} is less than ${$exclusiveMinimum}.`\n });\n }\n if ($exclusiveMaximum !== undefined && instance >= $exclusiveMaximum) {\n errors.push({\n instanceLocation,\n keyword: 'exclusiveMaximum',\n keywordLocation: `${schemaLocation}/exclusiveMaximum`,\n error: `${instance} is greater than or equal to ${$exclusiveMaximum}.`\n });\n }\n }\n if ($multipleOf !== undefined) {\n const remainder = instance % $multipleOf;\n if (Math.abs(0 - remainder) >= 1.1920929e-7 &&\n Math.abs($multipleOf - remainder) >= 1.1920929e-7) {\n errors.push({\n instanceLocation,\n keyword: 'multipleOf',\n keywordLocation: `${schemaLocation}/multipleOf`,\n error: `${instance} is not a multiple of ${$multipleOf}.`\n });\n }\n }\n }\n else if (instanceType === 'string') {\n const length = $minLength === undefined && $maxLength === undefined\n ? 0\n : ucs2length(instance);\n if ($minLength !== undefined && length < $minLength) {\n errors.push({\n instanceLocation,\n keyword: 'minLength',\n keywordLocation: `${schemaLocation}/minLength`,\n error: `String is too short (${length} < ${$minLength}).`\n });\n }\n if ($maxLength !== undefined && length > $maxLength) {\n errors.push({\n instanceLocation,\n keyword: 'maxLength',\n keywordLocation: `${schemaLocation}/maxLength`,\n error: `String is too long (${length} > ${$maxLength}).`\n });\n }\n if ($pattern !== undefined && !new RegExp($pattern, 'u').test(instance)) {\n errors.push({\n instanceLocation,\n keyword: 'pattern',\n keywordLocation: `${schemaLocation}/pattern`,\n error: `String does not match pattern.`\n });\n }\n if ($format !== undefined &&\n format[$format] &&\n !format[$format](instance)) {\n errors.push({\n instanceLocation,\n keyword: 'format',\n keywordLocation: `${schemaLocation}/format`,\n error: `String does not match format \"${$format}\".`\n });\n }\n }\n return { valid: errors.length === 0, errors };\n}\n","import { dereference } from './dereference.js';\nimport { validate } from './validate.js';\nexport class Validator {\n schema;\n draft;\n shortCircuit;\n lookup;\n constructor(schema, draft = '2019-09', shortCircuit = true) {\n this.schema = schema;\n this.draft = draft;\n this.shortCircuit = shortCircuit;\n this.lookup = dereference(schema);\n }\n validate(instance) {\n return validate(instance, this.schema, this.draft, this.lookup, this.shortCircuit);\n }\n addSchema(schema, id) {\n if (id) {\n schema = { ...schema, $id: id };\n }\n dereference(schema, this.lookup);\n }\n}\n","/**\n * Cloudflare Worker-compatible JSON Schema validator provider\n *\n * This provider uses @cfworker/json-schema for validation without code generation,\n * making it compatible with edge runtimes like Cloudflare Workers that restrict\n * eval and new Function.\n *\n * @see {@linkcode AjvJsonSchemaValidator} for the Node.js alternative\n */\n\nimport { Validator } from '@cfworker/json-schema';\n\nimport { declaredDialect } from './dialects';\nimport type { JsonSchemaType, JsonSchemaValidator, jsonSchemaValidator, JsonSchemaValidatorResult } from './types';\n\n/**\n * JSON Schema draft version supported by `@cfworker/json-schema`.\n */\nexport type CfWorkerSchemaDraft = '4' | '7' | '2019-09' | '2020-12';\n\n/**\n * `@cfworker/json-schema`-backed JSON Schema validator. See\n * `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point.\n *\n * Default dispatches on the schema's declared dialect: no `$schema` or 2020-12 → `'2020-12'`\n * (SEP-1613); 2019-09 → `'2019-09'`; draft-07 or draft-06 → `'7'`. Schemas declaring any other `$schema` are rejected\n * with a plain `Error`. Passing an explicit `draft` to the constructor\n * overrides this — that draft is used for every schema regardless of `$schema`.\n *\n * Known draft-07 engine gap: `@cfworker/json-schema` does not treat draft-07 `dependencies` as\n * a name→subschema map during `$ref` collection, so a dependency entry whose KEY collides with\n * a JSON Schema keyword (`type`, `default`, `format`, `required`, `pattern`, …) and whose\n * subschema contains a `$ref` throws `Unresolved $ref` at validation time when the dependency\n * triggers — data-dependently, not at compile. The Node (classic Ajv) engine handles the same\n * schema correctly. Callers that hit this receive the SDK's typed validation error (the throw\n * is captured by the validation paths), and the deviation is pinned by a recorded-contract test.\n *\n * @example Use with default configuration (2020-12, shortcircuit on)\n * ```ts source=\"./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default\"\n * const validator = new CfWorkerJsonSchemaValidator();\n * ```\n *\n * @example Use with custom configuration\n * ```ts source=\"./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig\"\n * const validator = new CfWorkerJsonSchemaValidator({\n * draft: '2020-12',\n * shortcircuit: false // Report all errors\n * });\n * ```\n */\nexport class CfWorkerJsonSchemaValidator implements jsonSchemaValidator {\n private readonly shortcircuit: boolean;\n /** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */\n private readonly draft?: CfWorkerSchemaDraft;\n\n /**\n * Create a validator\n *\n * @param options - Configuration options\n * @param options.shortcircuit - If `true`, stop validation after first error (default: `true`)\n * @param options.draft - JSON Schema draft version to force for every schema. When set, the\n * `$schema` dispatch is skipped. When omitted, the provider dispatches on each schema's\n * declared `$schema` (2020-12, 2019-09, draft-07, draft-06; absent means 2020-12) and rejects others.\n */\n constructor(options?: { shortcircuit?: boolean; draft?: CfWorkerSchemaDraft }) {\n this.shortcircuit = options?.shortcircuit ?? true;\n this.draft = options?.draft;\n }\n\n /**\n * Pick the engine draft for a schema's declared dialect (a caller-forced `{draft}` bypasses\n * this — do not second-guess by `$schema`). No `$schema` or 2020-12 → `'2020-12'`; 2019-09 →\n * `'2019-09'`; draft-07 or draft-06 → `'7'`; anything else → `Error`.\n */\n private _draftFor(schema: JsonSchemaType): CfWorkerSchemaDraft {\n const dialect = declaredDialect(schema, 'pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.');\n return dialect === 'draft-7' ? '7' : dialect;\n }\n\n /**\n * Create a validator for the given JSON Schema\n *\n * Unlike AJV, this validator is not cached internally\n *\n * @param schema - Standard JSON Schema object\n * @returns A validator function that validates input data\n */\n getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T> {\n const draft = this.draft ?? this._draftFor(schema);\n // Cast to the cfworker Schema type - our JsonSchemaType is structurally compatible\n const validator = new Validator(schema as ConstructorParameters<typeof Validator>[0], draft, this.shortcircuit);\n\n return (input: unknown): JsonSchemaValidatorResult<T> => {\n const result = validator.validate(input);\n\n return result.valid\n ? {\n valid: true,\n data: input as T,\n errorMessage: undefined\n }\n : {\n valid: false,\n data: undefined,\n errorMessage: result.errors.map(err => `${err.instanceLocation}: ${err.error}`).join('; ')\n };\n };\n }\n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F,UAAU,QAAQ,IAAI;AAClB,MAAI,GACA,UAAS;GAAE,GAAG;GAAQ,KAAK;GAAI;AAEnC,cAAY,QAAQ,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC8BxC,IAAa,8BAAb,MAAwE;CACpE,AAAiB;;CAEjB,AAAiB;;;;;;;;;;CAWjB,YAAY,SAAmE;AAC3E,OAAK,eAAe,SAAS,gBAAgB;AAC7C,OAAK,QAAQ,SAAS;;;;;;;CAQ1B,AAAQ,UAAU,QAA6C;EAC3D,MAAM,UAAU,gBAAgB,QAAQ,wFAAwF;AAChI,SAAO,YAAY,YAAY,MAAM;;;;;;;;;;CAWzC,aAAgB,QAAgD;EAG5D,MAAM,YAAY,IAAI,UAAU,QAFlB,KAAK,SAAS,KAAK,UAAU,OAAO,EAE2C,KAAK,aAAa;AAE/G,UAAQ,UAAiD;GACrD,MAAM,SAAS,UAAU,SAAS,MAAM;AAExC,UAAO,OAAO,QACR;IACI,OAAO;IACP,MAAM;IACN,cAAc;IACjB,GACD;IACI,OAAO;IACP,MAAM;IACN,cAAc,OAAO,OAAO,KAAI,QAAO,GAAG,IAAI,iBAAiB,IAAI,IAAI,QAAQ,CAAC,KAAK,KAAK;IAC7F"}
@@ -85,6 +85,16 @@ declare enum OAuthErrorCode {
85
85
  * The requested resource is invalid, missing, unknown, or malformed. (Custom error for resource indicators - RFC 8707)
86
86
  */
87
87
  InvalidTarget = "invalid_target",
88
+ /**
89
+ * The DPoP proof accompanying the request is invalid, or does not match the key the grant
90
+ * (e.g. a refresh token) is bound to. (RFC 9449 §5 / §7.1)
91
+ */
92
+ InvalidDpopProof = "invalid_dpop_proof",
93
+ /**
94
+ * The server requires a server-supplied nonce in the DPoP proof; retry with the `DPoP-Nonce`
95
+ * it returned. (RFC 9449 §8 / §9)
96
+ */
97
+ UseDpopNonce = "use_dpop_nonce",
88
98
  }
89
99
  /**
90
100
  * OAuth error class for all OAuth-related errors.
@@ -175,14 +185,32 @@ declare enum SdkErrorCode {
175
185
  /**
176
186
  * Protocol-era negotiation at connect time failed without producing either a
177
187
  * usable modern (2026-07-28+) era or a definitive legacy fallback signal —
178
- * e.g. the negotiation mode forbids falling back (`pin`), or the probe hit a
179
- * network failure (a typed connect error, never an era verdict).
188
+ * e.g. the negotiation mode forbids falling back (`pin`), the probe hit a
189
+ * network failure, or the server answered the probe with a 5xx (a typed
190
+ * connect error, never an era verdict).
180
191
  *
181
- * Negotiation-phase only: this code is never used once an era is established.
192
+ * Negotiation-phase only: this code is never used once an era is
193
+ * established. Auth walls never carry it: a 401/403 rejecting the probe
194
+ * uses {@linkcode ClientHttpAuthentication} / {@linkcode ClientHttpForbidden}
195
+ * instead, so era-recovery flows keyed on this code (e.g. cached-verdict
196
+ * gateways) can never persist a verdict for an unauthorized exchange.
182
197
  */
183
198
  EraNegotiationFailed = "ERA_NEGOTIATION_FAILED",
184
199
  ClientHttpNotImplemented = "CLIENT_HTTP_NOT_IMPLEMENTED",
200
+ /**
201
+ * HTTP 401 authentication failure: the transport's re-auth retry still got
202
+ * 401 (`Server returned 401 after re-authentication`), or the version
203
+ * negotiation probe was rejected 401 with no `authProvider` configured
204
+ * (`Version negotiation failed: the server requires authorization (HTTP 401)`).
205
+ * Carried on an {@linkcode SdkHttpError} with `status: 401`.
206
+ */
185
207
  ClientHttpAuthentication = "CLIENT_HTTP_AUTHENTICATION",
208
+ /**
209
+ * HTTP 403 denial: the step-up re-authorization retry limit was reached,
210
+ * or the version negotiation probe was rejected 403
211
+ * (`Version negotiation failed: the server denied access (HTTP 403)`).
212
+ * Carried on an {@linkcode SdkHttpError} with `status: 403`.
213
+ */
186
214
  ClientHttpForbidden = "CLIENT_HTTP_FORBIDDEN",
187
215
  ClientHttpUnexpectedContent = "CLIENT_HTTP_UNEXPECTED_CONTENT",
188
216
  ClientHttpFailedToOpenStream = "CLIENT_HTTP_FAILED_TO_OPEN_STREAM",
@@ -220,7 +248,17 @@ declare class SdkError extends Error {
220
248
  * silently matching nothing).
221
249
  */
222
250
  static isInstance<T$1 extends abstract new (...args: never[]) => unknown>(this: T$1, value: unknown): value is InstanceType<T$1>;
223
- constructor(code: SdkErrorCode, message: string, data?: unknown | undefined);
251
+ /**
252
+ * @param code - Stable string code identifying the failure ({@linkcode SdkErrorCode}).
253
+ * @param message - Human-readable description.
254
+ * @param data - Optional structured payload (for example the HTTP status carried by
255
+ * {@linkcode SdkHttpError}). Opaque to the SDK: a `cause` key inside `data` is not
256
+ * promoted to `Error.cause`.
257
+ * @param options - Standard `ErrorOptions`, forwarded to `Error`. Pass the underlying
258
+ * failure as `{ cause }` so it is reachable through the `Error.cause` chain that
259
+ * loggers and error trackers walk.
260
+ */
261
+ constructor(code: SdkErrorCode, message: string, data?: unknown | undefined, options?: ErrorOptions);
224
262
  }
225
263
  /**
226
264
  * Typed shape for HTTP error data carried by {@linkcode SdkHttpError}.
@@ -248,7 +286,10 @@ interface SdkHttpErrorData {
248
286
  */
249
287
  declare class SdkHttpError extends SdkError {
250
288
  readonly data: SdkHttpErrorData;
251
- constructor(code: SdkErrorCode, message: string, data: SdkHttpErrorData);
289
+ /**
290
+ * @param options - Standard `ErrorOptions`, forwarded to `Error` (see {@linkcode SdkError}).
291
+ */
292
+ constructor(code: SdkErrorCode, message: string, data: SdkHttpErrorData, options?: ErrorOptions);
252
293
  get status(): number;
253
294
  get statusText(): string | undefined;
254
295
  }
@@ -754,6 +795,18 @@ interface AuthInfo {
754
795
  * If set, this MUST match the MCP server's resource identifier (minus hash fragment).
755
796
  */
756
797
  resource?: URL;
798
+ /**
799
+ * URL of the RFC 9728 Protected Resource Metadata document for the
800
+ * resource server that accepted this token.
801
+ *
802
+ * The bearer-auth helpers stamp their configured `resourceMetadataUrl`
803
+ * here when verification succeeds, so challenge responses built after
804
+ * authentication (for example per-operation `insufficient_scope` scope
805
+ * challenges) can advertise the same document as the authentication
806
+ * gate's own challenges without separate configuration. Verifiers may
807
+ * also populate it directly; a verifier-set value wins.
808
+ */
809
+ resourceMetadataUrl?: string;
757
810
  /**
758
811
  * Additional data associated with the token.
759
812
  * This field should be used for any additional data that needs to be attached to the auth info.
@@ -2742,6 +2795,26 @@ declare class InMemoryTransport implements Transport {
2742
2795
  */
2743
2796
  declare function preloadSchemas(): void;
2744
2797
  //#endregion
2798
+ //#region src/server/scopeChallenge.d.ts
2799
+ /** OAuth scopes to request before handling an MCP request. */
2800
+ interface ScopeChallenge {
2801
+ /** The exact, complete scope set to include in the challenge. Each scope must satisfy the OAuth `scope-token` grammar. */
2802
+ scopes: readonly [string, ...string[]];
2803
+ /** Optional human-readable detail satisfying the RFC 6750 `error-description` grammar. */
2804
+ errorDescription?: string;
2805
+ }
2806
+ /** Determines whether an MCP request needs an OAuth scope challenge. */
2807
+ type ScopeChallengeHandler = (context: {
2808
+ request: JSONRPCRequest;
2809
+ authInfo?: AuthInfo;
2810
+ }) => ScopeChallenge | undefined | Promise<ScopeChallenge | undefined>;
2811
+ /**
2812
+ * Creates a handler that requires every supplied scope exactly.
2813
+ *
2814
+ * Requests without authentication are left to the server's authentication gate.
2815
+ */
2816
+ declare function requireScopes(...scopes: readonly [string, ...string[]]): ScopeChallengeHandler;
2817
+ //#endregion
2745
2818
  //#region src/server/server.d.ts
2746
2819
  type ServerOptions = ProtocolOptions & {
2747
2820
  /**
@@ -3103,7 +3176,7 @@ declare class Server extends Protocol<ServerContext> {
3103
3176
  * notification for the specified elicitation ID.
3104
3177
  *
3105
3178
  * The notification (and the `elicitationId` it references) exists only on protocol revision
3106
- * 2025-11-25 — the 2026-07-28 draft removed both. On a connection negotiated at 2026-07-28 the
3179
+ * 2025-11-25 — the 2026-07-28 revision removed both. On a connection negotiated at 2026-07-28 the
3107
3180
  * returned callback rejects with a typed local error before anything reaches the transport
3108
3181
  * (the method is not part of that revision's wire registry).
3109
3182
  *
@@ -3197,6 +3270,8 @@ declare class McpServer {
3197
3270
  * Closes the connection.
3198
3271
  */
3199
3272
  close(): Promise<void>;
3273
+ /** @internal */
3274
+ resolveScopeChallenge: ScopeChallengeHandler;
3200
3275
  private _toolHandlersInitialized;
3201
3276
  private setToolRequestHandlers;
3202
3277
  /**
@@ -3247,9 +3322,11 @@ declare class McpServer {
3247
3322
  */
3248
3323
  registerResource(name: string, uriOrTemplate: string, config: ResourceMetadata & {
3249
3324
  cacheHint?: CacheHint;
3325
+ scopeChallenge?: ScopeChallengeHandler;
3250
3326
  }, readCallback: ReadResourceCallback): RegisteredResource;
3251
3327
  registerResource(name: string, uriOrTemplate: ResourceTemplate, config: ResourceMetadata & {
3252
3328
  cacheHint?: CacheHint;
3329
+ scopeChallenge?: ScopeChallengeHandler;
3253
3330
  }, readCallback: ReadResourceTemplateCallback): RegisteredResourceTemplate;
3254
3331
  private _createRegisteredResource;
3255
3332
  private _createRegisteredResourceTemplate;
@@ -3288,6 +3365,8 @@ declare class McpServer {
3288
3365
  outputSchema?: OutputArgs;
3289
3366
  annotations?: ToolAnnotations;
3290
3367
  icons?: Icon[];
3368
+ /** Determines whether this tool call needs an OAuth scope challenge. */
3369
+ scopeChallenge?: ScopeChallengeHandler;
3291
3370
  _meta?: Record<string, unknown>;
3292
3371
  }, cb: ToolCallback<InputArgs>): RegisteredTool;
3293
3372
  /** @deprecated Wrap with `z.object({...})` instead. Raw-shape form: `inputSchema`/`outputSchema` may be a plain `{ field: z.string() }` record; it is auto-wrapped with `z.object()`. */
@@ -3298,6 +3377,7 @@ declare class McpServer {
3298
3377
  outputSchema?: OutputArgs;
3299
3378
  annotations?: ToolAnnotations;
3300
3379
  icons?: Icon[];
3380
+ scopeChallenge?: ScopeChallengeHandler;
3301
3381
  _meta?: Record<string, unknown>;
3302
3382
  }, cb: LegacyToolCallback<InputArgs>): RegisteredTool;
3303
3383
  /**
@@ -3331,6 +3411,8 @@ declare class McpServer {
3331
3411
  description?: string;
3332
3412
  argsSchema?: Args;
3333
3413
  icons?: Icon[];
3414
+ /** Determines whether this prompt retrieval needs an OAuth scope challenge. */
3415
+ scopeChallenge?: ScopeChallengeHandler;
3334
3416
  _meta?: Record<string, unknown>;
3335
3417
  }, cb: PromptCallback<Args>): RegisteredPrompt;
3336
3418
  /** @deprecated Wrap with `z.object({...})` instead. Raw-shape form: `argsSchema` may be a plain `{ field: z.string() }` record; it is auto-wrapped with `z.object()`. */
@@ -3339,6 +3421,7 @@ declare class McpServer {
3339
3421
  description?: string;
3340
3422
  argsSchema?: Args;
3341
3423
  icons?: Icon[];
3424
+ scopeChallenge?: ScopeChallengeHandler;
3342
3425
  _meta?: Record<string, unknown>;
3343
3426
  }, cb: LegacyPromptCallback<Args>): RegisteredPrompt;
3344
3427
  /**
@@ -3459,6 +3542,7 @@ type RegisteredTool = {
3459
3542
  annotations?: ToolAnnotations;
3460
3543
  icons?: Icon[];
3461
3544
  execution?: ToolExecution;
3545
+ scopeChallenge?: ScopeChallengeHandler;
3462
3546
  _meta?: Record<string, unknown>;
3463
3547
  handler: AnyToolHandler<StandardSchemaWithJSON | undefined>;
3464
3548
  /** @hidden */
@@ -3474,6 +3558,7 @@ type RegisteredTool = {
3474
3558
  outputSchema?: StandardSchemaWithJSON;
3475
3559
  annotations?: ToolAnnotations;
3476
3560
  icons?: Icon[];
3561
+ scopeChallenge?: ScopeChallengeHandler | null;
3477
3562
  _meta?: Record<string, unknown>;
3478
3563
  callback?: ToolCallback<StandardSchemaWithJSON>;
3479
3564
  enabled?: boolean;
@@ -3498,6 +3583,7 @@ type RegisteredResource = {
3498
3583
  metadata?: ResourceMetadata;
3499
3584
  /** Cache hint applied to this resource's `resources/read` results on the 2026-07-28 revision. */
3500
3585
  cacheHint?: CacheHint;
3586
+ scopeChallenge?: ScopeChallengeHandler;
3501
3587
  readCallback: ReadResourceCallback;
3502
3588
  enabled: boolean;
3503
3589
  enable(): void;
@@ -3507,6 +3593,7 @@ type RegisteredResource = {
3507
3593
  title?: string;
3508
3594
  uri?: string | null;
3509
3595
  metadata?: ResourceMetadata;
3596
+ scopeChallenge?: ScopeChallengeHandler | null;
3510
3597
  callback?: ReadResourceCallback;
3511
3598
  enabled?: boolean;
3512
3599
  }): void;
@@ -3522,6 +3609,7 @@ type RegisteredResourceTemplate = {
3522
3609
  metadata?: ResourceMetadata;
3523
3610
  /** Cache hint applied to this template's `resources/read` results on the 2026-07-28 revision. */
3524
3611
  cacheHint?: CacheHint;
3612
+ scopeChallenge?: ScopeChallengeHandler;
3525
3613
  readCallback: ReadResourceTemplateCallback;
3526
3614
  enabled: boolean;
3527
3615
  enable(): void;
@@ -3531,6 +3619,7 @@ type RegisteredResourceTemplate = {
3531
3619
  title?: string;
3532
3620
  template?: ResourceTemplate;
3533
3621
  metadata?: ResourceMetadata;
3622
+ scopeChallenge?: ScopeChallengeHandler | null;
3534
3623
  callback?: ReadResourceTemplateCallback;
3535
3624
  enabled?: boolean;
3536
3625
  }): void;
@@ -3547,6 +3636,7 @@ type RegisteredPrompt = {
3547
3636
  description?: string;
3548
3637
  argsSchema?: StandardSchemaWithJSON;
3549
3638
  icons?: Icon[];
3639
+ scopeChallenge?: ScopeChallengeHandler;
3550
3640
  _meta?: Record<string, unknown>;
3551
3641
  /** @hidden */
3552
3642
  handler: PromptHandler;
@@ -3559,6 +3649,7 @@ type RegisteredPrompt = {
3559
3649
  description?: string;
3560
3650
  argsSchema?: Args;
3561
3651
  icons?: Icon[];
3652
+ scopeChallenge?: ScopeChallengeHandler | null;
3562
3653
  _meta?: Record<string, unknown>;
3563
3654
  callback?: PromptCallback<Args>;
3564
3655
  enabled?: boolean;
@@ -3587,6 +3678,8 @@ interface PerRequestHTTPServerTransportOptions {
3587
3678
  classification: MessageClassification;
3588
3679
  /** Response shaping for the exchange; defaults to `auto`. */
3589
3680
  responseMode?: PerRequestResponseMode;
3681
+ /** SSE keep-alive interval in milliseconds; defaults to `15000`, `0` disables. */
3682
+ keepAliveMs?: number;
3590
3683
  }
3591
3684
  /** Per-exchange context handed to {@linkcode PerRequestHTTPServerTransport.handleMessage}. */
3592
3685
  interface PerRequestMessageExtra {
@@ -3631,6 +3724,7 @@ declare class PerRequestHTTPServerTransport implements Transport {
3631
3724
  private _deferredResponse?;
3632
3725
  private _sse?;
3633
3726
  private _abortCleanup?;
3727
+ private readonly _keepAliveMs;
3634
3728
  constructor(options: PerRequestHTTPServerTransportOptions);
3635
3729
  start(): Promise<void>;
3636
3730
  /**
@@ -3863,11 +3957,21 @@ interface CreateMcpHandlerOptions {
3863
3957
  */
3864
3958
  maxSubscriptions?: number;
3865
3959
  /**
3866
- * SSE comment-frame keepalive interval for `subscriptions/listen` streams,
3867
- * in milliseconds. Set to `0` to disable.
3960
+ * SSE comment-frame keepalive interval for every SSE stream this handler
3961
+ * serves. In modern `auto` mode it starts after SSE upgrade. Set to `0` to disable.
3868
3962
  * @default 15000
3869
3963
  */
3870
3964
  keepAliveMs?: number;
3965
+ /**
3966
+ * Upper bound, in bytes, on a POST body the handler reads itself (the
3967
+ * classification step and the stateless legacy leg). A body over the bound
3968
+ * is answered `413` before anything is parsed or any server instance is
3969
+ * created. Not applied to a body supplied as `parsedBody`. Must be a
3970
+ * positive number. Hand-wired compositions routing on
3971
+ * {@linkcode isLegacyRequest} pass the same value to the predicate.
3972
+ * @default 4194304 (4 MiB)
3973
+ */
3974
+ maxRequestBodySize?: number;
3871
3975
  }
3872
3976
  /**
3873
3977
  * The handler returned by {@linkcode createMcpHandler}: a web-standard
@@ -3904,26 +4008,26 @@ interface McpHttpHandler {
3904
4008
  */
3905
4009
  bus: ServerEventBus;
3906
4010
  }
3907
- /**
3908
- * The entry's default legacy serving (`legacy: 'stateless'`): per-request
3909
- * stateless serving of 2025-era traffic using the same factory as the modern
3910
- * path. Exported as a standalone building block for hand-wired compositions
3911
- * (for example mounting legacy stateless serving on its own route next to a
3912
- * strict modern endpoint).
3913
- *
3914
- * Each POST is served by a fresh instance from the factory connected to a
3915
- * fresh streamable HTTP transport constructed with only
3916
- * `sessionIdGenerator: undefined` — the established stateless idiom, unchanged.
3917
- * Because serving is per-request and stateless, GET and DELETE (2025 session
3918
- * operations) are answered with `405` / `Method not allowed.`, exactly like the
3919
- * canonical stateless example.
3920
- *
3921
- * The optional `onerror` callback receives factory and serving failures on
3922
- * this leg (reporting only — the response stays the 500 internal-error body).
3923
- * The entry passes its own `onerror` here when expanding the default, so
3924
- * legacy-leg failures are never silently swallowed.
3925
- */
3926
- declare function legacyStatelessFallback(factory: McpServerFactory, onerror?: (error: Error) => void): LegacyHttpHandler;
4011
+ /** Options for {@linkcode legacyStatelessFallback}. */
4012
+ interface LegacyStatelessFallbackOptions {
4013
+ /**
4014
+ * Upper bound, in bytes, on a POST body the leg reads itself (not applied
4015
+ * to a body supplied as `parsedBody`). Must be a positive number.
4016
+ * @default 4194304 (4 MiB)
4017
+ */
4018
+ maxRequestBodySize?: number;
4019
+ }
4020
+ declare function legacyStatelessFallback(factory: McpServerFactory, onerror?: (error: Error) => void, options?: LegacyStatelessFallbackOptions): LegacyHttpHandler;
4021
+ /** Options for {@linkcode isLegacyRequest}. */
4022
+ interface IsLegacyRequestOptions {
4023
+ /**
4024
+ * The same `maxRequestBodySize` the handler the predicate routes for was
4025
+ * created with, so the two read the body under one bound (a body over it
4026
+ * classifies `false`; the modern handler answers `413`).
4027
+ * @default 4194304 (4 MiB)
4028
+ */
4029
+ maxRequestBodySize?: number;
4030
+ }
3927
4031
  /**
3928
4032
  * Whether {@linkcode createMcpHandler} would route this request to its legacy
3929
4033
  * (2025-era) serving rather than the modern (2026-07-28) path.
@@ -3984,7 +4088,8 @@ declare function legacyStatelessFallback(factory: McpServerFactory, onerror?: (e
3984
4088
  * answers it with the unsupported-protocol-version error), a malformed
3985
4089
  * envelope behind a present claim (answered `-32602`), a request whose
3986
4090
  * `MCP-Protocol-Version` header names a modern revision but that lacks the
3987
- * envelope (`-32602`), and header/body mismatches (`-32020`). Consumers
4091
+ * envelope (`-32602`), header/body mismatches (`-32020`), and a POST body
4092
+ * over the size limit (413). Consumers
3988
4093
  * routing on the predicate must send `false` traffic to the modern handler,
3989
4094
  * never to a legacy handler — the modern path owns those error answers.
3990
4095
  * - `server/discover` probes sent by negotiating clients always carry the
@@ -3992,7 +4097,7 @@ declare function legacyStatelessFallback(factory: McpServerFactory, onerror?: (e
3992
4097
  * a method named `server/discover` has no claim and classifies legacy,
3993
4098
  * exactly as the entry itself routes it.
3994
4099
  */
3995
- declare function isLegacyRequest(request: Request, parsedBody?: unknown): Promise<boolean>;
4100
+ declare function isLegacyRequest(request: Request, parsedBody?: unknown, options?: IsLegacyRequestOptions): Promise<boolean>;
3996
4101
  /**
3997
4102
  * Creates an HTTP handler that serves the 2026-07-28 protocol revision from a
3998
4103
  * per-request server factory and, by default, falls back to old-school
@@ -4039,5 +4144,5 @@ declare function isLegacyRequest(request: Request, parsedBody?: unknown): Promis
4039
4144
  */
4040
4145
  declare function createMcpHandler(factory: McpServerFactory, options?: CreateMcpHandlerOptions): McpHttpHandler;
4041
4146
  //#endregion
4042
- export { Protocol as $, OAuthError as $a, SubscriptionsAcknowledgedNotification as $i, InitializeRequestParams as $n, PaginatedResult as $r, BaseMetadata as $t, ResourceMetadata as A, CLIENT_INFO_META_KEY as Aa, ResourceTemplateType as Ai, ElicitRequest as An, ListRootsResult as Ar, UnsupportedProtocolVersionError as At, STDIO_DEFAULT_MAX_BUFFER_SIZE as B, PROTOCOL_VERSION_META_KEY as Ba, SamplingMessage as Bi, GetPromptRequest as Bn, MetaObject as Br, StandardSchemaV1Sync as Bt, PromptCallback as C, UnsubscribeRequest as Ca, RequestTypeMap as Ci, CreateMessageRequestParamsWithTools as Cn, ListPromptsRequest as Cr, isJSONRPCResponse as Ct, RegisteredResource as D, UntitledSingleSelectEnumSchema as Da, ResourceListChangedNotification as Di, Cursor as Dn, ListResourcesRequest as Dr, MissingRequiredClientCapabilityError as Dt, RegisteredPrompt as E, UntitledMultiSelectEnumSchema as Ea, ResourceLink as Ei, CreateTaskResult as En, ListResourceTemplatesResult as Er, parseJSONRPCMessage as Et, preloadSchemas as F, JSONRPC_VERSION as Fa, ResultTypeMap as Fi, ElicitationCompleteNotification as Fn, LoggingLevel as Fr, acceptedContent as Ft, ProtocolEra as G, TRACEPARENT_META_KEY as Ga, ServerResult as Gi, GetTaskRequest as Gn, MultiSelectEnumSchema as Gr, InboundLegacyRoute as Gt, serializeMessage as H, SERVER_INFO_META_KEY as Ha, ServerCapabilities as Hi, GetPromptResult as Hn, MissingRequiredClientCapabilityErrorData as Hr, InboundClassificationOutcome as Ht, InMemoryTransport as I, LATEST_PROTOCOL_VERSION as Ia, Role as Ii, ElicitationCompleteNotificationParams as In, LoggingMessageNotification as Ir, inputRequired as It, BaseContext as J, resourceUrlFromServerUrl as Ja, SingleSelectEnumSchema as Ji, Icon as Jn, NotificationParams as Jr, InboundValidationRung as Jt, getDisplayName as K, TRACESTATE_META_KEY as Ka, SetLevelRequest as Ki, GetTaskResult as Kn, Notification as Kr, InboundLegacyRouteReason as Kt, UriTemplate as L, LOG_LEVEL_META_KEY as La, Root as Li, EmbeddedResource as Ln, LoggingMessageNotificationParams as Lr, inputResponse as Lt, ToolCallback as M, INTERNAL_ERROR as Ma, ResourceUpdatedNotificationParams as Mi, ElicitRequestParams as Mn, ListTasksResult as Mr, ProtocolErrorCode as Mt, Server as N, INVALID_PARAMS as Na, Result$1 as Ni, ElicitRequestURLParams as Nn, ListToolsRequest as Nr, InputRequiredSpec as Nt, RegisteredResourceTemplate as O, BAGGAGE_META_KEY as Oa, ResourceRequestParams as Oi, DiscoverRequest as On, ListResourcesResult as Or, ProtocolError as Ot, ServerOptions as P, INVALID_REQUEST as Pa, ResultMetaObject as Pi, ElicitResult as Pn, ListToolsResult as Pr, InputResponseView as Pt, ProgressCallback as Q, SdkHttpErrorData as Qa, SubscriptionFilter as Qi, InitializeRequest as Qn, PaginatedRequestParams as Qr, AuthInfo as Qt, Variables as R, METHOD_NOT_FOUND as Ra, RootsListChangedNotification as Ri, EmptyResult as Rn, MessageClassification as Rr, ElicitInputParams as Rt, McpServer as S, ToolUseContent as Sa, RequestParams as Si, CreateMessageRequestParamsBase as Sn, ListChangedOptions as Sr, isJSONRPCRequest as St, ReadResourceTemplateCallback as T, UnsupportedProtocolVersionErrorData as Ta, ResourceContents as Ti, CreateMessageResultWithTools as Tn, ListResourceTemplatesRequest as Tr, isTaskAugmentedRequestParams as Tt, CacheHint as U, SUBSCRIPTION_ID_META_KEY as Ua, ServerNotification as Ui, GetTaskPayloadRequest as Un, ModelHint as Ur, InboundHttpRequest as Ut, deserializeMessage as V, RELATED_TASK_META_KEY as Va, SamplingMessageContentBlock as Vi, GetPromptRequestParams as Vn, MethodNotFoundError as Vr, StandardSchemaWithJSON as Vt, CacheScope as W, SUPPORTED_PROTOCOL_VERSIONS as Wa, ServerRequest as Wi, GetTaskPayloadResult as Wn, ModelPreferences as Wr, InboundLadderRejection as Wt, DEFAULT_REQUEST_TIMEOUT_MSEC as X, SdkErrorCode as Xa, SubscribeRequest as Xi, ImageContent as Xn, NumberSchema as Xr, Annotations as Xt, ClientContext as Y, SdkError as Ya, StringSchema as Yi, Icons as Yn, NotificationTypeMap as Yr, classifyInboundRequest as Yt, NotificationOptions as Z, SdkHttpError as Za, SubscribeRequestParams as Zi, Implementation as Zn, PaginatedRequest as Zr, AudioContent as Zt, PerRequestResponseMode as _, ToolAnnotations as _a, RequestId as _i, CompleteRequestResourceTemplate as _n, JSONRPCResultResponse as _r, isInitializeRequest as _t, McpRequestContext as a, Task as aa, ProgressNotificationParams as ai, CancelTaskRequest as an, OAuthClientInformationMixed as ao, InputResponse as ar, mergeCapabilities as at, CompleteResourceTemplateCallback as b, ToolListChangedNotification as ba, RequestMetaObject as bi, CreateMessageRequest as bn, ListChangedCallback as br, isJSONRPCErrorResponse as bt, isLegacyRequest as c, TaskMetadata as ca, PromptArgument as ci, CancelledNotificationParams as cn, OAuthErrorResponse as co, InvalidParamsError as cr, TransportSendOptions as ct, ServerEvent as d, TaskStatusNotificationParams as da, PromptReference as di, ClientRequest as dn, OAuthTokenRevocationRequest as do, JSONObject as dr, SpecTypes as dt, SubscriptionsAcknowledgedNotificationParams as ea, ParseError as ei, BlobResourceContents as en, OAuthErrorCode as eo, InitializeResult as er, ProtocolOptions as et, ServerEventBus as f, TextContent as fa, ReadResourceRequest as fi, ClientResult as fn, OAuthTokens as fo, JSONRPCErrorResponse as fr, isSpecType as ft, PerRequestMessageExtra as g, Tool as ga, Request$1 as gi, CompleteRequestPrompt as gn, StoredOAuthTokens as go, JSONRPCResponse as gr, isCallToolResult as gt, PerRequestHTTPServerTransportOptions as h, TitledSingleSelectEnumSchema as ha, RelatedTaskMetadata as hi, CompleteRequestParams as hn, StoredOAuthClientInformation as ho, JSONRPCRequest as hr, assertCompleteRequestResourceTemplate as ht, McpHttpHandler as i, SubscriptionsListenResultMeta as ia, ProgressNotification as ii, CallToolResult as in, OAuthClientInformationFull as io, InputRequiredResult as ir, ServerContext as it, ResourceTemplate as j, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as ja, ResourceUpdatedNotification as ji, ElicitRequestFormParams as jn, ListTasksRequest as jr, UrlElicitationRequiredError as jt, RegisteredTool as k, CLIENT_CAPABILITIES_META_KEY as ka, ResourceTemplateReference as ki, DiscoverResult as kn, ListRootsRequest as kr, ResourceNotFoundError as kt, legacyStatelessFallback as l, TaskStatus as la, PromptListChangedNotification as li, ClientCapabilities as ln, OAuthMetadata as lo, InvalidRequestError as lr, createFetchWithInit as lt, PerRequestHTTPServerTransport as m, TitledMultiSelectEnumSchema as ma, ReadResourceResult as mi, CompleteRequest as mn, OpenIdProviderMetadata as mo, JSONRPCNotification as mr, assertCompleteRequestPrompt as mt, LegacyHttpHandler as n, SubscriptionsListenRequestParams as na, PrimitiveSchemaDefinition as ni, CallToolRequest as nn, IdJagTokenExchangeResponse as no, InputRequest as nr, RequestOptions as nt, McpServerFactory as o, TaskAugmentedRequestParams as oa, ProgressToken as oi, CancelTaskResult as on, OAuthClientMetadata as oo, InputResponses as or, FetchLike as ot, ServerNotifier as p, TextResourceContents as pa, ReadResourceRequestParams as pi, CompatibilityCallToolResult as pn, OpenIdProviderDiscoveryMetadata as po, JSONRPCMessage as pr, specTypeSchemas as pt, isJsonContentType as q, checkResourceAllowed as qa, SetLevelRequestParams as qi, HandlerResultTypeMap as qn, NotificationMethod as qr, InboundModernRoute as qt, McpHandlerRequestOptions as r, SubscriptionsListenResult as ra, Progress as ri, CallToolRequestParams as rn, OAuthClientInformation as ro, InputRequests as rr, RequestStateAccessor as rt, createMcpHandler as s, TaskCreationParams as sa, Prompt as si, CancelledNotification as sn, OAuthClientRegistrationError as so, InternalError as sr, Transport as st, CreateMcpHandlerOptions as t, SubscriptionsListenRequest as ta, PingRequest as ti, BooleanSchema as tn, AuthorizationServerMetadata as to, InitializedNotification as tr, RequestHandlerSchemas as tt, InMemoryServerEventBus as u, TaskStatusNotification as ua, PromptMessage as ui, ClientNotification as un, OAuthProtectedResourceMetadata as uo, JSONArray as ur, SpecTypeName as ut, AnyToolHandler as v, ToolChoice as va, RequestMeta as vi, CompleteResult as vn, JSONValue as vr, isInitializedNotification as vt, ReadResourceCallback as w, UnsubscribeRequestParams as wa, Resource as wi, CreateMessageResult as wn, ListPromptsResult as wr, isJSONRPCResultResponse as wt, ListResourcesCallback as x, ToolResultContent as xa, RequestMethod as xi, CreateMessageRequestParams as xn, ListChangedHandlers as xr, isJSONRPCNotification as xt, BaseToolCallback as y, ToolExecution as ya, RequestMetaEnvelope as yi, ContentBlock as yn, LegacyTitledEnumSchema as yr, isInputRequiredResult as yt, ReadBuffer as z, PARSE_ERROR as za, SamplingContent as zi, EnumSchema as zn, MessageExtraInfo as zr, StandardSchemaV1 as zt };
4043
- //# sourceMappingURL=createMcpHandler-DzBzpE4_.d.cts.map
4147
+ export { BaseContext as $, resourceUrlFromServerUrl as $a, SingleSelectEnumSchema as $i, Icon as $n, NotificationParams as $r, InboundValidationRung as $t, RegisteredResourceTemplate as A, UnsupportedProtocolVersionErrorData as Aa, ResourceContents as Ai, CreateMessageResultWithTools as An, ListResourceTemplatesRequest as Ar, isTaskAugmentedRequestParams as At, preloadSchemas as B, JSONRPC_VERSION as Ba, ResultTypeMap as Bi, ElicitationCompleteNotification as Bn, LoggingLevel as Br, acceptedContent as Bt, ListResourcesCallback as C, ToolChoice as Ca, RequestMeta as Ci, CompleteResult as Cn, JSONValue as Cr, isInitializedNotification as Ct, ReadResourceTemplateCallback as D, ToolUseContent as Da, RequestParams as Di, CreateMessageRequestParamsBase as Dn, ListChangedOptions as Dr, isJSONRPCRequest as Dt, ReadResourceCallback as E, ToolResultContent as Ea, RequestMethod as Ei, CreateMessageRequestParams as En, ListChangedHandlers as Er, isJSONRPCNotification as Et, Server as F, CLIENT_INFO_META_KEY as Fa, ResourceTemplateType as Fi, ElicitRequest as Fn, ListRootsResult as Fr, UnsupportedProtocolVersionError as Ft, STDIO_DEFAULT_MAX_BUFFER_SIZE as G, PROTOCOL_VERSION_META_KEY as Ga, SamplingMessage as Gi, GetPromptRequest as Gn, MetaObject as Gr, StandardSchemaV1Sync as Gt, UriTemplate as H, LOG_LEVEL_META_KEY as Ha, Root as Hi, EmbeddedResource as Hn, LoggingMessageNotificationParams as Hr, inputResponse as Ht, ServerOptions as I, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as Ia, ResourceUpdatedNotification as Ii, ElicitRequestFormParams as In, ListTasksRequest as Ir, UrlElicitationRequiredError as It, CacheHint as J, SUBSCRIPTION_ID_META_KEY as Ja, ServerNotification as Ji, GetTaskPayloadRequest as Jn, ModelHint as Jr, InboundHttpRequest as Jt, deserializeMessage as K, RELATED_TASK_META_KEY as Ka, SamplingMessageContentBlock as Ki, GetPromptRequestParams as Kn, MethodNotFoundError as Kr, StandardSchemaWithJSON as Kt, ScopeChallenge as L, INTERNAL_ERROR as La, ResourceUpdatedNotificationParams as Li, ElicitRequestParams as Ln, ListTasksResult as Lr, ProtocolErrorCode as Lt, ResourceMetadata as M, UntitledSingleSelectEnumSchema as Ma, ResourceListChangedNotification as Mi, Cursor as Mn, ListResourcesRequest as Mr, MissingRequiredClientCapabilityError as Mt, ResourceTemplate as N, BAGGAGE_META_KEY as Na, ResourceRequestParams as Ni, DiscoverRequest as Nn, ListResourcesResult as Nr, ProtocolError as Nt, RegisteredPrompt as O, UnsubscribeRequest as Oa, RequestTypeMap as Oi, CreateMessageRequestParamsWithTools as On, ListPromptsRequest as Or, isJSONRPCResponse as Ot, ToolCallback as P, CLIENT_CAPABILITIES_META_KEY as Pa, ResourceTemplateReference as Pi, DiscoverResult as Pn, ListRootsRequest as Pr, ResourceNotFoundError as Pt, isJsonContentType as Q, checkResourceAllowed as Qa, SetLevelRequestParams as Qi, HandlerResultTypeMap as Qn, NotificationMethod as Qr, InboundModernRoute as Qt, ScopeChallengeHandler as R, INVALID_PARAMS as Ra, Result$1 as Ri, ElicitRequestURLParams as Rn, ListToolsRequest as Rr, InputRequiredSpec as Rt, CompleteResourceTemplateCallback as S, ToolAnnotations as Sa, RequestId as Si, CompleteRequestResourceTemplate as Sn, JSONRPCResultResponse as Sr, isInitializeRequest as St, PromptCallback as T, ToolListChangedNotification as Ta, RequestMetaObject as Ti, CreateMessageRequest as Tn, ListChangedCallback as Tr, isJSONRPCErrorResponse as Tt, Variables as U, METHOD_NOT_FOUND as Ua, RootsListChangedNotification as Ui, EmptyResult as Un, MessageClassification as Ur, ElicitInputParams as Ut, InMemoryTransport as V, LATEST_PROTOCOL_VERSION as Va, Role as Vi, ElicitationCompleteNotificationParams as Vn, LoggingMessageNotification as Vr, inputRequired as Vt, ReadBuffer as W, PARSE_ERROR as Wa, SamplingContent as Wi, EnumSchema as Wn, MessageExtraInfo as Wr, StandardSchemaV1 as Wt, ProtocolEra as X, TRACEPARENT_META_KEY as Xa, ServerResult as Xi, GetTaskRequest as Xn, MultiSelectEnumSchema as Xr, InboundLegacyRoute as Xt, CacheScope as Y, SUPPORTED_PROTOCOL_VERSIONS as Ya, ServerRequest as Yi, GetTaskPayloadResult as Yn, ModelPreferences as Yr, InboundLadderRejection as Yt, getDisplayName as Z, TRACESTATE_META_KEY as Za, SetLevelRequest as Zi, GetTaskResult as Zn, Notification as Zr, InboundLegacyRouteReason as Zt, PerRequestHTTPServerTransportOptions as _, TextContent as _a, ReadResourceRequest as _i, ClientResult as _n, OAuthTokens as _o, JSONRPCErrorResponse as _r, isSpecType as _t, McpHandlerRequestOptions as a, SubscriptionsAcknowledgedNotificationParams as aa, ParseError as ai, BlobResourceContents as an, OAuthErrorCode as ao, InitializeResult as ar, ProtocolOptions as at, AnyToolHandler as b, TitledSingleSelectEnumSchema as ba, RelatedTaskMetadata as bi, CompleteRequestParams as bn, StoredOAuthClientInformation as bo, JSONRPCRequest as br, assertCompleteRequestResourceTemplate as bt, McpServerFactory as c, SubscriptionsListenResult as ca, Progress as ci, CallToolRequestParams as cn, OAuthClientInformation as co, InputRequests as cr, RequestStateAccessor as ct, legacyStatelessFallback as d, TaskAugmentedRequestParams as da, ProgressToken as di, CancelTaskResult as dn, OAuthClientMetadata as do, InputResponses as dr, FetchLike as dt, StringSchema as ea, NotificationTypeMap as ei, classifyInboundRequest as en, SdkError as eo, Icons as er, ClientContext as et, InMemoryServerEventBus as f, TaskCreationParams as fa, Prompt as fi, CancelledNotification as fn, OAuthClientRegistrationError as fo, InternalError as fr, Transport as ft, PerRequestHTTPServerTransport as g, TaskStatusNotificationParams as ga, PromptReference as gi, ClientRequest as gn, OAuthTokenRevocationRequest as go, JSONObject as gr, SpecTypes as gt, ServerNotifier as h, TaskStatusNotification as ha, PromptMessage as hi, ClientNotification as hn, OAuthProtectedResourceMetadata as ho, JSONArray as hr, SpecTypeName as ht, LegacyStatelessFallbackOptions as i, SubscriptionsAcknowledgedNotification as ia, PaginatedResult as ii, BaseMetadata as in, OAuthError as io, InitializeRequestParams as ir, Protocol as it, RegisteredTool as j, UntitledMultiSelectEnumSchema as ja, ResourceLink as ji, CreateTaskResult as jn, ListResourceTemplatesResult as jr, parseJSONRPCMessage as jt, RegisteredResource as k, UnsubscribeRequestParams as ka, Resource as ki, CreateMessageResult as kn, ListPromptsResult as kr, isJSONRPCResultResponse as kt, createMcpHandler as l, SubscriptionsListenResultMeta as la, ProgressNotification as li, CallToolResult as ln, OAuthClientInformationFull as lo, InputRequiredResult as lr, ServerContext as lt, ServerEventBus as m, TaskStatus as ma, PromptListChangedNotification as mi, ClientCapabilities as mn, OAuthMetadata as mo, InvalidRequestError as mr, createFetchWithInit as mt, IsLegacyRequestOptions as n, SubscribeRequestParams as na, PaginatedRequest as ni, AudioContent as nn, SdkHttpError as no, Implementation as nr, NotificationOptions as nt, McpHttpHandler as o, SubscriptionsListenRequest as oa, PingRequest as oi, BooleanSchema as on, AuthorizationServerMetadata as oo, InitializedNotification as or, RequestHandlerSchemas as ot, ServerEvent as p, TaskMetadata as pa, PromptArgument as pi, CancelledNotificationParams as pn, OAuthErrorResponse as po, InvalidParamsError as pr, TransportSendOptions as pt, serializeMessage as q, SERVER_INFO_META_KEY as qa, ServerCapabilities as qi, GetPromptResult as qn, MissingRequiredClientCapabilityErrorData as qr, InboundClassificationOutcome as qt, LegacyHttpHandler as r, SubscriptionFilter as ra, PaginatedRequestParams as ri, AuthInfo as rn, SdkHttpErrorData as ro, InitializeRequest as rr, ProgressCallback as rt, McpRequestContext as s, SubscriptionsListenRequestParams as sa, PrimitiveSchemaDefinition as si, CallToolRequest as sn, IdJagTokenExchangeResponse as so, InputRequest as sr, RequestOptions as st, CreateMcpHandlerOptions as t, SubscribeRequest as ta, NumberSchema as ti, Annotations as tn, SdkErrorCode as to, ImageContent as tr, DEFAULT_REQUEST_TIMEOUT_MSEC as tt, isLegacyRequest as u, Task as ua, ProgressNotificationParams as ui, CancelTaskRequest as un, OAuthClientInformationMixed as uo, InputResponse as ur, mergeCapabilities as ut, PerRequestMessageExtra as v, TextResourceContents as va, ReadResourceRequestParams as vi, CompatibilityCallToolResult as vn, OpenIdProviderDiscoveryMetadata as vo, JSONRPCMessage as vr, specTypeSchemas as vt, McpServer as w, ToolExecution as wa, RequestMetaEnvelope as wi, ContentBlock as wn, LegacyTitledEnumSchema as wr, isInputRequiredResult as wt, BaseToolCallback as x, Tool as xa, Request$1 as xi, CompleteRequestPrompt as xn, StoredOAuthTokens as xo, JSONRPCResponse as xr, isCallToolResult as xt, PerRequestResponseMode as y, TitledMultiSelectEnumSchema as ya, ReadResourceResult as yi, CompleteRequest as yn, OpenIdProviderMetadata as yo, JSONRPCNotification as yr, assertCompleteRequestPrompt as yt, requireScopes as z, INVALID_REQUEST as za, ResultMetaObject as zi, ElicitResult as zn, ListToolsResult as zr, InputResponseView as zt };
4148
+ //# sourceMappingURL=createMcpHandler-BLVe3qmU.d.cts.map