@spotlightjs/spotlight 4.5.1 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjsHelpers.js +9 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/cache.js +5 -0
- package/dist/_virtual/cache.js.map +1 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/re.js +5 -0
- package/dist/_virtual/re.js.map +1 -0
- package/dist/_virtual/uri.all.js +5 -0
- package/dist/_virtual/uri.all.js.map +1 -0
- package/dist/bootstrap.d.ts +0 -0
- package/dist/electron-index.d.ts +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/instrument.js +74 -0
- package/dist/instrument.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js +233 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +56 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +188 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +596 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +68 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +383 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +33 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1037 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/ajv.js +357 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/ajv.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/cache.js +21 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/cache.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/async.js +65 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/async.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/error_classes.js +28 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/error_classes.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/formats.js +110 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/formats.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/index.js +279 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/resolve.js +219 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/resolve.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/rules.js +92 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/rules.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/schema_obj.js +10 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/schema_obj.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/ucs2length.js +16 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/ucs2length.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/util.js +183 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/util.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/data.js +48 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/data.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/definition_schema.js +39 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/definition_schema.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limit.js +151 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limit.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitItems.js +81 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitItems.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitLength.js +86 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitLength.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitProperties.js +81 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitProperties.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/allOf.js +43 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/allOf.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/anyOf.js +74 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/anyOf.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/comment.js +17 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/comment.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/const.js +54 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/const.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/contains.js +79 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/contains.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/custom.js +221 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/custom.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/dependencies.js +162 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/dependencies.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/enum.js +63 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/enum.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/format.js +148 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/format.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/if.js +101 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/if.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/index.js +58 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/items.js +138 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/items.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/multipleOf.js +81 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/multipleOf.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/not.js +86 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/not.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/oneOf.js +72 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/oneOf.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/pattern.js +76 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/pattern.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/properties.js +313 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/properties.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/propertyNames.js +75 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/propertyNames.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/ref.js +125 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/ref.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/required.js +254 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/required.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/uniqueItems.js +86 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/uniqueItems.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/validate.js +455 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/validate.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/keyword.js +99 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/keyword.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/refs/data.json.js +41 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/refs/data.json.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/refs/json-schema-draft-07.json.js +257 -0
- package/dist/node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/refs/json-schema-draft-07.json.js.map +1 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +32 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js.map +1 -0
- package/dist/node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js +53 -0
- package/dist/node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js.map +1 -0
- package/dist/node_modules/.pnpm/hono@4.10.3/node_modules/hono/dist/helper/streaming/sse.js +24 -0
- package/dist/node_modules/.pnpm/hono@4.10.3/node_modules/hono/dist/helper/streaming/sse.js.map +1 -0
- package/dist/node_modules/.pnpm/hono@4.10.3/node_modules/hono/dist/middleware/cors/index.js +87 -0
- package/dist/node_modules/.pnpm/hono@4.10.3/node_modules/hono/dist/middleware/cors/index.js.map +1 -0
- package/dist/node_modules/.pnpm/hono@4.10.3/node_modules/hono/dist/utils/html.js +35 -0
- package/dist/node_modules/.pnpm/hono@4.10.3/node_modules/hono/dist/utils/html.js.map +1 -0
- package/dist/node_modules/.pnpm/hono@4.10.3/node_modules/hono/dist/utils/stream.js +69 -0
- package/dist/node_modules/.pnpm/hono@4.10.3/node_modules/hono/dist/utils/stream.js.map +1 -0
- package/dist/node_modules/.pnpm/json-schema-traverse@0.4.1/node_modules/json-schema-traverse/index.js +83 -0
- package/dist/node_modules/.pnpm/json-schema-traverse@0.4.1/node_modules/json-schema-traverse/index.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js +123 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js +388 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js +277 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js +53 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js +46 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js +12 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js +42 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js +22 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js +20 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js +15 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js +135 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js +29 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js +7 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js +22 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js +35 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js +91 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js +12 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js +28 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js +28 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js +57 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js +74 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js +49 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js +163 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js +14 -0
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js.map +1 -0
- package/dist/node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js +1027 -0
- package/dist/node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js +38 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js +24 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +19 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +12 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js +62 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +19 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +29 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +49 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +9 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +8 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +8 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +62 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +11 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +9 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +10 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +45 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +22 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +30 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +13 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +12 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +36 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +52 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +73 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +23 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +23 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +8 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +8 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +59 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +24 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +322 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +31 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +10 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +72 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +8 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js +109 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +67 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js.map +1 -0
- package/dist/run.d.ts +0 -1
- package/dist/run.js +22 -51777
- package/dist/run.js.map +1 -0
- package/dist/sentry-config.d.ts +7 -0
- package/dist/sentry-config.js +11 -0
- package/dist/sentry-config.js.map +1 -0
- package/dist/server/cli/help.d.ts +1 -0
- package/dist/server/cli/help.js +38 -0
- package/dist/server/cli/help.js.map +1 -0
- package/dist/server/cli/mcp.d.ts +2 -0
- package/dist/server/cli/mcp.js +105 -0
- package/dist/server/cli/mcp.js.map +1 -0
- package/dist/server/cli/run.d.ts +2 -0
- package/dist/server/cli/run.js +271 -0
- package/dist/server/cli/run.js.map +1 -0
- package/dist/server/cli/server.d.ts +2 -0
- package/dist/server/cli/server.js +13 -0
- package/dist/server/cli/server.js.map +1 -0
- package/dist/server/cli/tail.d.ts +8 -0
- package/dist/server/cli/tail.js +97 -0
- package/dist/server/cli/tail.js.map +1 -0
- package/dist/server/cli.d.ts +16 -0
- package/dist/server/cli.js +120 -0
- package/dist/server/cli.js.map +1 -0
- package/dist/server/constants.d.ts +3 -0
- package/dist/server/constants.js +7 -0
- package/dist/server/constants.js.map +1 -0
- package/dist/server/formatters/human/errors.d.ts +6 -0
- package/dist/server/formatters/human/errors.js +28 -0
- package/dist/server/formatters/human/errors.js.map +1 -0
- package/dist/server/formatters/human/index.d.ts +2 -0
- package/dist/server/formatters/human/index.js +13 -0
- package/dist/server/formatters/human/index.js.map +1 -0
- package/dist/server/formatters/human/logs.d.ts +6 -0
- package/dist/server/formatters/human/logs.js +23 -0
- package/dist/server/formatters/human/logs.js.map +1 -0
- package/dist/server/formatters/human/traces.d.ts +6 -0
- package/dist/server/formatters/human/traces.js +29 -0
- package/dist/server/formatters/human/traces.js.map +1 -0
- package/dist/server/formatters/human/utils.d.ts +43 -0
- package/dist/server/formatters/human/utils.js +113 -0
- package/dist/server/formatters/human/utils.js.map +1 -0
- package/dist/server/formatters/index.d.ts +11 -0
- package/dist/server/formatters/index.js +19 -0
- package/dist/server/formatters/index.js.map +1 -0
- package/dist/server/formatters/json/errors.d.ts +3 -0
- package/dist/server/formatters/json/errors.js +8 -0
- package/dist/server/formatters/json/errors.js.map +1 -0
- package/dist/server/formatters/json/index.d.ts +2 -0
- package/dist/server/formatters/json/index.js +13 -0
- package/dist/server/formatters/json/index.js.map +1 -0
- package/dist/server/formatters/json/logs.d.ts +3 -0
- package/dist/server/formatters/json/logs.js +11 -0
- package/dist/server/formatters/json/logs.js.map +1 -0
- package/dist/server/formatters/json/traces.d.ts +3 -0
- package/dist/server/formatters/json/traces.js +8 -0
- package/dist/server/formatters/json/traces.js.map +1 -0
- package/dist/server/formatters/logfmt/errors.d.ts +3 -0
- package/dist/server/formatters/logfmt/errors.js +9 -0
- package/dist/server/formatters/logfmt/errors.js.map +1 -0
- package/dist/server/formatters/logfmt/index.d.ts +2 -0
- package/dist/server/formatters/logfmt/index.js +13 -0
- package/dist/server/formatters/logfmt/index.js.map +1 -0
- package/dist/server/formatters/logfmt/logs.d.ts +3 -0
- package/dist/server/formatters/logfmt/logs.js +27 -0
- package/dist/server/formatters/logfmt/logs.js.map +1 -0
- package/dist/server/formatters/logfmt/traces.d.ts +3 -0
- package/dist/server/formatters/logfmt/traces.js +9 -0
- package/dist/server/formatters/logfmt/traces.js.map +1 -0
- package/dist/server/formatters/md/errors.d.ts +10 -0
- package/dist/server/formatters/md/errors.js +77 -0
- package/dist/server/formatters/md/errors.js.map +1 -0
- package/dist/server/formatters/md/event.d.ts +11 -0
- package/dist/server/formatters/md/event.js +362 -0
- package/dist/server/formatters/md/event.js.map +1 -0
- package/dist/server/formatters/md/index.d.ts +2 -0
- package/dist/server/formatters/md/index.js +13 -0
- package/dist/server/formatters/md/index.js.map +1 -0
- package/dist/server/formatters/md/logs.d.ts +7 -0
- package/dist/server/formatters/md/logs.js +39 -0
- package/dist/server/formatters/md/logs.js.map +1 -0
- package/dist/server/formatters/md/traces.d.ts +87 -0
- package/dist/server/formatters/md/traces.js +300 -0
- package/dist/server/formatters/md/traces.js.map +1 -0
- package/dist/server/formatters/schema.d.ts +6810 -0
- package/dist/server/formatters/shared/data-builders.d.ts +15 -0
- package/dist/server/formatters/shared/data-builders.js +120 -0
- package/dist/server/formatters/shared/data-builders.js.map +1 -0
- package/dist/server/formatters/types.d.ts +33 -0
- package/dist/server/formatters/types.js +5 -0
- package/dist/server/formatters/types.js.map +1 -0
- package/dist/server/formatters/utils.d.ts +25 -0
- package/dist/server/formatters/utils.js +46 -0
- package/dist/server/formatters/utils.js.map +1 -0
- package/dist/server/handlers/fileToServe.d.ts +2 -0
- package/dist/server/handlers/fileToServe.js +27 -0
- package/dist/server/handlers/fileToServe.js.map +1 -0
- package/dist/server/handlers/index.d.ts +1 -0
- package/dist/server/logger.d.ts +5 -0
- package/dist/server/logger.js +31 -0
- package/dist/server/logger.js.map +1 -0
- package/dist/server/main.d.ts +6 -0
- package/dist/server/main.js +175 -0
- package/dist/server/main.js.map +1 -0
- package/dist/server/mcp/constants.d.ts +3 -0
- package/dist/server/mcp/constants.js +79 -0
- package/dist/server/mcp/constants.js.map +1 -0
- package/dist/server/mcp/mcp.d.ts +31 -0
- package/dist/server/mcp/mcp.js +392 -0
- package/dist/server/mcp/mcp.js.map +1 -0
- package/dist/server/messageBuffer.d.ts +40 -0
- package/dist/server/messageBuffer.js +279 -0
- package/dist/server/messageBuffer.js.map +1 -0
- package/dist/server/parser/helpers.d.ts +10 -0
- package/dist/server/parser/helpers.js +32 -0
- package/dist/server/parser/helpers.js.map +1 -0
- package/dist/server/parser/index.d.ts +3 -0
- package/dist/server/parser/processEnvelope.d.ts +17 -0
- package/dist/server/parser/processEnvelope.js +86 -0
- package/dist/server/parser/processEnvelope.js.map +1 -0
- package/dist/server/parser/types.d.ts +198 -0
- package/dist/server/routes/clear.d.ts +3 -0
- package/dist/server/routes/clear.js +15 -0
- package/dist/server/routes/clear.js.map +1 -0
- package/dist/server/routes/contextlines/index.d.ts +3 -0
- package/dist/server/routes/contextlines/index.js +44 -0
- package/dist/server/routes/contextlines/index.js.map +1 -0
- package/dist/server/routes/contextlines/utils.d.ts +20 -0
- package/dist/server/routes/contextlines/utils.js +83 -0
- package/dist/server/routes/contextlines/utils.js.map +1 -0
- package/dist/server/routes/health.d.ts +3 -0
- package/dist/server/routes/health.js +7 -0
- package/dist/server/routes/health.js.map +1 -0
- package/dist/server/routes/index.d.ts +3 -0
- package/dist/server/routes/index.js +19 -0
- package/dist/server/routes/index.js.map +1 -0
- package/dist/server/routes/mcp.d.ts +3 -0
- package/dist/server/routes/mcp.js +20 -0
- package/dist/server/routes/mcp.js.map +1 -0
- package/dist/server/routes/open.d.ts +4 -0
- package/dist/server/routes/open.js +25 -0
- package/dist/server/routes/open.js.map +1 -0
- package/dist/server/routes/stream/debugLogging.d.ts +11 -0
- package/dist/server/routes/stream/debugLogging.js +59 -0
- package/dist/server/routes/stream/debugLogging.js.map +1 -0
- package/dist/server/routes/stream/index.d.ts +34 -0
- package/dist/server/routes/stream/index.js +98 -0
- package/dist/server/routes/stream/index.js.map +1 -0
- package/dist/server/routes/stream/streaming.d.ts +3 -0
- package/dist/server/routes/stream/streaming.js +26 -0
- package/dist/server/routes/stream/streaming.js.map +1 -0
- package/dist/server/routes/stream/userAgent.d.ts +11 -0
- package/dist/server/routes/stream/userAgent.js +25 -0
- package/dist/server/routes/stream/userAgent.js.map +1 -0
- package/dist/server/sdk.d.ts +15 -0
- package/dist/server/sdk.js +32 -0
- package/dist/server/sdk.js.map +1 -0
- package/dist/server/types/cli.d.ts +14 -0
- package/dist/server/types/env.d.ts +10 -0
- package/dist/server/types/index.d.ts +2 -0
- package/dist/server/types/utils.d.ts +44 -0
- package/dist/server/utils/cors.d.ts +12 -0
- package/dist/server/utils/cors.js +22 -0
- package/dist/server/utils/cors.js.map +1 -0
- package/dist/server/utils/docker-compose-parser.d.ts +20 -0
- package/dist/server/utils/docker-compose-parser.js +61 -0
- package/dist/server/utils/docker-compose-parser.js.map +1 -0
- package/dist/server/utils/docker-compose.d.ts +30 -0
- package/dist/server/utils/docker-compose.js +131 -0
- package/dist/server/utils/docker-compose.js.map +1 -0
- package/dist/server/utils/eventContainer.d.ts +34 -0
- package/dist/server/utils/eventContainer.js +71 -0
- package/dist/server/utils/eventContainer.js.map +1 -0
- package/dist/server/utils/extras.d.ts +5 -0
- package/dist/server/utils/extras.js +63 -0
- package/dist/server/utils/extras.js.map +1 -0
- package/dist/server/utils/getBuffer.d.ts +1 -0
- package/dist/server/utils/getBuffer.js +9 -0
- package/dist/server/utils/getBuffer.js.map +1 -0
- package/dist/server/utils/index.d.ts +4 -0
- package/dist/shared/constants.d.ts +3 -0
- package/dist/shared/constants.js +9 -0
- package/dist/shared/constants.js.map +1 -0
- package/dist/ui/assets/angular-html.js +1 -0
- package/dist/ui/assets/angular-ts.js +1 -0
- package/dist/ui/assets/astro.js +1 -0
- package/dist/ui/assets/blade.js +1 -0
- package/dist/ui/assets/client.js +50 -0
- package/dist/ui/assets/coffee.js +1 -0
- package/dist/ui/assets/cpp.js +1 -0
- package/dist/ui/assets/electron-index.js +6 -0
- package/dist/ui/assets/firefox.svg +105 -0
- package/dist/ui/assets/glsl.js +1 -0
- package/dist/ui/assets/graphql.js +1 -0
- package/dist/ui/assets/haml.js +1 -0
- package/dist/ui/assets/handlebars.js +1 -0
- package/dist/ui/assets/html-derivative.js +1 -0
- package/dist/ui/assets/html.js +1 -0
- package/dist/ui/assets/http.js +1 -0
- package/dist/ui/assets/index.js +152 -0
- package/dist/ui/assets/index2.js +1 -0
- package/dist/ui/assets/instrumentation.js +24 -0
- package/dist/ui/assets/jinja.js +1 -0
- package/dist/ui/assets/jison.js +1 -0
- package/dist/ui/assets/julia.js +1 -0
- package/dist/ui/assets/main.css +1 -0
- package/dist/ui/assets/main.js +2 -0
- package/dist/ui/assets/marko.js +1 -0
- package/dist/ui/assets/mdc.js +1 -0
- package/dist/ui/assets/nestjs.svg +4 -0
- package/dist/ui/assets/php.js +1 -0
- package/dist/ui/assets/pug.js +1 -0
- package/dist/ui/assets/raleway-cyrillic-400-normal.woff +0 -0
- package/dist/ui/assets/raleway-cyrillic-400-normal.woff2 +0 -0
- package/dist/ui/assets/raleway-cyrillic-ext-400-normal.woff +0 -0
- package/dist/ui/assets/raleway-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/ui/assets/raleway-latin-400-normal.woff +0 -0
- package/dist/ui/assets/raleway-latin-400-normal.woff2 +0 -0
- package/dist/ui/assets/raleway-latin-ext-400-normal.woff +0 -0
- package/dist/ui/assets/raleway-latin-ext-400-normal.woff2 +0 -0
- package/dist/ui/assets/raleway-vietnamese-400-normal.woff +0 -0
- package/dist/ui/assets/raleway-vietnamese-400-normal.woff2 +0 -0
- package/dist/ui/assets/safari.svg +38 -0
- package/dist/ui/assets/scss.js +1 -0
- package/dist/ui/assets/svelte.js +1 -0
- package/dist/ui/assets/ts-tags.js +1 -0
- package/dist/ui/assets/vue-html.js +1 -0
- package/dist/ui/assets/vue-vine.js +1 -0
- package/dist/ui/assets/vue.js +1 -0
- package/dist/ui/assets/xml.js +1 -0
- package/dist/{overlay/src → ui}/index.html +34 -0
- package/dist/ui/manifest.json +1103 -0
- package/package.json +109 -19
- package/dist/overlay/assets/angular-html-BmadGEgW.js +0 -1
- package/dist/overlay/assets/angular-ts-D-QQnnGT.js +0 -1
- package/dist/overlay/assets/astro-DHnp0xIo.js +0 -1
- package/dist/overlay/assets/blade-OPzGcV14.js +0 -1
- package/dist/overlay/assets/coffee-Dl27lzbd.js +0 -1
- package/dist/overlay/assets/cpp-Cj177cuW.js +0 -1
- package/dist/overlay/assets/glsl-CkUcVZNK.js +0 -1
- package/dist/overlay/assets/graphql-BLaPX4fU.js +0 -1
- package/dist/overlay/assets/haml-6FagfhCM.js +0 -1
- package/dist/overlay/assets/handlebars-Bd5Y4M6I.js +0 -1
- package/dist/overlay/assets/html-7XVNRwN7.js +0 -1
- package/dist/overlay/assets/html-derivative-BNxZ5Yf6.js +0 -1
- package/dist/overlay/assets/http-WC357zBG.js +0 -1
- package/dist/overlay/assets/index-BfFEknL3.js +0 -1
- package/dist/overlay/assets/jinja-WEhOU5ES.js +0 -1
- package/dist/overlay/assets/jison-c2JI40PB.js +0 -1
- package/dist/overlay/assets/julia-DcoDQokW.js +0 -1
- package/dist/overlay/assets/main.js +0 -224
- package/dist/overlay/assets/marko-DDi9qpQP.js +0 -1
- package/dist/overlay/assets/mdc-FI2x3BiY.js +0 -1
- package/dist/overlay/assets/php-BRU9zhoN.js +0 -1
- package/dist/overlay/assets/pug-CJWI-qSo.js +0 -1
- package/dist/overlay/assets/scss-B1FaCqwR.js +0 -1
- package/dist/overlay/assets/svelte-BjDUPxZ1.js +0 -1
- package/dist/overlay/assets/ts-tags-CZMzuZh-.js +0 -1
- package/dist/overlay/assets/vue-D-ba2-Rx.js +0 -1
- package/dist/overlay/assets/vue-html-Dn2ZoOSz.js +0 -1
- package/dist/overlay/assets/vue-vine-Jmfkm6lF.js +0 -1
- package/dist/overlay/assets/xml-C2J0sS9M.js +0 -1
- package/dist/overlay/manifest.json +0 -1000
- package/dist/run.cjs +0 -51848
- package/dist/sidecar.cjs +0 -7
- package/dist/sidecar.d.ts +0 -1
- package/dist/sidecar.js +0 -4
- /package/dist/{overlay/assets/andromeeda-BIpZ7gaU.js → ui/assets/andromeeda.js} +0 -0
- /package/dist/{overlay/assets/aurora-x-BwoVEUWZ.js → ui/assets/aurora-x.js} +0 -0
- /package/dist/{overlay/assets/ayu-dark-CxPZkpb2.js → ui/assets/ayu-dark.js} +0 -0
- /package/dist/{overlay/assets/c-eeMepfLm.js → ui/assets/c.js} +0 -0
- /package/dist/{overlay/assets/catppuccin-frappe-5udUqgsX.js → ui/assets/catppuccin-frappe.js} +0 -0
- /package/dist/{overlay/assets/catppuccin-latte-ufkS-HWv.js → ui/assets/catppuccin-latte.js} +0 -0
- /package/dist/{overlay/assets/catppuccin-macchiato-DzL2LPek.js → ui/assets/catppuccin-macchiato.js} +0 -0
- /package/dist/{overlay/assets/catppuccin-mocha-DDDDwkUT.js → ui/assets/catppuccin-mocha.js} +0 -0
- /package/dist/{overlay/assets/css-CECN5uSL.js → ui/assets/css.js} +0 -0
- /package/dist/{overlay/assets/dark-plus-pUHDTVV0.js → ui/assets/dark-plus.js} +0 -0
- /package/dist/{overlay/assets/dracula-soft-BKa-aqBv.js → ui/assets/dracula-soft.js} +0 -0
- /package/dist/{overlay/assets/dracula-BtZx2Kac.js → ui/assets/dracula.js} +0 -0
- /package/dist/{overlay/assets/everforest-dark-DMCBqXCK.js → ui/assets/everforest-dark.js} +0 -0
- /package/dist/{overlay/assets/everforest-light-BbXl82Em.js → ui/assets/everforest-light.js} +0 -0
- /package/dist/{overlay/assets/github-dark-default-BJPUVz4H.js → ui/assets/github-dark-default.js} +0 -0
- /package/dist/{overlay/assets/github-dark-dimmed-DUshB20C.js → ui/assets/github-dark-dimmed.js} +0 -0
- /package/dist/{overlay/assets/github-dark-high-contrast-D3aGCnF8.js → ui/assets/github-dark-high-contrast.js} +0 -0
- /package/dist/{overlay/assets/github-dark-DenFmJkN.js → ui/assets/github-dark.js} +0 -0
- /package/dist/{overlay/assets/github-light-default-D99KPAby.js → ui/assets/github-light-default.js} +0 -0
- /package/dist/{overlay/assets/github-light-high-contrast-BbmZE-Mp.js → ui/assets/github-light-high-contrast.js} +0 -0
- /package/dist/{overlay/assets/github-light-JYsPkUQd.js → ui/assets/github-light.js} +0 -0
- /package/dist/{overlay/assets/gruvbox-dark-hard-C2ND4cMr.js → ui/assets/gruvbox-dark-hard.js} +0 -0
- /package/dist/{overlay/assets/gruvbox-dark-medium-C8k4c8au.js → ui/assets/gruvbox-dark-medium.js} +0 -0
- /package/dist/{overlay/assets/gruvbox-dark-soft-xx9Q6FaG.js → ui/assets/gruvbox-dark-soft.js} +0 -0
- /package/dist/{overlay/assets/gruvbox-light-hard-BpUXv5in.js → ui/assets/gruvbox-light-hard.js} +0 -0
- /package/dist/{overlay/assets/gruvbox-light-medium-D3XFCoU1.js → ui/assets/gruvbox-light-medium.js} +0 -0
- /package/dist/{overlay/assets/gruvbox-light-soft-u7hpfz6Z.js → ui/assets/gruvbox-light-soft.js} +0 -0
- /package/dist/{overlay/assets/houston-BDYrDoDW.js → ui/assets/houston.js} +0 -0
- /package/dist/{overlay/assets/imba-CimUv-Uh.js → ui/assets/imba.js} +0 -0
- /package/dist/{overlay/assets/java-DY6VlHhP.js → ui/assets/java.js} +0 -0
- /package/dist/{overlay/assets/javascript-Dp1Jmi5H.js → ui/assets/javascript.js} +0 -0
- /package/dist/{overlay/assets/json-DxJze_jm.js → ui/assets/json.js} +0 -0
- /package/dist/{overlay/assets/json5-BT4Fjg39.js → ui/assets/json5.js} +0 -0
- /package/dist/{overlay/assets/jsonc-CHjZD8gR.js → ui/assets/jsonc.js} +0 -0
- /package/dist/{overlay/assets/jsonl-BGuvDmy9.js → ui/assets/jsonl.js} +0 -0
- /package/dist/{overlay/assets/jsx-BtKADgXT.js → ui/assets/jsx.js} +0 -0
- /package/dist/{overlay/assets/kanagawa-dragon-CiKur4Hl.js → ui/assets/kanagawa-dragon.js} +0 -0
- /package/dist/{overlay/assets/kanagawa-lotus-BKu-smKu.js → ui/assets/kanagawa-lotus.js} +0 -0
- /package/dist/{overlay/assets/kanagawa-wave-CQwozSzG.js → ui/assets/kanagawa-wave.js} +0 -0
- /package/dist/{overlay/assets/laserwave-6a00oqik.js → ui/assets/laserwave.js} +0 -0
- /package/dist/{overlay/assets/less-B1GLI2Di.js → ui/assets/less.js} +0 -0
- /package/dist/{overlay/assets/light-plus-CZuVqSLX.js → ui/assets/light-plus.js} +0 -0
- /package/dist/{overlay/assets/markdown-CrScaQ96.js → ui/assets/markdown.js} +0 -0
- /package/dist/{overlay/assets/material-theme-darker-CkRroheE.js → ui/assets/material-theme-darker.js} +0 -0
- /package/dist/{overlay/assets/material-theme-lighter-BUBw43Yz.js → ui/assets/material-theme-lighter.js} +0 -0
- /package/dist/{overlay/assets/material-theme-ocean-ClGX14Ja.js → ui/assets/material-theme-ocean.js} +0 -0
- /package/dist/{overlay/assets/material-theme-palenight-C1RVm8K1.js → ui/assets/material-theme-palenight.js} +0 -0
- /package/dist/{overlay/assets/material-theme-D6KBX41T.js → ui/assets/material-theme.js} +0 -0
- /package/dist/{overlay/assets/mdx-BOhZZUJ8.js → ui/assets/mdx.js} +0 -0
- /package/dist/{overlay/assets/min-dark-C7ak0t6c.js → ui/assets/min-dark.js} +0 -0
- /package/dist/{overlay/assets/min-light-CKFxVcPp.js → ui/assets/min-light.js} +0 -0
- /package/dist/{overlay/assets/monokai-C1KBYcO0.js → ui/assets/monokai.js} +0 -0
- /package/dist/{overlay/assets/night-owl-Bm2rzalh.js → ui/assets/night-owl.js} +0 -0
- /package/dist/{overlay/assets/nord-CC5OiUXg.js → ui/assets/nord.js} +0 -0
- /package/dist/{overlay/assets/one-dark-pro-DTA3VF0_.js → ui/assets/one-dark-pro.js} +0 -0
- /package/dist/{overlay/assets/one-light-D9sNaUtq.js → ui/assets/one-light.js} +0 -0
- /package/dist/{overlay/assets/plastic-CSTz3KZp.js → ui/assets/plastic.js} +0 -0
- /package/dist/{overlay/assets/poimandres-C-VADXHD.js → ui/assets/poimandres.js} +0 -0
- /package/dist/{overlay/assets/postcss-05aHdL-n.js → ui/assets/postcss.js} +0 -0
- /package/dist/{overlay/assets/python-BFNSHbwJ.js → ui/assets/python.js} +0 -0
- /package/dist/{overlay/assets/r-Bm0uF0U2.js → ui/assets/r.js} +0 -0
- /package/dist/{overlay/assets/red-7y8PH7HH.js → ui/assets/red.js} +0 -0
- /package/dist/{overlay/assets/regexp-BazyLpPg.js → ui/assets/regexp.js} +0 -0
- /package/dist/{overlay/assets/rose-pine-dawn-ClRRUdXX.js → ui/assets/rose-pine-dawn.js} +0 -0
- /package/dist/{overlay/assets/rose-pine-moon-ucNn3Gm8.js → ui/assets/rose-pine-moon.js} +0 -0
- /package/dist/{overlay/assets/rose-pine-Cr4kwgAY.js → ui/assets/rose-pine.js} +0 -0
- /package/dist/{overlay/assets/sass-DxHp5rTx.js → ui/assets/sass.js} +0 -0
- /package/dist/{overlay/assets/shellscript-InADTalH.js → ui/assets/shellscript.js} +0 -0
- /package/dist/{overlay/assets/slack-dark-i7wN4OET.js → ui/assets/slack-dark.js} +0 -0
- /package/dist/{overlay/assets/slack-ochin-ndHf0LoP.js → ui/assets/slack-ochin.js} +0 -0
- /package/dist/{overlay/assets/snazzy-light-BlSJXAu4.js → ui/assets/snazzy-light.js} +0 -0
- /package/dist/{overlay/assets/solarized-dark-UTmkh7lw.js → ui/assets/solarized-dark.js} +0 -0
- /package/dist/{overlay/assets/solarized-light-BheCkDPT.js → ui/assets/solarized-light.js} +0 -0
- /package/dist/{overlay/assets/sql-Cn_v3PB0.js → ui/assets/sql.js} +0 -0
- /package/dist/{overlay/assets/stylus-CyKEU1Ej.js → ui/assets/stylus.js} +0 -0
- /package/dist/{overlay/assets/synthwave-84-NU3C_KFZ.js → ui/assets/synthwave-84.js} +0 -0
- /package/dist/{overlay/assets/tokyo-night-DP4TmcQl.js → ui/assets/tokyo-night.js} +0 -0
- /package/dist/{overlay/assets/tsx-B8rCNbgL.js → ui/assets/tsx.js} +0 -0
- /package/dist/{overlay/assets/typescript-mg6ATTE8.js → ui/assets/typescript.js} +0 -0
- /package/dist/{overlay/assets/vesper-BckBta1U.js → ui/assets/vesper.js} +0 -0
- /package/dist/{overlay/assets/vitesse-black-BoGvW84i.js → ui/assets/vitesse-black.js} +0 -0
- /package/dist/{overlay/assets/vitesse-dark-Cym-eLtO.js → ui/assets/vitesse-dark.js} +0 -0
- /package/dist/{overlay/assets/vitesse-light-CcmG315c.js → ui/assets/vitesse-light.js} +0 -0
- /package/dist/{overlay/assets/wasm-BBXxrAl7.js → ui/assets/wasm.js} +0 -0
- /package/dist/{overlay/assets/wasm-DQxwEHae.js → ui/assets/wasm2.js} +0 -0
- /package/dist/{overlay/assets/wgsl-DY4iK1q1.js → ui/assets/wgsl.js} +0 -0
- /package/dist/{overlay/assets/wit-CQMQOlTg.js → ui/assets/wit.js} +0 -0
- /package/dist/{overlay/assets/yaml-DaO7k5B1.js → ui/assets/yaml.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.js","sources":["../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js"],"sourcesContent":["import { Server } from \"./index.js\";\nimport { zodToJsonSchema } from \"zod-to-json-schema\";\nimport { z, } from \"zod\";\nimport { McpError, ErrorCode, ListResourceTemplatesRequestSchema, ReadResourceRequestSchema, ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, CompleteRequestSchema, } from \"../types.js\";\nimport { Completable } from \"./completable.js\";\nimport { UriTemplate } from \"../shared/uriTemplate.js\";\n/**\n * High-level MCP server that provides a simpler API for working with resources, tools, and prompts.\n * For advanced usage (like sending notifications or setting custom request handlers), use the underlying\n * Server instance available via the `server` property.\n */\nexport class McpServer {\n constructor(serverInfo, options) {\n this._registeredResources = {};\n this._registeredResourceTemplates = {};\n this._registeredTools = {};\n this._registeredPrompts = {};\n this._toolHandlersInitialized = false;\n this._completionHandlerInitialized = false;\n this._resourceHandlersInitialized = false;\n this._promptHandlersInitialized = false;\n this.server = new Server(serverInfo, options);\n }\n /**\n * Attaches to the given transport, starts it, and starts listening for messages.\n *\n * The `server` object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.\n */\n async connect(transport) {\n return await this.server.connect(transport);\n }\n /**\n * Closes the connection.\n */\n async close() {\n await this.server.close();\n }\n setToolRequestHandlers() {\n if (this._toolHandlersInitialized) {\n return;\n }\n this.server.assertCanSetRequestHandler(ListToolsRequestSchema.shape.method.value);\n this.server.assertCanSetRequestHandler(CallToolRequestSchema.shape.method.value);\n this.server.registerCapabilities({\n tools: {\n listChanged: true\n }\n });\n this.server.setRequestHandler(ListToolsRequestSchema, () => ({\n tools: Object.entries(this._registeredTools).filter(([, tool]) => tool.enabled).map(([name, tool]) => {\n const toolDefinition = {\n name,\n title: tool.title,\n description: tool.description,\n inputSchema: tool.inputSchema\n ? zodToJsonSchema(tool.inputSchema, {\n strictUnions: true,\n })\n : EMPTY_OBJECT_JSON_SCHEMA,\n annotations: tool.annotations,\n };\n if (tool.outputSchema) {\n toolDefinition.outputSchema = zodToJsonSchema(tool.outputSchema, { strictUnions: true });\n }\n return toolDefinition;\n }),\n }));\n this.server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {\n const tool = this._registeredTools[request.params.name];\n if (!tool) {\n throw new McpError(ErrorCode.InvalidParams, `Tool ${request.params.name} not found`);\n }\n if (!tool.enabled) {\n throw new McpError(ErrorCode.InvalidParams, `Tool ${request.params.name} disabled`);\n }\n let result;\n if (tool.inputSchema) {\n const parseResult = await tool.inputSchema.safeParseAsync(request.params.arguments);\n if (!parseResult.success) {\n throw new McpError(ErrorCode.InvalidParams, `Invalid arguments for tool ${request.params.name}: ${parseResult.error.message}`);\n }\n const args = parseResult.data;\n const cb = tool.callback;\n try {\n result = await Promise.resolve(cb(args, extra));\n }\n catch (error) {\n result = {\n content: [\n {\n type: \"text\",\n text: error instanceof Error ? error.message : String(error),\n },\n ],\n isError: true,\n };\n }\n }\n else {\n const cb = tool.callback;\n try {\n result = await Promise.resolve(cb(extra));\n }\n catch (error) {\n result = {\n content: [\n {\n type: \"text\",\n text: error instanceof Error ? error.message : String(error),\n },\n ],\n isError: true,\n };\n }\n }\n if (tool.outputSchema && !result.isError) {\n if (!result.structuredContent) {\n throw new McpError(ErrorCode.InvalidParams, `Tool ${request.params.name} has an output schema but no structured content was provided`);\n }\n // if the tool has an output schema, validate structured content\n const parseResult = await tool.outputSchema.safeParseAsync(result.structuredContent);\n if (!parseResult.success) {\n throw new McpError(ErrorCode.InvalidParams, `Invalid structured content for tool ${request.params.name}: ${parseResult.error.message}`);\n }\n }\n return result;\n });\n this._toolHandlersInitialized = true;\n }\n setCompletionRequestHandler() {\n if (this._completionHandlerInitialized) {\n return;\n }\n this.server.assertCanSetRequestHandler(CompleteRequestSchema.shape.method.value);\n this.server.registerCapabilities({\n completions: {},\n });\n this.server.setRequestHandler(CompleteRequestSchema, async (request) => {\n switch (request.params.ref.type) {\n case \"ref/prompt\":\n return this.handlePromptCompletion(request, request.params.ref);\n case \"ref/resource\":\n return this.handleResourceCompletion(request, request.params.ref);\n default:\n throw new McpError(ErrorCode.InvalidParams, `Invalid completion reference: ${request.params.ref}`);\n }\n });\n this._completionHandlerInitialized = true;\n }\n async handlePromptCompletion(request, ref) {\n const prompt = this._registeredPrompts[ref.name];\n if (!prompt) {\n throw new McpError(ErrorCode.InvalidParams, `Prompt ${ref.name} not found`);\n }\n if (!prompt.enabled) {\n throw new McpError(ErrorCode.InvalidParams, `Prompt ${ref.name} disabled`);\n }\n if (!prompt.argsSchema) {\n return EMPTY_COMPLETION_RESULT;\n }\n const field = prompt.argsSchema.shape[request.params.argument.name];\n if (!(field instanceof Completable)) {\n return EMPTY_COMPLETION_RESULT;\n }\n const def = field._def;\n const suggestions = await def.complete(request.params.argument.value, request.params.context);\n return createCompletionResult(suggestions);\n }\n async handleResourceCompletion(request, ref) {\n const template = Object.values(this._registeredResourceTemplates).find((t) => t.resourceTemplate.uriTemplate.toString() === ref.uri);\n if (!template) {\n if (this._registeredResources[ref.uri]) {\n // Attempting to autocomplete a fixed resource URI is not an error in the spec (but probably should be).\n return EMPTY_COMPLETION_RESULT;\n }\n throw new McpError(ErrorCode.InvalidParams, `Resource template ${request.params.ref.uri} not found`);\n }\n const completer = template.resourceTemplate.completeCallback(request.params.argument.name);\n if (!completer) {\n return EMPTY_COMPLETION_RESULT;\n }\n const suggestions = await completer(request.params.argument.value, request.params.context);\n return createCompletionResult(suggestions);\n }\n setResourceRequestHandlers() {\n if (this._resourceHandlersInitialized) {\n return;\n }\n this.server.assertCanSetRequestHandler(ListResourcesRequestSchema.shape.method.value);\n this.server.assertCanSetRequestHandler(ListResourceTemplatesRequestSchema.shape.method.value);\n this.server.assertCanSetRequestHandler(ReadResourceRequestSchema.shape.method.value);\n this.server.registerCapabilities({\n resources: {\n listChanged: true\n }\n });\n this.server.setRequestHandler(ListResourcesRequestSchema, async (request, extra) => {\n const resources = Object.entries(this._registeredResources).filter(([_, resource]) => resource.enabled).map(([uri, resource]) => ({\n uri,\n name: resource.name,\n ...resource.metadata,\n }));\n const templateResources = [];\n for (const template of Object.values(this._registeredResourceTemplates)) {\n if (!template.resourceTemplate.listCallback) {\n continue;\n }\n const result = await template.resourceTemplate.listCallback(extra);\n for (const resource of result.resources) {\n templateResources.push({\n ...template.metadata,\n // the defined resource metadata should override the template metadata if present\n ...resource,\n });\n }\n }\n return { resources: [...resources, ...templateResources] };\n });\n this.server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => {\n const resourceTemplates = Object.entries(this._registeredResourceTemplates).map(([name, template]) => ({\n name,\n uriTemplate: template.resourceTemplate.uriTemplate.toString(),\n ...template.metadata,\n }));\n return { resourceTemplates };\n });\n this.server.setRequestHandler(ReadResourceRequestSchema, async (request, extra) => {\n const uri = new URL(request.params.uri);\n // First check for exact resource match\n const resource = this._registeredResources[uri.toString()];\n if (resource) {\n if (!resource.enabled) {\n throw new McpError(ErrorCode.InvalidParams, `Resource ${uri} disabled`);\n }\n return resource.readCallback(uri, extra);\n }\n // Then check templates\n for (const template of Object.values(this._registeredResourceTemplates)) {\n const variables = template.resourceTemplate.uriTemplate.match(uri.toString());\n if (variables) {\n return template.readCallback(uri, variables, extra);\n }\n }\n throw new McpError(ErrorCode.InvalidParams, `Resource ${uri} not found`);\n });\n this.setCompletionRequestHandler();\n this._resourceHandlersInitialized = true;\n }\n setPromptRequestHandlers() {\n if (this._promptHandlersInitialized) {\n return;\n }\n this.server.assertCanSetRequestHandler(ListPromptsRequestSchema.shape.method.value);\n this.server.assertCanSetRequestHandler(GetPromptRequestSchema.shape.method.value);\n this.server.registerCapabilities({\n prompts: {\n listChanged: true\n }\n });\n this.server.setRequestHandler(ListPromptsRequestSchema, () => ({\n prompts: Object.entries(this._registeredPrompts).filter(([, prompt]) => prompt.enabled).map(([name, prompt]) => {\n return {\n name,\n title: prompt.title,\n description: prompt.description,\n arguments: prompt.argsSchema\n ? promptArgumentsFromSchema(prompt.argsSchema)\n : undefined,\n };\n }),\n }));\n this.server.setRequestHandler(GetPromptRequestSchema, async (request, extra) => {\n const prompt = this._registeredPrompts[request.params.name];\n if (!prompt) {\n throw new McpError(ErrorCode.InvalidParams, `Prompt ${request.params.name} not found`);\n }\n if (!prompt.enabled) {\n throw new McpError(ErrorCode.InvalidParams, `Prompt ${request.params.name} disabled`);\n }\n if (prompt.argsSchema) {\n const parseResult = await prompt.argsSchema.safeParseAsync(request.params.arguments);\n if (!parseResult.success) {\n throw new McpError(ErrorCode.InvalidParams, `Invalid arguments for prompt ${request.params.name}: ${parseResult.error.message}`);\n }\n const args = parseResult.data;\n const cb = prompt.callback;\n return await Promise.resolve(cb(args, extra));\n }\n else {\n const cb = prompt.callback;\n return await Promise.resolve(cb(extra));\n }\n });\n this.setCompletionRequestHandler();\n this._promptHandlersInitialized = true;\n }\n resource(name, uriOrTemplate, ...rest) {\n let metadata;\n if (typeof rest[0] === \"object\") {\n metadata = rest.shift();\n }\n const readCallback = rest[0];\n if (typeof uriOrTemplate === \"string\") {\n if (this._registeredResources[uriOrTemplate]) {\n throw new Error(`Resource ${uriOrTemplate} is already registered`);\n }\n const registeredResource = this._createRegisteredResource(name, undefined, uriOrTemplate, metadata, readCallback);\n this.setResourceRequestHandlers();\n this.sendResourceListChanged();\n return registeredResource;\n }\n else {\n if (this._registeredResourceTemplates[name]) {\n throw new Error(`Resource template ${name} is already registered`);\n }\n const registeredResourceTemplate = this._createRegisteredResourceTemplate(name, undefined, uriOrTemplate, metadata, readCallback);\n this.setResourceRequestHandlers();\n this.sendResourceListChanged();\n return registeredResourceTemplate;\n }\n }\n registerResource(name, uriOrTemplate, config, readCallback) {\n if (typeof uriOrTemplate === \"string\") {\n if (this._registeredResources[uriOrTemplate]) {\n throw new Error(`Resource ${uriOrTemplate} is already registered`);\n }\n const registeredResource = this._createRegisteredResource(name, config.title, uriOrTemplate, config, readCallback);\n this.setResourceRequestHandlers();\n this.sendResourceListChanged();\n return registeredResource;\n }\n else {\n if (this._registeredResourceTemplates[name]) {\n throw new Error(`Resource template ${name} is already registered`);\n }\n const registeredResourceTemplate = this._createRegisteredResourceTemplate(name, config.title, uriOrTemplate, config, readCallback);\n this.setResourceRequestHandlers();\n this.sendResourceListChanged();\n return registeredResourceTemplate;\n }\n }\n _createRegisteredResource(name, title, uri, metadata, readCallback) {\n const registeredResource = {\n name,\n title,\n metadata,\n readCallback,\n enabled: true,\n disable: () => registeredResource.update({ enabled: false }),\n enable: () => registeredResource.update({ enabled: true }),\n remove: () => registeredResource.update({ uri: null }),\n update: (updates) => {\n if (typeof updates.uri !== \"undefined\" && updates.uri !== uri) {\n delete this._registeredResources[uri];\n if (updates.uri)\n this._registeredResources[updates.uri] = registeredResource;\n }\n if (typeof updates.name !== \"undefined\")\n registeredResource.name = updates.name;\n if (typeof updates.title !== \"undefined\")\n registeredResource.title = updates.title;\n if (typeof updates.metadata !== \"undefined\")\n registeredResource.metadata = updates.metadata;\n if (typeof updates.callback !== \"undefined\")\n registeredResource.readCallback = updates.callback;\n if (typeof updates.enabled !== \"undefined\")\n registeredResource.enabled = updates.enabled;\n this.sendResourceListChanged();\n },\n };\n this._registeredResources[uri] = registeredResource;\n return registeredResource;\n }\n _createRegisteredResourceTemplate(name, title, template, metadata, readCallback) {\n const registeredResourceTemplate = {\n resourceTemplate: template,\n title,\n metadata,\n readCallback,\n enabled: true,\n disable: () => registeredResourceTemplate.update({ enabled: false }),\n enable: () => registeredResourceTemplate.update({ enabled: true }),\n remove: () => registeredResourceTemplate.update({ name: null }),\n update: (updates) => {\n if (typeof updates.name !== \"undefined\" && updates.name !== name) {\n delete this._registeredResourceTemplates[name];\n if (updates.name)\n this._registeredResourceTemplates[updates.name] = registeredResourceTemplate;\n }\n if (typeof updates.title !== \"undefined\")\n registeredResourceTemplate.title = updates.title;\n if (typeof updates.template !== \"undefined\")\n registeredResourceTemplate.resourceTemplate = updates.template;\n if (typeof updates.metadata !== \"undefined\")\n registeredResourceTemplate.metadata = updates.metadata;\n if (typeof updates.callback !== \"undefined\")\n registeredResourceTemplate.readCallback = updates.callback;\n if (typeof updates.enabled !== \"undefined\")\n registeredResourceTemplate.enabled = updates.enabled;\n this.sendResourceListChanged();\n },\n };\n this._registeredResourceTemplates[name] = registeredResourceTemplate;\n return registeredResourceTemplate;\n }\n _createRegisteredPrompt(name, title, description, argsSchema, callback) {\n const registeredPrompt = {\n title,\n description,\n argsSchema: argsSchema === undefined ? undefined : z.object(argsSchema),\n callback,\n enabled: true,\n disable: () => registeredPrompt.update({ enabled: false }),\n enable: () => registeredPrompt.update({ enabled: true }),\n remove: () => registeredPrompt.update({ name: null }),\n update: (updates) => {\n if (typeof updates.name !== \"undefined\" && updates.name !== name) {\n delete this._registeredPrompts[name];\n if (updates.name)\n this._registeredPrompts[updates.name] = registeredPrompt;\n }\n if (typeof updates.title !== \"undefined\")\n registeredPrompt.title = updates.title;\n if (typeof updates.description !== \"undefined\")\n registeredPrompt.description = updates.description;\n if (typeof updates.argsSchema !== \"undefined\")\n registeredPrompt.argsSchema = z.object(updates.argsSchema);\n if (typeof updates.callback !== \"undefined\")\n registeredPrompt.callback = updates.callback;\n if (typeof updates.enabled !== \"undefined\")\n registeredPrompt.enabled = updates.enabled;\n this.sendPromptListChanged();\n },\n };\n this._registeredPrompts[name] = registeredPrompt;\n return registeredPrompt;\n }\n _createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, callback) {\n const registeredTool = {\n title,\n description,\n inputSchema: inputSchema === undefined ? undefined : z.object(inputSchema),\n outputSchema: outputSchema === undefined ? undefined : z.object(outputSchema),\n annotations,\n callback,\n enabled: true,\n disable: () => registeredTool.update({ enabled: false }),\n enable: () => registeredTool.update({ enabled: true }),\n remove: () => registeredTool.update({ name: null }),\n update: (updates) => {\n if (typeof updates.name !== \"undefined\" && updates.name !== name) {\n delete this._registeredTools[name];\n if (updates.name)\n this._registeredTools[updates.name] = registeredTool;\n }\n if (typeof updates.title !== \"undefined\")\n registeredTool.title = updates.title;\n if (typeof updates.description !== \"undefined\")\n registeredTool.description = updates.description;\n if (typeof updates.paramsSchema !== \"undefined\")\n registeredTool.inputSchema = z.object(updates.paramsSchema);\n if (typeof updates.callback !== \"undefined\")\n registeredTool.callback = updates.callback;\n if (typeof updates.annotations !== \"undefined\")\n registeredTool.annotations = updates.annotations;\n if (typeof updates.enabled !== \"undefined\")\n registeredTool.enabled = updates.enabled;\n this.sendToolListChanged();\n },\n };\n this._registeredTools[name] = registeredTool;\n this.setToolRequestHandlers();\n this.sendToolListChanged();\n return registeredTool;\n }\n /**\n * tool() implementation. Parses arguments passed to overrides defined above.\n */\n tool(name, ...rest) {\n if (this._registeredTools[name]) {\n throw new Error(`Tool ${name} is already registered`);\n }\n let description;\n let inputSchema;\n let outputSchema;\n let annotations;\n // Tool properties are passed as separate arguments, with omissions allowed.\n // Support for this style is frozen as of protocol version 2025-03-26. Future additions\n // to tool definition should *NOT* be added.\n if (typeof rest[0] === \"string\") {\n description = rest.shift();\n }\n // Handle the different overload combinations\n if (rest.length > 1) {\n // We have at least one more arg before the callback\n const firstArg = rest[0];\n if (isZodRawShape(firstArg)) {\n // We have a params schema as the first arg\n inputSchema = rest.shift();\n // Check if the next arg is potentially annotations\n if (rest.length > 1 && typeof rest[0] === \"object\" && rest[0] !== null && !(isZodRawShape(rest[0]))) {\n // Case: tool(name, paramsSchema, annotations, cb)\n // Or: tool(name, description, paramsSchema, annotations, cb)\n annotations = rest.shift();\n }\n }\n else if (typeof firstArg === \"object\" && firstArg !== null) {\n // Not a ZodRawShape, so must be annotations in this position\n // Case: tool(name, annotations, cb)\n // Or: tool(name, description, annotations, cb)\n annotations = rest.shift();\n }\n }\n const callback = rest[0];\n return this._createRegisteredTool(name, undefined, description, inputSchema, outputSchema, annotations, callback);\n }\n /**\n * Registers a tool with a config object and callback.\n */\n registerTool(name, config, cb) {\n if (this._registeredTools[name]) {\n throw new Error(`Tool ${name} is already registered`);\n }\n const { title, description, inputSchema, outputSchema, annotations } = config;\n return this._createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, cb);\n }\n prompt(name, ...rest) {\n if (this._registeredPrompts[name]) {\n throw new Error(`Prompt ${name} is already registered`);\n }\n let description;\n if (typeof rest[0] === \"string\") {\n description = rest.shift();\n }\n let argsSchema;\n if (rest.length > 1) {\n argsSchema = rest.shift();\n }\n const cb = rest[0];\n const registeredPrompt = this._createRegisteredPrompt(name, undefined, description, argsSchema, cb);\n this.setPromptRequestHandlers();\n this.sendPromptListChanged();\n return registeredPrompt;\n }\n /**\n * Registers a prompt with a config object and callback.\n */\n registerPrompt(name, config, cb) {\n if (this._registeredPrompts[name]) {\n throw new Error(`Prompt ${name} is already registered`);\n }\n const { title, description, argsSchema } = config;\n const registeredPrompt = this._createRegisteredPrompt(name, title, description, argsSchema, cb);\n this.setPromptRequestHandlers();\n this.sendPromptListChanged();\n return registeredPrompt;\n }\n /**\n * Checks if the server is connected to a transport.\n * @returns True if the server is connected\n */\n isConnected() {\n return this.server.transport !== undefined;\n }\n /**\n * Sends a resource list changed event to the client, if connected.\n */\n sendResourceListChanged() {\n if (this.isConnected()) {\n this.server.sendResourceListChanged();\n }\n }\n /**\n * Sends a tool list changed event to the client, if connected.\n */\n sendToolListChanged() {\n if (this.isConnected()) {\n this.server.sendToolListChanged();\n }\n }\n /**\n * Sends a prompt list changed event to the client, if connected.\n */\n sendPromptListChanged() {\n if (this.isConnected()) {\n this.server.sendPromptListChanged();\n }\n }\n}\n/**\n * A resource template combines a URI pattern with optional functionality to enumerate\n * all resources matching that pattern.\n */\nexport class ResourceTemplate {\n constructor(uriTemplate, _callbacks) {\n this._callbacks = _callbacks;\n this._uriTemplate =\n typeof uriTemplate === \"string\"\n ? new UriTemplate(uriTemplate)\n : uriTemplate;\n }\n /**\n * Gets the URI template pattern.\n */\n get uriTemplate() {\n return this._uriTemplate;\n }\n /**\n * Gets the list callback, if one was provided.\n */\n get listCallback() {\n return this._callbacks.list;\n }\n /**\n * Gets the callback for completing a specific URI template variable, if one was provided.\n */\n completeCallback(variable) {\n var _a;\n return (_a = this._callbacks.complete) === null || _a === void 0 ? void 0 : _a[variable];\n }\n}\nconst EMPTY_OBJECT_JSON_SCHEMA = {\n type: \"object\",\n properties: {},\n};\n// Helper to check if an object is a Zod schema (ZodRawShape)\nfunction isZodRawShape(obj) {\n if (typeof obj !== \"object\" || obj === null)\n return false;\n const isEmptyObject = Object.keys(obj).length === 0;\n // Check if object is empty or at least one property is a ZodType instance\n // Note: use heuristic check to avoid instanceof failure across different Zod versions\n return isEmptyObject || Object.values(obj).some(isZodTypeLike);\n}\nfunction isZodTypeLike(value) {\n return value !== null &&\n typeof value === 'object' &&\n 'parse' in value && typeof value.parse === 'function' &&\n 'safeParse' in value && typeof value.safeParse === 'function';\n}\nfunction promptArgumentsFromSchema(schema) {\n return Object.entries(schema.shape).map(([name, field]) => ({\n name,\n description: field.description,\n required: !field.isOptional(),\n }));\n}\nfunction createCompletionResult(suggestions) {\n return {\n completion: {\n values: suggestions.slice(0, 100),\n total: suggestions.length,\n hasMore: suggestions.length > 100,\n },\n };\n}\nconst EMPTY_COMPLETION_RESULT = {\n completion: {\n values: [],\n hasMore: false,\n },\n};\n//# sourceMappingURL=mcp.js.map"],"names":[],"mappings":";;;;;;AAWO,MAAM,UAAU;AAAA,EACnB,YAAY,YAAY,SAAS;AAC7B,SAAK,uBAAuB,CAAA;AAC5B,SAAK,+BAA+B,CAAA;AACpC,SAAK,mBAAmB,CAAA;AACxB,SAAK,qBAAqB,CAAA;AAC1B,SAAK,2BAA2B;AAChC,SAAK,gCAAgC;AACrC,SAAK,+BAA+B;AACpC,SAAK,6BAA6B;AAClC,SAAK,SAAS,IAAI,OAAO,YAAY,OAAO;AAAA,EAChD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,QAAQ,WAAW;AACrB,WAAO,MAAM,KAAK,OAAO,QAAQ,SAAS;AAAA,EAC9C;AAAA;AAAA;AAAA;AAAA,E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;AAAA;AAAA,EAIA,sBAAsB;AAClB,QAAI,KAAK,eAAe;AACpB,WAAK,OAAO,oBAAmB;AAAA,IACnC;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAIA,wBAAwB;AACpB,QAAI,KAAK,eAAe;AACpB,WAAK,OAAO,sBAAqB;AAAA,IACrC;AAAA,EACJ;AACJ;AAiCA,MAAM,2BAA2B;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY,CAAA;AAChB;AAEA,SAAS,cAAc,KAAK;AACxB,MAAI,OAAO,QAAQ,YAAY,QAAQ;AACnC,WAAO;AACX,QAAM,gBAAgB,OAAO,KAAK,GAAG,EAAE,WAAW;AAGlD,SAAO,iBAAiB,OAAO,OAAO,GAAG,EAAE,KAAK,aAAa;AACjE;AACA,SAAS,cAAc,OAAO;AAC1B,SAAO,UAAU,QACb,OAAO,UAAU,YACjB,WAAW,SAAS,OAAO,MAAM,UAAU,cAC3C,eAAe,SAAS,OAAO,MAAM,cAAc;AAC3D;AACA,SAAS,0BAA0B,QAAQ;AACvC,SAAO,OAAO,QAAQ,OAAO,KAAK,EAAE,IAAI,CAAC,CAAC,MAAM,KAAK,OAAO;AAAA,IACxD;AAAA,IACA,aAAa,MAAM;AAAA,IACnB,UAAU,CAAC,MAAM,WAAU;AAAA,EACnC,EAAM;AACN;AACA,SAAS,uBAAuB,aAAa;AACzC,SAAO;AAAA,IACH,YAAY;AAAA,MACR,QAAQ,YAAY,MAAM,GAAG,GAAG;AAAA,MAChC,OAAO,YAAY;AAAA,MACnB,SAAS,YAAY,SAAS;AAAA,IAC1C;AAAA,EACA;AACA;AACA,MAAM,0BAA0B;AAAA,EAC5B,YAAY;AAAA,IACR,QAAQ,CAAA;AAAA,IACR,SAAS;AAAA,EACjB;AACA;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import process from "node:process";
|
|
2
|
+
import { ReadBuffer, serializeMessage } from "../shared/stdio.js";
|
|
3
|
+
class StdioServerTransport {
|
|
4
|
+
constructor(_stdin = process.stdin, _stdout = process.stdout) {
|
|
5
|
+
this._stdin = _stdin;
|
|
6
|
+
this._stdout = _stdout;
|
|
7
|
+
this._readBuffer = new ReadBuffer();
|
|
8
|
+
this._started = false;
|
|
9
|
+
this._ondata = (chunk) => {
|
|
10
|
+
this._readBuffer.append(chunk);
|
|
11
|
+
this.processReadBuffer();
|
|
12
|
+
};
|
|
13
|
+
this._onerror = (error) => {
|
|
14
|
+
var _a;
|
|
15
|
+
(_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Starts listening for messages on stdin.
|
|
20
|
+
*/
|
|
21
|
+
async start() {
|
|
22
|
+
if (this._started) {
|
|
23
|
+
throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");
|
|
24
|
+
}
|
|
25
|
+
this._started = true;
|
|
26
|
+
this._stdin.on("data", this._ondata);
|
|
27
|
+
this._stdin.on("error", this._onerror);
|
|
28
|
+
}
|
|
29
|
+
processReadBuffer() {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
while (true) {
|
|
32
|
+
try {
|
|
33
|
+
const message = this._readBuffer.readMessage();
|
|
34
|
+
if (message === null) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
(_a = this.onmessage) === null || _a === void 0 ? void 0 : _a.call(this, message);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
(_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
async close() {
|
|
44
|
+
var _a;
|
|
45
|
+
this._stdin.off("data", this._ondata);
|
|
46
|
+
this._stdin.off("error", this._onerror);
|
|
47
|
+
const remainingDataListeners = this._stdin.listenerCount("data");
|
|
48
|
+
if (remainingDataListeners === 0) {
|
|
49
|
+
this._stdin.pause();
|
|
50
|
+
}
|
|
51
|
+
this._readBuffer.clear();
|
|
52
|
+
(_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
53
|
+
}
|
|
54
|
+
send(message) {
|
|
55
|
+
return new Promise((resolve) => {
|
|
56
|
+
const json = serializeMessage(message);
|
|
57
|
+
if (this._stdout.write(json)) {
|
|
58
|
+
resolve();
|
|
59
|
+
} else {
|
|
60
|
+
this._stdout.once("drain", resolve);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
StdioServerTransport
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.js","sources":["../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js"],"sourcesContent":["import process from \"node:process\";\nimport { ReadBuffer, serializeMessage } from \"../shared/stdio.js\";\n/**\n * Server transport for stdio: this communicates with a MCP client by reading from the current process' stdin and writing to stdout.\n *\n * This transport is only available in Node.js environments.\n */\nexport class StdioServerTransport {\n constructor(_stdin = process.stdin, _stdout = process.stdout) {\n this._stdin = _stdin;\n this._stdout = _stdout;\n this._readBuffer = new ReadBuffer();\n this._started = false;\n // Arrow functions to bind `this` properly, while maintaining function identity.\n this._ondata = (chunk) => {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n };\n this._onerror = (error) => {\n var _a;\n (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);\n };\n }\n /**\n * Starts listening for messages on stdin.\n */\n async start() {\n if (this._started) {\n throw new Error(\"StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.\");\n }\n this._started = true;\n this._stdin.on(\"data\", this._ondata);\n this._stdin.on(\"error\", this._onerror);\n }\n processReadBuffer() {\n var _a, _b;\n while (true) {\n try {\n const message = this._readBuffer.readMessage();\n if (message === null) {\n break;\n }\n (_a = this.onmessage) === null || _a === void 0 ? void 0 : _a.call(this, message);\n }\n catch (error) {\n (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error);\n }\n }\n }\n async close() {\n var _a;\n // Remove our event listeners first\n this._stdin.off(\"data\", this._ondata);\n this._stdin.off(\"error\", this._onerror);\n // Check if we were the only data listener\n const remainingDataListeners = this._stdin.listenerCount('data');\n if (remainingDataListeners === 0) {\n // Only pause stdin if we were the only listener\n // This prevents interfering with other parts of the application that might be using stdin\n this._stdin.pause();\n }\n // Clear the buffer and notify closure\n this._readBuffer.clear();\n (_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n send(message) {\n return new Promise((resolve) => {\n const json = serializeMessage(message);\n if (this._stdout.write(json)) {\n resolve();\n }\n else {\n this._stdout.once(\"drain\", resolve);\n }\n });\n }\n}\n//# sourceMappingURL=stdio.js.map"],"names":[],"mappings":";;AAOO,MAAM,qBAAqB;AAAA,EAC9B,YAAY,SAAS,QAAQ,OAAO,UAAU,QAAQ,QAAQ;AAC1D,SAAK,SAAS;AACd,SAAK,UAAU;AACf,SAAK,cAAc,IAAI,WAAU;AACjC,SAAK,WAAW;AAEhB,SAAK,UAAU,CAAC,UAAU;AACtB,WAAK,YAAY,OAAO,KAAK;AAC7B,WAAK,kBAAiB;AAAA,IAC1B;AACA,SAAK,WAAW,CAAC,UAAU;AACvB,UAAI;AACJ,OAAC,KAAK,KAAK,aAAa,QAAQ,OAAO,SAAS,SAAS,GAAG,KAAK,MAAM,KAAK;AAAA,IAChF;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAIA,MAAM,QAAQ;AACV,QAAI,KAAK,UAAU;AACf,YAAM,IAAI,MAAM,+GAA+G;AAAA,IACnI;AACA,SAAK,WAAW;AAChB,SAAK,OAAO,GAAG,QAAQ,KAAK,OAAO;AACnC,SAAK,OAAO,GAAG,SAAS,KAAK,QAAQ;AAAA,EACzC;AAAA,EACA,oBAAoB;AAChB,QAAI,IAAI;AACR,WAAO,MAAM;AACT,UAAI;AACA,cAAM,UAAU,KAAK,YAAY,YAAW;AAC5C,YAAI,YAAY,MAAM;AAClB;AAAA,QACJ;AACA,SAAC,KAAK,KAAK,eAAe,QAAQ,OAAO,SAAS,SAAS,GAAG,KAAK,MAAM,OAAO;AAAA,MACpF,SACO,OAAO;AACV,SAAC,KAAK,KAAK,aAAa,QAAQ,OAAO,SAAS,SAAS,GAAG,KAAK,MAAM,KAAK;AAAA,MAChF;AAAA,IACJ;AAAA,EACJ;AAAA,EACA,MAAM,QAAQ;AACV,QAAI;AAEJ,SAAK,OAAO,IAAI,QAAQ,KAAK,OAAO;AACpC,SAAK,OAAO,IAAI,SAAS,KAAK,QAAQ;AAEtC,UAAM,yBAAyB,KAAK,OAAO,cAAc,MAAM;AAC/D,QAAI,2BAA2B,GAAG;AAG9B,WAAK,OAAO,MAAK;AAAA,IACrB;AAEA,SAAK,YAAY,MAAK;AACtB,KAAC,KAAK,KAAK,aAAa,QAAQ,OAAO,SAAS,SAAS,GAAG,KAAK,IAAI;AAAA,EACzE;AAAA,EACA,KAAK,SAAS;AACV,WAAO,IAAI,QAAQ,CAAC,YAAY;AAC5B,YAAM,OAAO,iBAAiB,OAAO;AACrC,UAAI,KAAK,QAAQ,MAAM,IAAI,GAAG;AAC1B,gBAAO;AAAA,MACX,OACK;AACD,aAAK,QAAQ,KAAK,SAAS,OAAO;AAAA,MACtC;AAAA,IACJ,CAAC;AAAA,EACL;AACJ;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { CancelledNotificationSchema, ProgressNotificationSchema, PingRequestSchema, McpError, ErrorCode, isJSONRPCResponse, isJSONRPCError, isJSONRPCRequest, isJSONRPCNotification } from "../types.js";
|
|
2
|
+
const DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
|
|
3
|
+
class Protocol {
|
|
4
|
+
constructor(_options) {
|
|
5
|
+
this._options = _options;
|
|
6
|
+
this._requestMessageId = 0;
|
|
7
|
+
this._requestHandlers = /* @__PURE__ */ new Map();
|
|
8
|
+
this._requestHandlerAbortControllers = /* @__PURE__ */ new Map();
|
|
9
|
+
this._notificationHandlers = /* @__PURE__ */ new Map();
|
|
10
|
+
this._responseHandlers = /* @__PURE__ */ new Map();
|
|
11
|
+
this._progressHandlers = /* @__PURE__ */ new Map();
|
|
12
|
+
this._timeoutInfo = /* @__PURE__ */ new Map();
|
|
13
|
+
this._pendingDebouncedNotifications = /* @__PURE__ */ new Set();
|
|
14
|
+
this.setNotificationHandler(CancelledNotificationSchema, (notification) => {
|
|
15
|
+
const controller = this._requestHandlerAbortControllers.get(notification.params.requestId);
|
|
16
|
+
controller === null || controller === void 0 ? void 0 : controller.abort(notification.params.reason);
|
|
17
|
+
});
|
|
18
|
+
this.setNotificationHandler(ProgressNotificationSchema, (notification) => {
|
|
19
|
+
this._onprogress(notification);
|
|
20
|
+
});
|
|
21
|
+
this.setRequestHandler(
|
|
22
|
+
PingRequestSchema,
|
|
23
|
+
// Automatic pong by default.
|
|
24
|
+
(_request) => ({})
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
_setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) {
|
|
28
|
+
this._timeoutInfo.set(messageId, {
|
|
29
|
+
timeoutId: setTimeout(onTimeout, timeout),
|
|
30
|
+
startTime: Date.now(),
|
|
31
|
+
timeout,
|
|
32
|
+
maxTotalTimeout,
|
|
33
|
+
resetTimeoutOnProgress,
|
|
34
|
+
onTimeout
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
_resetTimeout(messageId) {
|
|
38
|
+
const info = this._timeoutInfo.get(messageId);
|
|
39
|
+
if (!info)
|
|
40
|
+
return false;
|
|
41
|
+
const totalElapsed = Date.now() - info.startTime;
|
|
42
|
+
if (info.maxTotalTimeout && totalElapsed >= info.maxTotalTimeout) {
|
|
43
|
+
this._timeoutInfo.delete(messageId);
|
|
44
|
+
throw new McpError(ErrorCode.RequestTimeout, "Maximum total timeout exceeded", { maxTotalTimeout: info.maxTotalTimeout, totalElapsed });
|
|
45
|
+
}
|
|
46
|
+
clearTimeout(info.timeoutId);
|
|
47
|
+
info.timeoutId = setTimeout(info.onTimeout, info.timeout);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
_cleanupTimeout(messageId) {
|
|
51
|
+
const info = this._timeoutInfo.get(messageId);
|
|
52
|
+
if (info) {
|
|
53
|
+
clearTimeout(info.timeoutId);
|
|
54
|
+
this._timeoutInfo.delete(messageId);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Attaches to the given transport, starts it, and starts listening for messages.
|
|
59
|
+
*
|
|
60
|
+
* The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.
|
|
61
|
+
*/
|
|
62
|
+
async connect(transport) {
|
|
63
|
+
var _a, _b, _c;
|
|
64
|
+
this._transport = transport;
|
|
65
|
+
const _onclose = (_a = this.transport) === null || _a === void 0 ? void 0 : _a.onclose;
|
|
66
|
+
this._transport.onclose = () => {
|
|
67
|
+
_onclose === null || _onclose === void 0 ? void 0 : _onclose();
|
|
68
|
+
this._onclose();
|
|
69
|
+
};
|
|
70
|
+
const _onerror = (_b = this.transport) === null || _b === void 0 ? void 0 : _b.onerror;
|
|
71
|
+
this._transport.onerror = (error) => {
|
|
72
|
+
_onerror === null || _onerror === void 0 ? void 0 : _onerror(error);
|
|
73
|
+
this._onerror(error);
|
|
74
|
+
};
|
|
75
|
+
const _onmessage = (_c = this._transport) === null || _c === void 0 ? void 0 : _c.onmessage;
|
|
76
|
+
this._transport.onmessage = (message, extra) => {
|
|
77
|
+
_onmessage === null || _onmessage === void 0 ? void 0 : _onmessage(message, extra);
|
|
78
|
+
if (isJSONRPCResponse(message) || isJSONRPCError(message)) {
|
|
79
|
+
this._onresponse(message);
|
|
80
|
+
} else if (isJSONRPCRequest(message)) {
|
|
81
|
+
this._onrequest(message, extra);
|
|
82
|
+
} else if (isJSONRPCNotification(message)) {
|
|
83
|
+
this._onnotification(message);
|
|
84
|
+
} else {
|
|
85
|
+
this._onerror(new Error(`Unknown message type: ${JSON.stringify(message)}`));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
await this._transport.start();
|
|
89
|
+
}
|
|
90
|
+
_onclose() {
|
|
91
|
+
var _a;
|
|
92
|
+
const responseHandlers = this._responseHandlers;
|
|
93
|
+
this._responseHandlers = /* @__PURE__ */ new Map();
|
|
94
|
+
this._progressHandlers.clear();
|
|
95
|
+
this._pendingDebouncedNotifications.clear();
|
|
96
|
+
this._transport = void 0;
|
|
97
|
+
(_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
98
|
+
const error = new McpError(ErrorCode.ConnectionClosed, "Connection closed");
|
|
99
|
+
for (const handler of responseHandlers.values()) {
|
|
100
|
+
handler(error);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
_onerror(error) {
|
|
104
|
+
var _a;
|
|
105
|
+
(_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
|
106
|
+
}
|
|
107
|
+
_onnotification(notification) {
|
|
108
|
+
var _a;
|
|
109
|
+
const handler = (_a = this._notificationHandlers.get(notification.method)) !== null && _a !== void 0 ? _a : this.fallbackNotificationHandler;
|
|
110
|
+
if (handler === void 0) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
Promise.resolve().then(() => handler(notification)).catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));
|
|
114
|
+
}
|
|
115
|
+
_onrequest(request, extra) {
|
|
116
|
+
var _a, _b, _c, _d;
|
|
117
|
+
const handler = (_a = this._requestHandlers.get(request.method)) !== null && _a !== void 0 ? _a : this.fallbackRequestHandler;
|
|
118
|
+
if (handler === void 0) {
|
|
119
|
+
(_b = this._transport) === null || _b === void 0 ? void 0 : _b.send({
|
|
120
|
+
jsonrpc: "2.0",
|
|
121
|
+
id: request.id,
|
|
122
|
+
error: {
|
|
123
|
+
code: ErrorCode.MethodNotFound,
|
|
124
|
+
message: "Method not found"
|
|
125
|
+
}
|
|
126
|
+
}).catch((error) => this._onerror(new Error(`Failed to send an error response: ${error}`)));
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const abortController = new AbortController();
|
|
130
|
+
this._requestHandlerAbortControllers.set(request.id, abortController);
|
|
131
|
+
const fullExtra = {
|
|
132
|
+
signal: abortController.signal,
|
|
133
|
+
sessionId: (_c = this._transport) === null || _c === void 0 ? void 0 : _c.sessionId,
|
|
134
|
+
_meta: (_d = request.params) === null || _d === void 0 ? void 0 : _d._meta,
|
|
135
|
+
sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
|
|
136
|
+
sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request.id }),
|
|
137
|
+
authInfo: extra === null || extra === void 0 ? void 0 : extra.authInfo,
|
|
138
|
+
requestId: request.id,
|
|
139
|
+
requestInfo: extra === null || extra === void 0 ? void 0 : extra.requestInfo
|
|
140
|
+
};
|
|
141
|
+
Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
|
|
142
|
+
var _a2;
|
|
143
|
+
if (abortController.signal.aborted) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
return (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send({
|
|
147
|
+
result,
|
|
148
|
+
jsonrpc: "2.0",
|
|
149
|
+
id: request.id
|
|
150
|
+
});
|
|
151
|
+
}, (error) => {
|
|
152
|
+
var _a2, _b2;
|
|
153
|
+
if (abortController.signal.aborted) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
return (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send({
|
|
157
|
+
jsonrpc: "2.0",
|
|
158
|
+
id: request.id,
|
|
159
|
+
error: {
|
|
160
|
+
code: Number.isSafeInteger(error["code"]) ? error["code"] : ErrorCode.InternalError,
|
|
161
|
+
message: (_b2 = error.message) !== null && _b2 !== void 0 ? _b2 : "Internal error"
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}).catch((error) => this._onerror(new Error(`Failed to send response: ${error}`))).finally(() => {
|
|
165
|
+
this._requestHandlerAbortControllers.delete(request.id);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
_onprogress(notification) {
|
|
169
|
+
const { progressToken, ...params } = notification.params;
|
|
170
|
+
const messageId = Number(progressToken);
|
|
171
|
+
const handler = this._progressHandlers.get(messageId);
|
|
172
|
+
if (!handler) {
|
|
173
|
+
this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(notification)}`));
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const responseHandler = this._responseHandlers.get(messageId);
|
|
177
|
+
const timeoutInfo = this._timeoutInfo.get(messageId);
|
|
178
|
+
if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) {
|
|
179
|
+
try {
|
|
180
|
+
this._resetTimeout(messageId);
|
|
181
|
+
} catch (error) {
|
|
182
|
+
responseHandler(error);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
handler(params);
|
|
187
|
+
}
|
|
188
|
+
_onresponse(response) {
|
|
189
|
+
const messageId = Number(response.id);
|
|
190
|
+
const handler = this._responseHandlers.get(messageId);
|
|
191
|
+
if (handler === void 0) {
|
|
192
|
+
this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(response)}`));
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
this._responseHandlers.delete(messageId);
|
|
196
|
+
this._progressHandlers.delete(messageId);
|
|
197
|
+
this._cleanupTimeout(messageId);
|
|
198
|
+
if (isJSONRPCResponse(response)) {
|
|
199
|
+
handler(response);
|
|
200
|
+
} else {
|
|
201
|
+
const error = new McpError(response.error.code, response.error.message, response.error.data);
|
|
202
|
+
handler(error);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
get transport() {
|
|
206
|
+
return this._transport;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Closes the connection.
|
|
210
|
+
*/
|
|
211
|
+
async close() {
|
|
212
|
+
var _a;
|
|
213
|
+
await ((_a = this._transport) === null || _a === void 0 ? void 0 : _a.close());
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Sends a request and wait for a response.
|
|
217
|
+
*
|
|
218
|
+
* Do not use this method to emit notifications! Use notification() instead.
|
|
219
|
+
*/
|
|
220
|
+
request(request, resultSchema, options) {
|
|
221
|
+
const { relatedRequestId, resumptionToken, onresumptiontoken } = options !== null && options !== void 0 ? options : {};
|
|
222
|
+
return new Promise((resolve, reject) => {
|
|
223
|
+
var _a, _b, _c, _d, _e, _f;
|
|
224
|
+
if (!this._transport) {
|
|
225
|
+
reject(new Error("Not connected"));
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (((_a = this._options) === null || _a === void 0 ? void 0 : _a.enforceStrictCapabilities) === true) {
|
|
229
|
+
this.assertCapabilityForMethod(request.method);
|
|
230
|
+
}
|
|
231
|
+
(_b = options === null || options === void 0 ? void 0 : options.signal) === null || _b === void 0 ? void 0 : _b.throwIfAborted();
|
|
232
|
+
const messageId = this._requestMessageId++;
|
|
233
|
+
const jsonrpcRequest = {
|
|
234
|
+
...request,
|
|
235
|
+
jsonrpc: "2.0",
|
|
236
|
+
id: messageId
|
|
237
|
+
};
|
|
238
|
+
if (options === null || options === void 0 ? void 0 : options.onprogress) {
|
|
239
|
+
this._progressHandlers.set(messageId, options.onprogress);
|
|
240
|
+
jsonrpcRequest.params = {
|
|
241
|
+
...request.params,
|
|
242
|
+
_meta: {
|
|
243
|
+
...((_c = request.params) === null || _c === void 0 ? void 0 : _c._meta) || {},
|
|
244
|
+
progressToken: messageId
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
const cancel = (reason) => {
|
|
249
|
+
var _a2;
|
|
250
|
+
this._responseHandlers.delete(messageId);
|
|
251
|
+
this._progressHandlers.delete(messageId);
|
|
252
|
+
this._cleanupTimeout(messageId);
|
|
253
|
+
(_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send({
|
|
254
|
+
jsonrpc: "2.0",
|
|
255
|
+
method: "notifications/cancelled",
|
|
256
|
+
params: {
|
|
257
|
+
requestId: messageId,
|
|
258
|
+
reason: String(reason)
|
|
259
|
+
}
|
|
260
|
+
}, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error) => this._onerror(new Error(`Failed to send cancellation: ${error}`)));
|
|
261
|
+
reject(reason);
|
|
262
|
+
};
|
|
263
|
+
this._responseHandlers.set(messageId, (response) => {
|
|
264
|
+
var _a2;
|
|
265
|
+
if ((_a2 = options === null || options === void 0 ? void 0 : options.signal) === null || _a2 === void 0 ? void 0 : _a2.aborted) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
if (response instanceof Error) {
|
|
269
|
+
return reject(response);
|
|
270
|
+
}
|
|
271
|
+
try {
|
|
272
|
+
const result = resultSchema.parse(response.result);
|
|
273
|
+
resolve(result);
|
|
274
|
+
} catch (error) {
|
|
275
|
+
reject(error);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
(_d = options === null || options === void 0 ? void 0 : options.signal) === null || _d === void 0 ? void 0 : _d.addEventListener("abort", () => {
|
|
279
|
+
var _a2;
|
|
280
|
+
cancel((_a2 = options === null || options === void 0 ? void 0 : options.signal) === null || _a2 === void 0 ? void 0 : _a2.reason);
|
|
281
|
+
});
|
|
282
|
+
const timeout = (_e = options === null || options === void 0 ? void 0 : options.timeout) !== null && _e !== void 0 ? _e : DEFAULT_REQUEST_TIMEOUT_MSEC;
|
|
283
|
+
const timeoutHandler = () => cancel(new McpError(ErrorCode.RequestTimeout, "Request timed out", { timeout }));
|
|
284
|
+
this._setupTimeout(messageId, timeout, options === null || options === void 0 ? void 0 : options.maxTotalTimeout, timeoutHandler, (_f = options === null || options === void 0 ? void 0 : options.resetTimeoutOnProgress) !== null && _f !== void 0 ? _f : false);
|
|
285
|
+
this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error) => {
|
|
286
|
+
this._cleanupTimeout(messageId);
|
|
287
|
+
reject(error);
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Emits a notification, which is a one-way message that does not expect a response.
|
|
293
|
+
*/
|
|
294
|
+
async notification(notification, options) {
|
|
295
|
+
var _a, _b;
|
|
296
|
+
if (!this._transport) {
|
|
297
|
+
throw new Error("Not connected");
|
|
298
|
+
}
|
|
299
|
+
this.assertNotificationCapability(notification.method);
|
|
300
|
+
const debouncedMethods = (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.debouncedNotificationMethods) !== null && _b !== void 0 ? _b : [];
|
|
301
|
+
const canDebounce = debouncedMethods.includes(notification.method) && !notification.params && !(options === null || options === void 0 ? void 0 : options.relatedRequestId);
|
|
302
|
+
if (canDebounce) {
|
|
303
|
+
if (this._pendingDebouncedNotifications.has(notification.method)) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
this._pendingDebouncedNotifications.add(notification.method);
|
|
307
|
+
Promise.resolve().then(() => {
|
|
308
|
+
var _a2;
|
|
309
|
+
this._pendingDebouncedNotifications.delete(notification.method);
|
|
310
|
+
if (!this._transport) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
const jsonrpcNotification2 = {
|
|
314
|
+
...notification,
|
|
315
|
+
jsonrpc: "2.0"
|
|
316
|
+
};
|
|
317
|
+
(_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send(jsonrpcNotification2, options).catch((error) => this._onerror(error));
|
|
318
|
+
});
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
const jsonrpcNotification = {
|
|
322
|
+
...notification,
|
|
323
|
+
jsonrpc: "2.0"
|
|
324
|
+
};
|
|
325
|
+
await this._transport.send(jsonrpcNotification, options);
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Registers a handler to invoke when this protocol object receives a request with the given method.
|
|
329
|
+
*
|
|
330
|
+
* Note that this will replace any previous request handler for the same method.
|
|
331
|
+
*/
|
|
332
|
+
setRequestHandler(requestSchema, handler) {
|
|
333
|
+
const method = requestSchema.shape.method.value;
|
|
334
|
+
this.assertRequestHandlerCapability(method);
|
|
335
|
+
this._requestHandlers.set(method, (request, extra) => {
|
|
336
|
+
return Promise.resolve(handler(requestSchema.parse(request), extra));
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Removes the request handler for the given method.
|
|
341
|
+
*/
|
|
342
|
+
removeRequestHandler(method) {
|
|
343
|
+
this._requestHandlers.delete(method);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
|
|
347
|
+
*/
|
|
348
|
+
assertCanSetRequestHandler(method) {
|
|
349
|
+
if (this._requestHandlers.has(method)) {
|
|
350
|
+
throw new Error(`A request handler for ${method} already exists, which would be overridden`);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Registers a handler to invoke when this protocol object receives a notification with the given method.
|
|
355
|
+
*
|
|
356
|
+
* Note that this will replace any previous notification handler for the same method.
|
|
357
|
+
*/
|
|
358
|
+
setNotificationHandler(notificationSchema, handler) {
|
|
359
|
+
this._notificationHandlers.set(notificationSchema.shape.method.value, (notification) => Promise.resolve(handler(notificationSchema.parse(notification))));
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Removes the notification handler for the given method.
|
|
363
|
+
*/
|
|
364
|
+
removeNotificationHandler(method) {
|
|
365
|
+
this._notificationHandlers.delete(method);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
function mergeCapabilities(base, additional) {
|
|
369
|
+
return Object.entries(additional).reduce((acc, [key, value]) => {
|
|
370
|
+
if (value && typeof value === "object") {
|
|
371
|
+
acc[key] = acc[key] ? { ...acc[key], ...value } : value;
|
|
372
|
+
} else {
|
|
373
|
+
acc[key] = value;
|
|
374
|
+
}
|
|
375
|
+
return acc;
|
|
376
|
+
}, { ...base });
|
|
377
|
+
}
|
|
378
|
+
export {
|
|
379
|
+
DEFAULT_REQUEST_TIMEOUT_MSEC,
|
|
380
|
+
Protocol,
|
|
381
|
+
mergeCapabilities
|
|
382
|
+
};
|
|
383
|
+
//# sourceMappingURL=protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sources":["../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.16.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js"],"sourcesContent":["import { CancelledNotificationSchema, ErrorCode, isJSONRPCError, isJSONRPCRequest, isJSONRPCResponse, isJSONRPCNotification, McpError, PingRequestSchema, ProgressNotificationSchema, } from \"../types.js\";\n/**\n * The default request timeout, in miliseconds.\n */\nexport const DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;\n/**\n * Implements MCP protocol framing on top of a pluggable transport, including\n * features like request/response linking, notifications, and progress.\n */\nexport class Protocol {\n constructor(_options) {\n this._options = _options;\n this._requestMessageId = 0;\n this._requestHandlers = new Map();\n this._requestHandlerAbortControllers = new Map();\n this._notificationHandlers = new Map();\n this._responseHandlers = new Map();\n this._progressHandlers = new Map();\n this._timeoutInfo = new Map();\n this._pendingDebouncedNotifications = new Set();\n this.setNotificationHandler(CancelledNotificationSchema, (notification) => {\n const controller = this._requestHandlerAbortControllers.get(notification.params.requestId);\n controller === null || controller === void 0 ? void 0 : controller.abort(notification.params.reason);\n });\n this.setNotificationHandler(ProgressNotificationSchema, (notification) => {\n this._onprogress(notification);\n });\n this.setRequestHandler(PingRequestSchema, \n // Automatic pong by default.\n (_request) => ({}));\n }\n _setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) {\n this._timeoutInfo.set(messageId, {\n timeoutId: setTimeout(onTimeout, timeout),\n startTime: Date.now(),\n timeout,\n maxTotalTimeout,\n resetTimeoutOnProgress,\n onTimeout\n });\n }\n _resetTimeout(messageId) {\n const info = this._timeoutInfo.get(messageId);\n if (!info)\n return false;\n const totalElapsed = Date.now() - info.startTime;\n if (info.maxTotalTimeout && totalElapsed >= info.maxTotalTimeout) {\n this._timeoutInfo.delete(messageId);\n throw new McpError(ErrorCode.RequestTimeout, \"Maximum total timeout exceeded\", { maxTotalTimeout: info.maxTotalTimeout, totalElapsed });\n }\n clearTimeout(info.timeoutId);\n info.timeoutId = setTimeout(info.onTimeout, info.timeout);\n return true;\n }\n _cleanupTimeout(messageId) {\n const info = this._timeoutInfo.get(messageId);\n if (info) {\n clearTimeout(info.timeoutId);\n this._timeoutInfo.delete(messageId);\n }\n }\n /**\n * Attaches to the given transport, starts it, and starts listening for messages.\n *\n * The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.\n */\n async connect(transport) {\n var _a, _b, _c;\n this._transport = transport;\n const _onclose = (_a = this.transport) === null || _a === void 0 ? void 0 : _a.onclose;\n this._transport.onclose = () => {\n _onclose === null || _onclose === void 0 ? void 0 : _onclose();\n this._onclose();\n };\n const _onerror = (_b = this.transport) === null || _b === void 0 ? void 0 : _b.onerror;\n this._transport.onerror = (error) => {\n _onerror === null || _onerror === void 0 ? void 0 : _onerror(error);\n this._onerror(error);\n };\n const _onmessage = (_c = this._transport) === null || _c === void 0 ? void 0 : _c.onmessage;\n this._transport.onmessage = (message, extra) => {\n _onmessage === null || _onmessage === void 0 ? void 0 : _onmessage(message, extra);\n if (isJSONRPCResponse(message) || isJSONRPCError(message)) {\n this._onresponse(message);\n }\n else if (isJSONRPCRequest(message)) {\n this._onrequest(message, extra);\n }\n else if (isJSONRPCNotification(message)) {\n this._onnotification(message);\n }\n else {\n this._onerror(new Error(`Unknown message type: ${JSON.stringify(message)}`));\n }\n };\n await this._transport.start();\n }\n _onclose() {\n var _a;\n const responseHandlers = this._responseHandlers;\n this._responseHandlers = new Map();\n this._progressHandlers.clear();\n this._pendingDebouncedNotifications.clear();\n this._transport = undefined;\n (_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this);\n const error = new McpError(ErrorCode.ConnectionClosed, \"Connection closed\");\n for (const handler of responseHandlers.values()) {\n handler(error);\n }\n }\n _onerror(error) {\n var _a;\n (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);\n }\n _onnotification(notification) {\n var _a;\n const handler = (_a = this._notificationHandlers.get(notification.method)) !== null && _a !== void 0 ? _a : this.fallbackNotificationHandler;\n // Ignore notifications not being subscribed to.\n if (handler === undefined) {\n return;\n }\n // Starting with Promise.resolve() puts any synchronous errors into the monad as well.\n Promise.resolve()\n .then(() => handler(notification))\n .catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));\n }\n _onrequest(request, extra) {\n var _a, _b, _c, _d;\n const handler = (_a = this._requestHandlers.get(request.method)) !== null && _a !== void 0 ? _a : this.fallbackRequestHandler;\n if (handler === undefined) {\n (_b = this._transport) === null || _b === void 0 ? void 0 : _b.send({\n jsonrpc: \"2.0\",\n id: request.id,\n error: {\n code: ErrorCode.MethodNotFound,\n message: \"Method not found\",\n },\n }).catch((error) => this._onerror(new Error(`Failed to send an error response: ${error}`)));\n return;\n }\n const abortController = new AbortController();\n this._requestHandlerAbortControllers.set(request.id, abortController);\n const fullExtra = {\n signal: abortController.signal,\n sessionId: (_c = this._transport) === null || _c === void 0 ? void 0 : _c.sessionId,\n _meta: (_d = request.params) === null || _d === void 0 ? void 0 : _d._meta,\n sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),\n sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request.id }),\n authInfo: extra === null || extra === void 0 ? void 0 : extra.authInfo,\n requestId: request.id,\n requestInfo: extra === null || extra === void 0 ? void 0 : extra.requestInfo\n };\n // Starting with Promise.resolve() puts any synchronous errors into the monad as well.\n Promise.resolve()\n .then(() => handler(request, fullExtra))\n .then((result) => {\n var _a;\n if (abortController.signal.aborted) {\n return;\n }\n return (_a = this._transport) === null || _a === void 0 ? void 0 : _a.send({\n result,\n jsonrpc: \"2.0\",\n id: request.id,\n });\n }, (error) => {\n var _a, _b;\n if (abortController.signal.aborted) {\n return;\n }\n return (_a = this._transport) === null || _a === void 0 ? void 0 : _a.send({\n jsonrpc: \"2.0\",\n id: request.id,\n error: {\n code: Number.isSafeInteger(error[\"code\"])\n ? error[\"code\"]\n : ErrorCode.InternalError,\n message: (_b = error.message) !== null && _b !== void 0 ? _b : \"Internal error\",\n },\n });\n })\n .catch((error) => this._onerror(new Error(`Failed to send response: ${error}`)))\n .finally(() => {\n this._requestHandlerAbortControllers.delete(request.id);\n });\n }\n _onprogress(notification) {\n const { progressToken, ...params } = notification.params;\n const messageId = Number(progressToken);\n const handler = this._progressHandlers.get(messageId);\n if (!handler) {\n this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(notification)}`));\n return;\n }\n const responseHandler = this._responseHandlers.get(messageId);\n const timeoutInfo = this._timeoutInfo.get(messageId);\n if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) {\n try {\n this._resetTimeout(messageId);\n }\n catch (error) {\n responseHandler(error);\n return;\n }\n }\n handler(params);\n }\n _onresponse(response) {\n const messageId = Number(response.id);\n const handler = this._responseHandlers.get(messageId);\n if (handler === undefined) {\n this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(response)}`));\n return;\n }\n this._responseHandlers.delete(messageId);\n this._progressHandlers.delete(messageId);\n this._cleanupTimeout(messageId);\n if (isJSONRPCResponse(response)) {\n handler(response);\n }\n else {\n const error = new McpError(response.error.code, response.error.message, response.error.data);\n handler(error);\n }\n }\n get transport() {\n return this._transport;\n }\n /**\n * Closes the connection.\n */\n async close() {\n var _a;\n await ((_a = this._transport) === null || _a === void 0 ? void 0 : _a.close());\n }\n /**\n * Sends a request and wait for a response.\n *\n * Do not use this method to emit notifications! Use notification() instead.\n */\n request(request, resultSchema, options) {\n const { relatedRequestId, resumptionToken, onresumptiontoken } = options !== null && options !== void 0 ? options : {};\n return new Promise((resolve, reject) => {\n var _a, _b, _c, _d, _e, _f;\n if (!this._transport) {\n reject(new Error(\"Not connected\"));\n return;\n }\n if (((_a = this._options) === null || _a === void 0 ? void 0 : _a.enforceStrictCapabilities) === true) {\n this.assertCapabilityForMethod(request.method);\n }\n (_b = options === null || options === void 0 ? void 0 : options.signal) === null || _b === void 0 ? void 0 : _b.throwIfAborted();\n const messageId = this._requestMessageId++;\n const jsonrpcRequest = {\n ...request,\n jsonrpc: \"2.0\",\n id: messageId,\n };\n if (options === null || options === void 0 ? void 0 : options.onprogress) {\n this._progressHandlers.set(messageId, options.onprogress);\n jsonrpcRequest.params = {\n ...request.params,\n _meta: {\n ...(((_c = request.params) === null || _c === void 0 ? void 0 : _c._meta) || {}),\n progressToken: messageId\n },\n };\n }\n const cancel = (reason) => {\n var _a;\n this._responseHandlers.delete(messageId);\n this._progressHandlers.delete(messageId);\n this._cleanupTimeout(messageId);\n (_a = this._transport) === null || _a === void 0 ? void 0 : _a.send({\n jsonrpc: \"2.0\",\n method: \"notifications/cancelled\",\n params: {\n requestId: messageId,\n reason: String(reason),\n },\n }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error) => this._onerror(new Error(`Failed to send cancellation: ${error}`)));\n reject(reason);\n };\n this._responseHandlers.set(messageId, (response) => {\n var _a;\n if ((_a = options === null || options === void 0 ? void 0 : options.signal) === null || _a === void 0 ? void 0 : _a.aborted) {\n return;\n }\n if (response instanceof Error) {\n return reject(response);\n }\n try {\n const result = resultSchema.parse(response.result);\n resolve(result);\n }\n catch (error) {\n reject(error);\n }\n });\n (_d = options === null || options === void 0 ? void 0 : options.signal) === null || _d === void 0 ? void 0 : _d.addEventListener(\"abort\", () => {\n var _a;\n cancel((_a = options === null || options === void 0 ? void 0 : options.signal) === null || _a === void 0 ? void 0 : _a.reason);\n });\n const timeout = (_e = options === null || options === void 0 ? void 0 : options.timeout) !== null && _e !== void 0 ? _e : DEFAULT_REQUEST_TIMEOUT_MSEC;\n const timeoutHandler = () => cancel(new McpError(ErrorCode.RequestTimeout, \"Request timed out\", { timeout }));\n this._setupTimeout(messageId, timeout, options === null || options === void 0 ? void 0 : options.maxTotalTimeout, timeoutHandler, (_f = options === null || options === void 0 ? void 0 : options.resetTimeoutOnProgress) !== null && _f !== void 0 ? _f : false);\n this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error) => {\n this._cleanupTimeout(messageId);\n reject(error);\n });\n });\n }\n /**\n * Emits a notification, which is a one-way message that does not expect a response.\n */\n async notification(notification, options) {\n var _a, _b;\n if (!this._transport) {\n throw new Error(\"Not connected\");\n }\n this.assertNotificationCapability(notification.method);\n const debouncedMethods = (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.debouncedNotificationMethods) !== null && _b !== void 0 ? _b : [];\n // A notification can only be debounced if it's in the list AND it's \"simple\"\n // (i.e., has no parameters and no related request ID that could be lost).\n const canDebounce = debouncedMethods.includes(notification.method)\n && !notification.params\n && !(options === null || options === void 0 ? void 0 : options.relatedRequestId);\n if (canDebounce) {\n // If a notification of this type is already scheduled, do nothing.\n if (this._pendingDebouncedNotifications.has(notification.method)) {\n return;\n }\n // Mark this notification type as pending.\n this._pendingDebouncedNotifications.add(notification.method);\n // Schedule the actual send to happen in the next microtask.\n // This allows all synchronous calls in the current event loop tick to be coalesced.\n Promise.resolve().then(() => {\n var _a;\n // Un-mark the notification so the next one can be scheduled.\n this._pendingDebouncedNotifications.delete(notification.method);\n // SAFETY CHECK: If the connection was closed while this was pending, abort.\n if (!this._transport) {\n return;\n }\n const jsonrpcNotification = {\n ...notification,\n jsonrpc: \"2.0\",\n };\n // Send the notification, but don't await it here to avoid blocking.\n // Handle potential errors with a .catch().\n (_a = this._transport) === null || _a === void 0 ? void 0 : _a.send(jsonrpcNotification, options).catch(error => this._onerror(error));\n });\n // Return immediately.\n return;\n }\n const jsonrpcNotification = {\n ...notification,\n jsonrpc: \"2.0\",\n };\n await this._transport.send(jsonrpcNotification, options);\n }\n /**\n * Registers a handler to invoke when this protocol object receives a request with the given method.\n *\n * Note that this will replace any previous request handler for the same method.\n */\n setRequestHandler(requestSchema, handler) {\n const method = requestSchema.shape.method.value;\n this.assertRequestHandlerCapability(method);\n this._requestHandlers.set(method, (request, extra) => {\n return Promise.resolve(handler(requestSchema.parse(request), extra));\n });\n }\n /**\n * Removes the request handler for the given method.\n */\n removeRequestHandler(method) {\n this._requestHandlers.delete(method);\n }\n /**\n * Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.\n */\n assertCanSetRequestHandler(method) {\n if (this._requestHandlers.has(method)) {\n throw new Error(`A request handler for ${method} already exists, which would be overridden`);\n }\n }\n /**\n * Registers a handler to invoke when this protocol object receives a notification with the given method.\n *\n * Note that this will replace any previous notification handler for the same method.\n */\n setNotificationHandler(notificationSchema, handler) {\n this._notificationHandlers.set(notificationSchema.shape.method.value, (notification) => Promise.resolve(handler(notificationSchema.parse(notification))));\n }\n /**\n * Removes the notification handler for the given method.\n */\n removeNotificationHandler(method) {\n this._notificationHandlers.delete(method);\n }\n}\nexport function mergeCapabilities(base, additional) {\n return Object.entries(additional).reduce((acc, [key, value]) => {\n if (value && typeof value === \"object\") {\n acc[key] = acc[key] ? { ...acc[key], ...value } : value;\n }\n else {\n acc[key] = value;\n }\n return acc;\n }, { ...base });\n}\n//# sourceMappingURL=protocol.js.map"],"names":["_a","_b","jsonrpcNotification"],"mappings":";AAIY,MAAC,+BAA+B;AAKrC,MAAM,SAAS;AAAA,EAClB,YAAY,UAAU;AAClB,SAAK,WAAW;AAChB,SAAK,oBAAoB;AACzB,SAAK,mBAAmB,oBAAI,IAAG;AAC/B,SAAK,kCAAkC,oBAAI,IAAG;AAC9C,SAAK,wBAAwB,oBAAI,IAAG;AACpC,SAAK,oBAAoB,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