diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 22aa649..a4f170b 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -12,9 +12,12 @@ ## Decision Rules - For normative behavior changes, update and approve the specification - repository before importing a new validator snapshot. + repository before importing a new validator selector. - For validator behavior, use exact immutable selectors and add sibling snapshots; never modify a published selector. +- Treat upstream specification tags and commits as informational provenance. + Validator package integrity is defined by its embedded schema, runtime, frozen + fixtures, package integrity, and immutable package release. - A maintainer-approved additive tooling-metadata correction may modify a published snapshot implementation only when schemas, conformance behavior, diagnostics, and fixtures remain unchanged and the integrity exception is diff --git a/.github/skills/validator-snapshot-intake/SKILL.md b/.github/skills/validator-snapshot-intake/SKILL.md index f0bfa9a..9da6d24 100644 --- a/.github/skills/validator-snapshot-intake/SKILL.md +++ b/.github/skills/validator-snapshot-intake/SKILL.md @@ -1,9 +1,9 @@ --- name: validator-snapshot-intake description: - Import an approved immutable MCP Description validator snapshot from the - specification repository. Use when adding a new draft or release-candidate - selector to @mcpdesc/validator. + Import reviewed MCP Description artifacts as an immutable validator selector. + Use when adding a new draft or release-candidate selector to + @mcpdesc/validator. license: Apache-2.0 --- @@ -12,7 +12,7 @@ license: Apache-2.0 ## Prerequisites - Read the root and `packages/validator/AGENTS.md` files. -- Require an approved exact specification tag or full commit. +- Require an approved exact specification selector. - Obtain a bundle with `manifest.json`, `runtime/`, and `fixtures/` from `mcpdesc/mcpdesc-specification`. - Confirm both repositories have clean worktrees before generation or import. @@ -20,9 +20,10 @@ license: Apache-2.0 ## Bundle Contract The manifest uses `formatVersion: 1`, an exact prerelease `selector`, matching -`snapshotTag`, source repository and full commit, and a complete sorted-capable -`files` array. Every file entry contains a bundle-relative path under `runtime/` -or `fixtures/` and its lowercase SHA-256 digest. +`snapshotTag`, and a complete sorted-capable `files` array. Every file entry +contains a bundle-relative path under `runtime/` or `fixtures/` and its +lowercase SHA-256 digest. Source repository and commit metadata are optional and +informational. ## Workflow @@ -32,8 +33,8 @@ or `fixtures/` and its lowercase SHA-256 digest. npm run import:snapshot --workspace @mcpdesc/validator -- --check ``` -2. Review the manifest, source commit, schema digest, semantic implementation, - and fixture corpus against the approved specification snapshot. +2. Review the manifest, schema digest, semantic implementation, and fixture + corpus against the approved specification artifacts. 3. Import only after approval: ```bash diff --git a/AGENTS.md b/AGENTS.md index 53aca28..f8b3fc2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,9 +36,10 @@ validation without creating a second source of normative specification text. - Require exact immutable snapshot selectors. - Do not infer a draft selector from `mcpdesc: "0.8.0"` alone. - Do not change behavior captured for a published selector silently. -- Import a new snapshot only from an explicitly approved specification tag or - commit, with exact schema, semantic implementation, fixture, and digest - provenance. Never require a sibling specification checkout in routine CI. +- Import a new selector only from approved specification artifacts. Review and + freeze the exact schema, semantic implementation, and fixtures owned by the + validator package. Upstream tags and commits are informational provenance; + never require a sibling specification checkout in routine CI. - Existing directories under `packages/validator/src/snapshots/` and `packages/validator/test/snapshots/` are immutable. Add sibling selectors. - A maintainer may approve an additive tooling-metadata correction to a @@ -47,6 +48,9 @@ validation without creating a second source of normative specification text. `snapshot-integrity.json` and the validator changelog. - Keep npm versions, format versions, snapshot selectors, schema identities, and MCP protocol revisions separate. +- Non-normative specification changelogs, FAQs, guides, governance, and release + prose may evolve without a validator or core release when package-owned + schema, behavior, and fixtures remain unchanged. ## New snapshot adoption diff --git a/CHANGELOG.md b/CHANGELOG.md index 622d92e..ab18292 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,21 @@ All notable changes to this repository are documented here. -## [Unreleased] +## [0.9.0] - 2026-09-07 + +### Added + +- Added MCP Description `0.8.0-rc.3` validator support and core support for + projection, merge, declaration selection, component reference resolution, and + migration from 0.7.0. +- Added RC.2 component reference resolution with deterministic terminal-target + provenance. + +### Changed + +- Snapshot integrity now protects package-owned selector bytes without binding + validation behavior to immutable specification repository documentation or + source commits. ## [0.8.1] - 2026-09-05 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 44b3b1e..fcf3d11 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,8 +20,9 @@ dependencies must work in Node.js 22 and browser bundles. Validator changes must preserve Node.js 20 support, deterministic offline validation, and strict-CSP behavior. Never modify an existing published snapshot -directory. A later approved specification snapshot is added as a sibling with -exact source, schema digest, semantic, and fixture provenance. +directory. A later approved specification snapshot is added as a sibling with an +exact schema digest, reviewed semantic implementation, and frozen fixtures. +Upstream repository tags and commits are informational provenance. Pull requests containing AI-assisted content must disclose the tool and extent of assistance. Releases follow the maintainer-controlled process in diff --git a/README.md b/README.md index 0193e5a..a2e94d6 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,12 @@ The repository contains two independently versioned packages: MCP Description snapshots, including strict-CSP browser entry points. The package parses and serializes JSON or YAML source text, migrates validated -MCP Description 0.7.0 values to exact Draft 4, RC.1, or RC.2 snapshots with -stable conversion reports, projects and merges Effective Protocol Views through -RC.2, and selects declaration subsets by normative identity. Validator snapshots -provide the conformance authority for those operations. Published package -operations perform no network or file access and support browser bundlers. +MCP Description 0.7.0 values to exact Draft 4, RC.1, RC.2, or RC.3 snapshots +with stable conversion reports, projects and merges Effective Protocol Views +through RC.3, and selects declaration subsets by normative identity. Validator +snapshots provide the conformance authority for those operations. Published +package operations perform no network or file access and support browser +bundlers. APIs remain experimental while MCP Description 0.8 is a community working draft. npm package versions, MCP Description versions, immutable snapshot selectors, diff --git a/ROADMAP.md b/ROADMAP.md index 1c6afb3..cd82a61 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -38,8 +38,10 @@ repository. grounded in the RC.2 specification snapshot and conformance fixtures. - [x] Add exact MCP Description RC.2 migration support from validated 0.7.0 documents. -- [x] Expose reusable-component resolution as a separate RC.1-only pure - operation with deterministic terminal-target provenance and existing +- [x] Adopt RC.3 with package-owned selector integrity and decouple + non-normative specification documentation from validator releases. +- [x] Expose reusable-component resolution as a separate RC.1, RC.2, and RC.3 + pure operation with deterministic terminal-target provenance and existing unresolved-reference diagnostics. - Add normalization or comparison operations only where multiple consumers demonstrate the same requirement. diff --git a/package-lock.json b/package-lock.json index c7c18b2..51fa26c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2200,10 +2200,10 @@ }, "packages/core": { "name": "@mcpdesc/core", - "version": "0.8.1", + "version": "0.9.0", "license": "Apache-2.0", "dependencies": { - "@mcpdesc/validator": "0.9.0", + "@mcpdesc/validator": "0.10.0", "jsonc-parser": "3.3.1", "yaml": "2.9.0" }, @@ -2213,7 +2213,7 @@ }, "packages/validator": { "name": "@mcpdesc/validator", - "version": "0.9.0", + "version": "0.10.0", "license": "Apache-2.0", "dependencies": { "@cfworker/json-schema": "^4.1.1", diff --git a/packages/core/README.md b/packages/core/README.md index c6c0486..b1c6601 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -66,46 +66,53 @@ console.log(serializeMcpDescriptionMigrationReport(migrated.report)); ``` Semantic operations require an exact immutable selector and support -`0.8.0-draft.4`, `0.8.0-rc.1`, and `0.8.0-rc.2`. They validate their source and -result with `@mcpdesc/validator`. Declaration selection uses MCP Description -identities: tool and prompt `name`, resource `uri`, and resource template -`uriTemplate`. It preserves all selected protocol-scoped variants and omits -empty declaration collections. Draft 4 constants and operations remain available -without being silently retargeted to RC.1. - -| Operation | Draft 4 | RC.1 | RC.2 | -| ---------------------------------- | ------------- | --------- | -------------------------------------- | -| Effective Protocol View projection | Supported | Supported | Supported | -| Effective Protocol View merge | Supported | Supported | Supported | -| Declaration selection | Supported | Supported | Supported | -| Migration from 0.7.0 | Supported | Supported | Supported | -| Component reference resolution | Not supported | Supported | Pending provenance-compatible contract | - -RC.2 projection preserves pre-standard server extension maps in every applicable -Effective Protocol View. `mergeEffectiveProtocolViews` combines compatible -views, retains semantically equivalent declarations across scopes, and rejects -conflicting views or unscoped metadata without mutating inputs. - -Component reference resolution is RC.1-only. It validates before resolving, -returns a deep-cloned document with root component registries retained, and -reports deterministic provenance from each authored reference path to its -terminal component path. Intermediate chain hops are not exposed. The operation -uses the resolver exported through `@mcpdesc/validator/standalone`; this keeps -the snapshot-owned traversal authoritative while avoiding the runtime AJV entry -and a dependency cycle. +`0.8.0-draft.4`, `0.8.0-rc.1`, `0.8.0-rc.2`, and `0.8.0-rc.3`. They validate +their source and result with `@mcpdesc/validator`. Declaration selection uses +MCP Description identities: tool and prompt `name`, resource `uri`, and resource +template `uriTemplate`. It preserves all selected protocol-scoped variants and +omits empty declaration collections. Draft 4 constants and operations remain +available without being silently retargeted to RC.1. + +| Operation | Draft 4 | RC.1 | RC.2 | RC.3 | +| ---------------------------------- | ------------- | --------- | --------- | --------- | +| Effective Protocol View projection | Supported | Supported | Supported | Supported | +| Effective Protocol View merge | Supported | Supported | Supported | Supported | +| Declaration selection | Supported | Supported | Supported | Supported | +| Migration from 0.7.0 | Supported | Supported | Supported | Supported | +| Component reference resolution | Not supported | Supported | Supported | Supported | + +| Specification selector | First validator release | First core release | +| ---------------------- | ----------------------- | ------------------ | +| `0.8.0-rc.3` | `0.10.0` | `0.9.0` | +| `0.8.0-rc.2` | `0.9.0` | `0.8.0` | +| `0.8.0-rc.1` | `0.5.0` | `0.4.0` | +| `0.8.0-draft.4` | `0.4.0` | `0.1.0` | + +RC.2 and RC.3 projection preserve pre-standard server extension maps in every +applicable Effective Protocol View. `mergeEffectiveProtocolViews` combines +compatible views, retains semantically equivalent declarations across scopes, +and rejects conflicting views or unscoped metadata without mutating inputs. + +Component reference resolution supports RC.1, RC.2, and RC.3. It validates +before resolving, returns a deep-cloned document with root component registries +retained, and reports deterministic provenance from each authored reference path +to its terminal component path. Intermediate chain hops are not exposed. The +operation uses the resolver exported through `@mcpdesc/validator/standalone`; +this keeps the snapshot-owned traversal authoritative while avoiding the runtime +AJV entry and a dependency cycle. Migration accepts a caller-validated MCP Description 0.7.0 value and validates the result against the exact target snapshot. It moves the protocol revision to root scope, wraps server capabilities, omits optional empty arrays, and converts inline legacy security schemes to deterministic named definitions and requirements. Generated names and deduplication are reported as warnings for -author review. RC.1 and RC.2 callers may opt into `defaultProtocolVersion` when -the source omits `info.protocolVersion`; the source value always takes -precedence, and no built-in default is applied. Every migration result includes -a stable, JSON-compatible report that distinguishes success, success with -warnings, and failure and records diagnostics, applied defaults, and proven -conversion changes. The package does not ship or duplicate the frozen 0.7.0 -schema, so callers must validate that source before setting +author review. RC.1, RC.2, and RC.3 callers may opt into +`defaultProtocolVersion` when the source omits `info.protocolVersion`; the +source value always takes precedence, and no built-in default is applied. Every +migration result includes a stable, JSON-compatible report that distinguishes +success, success with warnings, and failure and records diagnostics, applied +defaults, and proven conversion changes. The package does not ship or duplicate +the frozen 0.7.0 schema, so callers must validate that source before setting `sourceValidated: true`. Source parsing accepts text and returns a JSON-compatible value or structured diff --git a/packages/core/package.json b/packages/core/package.json index f058c41..2ef2719 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@mcpdesc/core", - "version": "0.8.1", + "version": "0.9.0", "description": "Pure semantic operations for MCP Description documents", "type": "module", "license": "Apache-2.0", @@ -50,7 +50,7 @@ "typecheck": "tsc --build --pretty false" }, "dependencies": { - "@mcpdesc/validator": "0.9.0", + "@mcpdesc/validator": "0.10.0", "jsonc-parser": "3.3.1", "yaml": "2.9.0" } diff --git a/packages/core/scripts/check-consumer.mjs b/packages/core/scripts/check-consumer.mjs index c799c9d..03d2974 100644 --- a/packages/core/scripts/check-consumer.mjs +++ b/packages/core/scripts/check-consumer.mjs @@ -60,11 +60,14 @@ try { import { RC_1_SCHEMA_URI, RC_2_SCHEMA_URI, + RC_3_SCHEMA_URI, migrateMcpDescription07ToRc1, migrateMcpDescription07ToRc2, + migrateMcpDescription07ToRc3, projectEffectiveProtocolView, rc1Snapshot, rc2Snapshot, + rc3Snapshot, resolveMcpDescriptionComponentReferences, serializeMcpDescriptionMigrationReport, } from '@mcpdesc/core'; @@ -179,6 +182,26 @@ try { }).valid, true); assert.equal(rc2Snapshot.specification, '0.8.0-rc.2'); + const rc3Migration = migrateMcpDescription07ToRc3({ + mcpdesc: '0.7.0', + info: { + name: 'legacy-rc3-consumer-smoke', + version: '1.0.0', + protocolVersion: '2025-11-25', + }, + transports: [{ type: 'stdio', command: 'server' }], + }, { + specification: '0.8.0-rc.3', + sourceValidated: true, + }); + assert.equal(rc3Migration.ok, true); + assert.equal(rc3Migration.value.$schema, RC_3_SCHEMA_URI); + assert.equal(rc3Migration.report.targetSpecification, '0.8.0-rc.3'); + assert.equal(validateMcpDescription(rc3Migration.value, { + specification: '0.8.0-rc.3', + }).valid, true); + assert.equal(rc3Snapshot.specification, '0.8.0-rc.3'); + const preStandardApps = { $schema: RC_2_SCHEMA_URI, mcpdesc: '0.8.0', @@ -197,21 +220,36 @@ try { [{ code: 'extensions-not-supported-by-version', severity: 'warning' }], ); - const reusable = { - ...source, - components: { schemas: { Input: { type: 'object' } } }, - tools: [{ - name: 'referenced', - inputSchema: { $componentRef: '#/components/schemas/Input' }, - }], - }; - for (const operation of [resolveMcpDescriptionComponentReferences, resolveComponentsSubpath]) { - const resolution = operation(reusable, { specification: '0.8.0-rc.1' }); - assert.equal(resolution.ok, true); - assert.deepEqual(resolution.provenance, [{ - referencePath: ['tools', 0, 'inputSchema'], - targetPath: ['components', 'schemas', 'Input'], - }]); + for (const [specification, schemaUri] of [ + ['0.8.0-rc.1', RC_1_SCHEMA_URI], + ['0.8.0-rc.2', RC_2_SCHEMA_URI], + ['0.8.0-rc.3', RC_3_SCHEMA_URI], + ]) { + const reusable = { + ...source, + $schema: schemaUri, + components: { + schemas: { + Input: { type: 'object', additionalProperties: false }, + }, + }, + tools: [{ + name: 'referenced', + inputSchema: { $componentRef: '#/components/schemas/Input' }, + }], + }; + for (const operation of [resolveMcpDescriptionComponentReferences, resolveComponentsSubpath]) { + const resolution = operation(reusable, { specification }); + assert.equal( + resolution.ok, + true, + JSON.stringify(resolution.diagnostics), + ); + assert.deepEqual(resolution.provenance, [{ + referencePath: ['tools', 0, 'inputSchema'], + targetPath: ['components', 'schemas', 'Input'], + }]); + } } `, ); @@ -230,9 +268,11 @@ try { import { migrateMcpDescription07ToRc1, migrateMcpDescription07ToRc2, + migrateMcpDescription07ToRc3, serializeMcpDescriptionMigrationReport, type MigrateMcpDescription07ToRc1Options, type MigrateMcpDescription07ToRc2Options, + type MigrateMcpDescription07ToRc3Options, } from '@mcpdesc/core'; const parsed = parseMcpDescriptionSource('{"mcpdesc":"0.8.0"}'); @@ -268,6 +308,21 @@ try { }, rc2MigrationOptions, ); + const rc3MigrationOptions: MigrateMcpDescription07ToRc3Options = { + specification: '0.8.0-rc.3', + sourceValidated: true, + }; + migrateMcpDescription07ToRc3( + { + mcpdesc: '0.7.0', + info: { + name: 'typed-rc3', + version: '1.0.0', + protocolVersion: '2025-11-25', + }, + }, + rc3MigrationOptions, + ); const reference: McpDescComponentReference = { $componentRef: '#/components/schemas/Input', }; @@ -278,6 +333,14 @@ try { { mcpdesc: '0.8.0', info: {}, protocolVersions: [], components }, { specification: '0.8.0-rc.1' }, ); + resolveMcpDescriptionComponentReferences( + { mcpdesc: '0.8.0', info: {}, protocolVersions: [], components }, + { specification: '0.8.0-rc.2' }, + ); + resolveMcpDescriptionComponentReferences( + { mcpdesc: '0.8.0', info: {}, protocolVersions: [], components }, + { specification: '0.8.0-rc.3' }, + ); `, ); execFileSync( @@ -302,9 +365,9 @@ try { 'utf8', ), ); - if (installed.version !== '0.8.1') { + if (installed.version !== pack.version) { throw new Error( - `Expected installed core 0.8.1, found ${installed.version}`, + `Expected installed core ${pack.version}, found ${installed.version}`, ); } const installedValidator = JSON.parse( @@ -313,9 +376,9 @@ try { 'utf8', ), ); - if (installedValidator.version !== '0.9.0') { + if (installedValidator.version !== validatorPack.version) { throw new Error( - `Expected installed validator 0.9.0, found ${installedValidator.version}`, + `Expected installed validator ${validatorPack.version}, found ${installedValidator.version}`, ); } diff --git a/packages/core/src/components.ts b/packages/core/src/components.ts index d586416..8f5d298 100644 --- a/packages/core/src/components.ts +++ b/packages/core/src/components.ts @@ -5,7 +5,11 @@ import { } from '@mcpdesc/validator/standalone'; import type { CoreDiagnostic, McpDescriptionDocument } from './model.js'; -import { RC_1_SPECIFICATION } from './snapshot.js'; +import { + RC_1_SPECIFICATION, + RC_2_SPECIFICATION, + RC_3_SPECIFICATION, +} from './snapshot.js'; export type { McpDescComponentNamespace, @@ -19,9 +23,18 @@ export type { } from './model.js'; export interface ResolveMcpDescriptionComponentReferencesOptions { - readonly specification: typeof RC_1_SPECIFICATION; + readonly specification: + | typeof RC_1_SPECIFICATION + | typeof RC_2_SPECIFICATION + | typeof RC_3_SPECIFICATION; } +const componentReferenceSpecifications = new Set([ + RC_1_SPECIFICATION, + RC_2_SPECIFICATION, + RC_3_SPECIFICATION, +]); + export interface McpDescriptionComponentReferenceProvenance { readonly referencePath: readonly (number | string)[]; readonly targetPath: readonly (number | string)[]; @@ -70,7 +83,7 @@ export function resolveMcpDescriptionComponentReferences( document: unknown, options: ResolveMcpDescriptionComponentReferencesOptions, ): ResolveMcpDescriptionComponentReferencesResult { - if (options.specification !== RC_1_SPECIFICATION) { + if (!componentReferenceSpecifications.has(options.specification)) { return { ok: false, diagnostics: [ diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 6d0c56b..5039426 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -26,6 +26,7 @@ export { migrateMcpDescription07ToDraft4, migrateMcpDescription07ToRc1, migrateMcpDescription07ToRc2, + migrateMcpDescription07ToRc3, serializeMcpDescriptionMigrationReport, type McpDescriptionMigrationChange, type McpDescriptionMigrationDefault, @@ -34,6 +35,7 @@ export { type MigrateMcpDescription07Options, type MigrateMcpDescription07ToRc1Options, type MigrateMcpDescription07ToRc2Options, + type MigrateMcpDescription07ToRc3Options, } from './migration.js'; export { parseMcpDescriptionSource, @@ -66,8 +68,11 @@ export { RC_1_SPECIFICATION, RC_2_SCHEMA_URI, RC_2_SPECIFICATION, + RC_3_SCHEMA_URI, + RC_3_SPECIFICATION, draft4Snapshot, rc1Snapshot, rc2Snapshot, + rc3Snapshot, type SupportedCoreSpecification, } from './snapshot.js'; diff --git a/packages/core/src/migration.ts b/packages/core/src/migration.ts index 56033fa..b974ace 100644 --- a/packages/core/src/migration.ts +++ b/packages/core/src/migration.ts @@ -17,9 +17,12 @@ import { RC_1_SPECIFICATION, RC_2_SCHEMA_URI, RC_2_SPECIFICATION, + RC_3_SCHEMA_URI, + RC_3_SPECIFICATION, draft4Snapshot, rc1Snapshot, rc2Snapshot, + rc3Snapshot, type SupportedCoreSpecification, } from './snapshot.js'; @@ -59,10 +62,18 @@ export interface MigrateMcpDescription07ToRc2Options { readonly sourceValidated: true; } +export interface MigrateMcpDescription07ToRc3Options { + readonly specification: typeof RC_3_SPECIFICATION; + readonly defaultProtocolVersion?: SupportedProtocolVersion; + readonly protocolVersion?: SupportedProtocolVersion; + readonly sourceValidated: true; +} + type SupportedMigrationOptions = | MigrateMcpDescription07Options | MigrateMcpDescription07ToRc1Options - | MigrateMcpDescription07ToRc2Options; + | MigrateMcpDescription07ToRc2Options + | MigrateMcpDescription07ToRc3Options; export interface McpDescriptionMigrationDefault { readonly code: 'migration-default-protocol-version'; @@ -334,7 +345,10 @@ function migrateMcpDescription07( options: SupportedMigrationOptions, targetSpecification: SupportedCoreSpecification, targetSchemaUri: - typeof DRAFT_4_SCHEMA_URI | typeof RC_1_SCHEMA_URI | typeof RC_2_SCHEMA_URI, + | typeof DRAFT_4_SCHEMA_URI + | typeof RC_1_SCHEMA_URI + | typeof RC_2_SCHEMA_URI + | typeof RC_3_SCHEMA_URI, targetProtocolVersions: readonly SupportedProtocolVersion[], ): McpDescriptionMigrationResult { if (options.specification !== targetSpecification) { @@ -386,7 +400,8 @@ function migrateMcpDescription07( } const defaultProtocolVersion = (targetSpecification === RC_1_SPECIFICATION || - targetSpecification === RC_2_SPECIFICATION) && + targetSpecification === RC_2_SPECIFICATION || + targetSpecification === RC_3_SPECIFICATION) && 'defaultProtocolVersion' in options ? options.defaultProtocolVersion : undefined; @@ -550,3 +565,16 @@ export function migrateMcpDescription07ToRc2( rc2Snapshot.protocolVersions, ); } + +export function migrateMcpDescription07ToRc3( + source: unknown, + options: MigrateMcpDescription07ToRc3Options, +): McpDescriptionMigrationResult { + return migrateMcpDescription07( + source, + options, + RC_3_SPECIFICATION, + RC_3_SCHEMA_URI, + rc3Snapshot.protocolVersions, + ); +} diff --git a/packages/core/src/snapshot.ts b/packages/core/src/snapshot.ts index 2f5ba17..ba2d9ec 100644 --- a/packages/core/src/snapshot.ts +++ b/packages/core/src/snapshot.ts @@ -12,15 +12,20 @@ export const RC_1_SCHEMA_URI = export const RC_2_SPECIFICATION = '0.8.0-rc.2' as const; export const RC_2_SCHEMA_URI = 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json' as const; +export const RC_3_SPECIFICATION = '0.8.0-rc.3' as const; +export const RC_3_SCHEMA_URI = + 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json' as const; export type SupportedCoreSpecification = | typeof DRAFT_4_SPECIFICATION | typeof RC_1_SPECIFICATION - | typeof RC_2_SPECIFICATION; + | typeof RC_2_SPECIFICATION + | typeof RC_3_SPECIFICATION; const draft4Provenance = specificationProvenance[DRAFT_4_SPECIFICATION]; const rc1Provenance = specificationProvenance[RC_1_SPECIFICATION]; const rc2Provenance = specificationProvenance[RC_2_SPECIFICATION]; +const rc3Provenance = specificationProvenance[RC_3_SPECIFICATION]; export const draft4Snapshot = Object.freeze({ specification: DRAFT_4_SPECIFICATION, @@ -46,12 +51,21 @@ export const rc2Snapshot = Object.freeze({ protocolVersions: supportedProtocolVersions, }); +export const rc3Snapshot = Object.freeze({ + specification: RC_3_SPECIFICATION, + schemaUri: RC_3_SCHEMA_URI, + snapshotTag: rc3Provenance.snapshotTag, + schemaSha256: rc3Provenance.schemaSha256, + protocolVersions: supportedProtocolVersions, +}); + export function isSupportedCoreSpecification( specification: string, ): specification is SupportedCoreSpecification { return ( specification === DRAFT_4_SPECIFICATION || specification === RC_1_SPECIFICATION || - specification === RC_2_SPECIFICATION + specification === RC_2_SPECIFICATION || + specification === RC_3_SPECIFICATION ); } diff --git a/packages/core/test/components.test.ts b/packages/core/test/components.test.ts index 55e4f38..a363e59 100644 --- a/packages/core/test/components.test.ts +++ b/packages/core/test/components.test.ts @@ -18,6 +18,27 @@ const reusableComponents = JSON.parse( ), ) as JsonObject; +const laterReusableComponents = { + '0.8.0-rc.2': JSON.parse( + readFileSync( + new URL( + '../../validator/test/snapshots/0.8.0-rc.2/fixtures/expected-valid/reusable-components.json', + import.meta.url, + ), + 'utf8', + ), + ) as JsonObject, + '0.8.0-rc.3': JSON.parse( + readFileSync( + new URL( + '../../validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/reusable-components.json', + import.meta.url, + ), + 'utf8', + ), + ) as JsonObject, +} as const; + function resolve(document: unknown) { return resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-rc.1', @@ -37,6 +58,26 @@ function expectDiagnostic( } describe('resolveMcpDescriptionComponentReferences', () => { + for (const specification of ['0.8.0-rc.2', '0.8.0-rc.3'] as const) { + it(`resolves ${specification} references with terminal provenance`, () => { + const document = laterReusableComponents[specification]; + const result = resolveMcpDescriptionComponentReferences(document, { + specification, + }); + + expect(result.ok).toBe(true); + if (!result.ok) return; + expect((result.value.tools as JsonObject[])[0].inputSchema).toEqual( + (document.components as JsonObject).schemas && + ((document.components as JsonObject).schemas as JsonObject).Input, + ); + expect(result.provenance).toContainEqual({ + referencePath: ['tools', 0, 'inputSchema'], + targetPath: ['components', 'schemas', 'Input'], + }); + }); + } + it('resolves every namespace, chains, and shared targets with provenance', () => { const document = structuredClone(reusableComponents); const tools = document.tools as JsonObject[]; diff --git a/packages/core/test/migration.test.ts b/packages/core/test/migration.test.ts index 4234071..94f2e1e 100644 --- a/packages/core/test/migration.test.ts +++ b/packages/core/test/migration.test.ts @@ -4,9 +4,11 @@ import { DRAFT_4_SCHEMA_URI, RC_1_SCHEMA_URI, RC_2_SCHEMA_URI, + RC_3_SCHEMA_URI, migrateMcpDescription07ToDraft4, migrateMcpDescription07ToRc1, migrateMcpDescription07ToRc2, + migrateMcpDescription07ToRc3, serializeMcpDescriptionMigrationReport, type MigrateMcpDescription07ToRc1Options, } from '../src/index.js'; @@ -362,3 +364,19 @@ describe('migrateMcpDescription07ToRc2', () => { ]); }); }); + +describe('migrateMcpDescription07ToRc3', () => { + it('uses a source protocol version and validates the exact RC.3 snapshot', () => { + const result = migrateMcpDescription07ToRc3(source, { + specification: '0.8.0-rc.3', + sourceValidated: true, + }); + + expect(result.ok).toBe(true); + if (!result.ok) return; + expect(result.value.$schema).toBe(RC_3_SCHEMA_URI); + expect(result.value.mcpdesc).toBe('0.8.0'); + expect(result.value.protocolVersions).toEqual(['2025-11-25']); + expect(result.report.targetSpecification).toBe('0.8.0-rc.3'); + }); +}); diff --git a/packages/core/test/projection.test.ts b/packages/core/test/projection.test.ts index bdab2fb..59cd83f 100644 --- a/packages/core/test/projection.test.ts +++ b/packages/core/test/projection.test.ts @@ -4,10 +4,12 @@ import { DRAFT_4_SCHEMA_URI, RC_1_SCHEMA_URI, RC_2_SCHEMA_URI, + RC_3_SCHEMA_URI, draft4Snapshot, projectEffectiveProtocolView, rc1Snapshot, rc2Snapshot, + rc3Snapshot, } from '../src/index.js'; const source = { @@ -196,6 +198,17 @@ describe('projectEffectiveProtocolView', () => { expect(Object.isFrozen(rc2Snapshot)).toBe(true); }); + it('publishes RC.3 snapshot metadata', () => { + expect(rc3Snapshot).toMatchObject({ + specification: '0.8.0-rc.3', + schemaUri: RC_3_SCHEMA_URI, + snapshotTag: 'v0.8.0-rc.3', + schemaSha256: + 'a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4', + }); + expect(Object.isFrozen(rc3Snapshot)).toBe(true); + }); + it('projects every scoped root collection and preserves unscoped semantics', () => { const comprehensive = { $schema: DRAFT_4_SCHEMA_URI, diff --git a/packages/core/test/specification-support.test.ts b/packages/core/test/specification-support.test.ts index 8e9d04e..9838c59 100644 --- a/packages/core/test/specification-support.test.ts +++ b/packages/core/test/specification-support.test.ts @@ -4,10 +4,12 @@ import { DRAFT_4_SCHEMA_URI, RC_1_SCHEMA_URI, RC_2_SCHEMA_URI, + RC_3_SCHEMA_URI, mergeEffectiveProtocolViews, migrateMcpDescription07ToDraft4, migrateMcpDescription07ToRc1, migrateMcpDescription07ToRc2, + migrateMcpDescription07ToRc3, projectEffectiveProtocolView, resolveMcpDescriptionComponentReferences, selectMcpDescriptionDeclarations, @@ -39,7 +41,14 @@ const supportBySpecification = { selection: 'supported', }, '0.8.0-rc.2': { - componentResolution: 'unsupported-pending-contract', + componentResolution: 'supported', + merge: 'supported', + migrationFrom07: 'supported', + projection: 'supported', + selection: 'supported', + }, + '0.8.0-rc.3': { + componentResolution: 'supported', merge: 'supported', migrationFrom07: 'supported', projection: 'supported', @@ -54,6 +63,7 @@ const schemaBySpecification = { '0.8.0-draft.4': DRAFT_4_SCHEMA_URI, '0.8.0-rc.1': RC_1_SCHEMA_URI, '0.8.0-rc.2': RC_2_SCHEMA_URI, + '0.8.0-rc.3': RC_3_SCHEMA_URI, } as const satisfies Record; const migrateBySpecification = { @@ -72,6 +82,11 @@ const migrateBySpecification = { specification: '0.8.0-rc.2', sourceValidated: true, }), + '0.8.0-rc.3': (source: unknown) => + migrateMcpDescription07ToRc3(source, { + specification: '0.8.0-rc.3', + sourceValidated: true, + }), } satisfies Record< SupportedCoreSpecification, (source: unknown) => { readonly ok: boolean } diff --git a/packages/validator/AGENTS.md b/packages/validator/AGENTS.md index e93cfe9..683b03a 100644 --- a/packages/validator/AGENTS.md +++ b/packages/validator/AGENTS.md @@ -23,8 +23,9 @@ schemas remain in `mcpdesc/mcpdesc-specification`. published `src/snapshots/` implementation when schema validation, semantic conformance, diagnostics, and frozen fixtures remain unchanged. Record the exact file and reason in `snapshot-integrity.json` and the package changelog. -- Import approved specification artifacts with exact source commit, tag, schema - digest, semantic implementation, and frozen fixture provenance. +- Import reviewed specification artifacts with exact selector, schema digest, + semantic implementation, and frozen fixtures. Source repository, tag, and + commit are informational provenance rather than package integrity inputs. - Add later snapshots as siblings and update the registry, declarations, package README, changelog, package-content check, and browser build selector list together. diff --git a/packages/validator/CHANGELOG.md b/packages/validator/CHANGELOG.md index 5513b39..ff71ce3 100644 --- a/packages/validator/CHANGELOG.md +++ b/packages/validator/CHANGELOG.md @@ -6,7 +6,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this package follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Dates for published releases are the UTC publication dates recorded by npm. -## [Unreleased] +## [0.10.0] - 2026-09-07 + +### Added + +- Added the immutable `0.8.0-rc.3` selector with behavior equivalent to RC.2, + its RC.3 schema identity, and frozen fixtures. +- Added component reference resolution for RC.2 and RC.3 with deterministic + terminal-target provenance. + +### Changed + +- Validator integrity now relies on package-owned schema, runtime, fixture, and + package bytes. Specification repository tags and commits are retained only as + informational provenance. +- Recorded maintainer-approved additive provenance corrections to the RC.2 and + RC.3 snapshot implementations. Their schemas, conformance results, + diagnostics, and frozen fixtures remain unchanged. ## [0.9.0] - 2026-09-04 diff --git a/packages/validator/README.md b/packages/validator/README.md index ebbb4e3..c0ffb40 100644 --- a/packages/validator/README.md +++ b/packages/validator/README.md @@ -44,16 +44,21 @@ a later draft is published. ## Supported snapshots -Version `0.8.0` supports these immutable snapshots, newest first: +The current workspace supports these immutable selectors, newest first: -| Selector | Tag | Embedded schema SHA-256 | +| Selector | First validator release | Embedded schema SHA-256 | |---|---|---| -| `0.8.0-rc.2` | `v0.8.0-rc.2` | `40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8` | -| `0.8.0-rc.1` | `v0.8.0-rc.1` | `936a0f24ade501fcabf3d6498c0440c445daa672a575573a35954cee49430ac4` | -| `0.8.0-draft.4` | `v0.8.0-draft.4` | `93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b` | -| `0.8.0-draft.3` | `v0.8.0-draft.3` | `8823c1f1946360b2a44d00920e2092e5e4acd139a1964befad4eb0bf3ce96002` | -| `0.8.0-draft.2` | `v0.8.0-draft.2` | `ab692c1a5a0f7e5f29be1940aa8c64a56d4620be0a19d00cf0a64680b7e517fa` | -| `0.8.0-draft.1` | `v0.8.0-draft.1` | `4ceb6042c3fd31703199cd3db869ec5c35c17d2fe9ab7b2f5b96a2a3af0cebe4` | +| `0.8.0-rc.3` | `0.10.0` | `a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4` | +| `0.8.0-rc.2` | `0.9.0` | `40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8` | +| `0.8.0-rc.1` | `0.5.0` | `936a0f24ade501fcabf3d6498c0440c445daa672a575573a35954cee49430ac4` | +| `0.8.0-draft.4` | `0.4.0` | `93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b` | +| `0.8.0-draft.3` | `0.3.0` | `8823c1f1946360b2a44d00920e2092e5e4acd139a1964befad4eb0bf3ce96002` | +| `0.8.0-draft.2` | `0.2.0` | `ab692c1a5a0f7e5f29be1940aa8c64a56d4620be0a19d00cf0a64680b7e517fa` | +| `0.8.0-draft.1` | `0.1.0` | `4ceb6042c3fd31703199cd3db869ec5c35c17d2fe9ab7b2f5b96a2a3af0cebe4` | + +The validator package embeds the schema and executable behavior for each +selector. npm integrity and trusted-publishing provenance identify released +package bytes; specification repository tags and commits are informational. ## Usage @@ -132,9 +137,9 @@ Structural paths start with AJV's instance path. A `required` error appends its ## Support metadata -The package exports frozen `supportedSpecifications`, `supportedProtocolVersions`, and `specificationProvenance` values. Provenance records include the snapshot tag, recorded schema URI, and embedded schema SHA-256 digest. Public validation dispatches through a registry keyed by exact specification selectors. The current repository selector set is `0.8.0-draft.1`, `0.8.0-draft.2`, `0.8.0-draft.3`, `0.8.0-draft.4`, `0.8.0-rc.1`, and `0.8.0-rc.2`; the protocol-version export is the deduplicated union supported by those snapshots. +The package exports frozen `supportedSpecifications`, `supportedProtocolVersions`, and `specificationProvenance` values. Provenance records include the snapshot tag, recorded schema URI, and embedded schema SHA-256 digest. Public validation dispatches through a registry keyed by exact specification selectors. The current repository selector set is `0.8.0-draft.1`, `0.8.0-draft.2`, `0.8.0-draft.3`, `0.8.0-draft.4`, `0.8.0-rc.1`, `0.8.0-rc.2`, and `0.8.0-rc.3`; the protocol-version export is the deduplicated union supported by those snapshots. -RC.2 also exports the frozen `mcpExtensionCatalogue` and +RC.2 and RC.3 also export the frozen `mcpExtensionCatalogue` and `mcpExtensionMaturity` classifier. The catalogue pins its authoritative source, effective date, and official or experimental identifier assignments. Catalogue recognition establishes authority and maturity only; it does not validate @@ -142,10 +147,10 @@ extension-specific settings. npm package SemVer tracks implementation releases independently from specification snapshot identity. Adding a later snapshot is additive: it must use a sibling implementation and selector rather than changing an existing snapshot's schema, semantics, metadata, fixtures, or results. -The RC.1 component resolver has one maintainer-approved additive tooling -correction: successful substitutions also report authored and terminal target -paths. The correction does not change the RC.1 schema, validation results, -diagnostics, or fixtures and is recorded in the integrity manifest. +The RC.1, RC.2, and RC.3 component resolvers report authored and terminal target +paths for successful substitutions. The additive tooling corrections do not +change snapshot schemas, validation results, diagnostics, or fixtures and are +recorded in the integrity manifest. The runtime bundles its schema, performs no network fetches for external schema references, and imports no Node.js built-ins. Unresolved external Tool-schema references produce incomplete-validation warnings and are preserved. All three ESM entry points support Node.js 20 or later and browser bundlers. diff --git a/packages/validator/index.d.ts b/packages/validator/index.d.ts index 6462b95..8deb811 100644 --- a/packages/validator/index.d.ts +++ b/packages/validator/index.d.ts @@ -1,4 +1,4 @@ -export type McpDescriptionSpecification = '0.8.0-draft.1' | '0.8.0-draft.2' | '0.8.0-draft.3' | '0.8.0-draft.4' | '0.8.0-rc.1' | '0.8.0-rc.2'; +export type McpDescriptionSpecification = '0.8.0-draft.1' | '0.8.0-draft.2' | '0.8.0-draft.3' | '0.8.0-draft.4' | '0.8.0-rc.1' | '0.8.0-rc.2' | '0.8.0-rc.3'; export type SupportedProtocolVersion = | '2024-11-05' @@ -38,7 +38,7 @@ export interface McpDescriptionComponentResolutionResult { } export interface ResolveMcpDescriptionComponentReferencesOptions { - readonly specification: '0.8.0-rc.1'; + readonly specification: '0.8.0-rc.1' | '0.8.0-rc.2' | '0.8.0-rc.3'; } export type McpExtensionMaturity = 'official' | 'experimental' | 'uncatalogued'; @@ -86,6 +86,11 @@ export interface SpecificationProvenance { readonly schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json'; readonly schemaSha256: '40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8'; }; + readonly '0.8.0-rc.3': { + readonly snapshotTag: 'v0.8.0-rc.3'; + readonly schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json'; + readonly schemaSha256: 'a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4'; + }; } export interface ResolveMcpDescriptionSpecificationOptions { @@ -109,7 +114,7 @@ export type McpDescriptionSpecificationResolution = | ResolvedMcpDescriptionSpecification | UnresolvedMcpDescriptionSpecification; -export declare const supportedSpecifications: readonly ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2']; +export declare const supportedSpecifications: readonly ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2', '0.8.0-rc.3']; export declare const supportedProtocolVersions: readonly [ '2024-11-05', diff --git a/packages/validator/package.json b/packages/validator/package.json index dd5804f..d6c103e 100644 --- a/packages/validator/package.json +++ b/packages/validator/package.json @@ -1,6 +1,6 @@ { "name": "@mcpdesc/validator", - "version": "0.9.0", + "version": "0.10.0", "description": "Structural and semantic validation for MCP Description snapshots", "type": "module", "types": "./index.d.ts", diff --git a/packages/validator/scripts/build-standalone.mjs b/packages/validator/scripts/build-standalone.mjs index fb88216..9e17f42 100644 --- a/packages/validator/scripts/build-standalone.mjs +++ b/packages/validator/scripts/build-standalone.mjs @@ -12,7 +12,7 @@ const output = path.join(packageRoot, 'standalone.js'); const draft7Adapter = path.join(packageRoot, 'src/standalone/ajv-adapter.js'); const draft2020Adapter = path.join(packageRoot, 'src/standalone/ajv-2020-adapter.js'); const formatsAdapter = path.join(packageRoot, 'src/standalone/ajv-formats-adapter.js'); -const selectors = ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2']; +const selectors = ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2', '0.8.0-rc.3']; const schemas = selectors.map((selector) => JSON.parse(fs.readFileSync( path.join(packageRoot, 'src/snapshots', selector, 'schema.json'), 'utf8' diff --git a/packages/validator/scripts/check-browser-bundle.mjs b/packages/validator/scripts/check-browser-bundle.mjs index 1307ff3..2c5de00 100644 --- a/packages/validator/scripts/check-browser-bundle.mjs +++ b/packages/validator/scripts/check-browser-bundle.mjs @@ -80,7 +80,7 @@ if (/\beval\s*\(|\bnew\s+Function\b/.test(standalone)) { if (/\bnode:/.test(standalone)) { throw new Error('Standalone bundle contains a Node.js built-in import'); } -for (const selector of ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2']) { +for (const selector of ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2', '0.8.0-rc.3']) { if (!standalone.includes(selector)) { throw new Error(`Standalone bundle is missing runtime snapshot ${selector}`); } diff --git a/packages/validator/scripts/check-package.mjs b/packages/validator/scripts/check-package.mjs index 505f632..b50d036 100644 --- a/packages/validator/scripts/check-package.mjs +++ b/packages/validator/scripts/check-package.mjs @@ -64,7 +64,11 @@ const expected = [ 'src/snapshots/0.8.0-rc.2/base.js', 'src/snapshots/0.8.0-rc.2/index.js', 'src/snapshots/0.8.0-rc.2/schema.json', - 'src/snapshots/0.8.0-rc.2/semantic.js' + 'src/snapshots/0.8.0-rc.2/semantic.js', + 'src/snapshots/0.8.0-rc.3/base.js', + 'src/snapshots/0.8.0-rc.3/index.js', + 'src/snapshots/0.8.0-rc.3/schema.json', + 'src/snapshots/0.8.0-rc.3/semantic.js' ].sort(); if (JSON.stringify(actual) !== JSON.stringify(expected)) { diff --git a/packages/validator/scripts/check-snapshot-integrity.mjs b/packages/validator/scripts/check-snapshot-integrity.mjs index 209bb88..d1b26df 100644 --- a/packages/validator/scripts/check-snapshot-integrity.mjs +++ b/packages/validator/scripts/check-snapshot-integrity.mjs @@ -33,17 +33,22 @@ const files = snapshotRoots })); const generated = { formatVersion: 1, - baselineSource: { - repository: 'https://github.com/mcpdesc/mcpdesc-specification', - commit: '6eb1b54330f8b7dc11468c7e31614214c7521cd0', - tag: 'validator-v0.6.0', - }, approvedExceptions: [ { path: 'src/snapshots/0.8.0-rc.1/semantic.js', reason: 'Add terminal component-reference provenance without changing the RC.1 schema, conformance results, diagnostics, or fixtures.', }, + { + path: 'src/snapshots/0.8.0-rc.2/semantic.js', + reason: + 'Add terminal component-reference provenance without changing the RC.2 schema, conformance results, diagnostics, or fixtures.', + }, + { + path: 'src/snapshots/0.8.0-rc.3/semantic.js', + reason: + 'Add terminal component-reference provenance without changing the RC.3 schema, conformance results, diagnostics, or fixtures.', + }, ], files, }; diff --git a/packages/validator/scripts/import-snapshot.mjs b/packages/validator/scripts/import-snapshot.mjs index 6b7dcd3..f2e1dc6 100644 --- a/packages/validator/scripts/import-snapshot.mjs +++ b/packages/validator/scripts/import-snapshot.mjs @@ -37,11 +37,13 @@ if (!/^\d+\.\d+\.\d+-(?:draft|rc)\.\d+$/.test(manifest.selector ?? '')) { if (manifest.snapshotTag !== `v${manifest.selector}`) { fail('snapshotTag must equal v'); } -if (!/^[a-f0-9]{40}$/.test(manifest.source?.commit ?? '')) { - fail('source.commit must be a full lowercase Git commit'); -} -if (manifest.source?.repository !== 'https://github.com/mcpdesc/mcpdesc-specification') { - fail('source.repository must identify mcpdesc/mcpdesc-specification'); +if (manifest.source !== undefined) { + if (!/^[a-f0-9]{40}$/.test(manifest.source?.commit ?? '')) { + fail('source.commit must be a full lowercase Git commit when provided'); + } + if (manifest.source?.repository !== 'https://github.com/mcpdesc/mcpdesc-specification') { + fail('source.repository must identify mcpdesc/mcpdesc-specification'); + } } if (!Array.isArray(manifest.files) || manifest.files.length === 0) { fail('files must be a non-empty array'); @@ -116,7 +118,7 @@ const fixtureTarget = path.join( 'snapshots', manifest.selector, ); -if (fs.existsSync(runtimeTarget) || fs.existsSync(fixtureTarget)) { +if (!checkOnly && (fs.existsSync(runtimeTarget) || fs.existsSync(fixtureTarget))) { fail(`${manifest.selector} already exists; snapshots are immutable`); } @@ -132,17 +134,12 @@ if (!checkOnly) { }); fs.writeFileSync( path.join(fixtureTarget, 'README.md'), - `# Validator fixture snapshot: ${manifest.selector}\n\nThe \`fixtures/\` tree was imported from ${manifest.source.repository} commit \`${manifest.source.commit}\` for the immutable \`${manifest.snapshotTag}\` specification snapshot.\n`, - ); - fs.mkdirSync(path.join(packageRoot, 'snapshot-imports'), { recursive: true }); - fs.copyFileSync( - manifestPath, - path.join(packageRoot, 'snapshot-imports', `${manifest.selector}.json`), + `# Validator fixture snapshot: ${manifest.selector}\n\nThe \`fixtures/\` tree is frozen for the immutable \`${manifest.selector}\` validator selector.\n`, ); } console.log( - `${checkOnly ? 'Validated' : 'Imported'} ${manifest.selector} from ${manifest.source.commit} (${manifest.files.length} files).`, + `${checkOnly ? 'Validated' : 'Imported'} ${manifest.selector} (${manifest.files.length} files).`, ); if (!checkOnly) { console.log( diff --git a/packages/validator/snapshot-integrity.json b/packages/validator/snapshot-integrity.json index 45bd5a3..b085172 100644 --- a/packages/validator/snapshot-integrity.json +++ b/packages/validator/snapshot-integrity.json @@ -1,14 +1,17 @@ { "formatVersion": 1, - "baselineSource": { - "repository": "https://github.com/mcpdesc/mcpdesc-specification", - "commit": "6eb1b54330f8b7dc11468c7e31614214c7521cd0", - "tag": "validator-v0.6.0" - }, "approvedExceptions": [ { "path": "src/snapshots/0.8.0-rc.1/semantic.js", "reason": "Add terminal component-reference provenance without changing the RC.1 schema, conformance results, diagnostics, or fixtures." + }, + { + "path": "src/snapshots/0.8.0-rc.2/semantic.js", + "reason": "Add terminal component-reference provenance without changing the RC.2 schema, conformance results, diagnostics, or fixtures." + }, + { + "path": "src/snapshots/0.8.0-rc.3/semantic.js", + "reason": "Add terminal component-reference provenance without changing the RC.3 schema, conformance results, diagnostics, or fixtures." } ], "files": [ @@ -102,7 +105,23 @@ }, { "path": "src/snapshots/0.8.0-rc.2/semantic.js", - "sha256": "7fa66976fa3a47b66e70378f8e2a4e00c2f846bd3713166cce2abb0dc1865a1c" + "sha256": "84f19ab1bbf001fdb3afe29c03f4893ffb05e5d1f4498fd3a7ae11e363bf9f3e" + }, + { + "path": "src/snapshots/0.8.0-rc.3/base.js", + "sha256": "2c7b062583ee2d94a00a8a9b6bcd382f8f54749673be571c9ee8f7c87874822f" + }, + { + "path": "src/snapshots/0.8.0-rc.3/index.js", + "sha256": "97c0382f97a57e9b352d5f6331e848014a95e7d114630500d8420cfbc9a5b068" + }, + { + "path": "src/snapshots/0.8.0-rc.3/schema.json", + "sha256": "a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4" + }, + { + "path": "src/snapshots/0.8.0-rc.3/semantic.js", + "sha256": "2b18029a385e0e22a34ea058aae5e5e0ec28aeea77df532d84000d6b0a6bc680" }, { "path": "test/snapshots/0.8.0-draft.1/README.md", @@ -2215,6 +2234,394 @@ { "path": "test/snapshots/0.8.0-rc.2/fixtures/expected-warning/unresolved-external-tool-ref.json", "sha256": "5f7a8faefa703d8974c3a2b311885104755620d0531fada988029c24252928a5" + }, + { + "path": "test/snapshots/0.8.0-rc.3/README.md", + "sha256": "350f81d52d0c42cc5720bbd578d149f105d8ca5a3699c53ebfaa1284ecd013ef" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/closed-protocol-enum.json", + "sha256": "14965ac313740feaacd73976347d854d05e435728f23750ce11281aa274ef1c3" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-contextual-examples.json", + "sha256": "5e02f403d8d4c88c001975412e413c4281bb2ff08dc99baed642840741cf0128" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-contextual-schemas.json", + "sha256": "13852d3292b00ee26109aecefad21448f3f95b71c889d773360d501ee4091b30" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-extension-boundaries.json", + "sha256": "797025e39c00502affd6b5c651603a9e3d94b663cba788eb53c4755fb63d98f3" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-protocol-scope.json", + "sha256": "0c666a200e3b3b3a630a8ed6cbd56a60ac698533df07003ec696267d91020ade" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-reference-resolution.json", + "sha256": "92817c8a36b14e38b8d875ce2e094fb338baa36cd0ef8cd088909f85d29f7d96" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/components-empty-and-reference-shapes.json", + "sha256": "8d905979442c3055c4d00cbb1fc9398143d8d1be72e3338df3f1a76a03a1bafc" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-mcp-header.json", + "sha256": "eb2b90be79412681b7a768ab3752a4fa9091937b4c771d0f8027d2578722f9a6" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-security-scope.json", + "sha256": "26285e5ac83c8372180adc3fcca7118e9d5f7e3324c5381639799c1f04a4473d" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-tag-reference.json", + "sha256": "3b5ed62d2aee72ddd53299e1ff0491e91266cf598f72ae22a4f638b4df214c7e" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-branch-mixing.json", + "sha256": "d4d67ae98859b0ce0a907ca5768d4cda0424150b19a1ba994ecc9fa37bd06599" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-form-semantics.json", + "sha256": "60f0ed723e0012f8ba1bc7820dfb32efc3c978f612c81cf9af14ab6075751cd6" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-scope-outside-parent.json", + "sha256": "02c82087bf2aecd7863385f8ec582ece66317eb92d0c23457439e1ebaa403d5b" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-version-mismatch.json", + "sha256": "e59fb70ed93d25ca017e722b7398a737d5fb37de423467b1c81c41acabcf2dae" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-client-capability-requirements.json", + "sha256": "c851871d487ea536b926bde37ba2005f264fa0304c1918383643aae6d65ad206" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-ordinary-nested-collections.json", + "sha256": "204a6e76631bbfead649f803f28d01a157ed5470582f8e6b3d201c72fbb8d7c1" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-ordinary-root-collections.json", + "sha256": "5ca857cf66986c757985d5e490c3d5a9645f4b7e10ddf1c57afbfc44b97a85ea" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-tag-catalog-reference.json", + "sha256": "4e93b6ec3a71806bac236af96d0a16ec4df731b289eee327f175c133752cea5c" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-completion-example-semantics.json", + "sha256": "07fcc00fd30620b99570660e3246a58c452566da12e6b9f28063ffbd4b30d89a" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-mcp-header-placement.json", + "sha256": "16de60076d6eaebbc0110accb9613a11641e147baf23ded3e5218dcd53f57c55" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-mcp-header-value.json", + "sha256": "97711dbb007643edbf4b53c2bd1ae99b4f09a82ae2ec3bc49c2d196cd4590511" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-prompt-example-semantics.json", + "sha256": "0b307f43d3a1d6c35ec3d72983db9056efb10e88730faf07cce3126b7a1ed39d" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-resource-annotations.json", + "sha256": "5576d9db73f90861600ee74ecc870db2702d942e98bb706b7c48c5d708f51b62" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-security-scheme-name.json", + "sha256": "c738b03ffa218ac9cb2c47fdb2b6d691d64a9723516212c8cef9dff11492bbcf" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-tool-example-result-semantics.json", + "sha256": "1e81e11b85de858efc328a6eb81c063008ddca4835fa7ef457a8f9aa510e7f91" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-tool-interaction-example-semantics.json", + "sha256": "3a077bf78da74ca044272597c632f367eeb2869daa352403098677d8d7e8267a" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-completion-examples.json", + "sha256": "8c78b0acd3f2748d908b74fb10c1c96f79d41c92264bbbd5ed8e38616fb088c0" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-extension-identifier.json", + "sha256": "e4b893496a0837cd7cc0c366a41d979da4444fdd4ba319c05e36d65ef4d1052a" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-pre-dialect-tool-schema-shape.json", + "sha256": "30a238d871d199e321b6fa1e00ca5c58d588d1872c49f4229221227a4cd8b36a" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-prompt-examples.json", + "sha256": "7f0297b0817230ebc76d9e2d33db31a20e923b6a4001893f67db3780ff0b332b" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-resource-examples.json", + "sha256": "8824657335e34e9d3c9a19f1618957230e7332b1f30233b14d8a11abbac7f641" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-resource-template-example.json", + "sha256": "91fe9da17eaec9e0bab8b4c36832036a32c5d171642021536bde5603c6a263ac" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-examples.json", + "sha256": "9fdcfecf736c95c8509f3f878ec1b3bbd1d91b2f3ea4e05318046ff836a416c5" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-interaction-examples.json", + "sha256": "e9766a31c1f4bf05e5c951cf222d78ab8e46c318e2a94a3f42d4d807e4f60dd5" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-schema.json", + "sha256": "5d40e4a286b61370548ff4caa8d67246ad8ba279e0f1ad2ffdf3668f4a45e940" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/meta-invalid-key.json", + "sha256": "78b92bea3674ad8e80f1aa33e8dacc14ee86dc1a876e5e6ff009441e673171fc" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/meta-reserved-key-misuse.json", + "sha256": "2b446c31c2059dc32a7f49108654a4ea92dbdc5cb35196d79342a6264d8383ab" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/missing-tool-input-schema.json", + "sha256": "2475e39b32c095e4e246abd71d60821ec2a8741a46e0e8b0e6c53ba710d79366" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/non-oauth-scopes.json", + "sha256": "dd8ad2dbc08bb5e85168e882f260a8bdf1aa9047855a32cd46cc55c45113cd8a" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/non-object-output-schema-before-2026.json", + "sha256": "c4c25b38f56f2208190fbf01fd2fa91d0fc52d12ff089ae532bc23bb34ce8770" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/oauth-flow-missing-required-url.json", + "sha256": "575d47953c0e104b7cdc140ede417ef49d168f07ab954c5b8b2f1ad18c170b3d" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-cannot-weaken-core.json", + "sha256": "a1e2667937ac5027f1f6d76c91028950ca0a882cdad2c588eafb64c745df8a3a" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-capability-map.json", + "sha256": "d7b2ae6061c0bee5a5f6d2c4c8339ae2c36d1b3a76c97fd96e83bdfc370eab88" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-domain-map.json", + "sha256": "ccce54e60e773a0976eced4b892549e41e1dd3758722de83196fd0e2eee9dd7c" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-native-content.json", + "sha256": "ab97250d17e0f3284646104ff09650b723c45307752449703be58027048d57c5" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-security-requirement.json", + "sha256": "6d5fed19006d9a11fc80aacb5177e70a1e3ad28c3eddb4ef8cdd85b0eb8f037b" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-unknown-property.json", + "sha256": "398a9d3b666e5606c100707dc32722c29c6b33f604f4a8d5b27ee3c66d0be810" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/overlapping-capabilities.json", + "sha256": "e35f1bbf249f36950bdd74a7773d4dc798f5f6a6c4884e0c37d26ed8f969a40c" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/overlapping-tool-scope.json", + "sha256": "9dea7e33bbcdbad531c94bf2ba120d5bd8f308c009ab1dd42c3e4351726e9ea1" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/resource-example-cache-fields.json", + "sha256": "ab843b193614836a85e71b8e1585f2566d50af1d34da1b46d5080a6432806bd5" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/resource-example-result-semantics.json", + "sha256": "fb37de7365789fa2d108782f6791bf43492f68ddf0af9daca92eb139dc9061c0" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-execution.json", + "sha256": "ec04ac2cb43c6dbe5a9e9809411dd3982fb92995fc8cad1e664efa964f603be0" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-mcp-header.json", + "sha256": "67829ae3ff85311bf1c680ec747b1c33cb2f5ed74eee6386b2c4e4c7ebc310bc" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-streamable-http.json", + "sha256": "1eb9e12b50170d3f98d2909ffbae991cdb8ec0b8cc4947c608b771d3a94f3344" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-tool-schema-dialect.json", + "sha256": "26d6beda350f88661a306d74ef741dbbb9bd283c40dd41b63f5ff3f58906fb68" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-incompatible-client-capability-requirements.json", + "sha256": "058c167c5962f43420e1f6c68275ebb61816f99b3a602c712d2e078bbaecaa57" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-incompatible-tool-example.json", + "sha256": "81b0f4729bb3e832e3d8d631cf86775a6b8c6452d7d763b40f5882284cdaec46" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/root-version-without-transport.json", + "sha256": "b6603442488035e1d4140e3646a6d776f5f3988cffbb373e1b664c092bc5ece7" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/scoped-version-not-in-root.json", + "sha256": "f54bf932b11d53a36a03bd2935437b1817a39fa2ecd7b04be780ec92a896898c" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/tool-example-schema-mismatches.json", + "sha256": "edbf863af86b19b8fd656df2192c4eb7cb46076ca8232e68cc29d0024079e3b4" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/unknown-security-reference.json", + "sha256": "727c7fc8a1b64f055a03a6a02fcd58330feba82500be169dbc44e435ee8eac95" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/unresolved-local-tool-ref.json", + "sha256": "339452f1966570c1a0f27ac28c1c453701d9b4b6b5bcdcad2d789c3b8c9d4710" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/client-capability-requirements.json", + "sha256": "6980cad385b8266a58a1f86e6c7522a4dd20c3bebb9c466ed1d3533bf6ea39a9" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/distinct-tool-and-resource-annotations.json", + "sha256": "1fc713c40b4366f2a533d3945b89e6dd9e96e11aa953648f52df0fcf0405d2c6" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/elicitation-declarations.json", + "sha256": "c317269e3e80bebcebcc58cf6a2dc9c5027103b939da989bc1ecf0a4c782fe10" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/integrated-draft2-features.yaml", + "sha256": "d7e5a97571479fcd1f10ae01533bb7edeab2c029e0fdf00c9db7041b5c5dcaea" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/meta-literal-values.json", + "sha256": "a2409815127fbd977b4e2a0abffbf926e2fda5621a7549ba9ce08475b748fe7b" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/minimal-zero-primitives.json", + "sha256": "acb1250c6e1d91ae62eeedea02f7e605920ad2a25cc9148fdeeb63d98a9d2e51" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-completion-examples.json", + "sha256": "f1de1543aee7462cc99b2add457e62866963cd00bf90831f3b36294846bbde5f" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-prompt-examples.json", + "sha256": "be87205f0b5759b403a6005f443437066005b9c0b0ce10700a490fabf56e2f2e" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-resource-examples.json", + "sha256": "90d5db86a9932ef1bd3e1d057185cee583889171a11543bf07eab69c0fd2118c" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-tool-examples.json", + "sha256": "4dde2f0c9c3ecef2a3dbeb944b519f3a01e06160b57560b1ededf74e1e57a57f" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-tool-interaction-examples.json", + "sha256": "661b9a5ecf827dae4ec895e4fb907a69ad57c10dafa86ca4851a17ee5dcd69fb" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/object-level-specification-extensions.json", + "sha256": "54c3e6dc6f54b6361df3747166024204cc3e2baee6dfb8f9c390a04cb507e98a" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/protocol-coverage-and-tool-schemas.json", + "sha256": "842b8df1e2b3ffe2dc5c16ce25e7bedccb2fbe0db3bcd16ccc7ecdcb307e1690" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/protocol-scoped-primitives.json", + "sha256": "b004c1d30b64eeb3223a4ef0e5e15296068f0e07ae49d48a89c0a5ca5cd42462" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/reusable-components.json", + "sha256": "8846366fdb7a5466f71ca2b8b7111828017b0c03083b7288da13c29f62bb64b8" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/security-composition-and-inheritance.json", + "sha256": "e8c41050150a4057b652793a0a0cf5af2eb6aae0bb12803562bf98f968006d11" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/security-root-and-override.json", + "sha256": "94ec965c3b6f79af539a6460ffd6a554fd7990a1260fc656ee2e42d16a457cf1" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/tagged-surface.json", + "sha256": "347b6377b86ad292f1221d161da53745b4b84f0fd26e867f984d14cad0aa576d" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-valid/unknown-extension-identifier.json", + "sha256": "73f079f3a9a9ad1fe736a23ab1d5387227ada99a7c8546c7c26b887bd168497e" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/deprecated-client-capability-requirements.json", + "sha256": "6024824ef78d93bc2cb42cb218a1f5a5b294519fcebb8f51b704fd2099d5077e" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/legacy-completion-examples.json", + "sha256": "dae920af02e62e42889fe52fe0963ef83452eef246f774b11fcd429a89ab0bec" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/legacy-sse-modern-revision.json", + "sha256": "d2a56cc4c7a52de8603da233f3410ec1603315d18d50ec43d9c801c3e41632f7" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/logging-deprecated-2026.json", + "sha256": "dd5c79f9748533dc7b86a0947765dbfcef71a7e8807dc1db670e7627b574a071" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-dialect-tool-example.json", + "sha256": "b5e32b241a8e9279d3c8969ae67f4d76e4ac50b22882f714f7877b40c27c0e42" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-dialect-tool-schema-shape.json", + "sha256": "2342c65a923530813cdbd4618af93492e659bc1bc4c97a1c32a1ed8a202ad1f8" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-standard-extension-capabilities.json", + "sha256": "3087bd7e51d43f8cd9a765343dc56cf6c82dc38649119a87395014a841e40008" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/resource-example-consistency.json", + "sha256": "1039c7237a6efa1a9019a22e6e52b13fe6189fe2dba26e075618e27e988eb3c6" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/tool-interaction-client-requirements-contradictions.json", + "sha256": "f85aa33860a324aa321b6108695c45b8561aa9b5f39f037d6b7251b0292de3ab" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/uncatalogued-oauth-scope.json", + "sha256": "f127b184b8a4dae4f7a571ef37fd3e638430dec81a508f9dfc4cf1df6a096e88" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/uncatalogued-openid-scope.json", + "sha256": "6b4384351dc4a573570c33385f6353cfe9e40ed8a0a1eaf048296526a548117d" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unknown-reserved-extension-identifier.json", + "sha256": "2fcf6249d88689ee05f17240c7dd8e82f8c976620a75cf4be125381ad493d174" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unknown-reserved-meta-key.json", + "sha256": "827bcf6b221150fc6c69a6657cd7faf557a3cddfdfd406b46a20007dc916e135" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unresolved-external-tool-example-ref.json", + "sha256": "aea2f2258b9cc7f077b7522381760f03390eb45433a4cbb7efc7970878f7554a" + }, + { + "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unresolved-external-tool-ref.json", + "sha256": "53f66f56c2040ffd88bd3f47394ea4f00301ef6a53c69731d8e824aedf1d9213" } ] } diff --git a/packages/validator/src/index.js b/packages/validator/src/index.js index 7923054..8314249 100644 --- a/packages/validator/src/index.js +++ b/packages/validator/src/index.js @@ -4,7 +4,10 @@ import * as draft3 from './snapshots/0.8.0-draft.3/index.js'; import * as draft4 from './snapshots/0.8.0-draft.4/index.js'; import * as rc1 from './snapshots/0.8.0-rc.1/index.js'; import * as rc2 from './snapshots/0.8.0-rc.2/index.js'; +import * as rc3 from './snapshots/0.8.0-rc.3/index.js'; import { resolveComponentReferences as resolveRc1ComponentReferences } from './snapshots/0.8.0-rc.1/semantic.js'; +import { resolveComponentReferences as resolveRc2ComponentReferences } from './snapshots/0.8.0-rc.2/semantic.js'; +import { resolveComponentReferences as resolveRc3ComponentReferences } from './snapshots/0.8.0-rc.3/semantic.js'; import { mcpExtensionCatalogue, mcpExtensionMaturity @@ -18,7 +21,14 @@ const snapshots = Object.freeze({ [draft3.specification]: draft3, [draft4.specification]: draft4, [rc1.specification]: rc1, - [rc2.specification]: rc2 + [rc2.specification]: rc2, + [rc3.specification]: rc3 +}); + +const componentResolvers = Object.freeze({ + '0.8.0-rc.1': resolveRc1ComponentReferences, + '0.8.0-rc.2': resolveRc2ComponentReferences, + '0.8.0-rc.3': resolveRc3ComponentReferences }); const schemaUris = Object.freeze({ @@ -27,7 +37,8 @@ const schemaUris = Object.freeze({ '0.8.0-draft.3': 'https://mcpdesc.org/schema/0.8.0.json', '0.8.0-draft.4': 'https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json', '0.8.0-rc.1': 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json', - '0.8.0-rc.2': 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json' + '0.8.0-rc.2': 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', + '0.8.0-rc.3': 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json' }); export const supportedSpecifications = Object.freeze(Object.keys(snapshots)); @@ -158,9 +169,9 @@ export function resolveMcpDescriptionComponentReferences(document, options) { if (!options || typeof options !== 'object' || Array.isArray(options) || !Object.hasOwn(options, 'specification')) { throw new TypeError('options.specification is required'); } - if (options.specification !== '0.8.0-rc.1') { + if (!Object.hasOwn(componentResolvers, options.specification)) { throw new RangeError(`Component reference resolution does not support specification: ${String(options.specification)}`); } - return resolveRc1ComponentReferences(document); + return componentResolvers[options.specification](document); } \ No newline at end of file diff --git a/packages/validator/src/snapshots/0.8.0-rc.2/semantic.js b/packages/validator/src/snapshots/0.8.0-rc.2/semantic.js index 864d579..e1e4247 100644 --- a/packages/validator/src/snapshots/0.8.0-rc.2/semantic.js +++ b/packages/validator/src/snapshots/0.8.0-rc.2/semantic.js @@ -62,6 +62,7 @@ function componentDiagnostic(code, rel, message, path) { export function resolveComponentReferences(document, rel = 'document') { const resolved = structuredClone(document); const diagnostics = []; + const provenance = []; let substitutions = 0; function resolve(reference, expectedNamespace, path, stack = []) { @@ -75,7 +76,7 @@ export function resolveComponentReferences(document, rel = 'document') { `must target #/components/${expectedNamespace}, not #/components/${namespace}`, path )); - return reference; + return { value: reference }; } const key = `${namespace}/${name}`; @@ -86,7 +87,7 @@ export function resolveComponentReferences(document, rel = 'document') { `forms a cycle through ${[...stack, key].join(' -> ')}`, path )); - return reference; + return { value: reference }; } const target = document?.components?.[namespace]?.[name]; @@ -97,18 +98,29 @@ export function resolveComponentReferences(document, rel = 'document') { `targets missing component ${JSON.stringify(reference.$componentRef)}`, path )); - return reference; + return { value: reference }; } substitutions += 1; return isReferenceObject(target) ? resolve(target, expectedNamespace, path, [...stack, key]) - : structuredClone(target); + : { + value: structuredClone(target), + targetPath: ['components', namespace, name] + }; + } + + function substitute(reference, expectedNamespace, path, stack = []) { + const result = resolve(reference, expectedNamespace, path, stack); + if (result.targetPath) { + provenance.push({ referencePath: path, targetPath: result.targetPath }); + } + return result.value; } for (const namespace of componentNamespaces) { for (const [name, value] of Object.entries(document?.components?.[namespace] ?? {})) { if (isReferenceObject(value)) { - resolved.components[namespace][name] = resolve(value, namespace, ['components', namespace, name], [`${namespace}/${name}`]); + resolved.components[namespace][name] = substitute(value, namespace, ['components', namespace, name], [`${namespace}/${name}`]); } } } @@ -124,7 +136,7 @@ export function resolveComponentReferences(document, rel = 'document') { if (collection === 'tools') { for (const field of ['inputSchema', 'outputSchema']) { if (isReferenceObject(declaration[field])) { - resolvedDeclaration[field] = resolve(declaration[field], 'schemas', [collection, declarationIndex, field]); + resolvedDeclaration[field] = substitute(declaration[field], 'schemas', [collection, declarationIndex, field]); } } } @@ -138,7 +150,7 @@ export function resolveComponentReferences(document, rel = 'document') { : 'promptExamples'; for (const [name, example] of Object.entries(declaration.examples ?? {})) { if (isReferenceObject(example)) { - resolvedDeclaration.examples[name] = resolve( + resolvedDeclaration.examples[name] = substitute( example, exampleNamespace, [collection, declarationIndex, 'examples', name] @@ -152,7 +164,7 @@ export function resolveComponentReferences(document, rel = 'document') { for (const [declarationIndex, declaration] of (document?.[collection] ?? []).entries()) { for (const [elicitationIndex, elicitation] of (declaration.elicitations ?? []).entries()) { if (isReferenceObject(elicitation.requestedSchema)) { - resolved[collection][declarationIndex].elicitations[elicitationIndex].requestedSchema = resolve( + resolved[collection][declarationIndex].elicitations[elicitationIndex].requestedSchema = substitute( elicitation.requestedSchema, 'schemas', [collection, declarationIndex, 'elicitations', elicitationIndex, 'requestedSchema'] @@ -162,7 +174,7 @@ export function resolveComponentReferences(document, rel = 'document') { } } - return { document: resolved, diagnostics, substitutions }; + return { document: resolved, diagnostics, substitutions, provenance }; } function structuralPath(document, error) { diff --git a/packages/validator/src/snapshots/0.8.0-rc.3/base.js b/packages/validator/src/snapshots/0.8.0-rc.3/base.js new file mode 100644 index 0000000..1896616 --- /dev/null +++ b/packages/validator/src/snapshots/0.8.0-rc.3/base.js @@ -0,0 +1,1417 @@ +// Provide structural and semantic validation for MCP Description v0.8.0. +// +// The exported helpers complement the published JSON Schema with cross-object +// rules for protocol scopes, revision applicability, security, tags, embedded +// Tool schemas and examples, Resource examples, Elicitation Declarations, +// transports, and extension namespaces. Diagnostics +// distinguish fatal errors from nonfatal warnings. External schema references +// are never fetched automatically; unresolved targets are preserved and reported. + +import Ajv from 'ajv'; +import Ajv2020 from 'ajv/dist/2020.js'; +import addFormats from 'ajv-formats'; +import { UriTemplateMatcher } from 'uri-template-matcher'; + +export const supportedProtocolVersions = Object.freeze([ + '2024-11-05', + '2025-03-26', + '2025-06-18', + '2025-11-25', + '2026-07-28' +]); + +const protocolOrder = new Map(supportedProtocolVersions.map((version, index) => [version, index])); +const toolSchemaDialectVersion = '2025-11-25'; +const completeSemanticConformanceVersion = '2025-06-18'; +export const mcpExtensionCatalogue = Object.freeze({ + effectiveDate: '2026-09-04', + source: 'https://modelcontextprotocol.io/extensions/overview', + officialIdentifiers: Object.freeze([ + 'io.modelcontextprotocol/enterprise-managed-authorization', + 'io.modelcontextprotocol/oauth-client-credentials', + 'io.modelcontextprotocol/tasks', + 'io.modelcontextprotocol/ui' + ]), + experimentalIdentifiers: Object.freeze([]) +}); +const metaKeyPattern = /^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/; + +export function mcpExtensionMaturity(identifier) { + if (mcpExtensionCatalogue.officialIdentifiers.includes(identifier)) return 'official'; + if (mcpExtensionCatalogue.experimentalIdentifiers.includes(identifier)) return 'experimental'; + return 'uncatalogued'; +} + +function createValidatorForDialect(dialect) { + const Factory = dialect === '2020-12' ? Ajv2020 : Ajv; + const instance = new Factory({ allErrors: true, strict: false }); + addFormats(instance); + return instance; +} + +function normalizeScope(scope) { + return [...scope].sort((left, right) => protocolOrder.get(left) - protocolOrder.get(right)); +} + +function effectiveScope(document, item, parentScope) { + return normalizeScope(item?.protocolVersions ?? parentScope ?? document.protocolVersions ?? []); +} + +function intersection(left, right) { + const rightSet = new Set(right); + return left.filter((value) => rightSet.has(value)); +} + +function collectOAuthScopeCatalog(scheme) { + if (!scheme || typeof scheme !== 'object') return new Set(); + const catalog = new Set(); + if (scheme.type === 'oauth2') { + for (const flow of Object.values(scheme.flows ?? {})) { + for (const scope of Object.keys(flow?.scopes ?? {})) catalog.add(scope); + } + } + return catalog; +} + +function embeddedSchemaDialect(schema) { + const declared = schema?.$schema; + if (declared === undefined) return '2020-12'; + if (typeof declared !== 'string') return null; + if (/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(declared)) return '2020-12'; + if (/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(declared)) return 'draft-07'; + return null; +} + +function schemaForPartialOfflineCompilation(schema) { + const externalReferences = []; + + function visit(value) { + if (Array.isArray(value)) return value.map(visit); + if (!value || typeof value !== 'object') return value; + const result = {}; + for (const [key, child] of Object.entries(value)) { + if (key === '$ref' && typeof child === 'string' && !child.startsWith('#')) { + externalReferences.push(child); + continue; + } + result[key] = visit(child); + } + return result; + } + + return { schema: visit(schema), externalReferences }; +} + +function makeDiagnostic(code, severity, message, path) { + if (!Array.isArray(path)) throw new TypeError(`Diagnostic ${code} is missing an explicit path`); + return { code, severity, message, path }; +} + +function usesMcpReservedPrefix(identifier) { + if (typeof identifier !== 'string') return false; + const [prefix] = identifier.split('/', 1); + const labels = prefix.split('.'); + if (labels.length < 2) return false; + const secondLabel = labels[1].toLowerCase(); + return secondLabel === 'modelcontextprotocol' || secondLabel === 'mcp'; +} + +function usesMcpReservedMetaPrefix(identifier, version) { + if (typeof identifier !== 'string' || !identifier.includes('/')) return false; + const labels = identifier.slice(0, identifier.indexOf('/')).split('.'); + if (version === '2025-06-18') { + return labels.slice(0, -1).some((label) => ['modelcontextprotocol', 'mcp'].includes(label.toLowerCase())); + } + return labels.length >= 2 && ['modelcontextprotocol', 'mcp'].includes(labels[1].toLowerCase()); +} + +function isImplementation(value) { + return value && typeof value === 'object' && !Array.isArray(value) + && typeof value.name === 'string' && typeof value.version === 'string'; +} + +function validateMeta(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + const legacyVersions = rootScope.filter( + (version) => protocolOrder.get(version) < protocolOrder.get(completeSemanticConformanceVersion) + ); + if (legacyVersions.length) { + diagnostics.push( + makeDiagnostic( + 'legacy-protocol-validation-incomplete', + 'warning', + `MCP ${legacyVersions.join(', ')} are legacy compatibility revisions; structural and selected checks were applied, but complete MCP semantic conformance was not evaluated`, + ['protocolVersions'] + ) + ); + } + + function validateKnownReservedKey(key, value, context, version, location, locationPath) { + let validContext; + let validValue; + + if (key === 'progressToken' && ['2025-06-18', '2025-11-25', '2026-07-28'].includes(version)) { + validContext = context === 'request'; + validValue = typeof value === 'string' || typeof value === 'number'; + } else if (key === 'io.modelcontextprotocol/related-task' && version === '2025-11-25') { + validContext = context === 'result'; + validValue = value && typeof value === 'object' && !Array.isArray(value) && typeof value.taskId === 'string'; + } else if (key === 'io.modelcontextprotocol/serverInfo' && version === '2026-07-28') { + validContext = context === 'result'; + validValue = isImplementation(value); + } else if ( + version === '2026-07-28' + && ['io.modelcontextprotocol/protocolVersion', 'io.modelcontextprotocol/clientInfo', 'io.modelcontextprotocol/clientCapabilities', 'io.modelcontextprotocol/logLevel'].includes(key) + ) { + validContext = context === 'request'; + validValue = key === 'io.modelcontextprotocol/protocolVersion' + ? typeof value === 'string' + : key === 'io.modelcontextprotocol/clientInfo' + ? isImplementation(value) + : key === 'io.modelcontextprotocol/clientCapabilities' + ? value && typeof value === 'object' && !Array.isArray(value) + : ['debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency'].includes(value); + } else if (key === 'io.modelcontextprotocol/subscriptionId' && version === '2026-07-28') { + validContext = context === 'notification' || context === 'subscription-result'; + validValue = typeof value === 'string' || typeof value === 'number'; + } else if (version === '2026-07-28' && ['traceparent', 'tracestate', 'baggage'].includes(key)) { + validContext = true; + validValue = typeof value === 'string' && value.length > 0; + } else { + return false; + } + + if (!validContext) { + diagnostics.push( + makeDiagnostic( + 'meta-reserved-key-context', + 'error', + `${location} uses reserved _meta key ${JSON.stringify(key)} in a ${context} context where MCP ${version} does not define it`, + [...locationPath, key] + ) + ); + } else if (!validValue) { + diagnostics.push( + makeDiagnostic( + 'meta-reserved-key-value', + 'error', + `${location}[${JSON.stringify(key)}] has an invalid value for MCP ${version}`, + [...locationPath, key] + ) + ); + } + return true; + } + + function check(meta, context, scope, location, locationPath) { + if (!meta || typeof meta !== 'object' || Array.isArray(meta)) return; + for (const [key, value] of Object.entries(meta)) { + if (!metaKeyPattern.test(key)) { + diagnostics.push( + makeDiagnostic( + 'meta-key-invalid', + 'error', + `${location} contains invalid MCP _meta key ${JSON.stringify(key)}`, + [...locationPath, key] + ) + ); + continue; + } + for (const version of scope.filter((candidate) => protocolOrder.get(candidate) >= protocolOrder.get(completeSemanticConformanceVersion))) { + if (validateKnownReservedKey(key, value, context, version, location, locationPath)) continue; + if (usesMcpReservedMetaPrefix(key, version)) { + diagnostics.push( + makeDiagnostic( + 'meta-unknown-reserved-key', + 'warning', + `${location} contains unrecognized key ${JSON.stringify(key)} under an MCP-reserved prefix for MCP ${version}; preserve it and review its authority`, + [...locationPath, key] + ) + ); + } + } + } + } + + for (const [kind, items] of [ + ['tools', document.tools ?? []], + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []], + ['prompts', document.prompts ?? []] + ]) { + items.forEach((item, itemIndex) => { + const scope = effectiveScope(document, item, rootScope); + const itemPath = [kind, itemIndex]; + check(item._meta, 'declaration', scope, `${kind}[${itemIndex}]._meta`, [...itemPath, '_meta']); + if (kind === 'tools') { + for (const [exampleName, example] of Object.entries(item.examples ?? {})) { + const result = example?.result; + if (!result || typeof result !== 'object' || Array.isArray(result)) continue; + const resultLocation = `${kind}[${itemIndex}].examples[${JSON.stringify(exampleName)}].result`; + const resultPath = [...itemPath, 'examples', exampleName, 'result']; + check(result._meta, 'result', scope, `${resultLocation}._meta`, [...resultPath, '_meta']); + (result.content ?? []).forEach((content, contentIndex) => { + const contentLocation = `${resultLocation}.content[${contentIndex}]`; + const contentPath = [...resultPath, 'content', contentIndex]; + check(content?._meta, 'content', scope, `${contentLocation}._meta`, [...contentPath, '_meta']); + if (content?.type === 'resource') { + check(content.resource?._meta, 'content', scope, `${contentLocation}.resource._meta`, [...contentPath, 'resource', '_meta']); + } + }); + } + } else if (kind !== 'prompts') { + for (const [exampleName, example] of Object.entries(item.examples ?? {})) { + const result = example?.result; + if (!result || typeof result !== 'object' || Array.isArray(result)) continue; + const resultLocation = `${kind}[${itemIndex}].examples[${JSON.stringify(exampleName)}].result`; + const resultPath = [...itemPath, 'examples', exampleName, 'result']; + check(result._meta, 'result', scope, `${resultLocation}._meta`, [...resultPath, '_meta']); + (result.contents ?? []).forEach((content, contentIndex) => { + check( + content?._meta, + 'content', + scope, + `${resultLocation}.contents[${contentIndex}]._meta`, + [...resultPath, 'contents', contentIndex, '_meta'] + ); + }); + } + } + }); + } +} + +function validateTagReferences(document, rel, diagnostics) { + const declaredTags = new Set(); + (document.tags ?? []).forEach((tag, tagIndex) => { + if (declaredTags.has(tag.name)) { + diagnostics.push(makeDiagnostic( + 'duplicate-root-tag', + 'error', + `root tags must use unique names; found duplicate tag ${JSON.stringify(tag.name)}`, + ['tags', tagIndex, 'name'] + )); + return; + } + declaredTags.add(tag.name); + }); + if (!Object.hasOwn(document, 'tags')) return; + + for (const [kind, items] of [ + ['tools', document.tools ?? []], + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []], + ['prompts', document.prompts ?? []] + ]) { + items.forEach((item, index) => { + (item.tags ?? []).forEach((tag, tagIndex) => { + if (!declaredTags.has(tag)) { + diagnostics.push( + makeDiagnostic( + 'unknown-tag-reference', + 'error', + `${kind}[${index}] references undeclared tag ${JSON.stringify(tag)}`, + [kind, index, 'tags', tagIndex] + ) + ); + } + }); + }); + } +} + +function validateSecurityRequirements(document, rel, diagnostics) { + const schemeMap = document.securitySchemes ?? {}; + const schemeNames = new Set(Object.keys(schemeMap)); + const scopeCatalogByScheme = new Map( + Object.entries(schemeMap).map(([name, scheme]) => [name, collectOAuthScopeCatalog(scheme)]) + ); + + function checkRequirementArray(requirementArray, location, locationPath) { + if (!Array.isArray(requirementArray)) return; + requirementArray.forEach((requirement, requirementIndex) => { + for (const [schemeName, scopes] of Object.entries(requirement)) { + if (!schemeNames.has(schemeName)) { + diagnostics.push( + makeDiagnostic( + 'unknown-security-scheme', + 'error', + `${location}[${requirementIndex}] references unknown security scheme ${JSON.stringify(schemeName)}`, + [...locationPath, requirementIndex, schemeName] + ) + ); + continue; + } + const scheme = schemeMap[schemeName]; + if (!Array.isArray(scopes)) continue; + const duplicateScopes = scopes.filter((scope, index) => scopes.indexOf(scope) !== index); + if (duplicateScopes.length) { + diagnostics.push( + makeDiagnostic( + 'duplicate-security-scope', + 'error', + `${location}[${requirementIndex}].${schemeName} contains duplicate scope values`, + [...locationPath, requirementIndex, schemeName] + ) + ); + } + if ((scheme.type === 'http' || scheme.type === 'apiKey') && scopes.length > 0) { + diagnostics.push( + makeDiagnostic( + 'non-oauth-scope-misuse', + 'error', + `${location}[${requirementIndex}].${schemeName} uses scopes with ${scheme.type}, but only oauth2 and openIdConnect requirements may list scopes`, + [...locationPath, requirementIndex, schemeName] + ) + ); + } + if (scheme.type === 'oauth2' || scheme.type === 'openIdConnect') { + const catalog = scopeCatalogByScheme.get(schemeName) ?? new Set(); + scopes.forEach((scope, scopeIndex) => { + if (!catalog.has(scope)) { + diagnostics.push( + makeDiagnostic( + 'uncatalogued-oauth-scope', + 'warning', + `${location}[${requirementIndex}].${schemeName} references scope ${JSON.stringify(scope)} that is not present in the declared static scope catalogue`, + [...locationPath, requirementIndex, schemeName, scopeIndex] + ) + ); + } + }); + } + } + }); + } + + checkRequirementArray(document.security, 'security', ['security']); + (document.transports ?? []).forEach((transport, index) => { + checkRequirementArray(transport.security, `transports[${index}].security`, ['transports', index, 'security']); + }); + for (const [kind, items] of [ + ['tools', document.tools ?? []], + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []], + ['prompts', document.prompts ?? []] + ]) { + items.forEach((item, index) => { + checkRequirementArray(item.security, `${kind}[${index}].security`, [kind, index, 'security']); + }); + } +} + +function validateProtocolScopes(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + const coverage = new Set(); + + function assertSubset(scope, parentScope, location, locationPath) { + const parentScopeSet = new Set(parentScope); + for (const version of scope) { + if (!parentScopeSet.has(version)) { + diagnostics.push( + makeDiagnostic( + 'protocol-scope-outside-parent', + 'error', + `${location} includes protocol version ${version} outside its parent scope`, + locationPath + ) + ); + } + } + } + + (document.transports ?? []).forEach((transport, index) => { + const scope = effectiveScope(document, transport, rootScope); + assertSubset(scope, rootScope, `transports[${index}].protocolVersions`, ['transports', index, 'protocolVersions']); + for (const version of scope) coverage.add(version); + }); + for (const version of rootScope) { + if (!coverage.has(version)) { + diagnostics.push( + makeDiagnostic( + 'transport-coverage-gap', + 'error', + `protocol version ${version} is present at the root but not covered by any transport`, + ['protocolVersions'] + ) + ); + } + } + + const capabilities = document.capabilities ?? []; + capabilities.forEach((capability, index) => { + const scope = effectiveScope(document, capability, rootScope); + assertSubset(scope, rootScope, `capabilities[${index}].protocolVersions`, ['capabilities', index, 'protocolVersions']); + }); + for (let index = 0; index < capabilities.length; index += 1) { + for (let otherIndex = index + 1; otherIndex < capabilities.length; otherIndex += 1) { + const leftScope = effectiveScope(document, capabilities[index], rootScope); + const rightScope = effectiveScope(document, capabilities[otherIndex], rootScope); + const overlap = intersection(leftScope, rightScope); + if (overlap.length > 0) { + diagnostics.push( + makeDiagnostic( + 'capability-scope-overlap', + 'error', + `capabilities[${index}] and capabilities[${otherIndex}] overlap for protocol versions ${overlap.join(', ')}`, + ['capabilities', index, 'protocolVersions'] + ) + ); + } + } + } + + for (const [kind, items, key] of [ + ['tools', document.tools ?? [], 'name'], + ['prompts', document.prompts ?? [], 'name'], + ['resources', document.resources ?? [], 'uri'], + ['resourceTemplates', document.resourceTemplates ?? [], 'uriTemplate'] + ]) { + const byIdentifier = new Map(); + items.forEach((item, index) => { + const identifier = item[key]; + const scope = effectiveScope(document, item, rootScope); + assertSubset(scope, rootScope, `${kind}[${index}].protocolVersions`, [kind, index, 'protocolVersions']); + (item.elicitations ?? []).forEach((elicitation, elicitationIndex) => { + const elicitationScope = effectiveScope(document, elicitation, scope); + assertSubset( + elicitationScope, + scope, + `${kind}[${index}].elicitations[${elicitationIndex}].protocolVersions`, + [kind, index, 'elicitations', elicitationIndex, 'protocolVersions'] + ); + }); + const existing = byIdentifier.get(identifier) ?? []; + for (const other of existing) { + const overlap = intersection(scope, other.scope); + if (overlap.length > 0) { + diagnostics.push( + makeDiagnostic( + 'primitive-scope-overlap', + 'error', + `${kind}[${index}] with identifier ${JSON.stringify(identifier)} overlaps ${kind}[${other.index}] for protocol versions ${overlap.join(', ')}`, + [kind, index, 'protocolVersions'] + ) + ); + } + } + existing.push({ index, scope }); + byIdentifier.set(identifier, existing); + }); + } +} + +function validateElicitations(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + + function validateFormSchema(schema, version, location, locationPath) { + if (!schema || typeof schema !== 'object' || Array.isArray(schema)) return; + if (version === '2025-06-18' && Object.hasOwn(schema, '$schema')) { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-schema-version-mismatch', + 'error', + `${location}.$schema is not defined for MCP ${version}`, + [...locationPath, '$schema'] + ) + ); + } + + const propertyNames = new Set(Object.keys(schema.properties ?? {})); + (schema.required ?? []).forEach((requiredName, requiredIndex) => { + if (propertyNames.has(requiredName)) return; + diagnostics.push( + makeDiagnostic( + 'elicitation-form-required-property-unknown', + 'error', + `${location}.required references undeclared property ${JSON.stringify(requiredName)}`, + [...locationPath, 'required', requiredIndex] + ) + ); + }); + + for (const [propertyName, property] of Object.entries(schema.properties ?? {})) { + const propertyLocation = `${location}.properties[${JSON.stringify(propertyName)}]`; + const propertyPath = [...locationPath, 'properties', propertyName]; + if (!property || typeof property !== 'object' || Array.isArray(property)) continue; + + if (version === '2025-06-18') { + if (property.type === 'array' || Object.hasOwn(property, 'oneOf')) { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-schema-version-mismatch', + 'error', + `${propertyLocation} uses an enum form introduced after MCP ${version}`, + propertyPath + ) + ); + } + if (Object.hasOwn(property, 'default') && property.type !== 'boolean') { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-schema-version-mismatch', + 'error', + `${propertyLocation}.default is not defined for this property type in MCP ${version}`, + [...propertyPath, 'default'] + ) + ); + } + } + + if (Array.isArray(property.enumNames) && Array.isArray(property.enum) && property.enumNames.length !== property.enum.length) { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-enum-names-mismatch', + 'error', + `${propertyLocation}.enumNames must contain one display name for every enum value`, + [...propertyPath, 'enumNames'] + ) + ); + } + if (Object.hasOwn(property, 'default')) { + const allowedValues = Array.isArray(property.enum) + ? property.enum + : Array.isArray(property.oneOf) + ? property.oneOf.map((option) => option.const) + : undefined; + if (allowedValues && !allowedValues.includes(property.default)) { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-default-outside-enum', + 'error', + `${propertyLocation}.default must be one of the declared enum values`, + [...propertyPath, 'default'] + ) + ); + } + if (property.type === 'array') { + const itemValues = property.items?.enum ?? property.items?.anyOf?.map((option) => option.const); + if (Array.isArray(itemValues) && property.default.some((value) => !itemValues.includes(value))) { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-default-outside-enum', + 'error', + `${propertyLocation}.default contains a value outside the declared enum values`, + [...propertyPath, 'default'] + ) + ); + } + } + } + if (typeof property.minLength === 'number' && typeof property.maxLength === 'number' && property.minLength > property.maxLength) { + diagnostics.push(makeDiagnostic('elicitation-form-invalid-range', 'error', `${propertyLocation}.minLength must not exceed maxLength`, [...propertyPath, 'minLength'])); + } + if (typeof property.minimum === 'number' && typeof property.maximum === 'number' && property.minimum > property.maximum) { + diagnostics.push(makeDiagnostic('elicitation-form-invalid-range', 'error', `${propertyLocation}.minimum must not exceed maximum`, [...propertyPath, 'minimum'])); + } + if (typeof property.minItems === 'number' && typeof property.maxItems === 'number' && property.minItems > property.maxItems) { + diagnostics.push(makeDiagnostic('elicitation-form-invalid-range', 'error', `${propertyLocation}.minItems must not exceed maxItems`, [...propertyPath, 'minItems'])); + } + } + } + + for (const [kind, items] of [ + ['tools', document.tools ?? []], + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []], + ['prompts', document.prompts ?? []] + ]) { + items.forEach((item, itemIndex) => { + const parentScope = effectiveScope(document, item, rootScope); + const names = new Set(); + (item.elicitations ?? []).forEach((elicitation, elicitationIndex) => { + const location = `${kind}[${itemIndex}].elicitations[${elicitationIndex}]`; + const locationPath = [kind, itemIndex, 'elicitations', elicitationIndex]; + if (names.has(elicitation.name)) { + diagnostics.push( + makeDiagnostic( + 'duplicate-elicitation-name', + 'error', + `${location}.name duplicates Elicitation Declaration name ${JSON.stringify(elicitation.name)} within the containing primitive`, + [...locationPath, 'name'] + ) + ); + } + names.add(elicitation.name); + + const scope = effectiveScope(document, elicitation, parentScope); + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get(completeSemanticConformanceVersion)) continue; + if (version === '2025-06-18' && elicitation.mode !== 'form') { + diagnostics.push( + makeDiagnostic( + 'elicitation-mode-not-supported-by-version', + 'error', + `${location}.mode ${JSON.stringify(elicitation.mode)} is not defined for MCP ${version}; only form mode is supported`, + [...locationPath, 'mode'] + ) + ); + } + if (elicitation.mode === 'form') { + validateFormSchema(elicitation.requestedSchema, version, `${location}.requestedSchema`, [...locationPath, 'requestedSchema']); + } + } + }); + }); + } +} + +function validateVersionSpecificSemantics(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + + function checkMinimumVersion(location, locationPath, object, fieldName, minimumVersion, scope) { + if (!(fieldName in object)) return; + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get(minimumVersion)) { + diagnostics.push( + makeDiagnostic( + 'field-not-supported-by-version', + 'error', + `${location}.${fieldName} is not defined for MCP ${version}; it requires ${minimumVersion} or later`, + [...locationPath, fieldName] + ) + ); + } + } + } + + function checkOnlyVersion(location, locationPath, object, fieldName, supportedVersion, scope) { + if (!(fieldName in object)) return; + for (const version of scope) { + if (version !== supportedVersion) { + diagnostics.push( + makeDiagnostic( + 'field-not-supported-by-version', + 'error', + `${location}.${fieldName} is defined only for MCP ${supportedVersion}, not MCP ${version}`, + [...locationPath, fieldName] + ) + ); + } + } + } + + checkMinimumVersion('info', ['info'], document.info ?? {}, 'title', '2025-06-18', rootScope); + checkMinimumVersion('info', ['info'], document.info ?? {}, 'description', '2025-11-25', rootScope); + checkMinimumVersion('info', ['info'], document.info ?? {}, 'icons', '2025-11-25', rootScope); + checkMinimumVersion('info', ['info'], document.info ?? {}, 'websiteUrl', '2025-11-25', rootScope); + + (document.transports ?? []).forEach((transport, index) => { + const scope = effectiveScope(document, transport, rootScope); + if (transport.type === 'streamable-http') { + for (const version of scope) { + if (protocolOrder.get(version) >= protocolOrder.get('2025-03-26')) continue; + diagnostics.push( + makeDiagnostic( + 'transport-not-supported-by-version', + 'error', + `transports[${index}] uses Streamable HTTP, which is not defined for MCP ${version}; it requires 2025-03-26 or later`, + ['transports', index, 'type'] + ) + ); + } + } + if (transport.type === 'sse') { + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get('2025-03-26')) continue; + diagnostics.push( + makeDiagnostic( + 'legacy-sse-for-modern-version', + 'warning', + `transports[${index}] associates legacy SSE with MCP ${version}, where Streamable HTTP is the standard remote transport`, + ['transports', index, 'type'] + ) + ); + } + } + }); + + (document.tools ?? []).forEach((tool, index) => { + const scope = effectiveScope(document, tool, rootScope); + const toolPath = ['tools', index]; + checkMinimumVersion(`tools[${index}]`, toolPath, tool, 'title', '2025-06-18', scope); + checkMinimumVersion(`tools[${index}]`, toolPath, tool, 'outputSchema', '2025-06-18', scope); + checkMinimumVersion(`tools[${index}]`, toolPath, tool, '_meta', '2025-06-18', scope); + checkMinimumVersion(`tools[${index}]`, toolPath, tool, 'annotations', '2025-03-26', scope); + checkOnlyVersion(`tools[${index}]`, toolPath, tool, 'execution', '2025-11-25', scope); + checkMinimumVersion(`tools[${index}]`, toolPath, tool, 'icons', '2025-11-25', scope); + }); + + for (const [kind, items] of [ + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []], + ['prompts', document.prompts ?? []] + ]) { + items.forEach((item, index) => { + const scope = effectiveScope(document, item, rootScope); + const itemPath = [kind, index]; + checkMinimumVersion(`${kind}[${index}]`, itemPath, item, 'title', '2025-06-18', scope); + checkMinimumVersion(`${kind}[${index}]`, itemPath, item, '_meta', '2025-06-18', scope); + checkMinimumVersion(`${kind}[${index}]`, itemPath, item, 'icons', '2025-11-25', scope); + if (kind !== 'prompts' && item.annotations?.lastModified !== undefined) { + for (const version of scope) { + if (protocolOrder.get(version) >= protocolOrder.get('2025-06-18')) continue; + diagnostics.push( + makeDiagnostic( + 'resource-annotation-not-supported-by-version', + 'error', + `${kind}[${index}].annotations.lastModified is not defined for MCP ${version}`, + [...itemPath, 'annotations', 'lastModified'] + ) + ); + } + } + if (kind === 'prompts') { + (item.arguments ?? []).forEach((argument, argumentIndex) => { + checkMinimumVersion( + `${kind}[${index}].arguments[${argumentIndex}]`, + [...itemPath, 'arguments', argumentIndex], + argument, + 'title', + '2025-06-18', + scope + ); + }); + } + }); + } + + (document.capabilities ?? []).forEach((capability, index) => { + const scope = effectiveScope(document, capability, rootScope); + const capabilityPath = ['capabilities', index]; + if ('completions' in capability) checkMinimumVersion(`capabilities[${index}]`, capabilityPath, capability, 'completions', '2025-03-26', scope); + if ('tasks' in capability) { + checkMinimumVersion(`capabilities[${index}]`, capabilityPath, capability, 'tasks', '2025-11-25', scope); + if (scope.includes('2026-07-28')) { + diagnostics.push( + makeDiagnostic( + 'tasks-core-not-valid-in-2026', + 'error', + `capabilities[${index}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`, + [...capabilityPath, 'tasks'] + ) + ); + } + } + if ('extensions' in capability) { + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get('2026-07-28')) { + diagnostics.push( + makeDiagnostic( + 'extensions-not-supported-by-version', + 'warning', + `capabilities[${index}].extensions is not defined by the MCP ${version} core schema; this description preserves a deployed pre-standard extension negotiation convention. Formal extensions capability negotiation was introduced in MCP 2026-07-28`, + [...capabilityPath, 'extensions'] + ) + ); + } + } + for (const identifier of Object.keys(capability.extensions ?? {})) { + if (!usesMcpReservedPrefix(identifier)) continue; + const maturity = mcpExtensionMaturity(identifier); + if (maturity === 'official') continue; + diagnostics.push( + makeDiagnostic( + maturity === 'experimental' + ? 'experimental-reserved-extension-identifier' + : 'unknown-reserved-extension-identifier', + 'warning', + maturity === 'experimental' + ? `capabilities[${index}].extensions contains experimental MCP extension ${JSON.stringify(identifier)}; preserve it and review its maturity before relying on it` + : `capabilities[${index}].extensions contains unrecognized identifier ${JSON.stringify(identifier)} under an MCP-reserved prefix; preserve it and review its authority`, + [...capabilityPath, 'extensions', identifier] + ) + ); + } + } + if ('logging' in capability && scope.includes('2026-07-28')) { + diagnostics.push( + makeDiagnostic( + 'logging-deprecated-in-2026', + 'warning', + `capabilities[${index}].logging applies to MCP 2026-07-28, where logging is deprecated`, + [...capabilityPath, 'logging'] + ) + ); + } + }); +} + +const singleSchemaKeywords = [ + 'additionalItems', + 'additionalProperties', + 'contains', + 'contentSchema', + 'else', + 'if', + 'items', + 'not', + 'propertyNames', + 'then', + 'unevaluatedItems', + 'unevaluatedProperties' +]; +const arraySchemaKeywords = ['allOf', 'anyOf', 'oneOf', 'prefixItems']; +const mapSchemaKeywords = ['$defs', 'definitions', 'dependentSchemas', 'patternProperties']; +const utf8Encoder = new TextEncoder(); + +function collectMcpHeaderAnnotations(schema) { + const annotations = []; + + function visit(node, location, locationPath, propertiesOnlyPath, isPropertyNode) { + if (!node || typeof node !== 'object' || Array.isArray(node)) return; + if (Object.hasOwn(node, 'x-mcp-header')) { + annotations.push({ + location, + path: locationPath, + value: node['x-mcp-header'], + type: node.type, + staticallyReachable: propertiesOnlyPath && isPropertyNode + }); + } + + if (node.properties && typeof node.properties === 'object' && !Array.isArray(node.properties)) { + for (const [name, child] of Object.entries(node.properties)) { + visit(child, `${location}.properties[${JSON.stringify(name)}]`, [...locationPath, 'properties', name], propertiesOnlyPath, propertiesOnlyPath); + } + } + + for (const keyword of mapSchemaKeywords) { + const map = node[keyword]; + if (!map || typeof map !== 'object' || Array.isArray(map)) continue; + for (const [name, child] of Object.entries(map)) { + visit(child, `${location}.${keyword}[${JSON.stringify(name)}]`, [...locationPath, keyword, name], false, false); + } + } + for (const keyword of arraySchemaKeywords) { + if (!Array.isArray(node[keyword])) continue; + node[keyword].forEach((child, index) => visit(child, `${location}.${keyword}[${index}]`, [...locationPath, keyword, index], false, false)); + } + for (const keyword of singleSchemaKeywords) { + const child = node[keyword]; + if (Array.isArray(child)) { + child.forEach((item, index) => visit(item, `${location}.${keyword}[${index}]`, [...locationPath, keyword, index], false, false)); + } else { + visit(child, `${location}.${keyword}`, [...locationPath, keyword], false, false); + } + } + const dependencies = node.dependencies; + if (dependencies && typeof dependencies === 'object' && !Array.isArray(dependencies)) { + for (const [name, child] of Object.entries(dependencies)) { + if (!Array.isArray(child)) visit(child, `${location}.dependencies[${JSON.stringify(name)}]`, [...locationPath, 'dependencies', name], false, false); + } + } + } + + visit(schema, 'inputSchema', ['inputSchema'], true, false); + return annotations; +} + +function validateMcpHeaderAnnotations(tool, toolIndex, scope, rel, diagnostics) { + const annotations = collectMcpHeaderAnnotations(tool.inputSchema); + if (!annotations.length) return; + + for (const version of scope) { + if (version !== '2026-07-28') { + diagnostics.push( + makeDiagnostic( + 'field-not-supported-by-version', + 'error', + `tools[${toolIndex}].inputSchema uses x-mcp-header, which is not defined for MCP ${version}`, + ['tools', toolIndex, 'inputSchema'] + ) + ); + } + } + + const byCaseInsensitiveName = new Map(); + for (const annotation of annotations) { + const location = `tools[${toolIndex}].${annotation.location}.x-mcp-header`; + const locationPath = ['tools', toolIndex, ...annotation.path, 'x-mcp-header']; + if (!annotation.staticallyReachable) { + diagnostics.push( + makeDiagnostic( + 'invalid-x-mcp-header', + 'error', + `${location} is not on a property statically reachable from the schema root through properties only`, + locationPath + ) + ); + } + if (typeof annotation.value !== 'string' || !/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(annotation.value)) { + diagnostics.push( + makeDiagnostic( + 'invalid-x-mcp-header', + 'error', + `${location} must be a non-empty HTTP field-name token`, + locationPath + ) + ); + continue; + } + if (!['boolean', 'integer', 'string'].includes(annotation.type)) { + diagnostics.push( + makeDiagnostic( + 'invalid-x-mcp-header', + 'error', + `${location} may annotate only a boolean, integer, or string property`, + locationPath + ) + ); + } + const normalizedName = annotation.value.toLowerCase(); + const previousLocation = byCaseInsensitiveName.get(normalizedName); + if (previousLocation) { + diagnostics.push( + makeDiagnostic( + 'duplicate-x-mcp-header', + 'error', + `${location} duplicates ${previousLocation} case-insensitively`, + locationPath + ) + ); + } else { + byCaseInsensitiveName.set(normalizedName, location); + } + } +} + +function validateLegacyToolSchemaShape(schema, location, locationPath, rel, diagnostics) { + if (Object.hasOwn(schema, 'properties')) { + const properties = schema.properties; + if (!properties || typeof properties !== 'object' || Array.isArray(properties)) { + diagnostics.push( + makeDiagnostic( + 'invalid-legacy-tool-schema-shape', + 'error', + `${location}.properties must be an object for MCP revisions before ${toolSchemaDialectVersion}`, + [...locationPath, 'properties'] + ) + ); + } else { + for (const [name, propertySchema] of Object.entries(properties)) { + if (propertySchema && typeof propertySchema === 'object' && !Array.isArray(propertySchema)) continue; + diagnostics.push( + makeDiagnostic( + 'invalid-legacy-tool-schema-shape', + 'error', + `${location}.properties[${JSON.stringify(name)}] must be an object for MCP revisions before ${toolSchemaDialectVersion}`, + [...locationPath, 'properties', name] + ) + ); + } + } + } + if (Object.hasOwn(schema, 'required') && (!Array.isArray(schema.required) || schema.required.some((name) => typeof name !== 'string'))) { + diagnostics.push( + makeDiagnostic( + 'invalid-legacy-tool-schema-shape', + 'error', + `${location}.required must be an array of strings for MCP revisions before ${toolSchemaDialectVersion}`, + [...locationPath, 'required'] + ) + ); + } +} + +function validateToolSchemas(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + + (document.tools ?? []).forEach((tool, toolIndex) => { + const scope = effectiveScope(document, tool, rootScope); + for (const fieldName of ['inputSchema', 'outputSchema']) { + const schema = tool[fieldName]; + if (!schema || typeof schema !== 'object' || Array.isArray(schema)) continue; + const location = `tools[${toolIndex}].${fieldName}`; + const locationPath = ['tools', toolIndex, fieldName]; + const hasLegacyScope = scope.some((version) => protocolOrder.get(version) < protocolOrder.get(toolSchemaDialectVersion)); + const hasDialectAwareScope = scope.some((version) => protocolOrder.get(version) >= protocolOrder.get(toolSchemaDialectVersion)); + if (Object.hasOwn(schema, '$schema')) { + for (const version of scope) { + if (protocolOrder.get(version) >= protocolOrder.get(toolSchemaDialectVersion)) continue; + diagnostics.push( + makeDiagnostic( + 'field-not-supported-by-version', + 'error', + `${location}.$schema is not defined for MCP ${version}; it requires ${toolSchemaDialectVersion} or later`, + [...locationPath, '$schema'] + ) + ); + } + } + if (hasLegacyScope) validateLegacyToolSchemaShape(schema, location, locationPath, rel, diagnostics); + + if (hasDialectAwareScope) { + const dialect = embeddedSchemaDialect(schema); + if (!dialect) { + diagnostics.push( + makeDiagnostic( + 'unsupported-tool-schema-dialect', + 'error', + `${location} declares an unsupported JSON Schema dialect ${JSON.stringify(schema.$schema)}`, + [...locationPath, '$schema'] + ) + ); + } else { + const validator = createValidatorForDialect(dialect); + try { + if (!validator.validateSchema(schema, true)) { + const details = validator.errors?.map((error) => `${error.instancePath || '/'} ${error.message}`).join('; ') ?? 'unknown meta-schema error'; + diagnostics.push( + makeDiagnostic( + 'invalid-tool-schema', + 'error', + `${location} is not valid JSON Schema ${dialect}: ${details}`, + locationPath + ) + ); + } else { + validator.compile(schema); + } + } catch (error) { + const partial = schemaForPartialOfflineCompilation(schema); + try { + if (!partial.externalReferences.length) throw error; + createValidatorForDialect(dialect).compile(partial.schema); + const references = [...new Set(partial.externalReferences)].sort(); + diagnostics.push( + makeDiagnostic( + 'unresolved-external-tool-schema-reference', + 'warning', + `${location} contains external $ref values unavailable to offline validation (${references.map((reference) => JSON.stringify(reference)).join(', ')}); the references are preserved, but complete Tool schema validation was not possible`, + locationPath + ) + ); + } catch (partialError) { + diagnostics.push( + makeDiagnostic( + 'invalid-tool-schema', + 'error', + `${location} is not a compilable JSON Schema ${dialect}: ${partialError.message}`, + locationPath + ) + ); + } + } + } + } + + if (fieldName === 'outputSchema' && schema.type !== 'object') { + for (const version of scope) { + if (version === '2026-07-28') continue; + diagnostics.push( + makeDiagnostic( + 'field-not-supported-by-version', + 'error', + `${location} must have type "object" when it applies to MCP ${version}`, + [...locationPath, 'type'] + ) + ); + } + } + } + validateMcpHeaderAnnotations(tool, toolIndex, scope, rel, diagnostics); + }); +} + +function validateLegacyExampleValue(schema, value, location, locationPath, rel, diagnostics) { + if (schema.type === 'object' && (!value || typeof value !== 'object' || Array.isArray(value))) { + diagnostics.push(makeDiagnostic('tool-example-schema-mismatch', 'error', `${location} must be an object`, locationPath)); + return; + } + for (const name of schema.required ?? []) { + if (!Object.hasOwn(value, name)) { + diagnostics.push(makeDiagnostic('tool-example-schema-mismatch', 'error', `${location} is missing required property ${JSON.stringify(name)}`, [...locationPath, name])); + } + } + if (schema.additionalProperties === false && schema.properties && typeof schema.properties === 'object') { + for (const name of Object.keys(value)) { + if (!Object.hasOwn(schema.properties, name)) { + diagnostics.push(makeDiagnostic('tool-example-schema-mismatch', 'error', `${location} contains undeclared property ${JSON.stringify(name)}`, [...locationPath, name])); + } + } + } +} + +function validateExampleValue(schema, value, location, locationPath, rel, diagnostics) { + const dialect = embeddedSchemaDialect(schema); + if (!dialect) return; + const partial = schemaForPartialOfflineCompilation(schema); + if (partial.externalReferences.length) { + const references = [...new Set(partial.externalReferences)].sort(); + diagnostics.push( + makeDiagnostic( + 'incomplete-tool-example-validation', + 'warning', + `${location} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${references.map((reference) => JSON.stringify(reference)).join(', ')})`, + locationPath + ) + ); + return; + } + try { + const validate = createValidatorForDialect(dialect).compile(schema); + if (!validate(value)) { + const details = validate.errors?.map((error) => `${error.instancePath || '/'} ${error.message}`).join('; ') ?? 'unknown validation error'; + diagnostics.push(makeDiagnostic('tool-example-schema-mismatch', 'error', `${location} does not validate against its associated Tool schema: ${details}`, locationPath)); + } + } catch { + // validateToolSchemas reports the malformed or unsupported schema itself. + } +} + +function validateToolExamples(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + + (document.tools ?? []).forEach((tool, toolIndex) => { + if (!tool.examples || typeof tool.examples !== 'object' || Array.isArray(tool.examples)) return; + const scope = effectiveScope(document, tool, rootScope); + const legacyVersions = scope.filter((version) => protocolOrder.get(version) < protocolOrder.get(toolSchemaDialectVersion)); + const modernVersions = scope.filter((version) => protocolOrder.get(version) >= protocolOrder.get(toolSchemaDialectVersion)); + + for (const [exampleName, example] of Object.entries(tool.examples)) { + if (!example || typeof example !== 'object') continue; + const exampleLocation = `tools[${toolIndex}].examples[${JSON.stringify(exampleName)}]`; + const examplePath = ['tools', toolIndex, 'examples', exampleName]; + const result = example.result ?? {}; + const resultPath = [...examplePath, 'result']; + const successful = result.isError !== true; + + for (const envelopeField of ['jsonrpc', 'id', 'error']) { + if (Object.hasOwn(result, envelopeField)) { + diagnostics.push(makeDiagnostic('tool-example-json-rpc-envelope', 'error', `${exampleLocation}.result must not contain JSON-RPC envelope field ${JSON.stringify(envelopeField)}`, [...resultPath, envelopeField])); + } + } + for (const incompleteField of ['task', 'inputRequests', 'requestState']) { + if (Object.hasOwn(result, incompleteField)) { + diagnostics.push(makeDiagnostic('incomplete-tool-example-result', 'error', `${exampleLocation}.result must not contain non-completed workflow field ${JSON.stringify(incompleteField)}`, [...resultPath, incompleteField])); + } + } + + for (const version of scope) { + const resultLocation = `${exampleLocation}.result`; + if (version === '2026-07-28' && result.resultType !== 'complete') { + diagnostics.push(makeDiagnostic('tool-example-result-version-mismatch', 'error', `${resultLocation}.resultType must be "complete" for MCP ${version}`, [...resultPath, 'resultType'])); + } + if (version !== '2026-07-28' && Object.hasOwn(result, 'resultType')) { + diagnostics.push(makeDiagnostic('tool-example-result-version-mismatch', 'error', `${resultLocation}.resultType is not defined for MCP ${version}`, [...resultPath, 'resultType'])); + } + if (Object.hasOwn(result, 'structuredContent') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('tool-example-result-version-mismatch', 'error', `${resultLocation}.structuredContent is not defined for MCP ${version}`, [...resultPath, 'structuredContent'])); + } + if (Object.hasOwn(result, 'structuredContent') && version !== '2026-07-28' && (!result.structuredContent || typeof result.structuredContent !== 'object' || Array.isArray(result.structuredContent))) { + diagnostics.push(makeDiagnostic('tool-example-result-version-mismatch', 'error', `${resultLocation}.structuredContent must be an object for MCP ${version}`, [...resultPath, 'structuredContent'])); + } + (result.content ?? []).forEach((content, contentIndex) => { + const contentLocation = `${resultLocation}.content[${contentIndex}]`; + const contentPath = [...resultPath, 'content', contentIndex]; + if (content.type === 'audio' && protocolOrder.get(version) < protocolOrder.get('2025-03-26')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation} uses audio content, which is not defined for MCP ${version}`, [...contentPath, 'type'])); + } + if (content.type === 'resource_link' && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation} uses resource-link content, which is not defined for MCP ${version}`, [...contentPath, 'type'])); + } + if (Object.hasOwn(content, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation}._meta is not defined for MCP ${version}`, [...contentPath, '_meta'])); + } + if (content.type === 'resource' && Object.hasOwn(content.resource ?? {}, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation}.resource._meta is not defined for MCP ${version}`, [...contentPath, 'resource', '_meta'])); + } + if (content.type === 'resource_link' && Array.isArray(content.icons) && protocolOrder.get(version) < protocolOrder.get('2025-11-25')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation}.icons is not defined for MCP ${version}`, [...contentPath, 'icons'])); + } + if (content.annotations?.lastModified !== undefined && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation}.annotations.lastModified is not defined for MCP ${version}`, [...contentPath, 'annotations', 'lastModified'])); + } + }); + } + + if (!successful && Object.hasOwn(result, 'structuredContent')) { + diagnostics.push(makeDiagnostic('structured-tool-error-example', 'error', `${exampleLocation}.result must not contain structuredContent when isError is true`, [...resultPath, 'structuredContent'])); + } + if (successful && tool.outputSchema && !Object.hasOwn(result, 'structuredContent')) { + diagnostics.push(makeDiagnostic('missing-tool-example-structured-content', 'error', `${exampleLocation}.result must contain structuredContent because the Tool declares outputSchema`, [...resultPath, 'structuredContent'])); + } + + if (legacyVersions.length) { + validateLegacyExampleValue(tool.inputSchema, example.input, `${exampleLocation}.input`, [...examplePath, 'input'], rel, diagnostics); + diagnostics.push( + makeDiagnostic( + 'incomplete-tool-example-validation', + 'warning', + `${exampleLocation}.input compatibility could not be validated completely for MCP ${legacyVersions.join(', ')} because those revisions do not define an embedded Tool-schema dialect`, + [...examplePath, 'input'] + ) + ); + } + if (modernVersions.length) { + validateExampleValue(tool.inputSchema, example.input, `${exampleLocation}.input`, [...examplePath, 'input'], rel, diagnostics); + } + if (successful && Object.hasOwn(result, 'structuredContent') && tool.outputSchema) { + if (legacyVersions.length) { + validateLegacyExampleValue(tool.outputSchema, result.structuredContent, `${exampleLocation}.result.structuredContent`, [...resultPath, 'structuredContent'], rel, diagnostics); + diagnostics.push( + makeDiagnostic( + 'incomplete-tool-example-validation', + 'warning', + `${exampleLocation}.result.structuredContent compatibility could not be validated completely for MCP ${legacyVersions.join(', ')} because those revisions do not define an embedded Tool-schema dialect`, + [...resultPath, 'structuredContent'] + ) + ); + } + if (modernVersions.length) { + validateExampleValue(tool.outputSchema, result.structuredContent, `${exampleLocation}.result.structuredContent`, [...resultPath, 'structuredContent'], rel, diagnostics); + } + } + } + }); +} + +function isValidBase64(value) { + if (typeof value !== 'string' || value.length % 4 !== 0 || !/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(value)) return false; + if (value.endsWith('==')) return 'AQgw'.includes(value.at(-3)); + if (value.endsWith('=')) return 'AEIMQUYcgkosw048'.includes(value.at(-2)); + return true; +} + +function decodedBase64Length(value) { + return (value.length / 4) * 3 - (value.endsWith('==') ? 2 : value.endsWith('=') ? 1 : 0); +} + +function validateCompletedResourceResult(result, scope, location, locationPath, rel, diagnostics) { + for (const envelopeField of ['jsonrpc', 'id', 'error']) { + if (Object.hasOwn(result, envelopeField)) { + diagnostics.push(makeDiagnostic('resource-example-json-rpc-envelope', 'error', `${location} must not contain JSON-RPC envelope field ${JSON.stringify(envelopeField)}`, [...locationPath, envelopeField])); + } + } + for (const incompleteField of ['task', 'inputRequests', 'requestState']) { + if (Object.hasOwn(result, incompleteField)) { + diagnostics.push(makeDiagnostic('incomplete-resource-example-result', 'error', `${location} must not contain non-completed workflow field ${JSON.stringify(incompleteField)}`, [...locationPath, incompleteField])); + } + } + + for (const version of scope) { + if (version === '2026-07-28' && result.resultType !== 'complete') { + diagnostics.push(makeDiagnostic('resource-example-result-version-mismatch', 'error', `${location}.resultType must be "complete" for MCP ${version}`, [...locationPath, 'resultType'])); + } + if (version === '2026-07-28' && !Object.hasOwn(result, 'ttlMs')) { + diagnostics.push(makeDiagnostic('resource-example-cache-fields-version-mismatch', 'error', `${location}.ttlMs is required for MCP ${version}`, [...locationPath, 'ttlMs'])); + } + if (version === '2026-07-28' && !Object.hasOwn(result, 'cacheScope')) { + diagnostics.push(makeDiagnostic('resource-example-cache-fields-version-mismatch', 'error', `${location}.cacheScope is required for MCP ${version}`, [...locationPath, 'cacheScope'])); + } + if (version !== '2026-07-28' && Object.hasOwn(result, 'resultType')) { + diagnostics.push(makeDiagnostic('resource-example-result-version-mismatch', 'error', `${location}.resultType is not defined for MCP ${version}`, [...locationPath, 'resultType'])); + } + for (const cacheField of ['ttlMs', 'cacheScope']) { + if (version !== '2026-07-28' && Object.hasOwn(result, cacheField)) { + diagnostics.push(makeDiagnostic('resource-example-cache-fields-version-mismatch', 'error', `${location}.${cacheField} is not defined for MCP ${version}`, [...locationPath, cacheField])); + } + } + if (Object.hasOwn(result, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('resource-example-result-version-mismatch', 'error', `${location}._meta is not defined for MCP ${version}`, [...locationPath, '_meta'])); + } + (result.contents ?? []).forEach((content, contentIndex) => { + if (Object.hasOwn(content, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('resource-example-content-version-mismatch', 'error', `${location}.contents[${contentIndex}]._meta is not defined for MCP ${version}`, [...locationPath, 'contents', contentIndex, '_meta'])); + } + }); + } +} + +function validateResourceExampleContents(owner, requestedUri, result, location, locationPath, rel, diagnostics) { + const contents = result.contents ?? []; + let requestedEntryFound = false; + + contents.forEach((content, contentIndex) => { + const contentLocation = `${location}.result.contents[${contentIndex}]`; + const contentPath = [...locationPath, 'result', 'contents', contentIndex]; + if (content.uri === requestedUri) { + requestedEntryFound = true; + if (owner.mimeType && content.mimeType && content.mimeType !== owner.mimeType) { + diagnostics.push(makeDiagnostic('resource-example-mime-type-mismatch', 'warning', `${contentLocation}.mimeType ${JSON.stringify(content.mimeType)} differs from the declaration MIME type ${JSON.stringify(owner.mimeType)}`, [...contentPath, 'mimeType'])); + } + if (owner.size !== undefined) { + const actualSize = typeof content.text === 'string' + ? utf8Encoder.encode(content.text).byteLength + : typeof content.blob === 'string' && isValidBase64(content.blob) + ? decodedBase64Length(content.blob) + : undefined; + if (actualSize !== undefined && actualSize !== owner.size) { + diagnostics.push(makeDiagnostic('resource-example-size-mismatch', 'warning', `${contentLocation} contains ${actualSize} raw bytes, which differs from the declared Resource size ${owner.size}`, contentPath)); + } + } + } + if (typeof content.blob === 'string' && !isValidBase64(content.blob)) { + diagnostics.push(makeDiagnostic('invalid-resource-example-base64', 'error', `${contentLocation}.blob must be valid canonical base64`, [...contentPath, 'blob'])); + } + }); + + if (!requestedEntryFound) { + diagnostics.push(makeDiagnostic('resource-example-requested-uri-not-returned', 'warning', `${location}.result.contents has no entry for requested URI ${JSON.stringify(requestedUri)}; this is valid only for a documented collection or indirection`, [...locationPath, 'result', 'contents'])); + } +} + +function validateResourceExamples(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + + for (const [kind, items] of [ + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []] + ]) { + items.forEach((owner, ownerIndex) => { + if (!owner.examples || typeof owner.examples !== 'object' || Array.isArray(owner.examples)) return; + const scope = effectiveScope(document, owner, rootScope); + let template; + if (kind === 'resourceTemplates') { + try { + template = new UriTemplateMatcher(); + template.add(owner.uriTemplate); + } catch (error) { + template = undefined; + diagnostics.push(makeDiagnostic('resource-template-example-invalid-template', 'error', `${kind}[${ownerIndex}].uriTemplate is not a valid RFC 6570 template: ${error.message}`, [kind, ownerIndex, 'uriTemplate'])); + } + } + + for (const [exampleName, example] of Object.entries(owner.examples)) { + if (!example || typeof example !== 'object' || Array.isArray(example)) continue; + const location = `${kind}[${ownerIndex}].examples[${JSON.stringify(exampleName)}]`; + const locationPath = [kind, ownerIndex, 'examples', exampleName]; + const result = example.result; + if (!result || typeof result !== 'object' || Array.isArray(result)) continue; + const requestedUri = kind === 'resources' ? owner.uri : example.uri; + + if (kind === 'resourceTemplates' && typeof requestedUri === 'string' && template && !template.match(requestedUri)) { + diagnostics.push(makeDiagnostic('resource-template-example-invalid-expansion', 'error', `${location}.uri ${JSON.stringify(requestedUri)} is not a valid RFC 6570 expansion of ${JSON.stringify(owner.uriTemplate)}`, [...locationPath, 'uri'])); + } + + validateCompletedResourceResult(result, scope, `${location}.result`, [...locationPath, 'result'], rel, diagnostics); + if (typeof requestedUri === 'string') validateResourceExampleContents(owner, requestedUri, result, location, locationPath, rel, diagnostics); + } + }); + } +} + +export function semanticValidateDocument(document, rel = 'document') { + const diagnostics = []; + validateProtocolScopes(document, rel, diagnostics); + validateSecurityRequirements(document, rel, diagnostics); + validateTagReferences(document, rel, diagnostics); + validateVersionSpecificSemantics(document, rel, diagnostics); + validateElicitations(document, rel, diagnostics); + validateMeta(document, rel, diagnostics); + validateToolSchemas(document, rel, diagnostics); + validateToolExamples(document, rel, diagnostics); + validateResourceExamples(document, rel, diagnostics); + diagnostics.sort( + (left, right) => left.code.localeCompare(right.code) + || left.message.localeCompare(right.message) + || JSON.stringify(left.path).localeCompare(JSON.stringify(right.path)) + ); + return diagnostics; +} + +export function createMcpdesc08Validator(schema) { + const ajv = createValidatorForDialect('2020-12'); + return ajv.compile(schema); +} \ No newline at end of file diff --git a/packages/validator/src/snapshots/0.8.0-rc.3/index.js b/packages/validator/src/snapshots/0.8.0-rc.3/index.js new file mode 100644 index 0000000..4f3b662 --- /dev/null +++ b/packages/validator/src/snapshots/0.8.0-rc.3/index.js @@ -0,0 +1,17 @@ +import { + supportedProtocolVersions, + validateMcpdesc08Document +} from './semantic.js'; + +export const specification = '0.8.0-rc.3'; +export const snapshotTag = 'v0.8.0-rc.3'; +export const schemaSha256 = 'a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4'; +export { supportedProtocolVersions }; + +export function validate(document) { + const diagnostics = validateMcpdesc08Document(document); + return { + valid: !diagnostics.some((diagnostic) => diagnostic.severity === 'error'), + diagnostics + }; +} diff --git a/packages/validator/src/snapshots/0.8.0-rc.3/schema.json b/packages/validator/src/snapshots/0.8.0-rc.3/schema.json new file mode 100644 index 0000000..519ddf7 --- /dev/null +++ b/packages/validator/src/snapshots/0.8.0-rc.3/schema.json @@ -0,0 +1,2820 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "title": "MCP Description", + "description": "MCP Description 0.8.0 Release Candidate 3 (v0.8.0-rc.3; prerelease).", + "type": "object", + "required": [ + "mcpdesc", + "info", + "protocolVersions" + ], + "additionalProperties": false, + "properties": { + "$schema": { + "type": "string" + }, + "capabilities": { + "items": { + "$ref": "#/$defs/capabilities" + }, + "minItems": 1, + "type": "array" + }, + "components": { + "$ref": "#/$defs/components" + }, + "info": { + "$ref": "#/$defs/info" + }, + "instructions": { + "type": "string" + }, + "mcpdesc": { + "const": "0.8.0", + "type": "string" + }, + "prompts": { + "items": { + "$ref": "#/$defs/prompt" + }, + "minItems": 1, + "type": "array" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "resourceTemplates": { + "items": { + "$ref": "#/$defs/resourceTemplate" + }, + "minItems": 1, + "type": "array" + }, + "resources": { + "items": { + "$ref": "#/$defs/resource" + }, + "minItems": 1, + "type": "array" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "securitySchemes": { + "$ref": "#/$defs/securitySchemeMap" + }, + "tags": { + "items": { + "$ref": "#/$defs/tag" + }, + "minItems": 1, + "type": "array" + }, + "tools": { + "items": { + "$ref": "#/$defs/tool" + }, + "minItems": 1, + "type": "array" + }, + "transports": { + "items": { + "$ref": "#/$defs/transport" + }, + "minItems": 1, + "type": "array" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/jsonValue" + } + }, + "$defs": { + "capabilities": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "completions": { + "additionalProperties": true, + "type": "object" + }, + "experimental": { + "additionalProperties": true, + "type": "object" + }, + "extensions": { + "$ref": "#/$defs/extensionCapabilities" + }, + "logging": { + "additionalProperties": true, + "type": "object" + }, + "prompts": { + "$ref": "#/$defs/capabilityPrompts" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "resources": { + "$ref": "#/$defs/capabilityResources" + }, + "tasks": { + "additionalProperties": false, + "properties": { + "cancel": { + "additionalProperties": true, + "type": "object" + }, + "list": { + "additionalProperties": true, + "type": "object" + }, + "requests": { + "additionalProperties": false, + "properties": { + "tools": { + "additionalProperties": false, + "properties": { + "call": { + "additionalProperties": true, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "tools": { + "$ref": "#/$defs/capabilityTools" + } + }, + "type": "object" + }, + "capabilityPrompts": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "listChanged": { + "type": "boolean" + } + }, + "type": "object" + }, + "capabilityResources": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "listChanged": { + "type": "boolean" + }, + "subscribe": { + "type": "boolean" + } + }, + "type": "object" + }, + "capabilityTools": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "listChanged": { + "type": "boolean" + } + }, + "type": "object" + }, + "clientCapabilityRequirements": { + "additionalProperties": { + "$ref": "#/$defs/clientCapabilityValue" + }, + "minProperties": 1, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "elicitation": { + "$ref": "#/$defs/clientCapabilityValue" + }, + "experimental": { + "additionalProperties": { + "$ref": "#/$defs/clientCapabilityValue" + }, + "type": "object" + }, + "extensions": { + "$ref": "#/$defs/extensionCapabilities" + }, + "roots": { + "$ref": "#/$defs/clientCapabilityValue" + }, + "sampling": { + "$ref": "#/$defs/clientCapabilityValue" + }, + "tasks": { + "$ref": "#/$defs/clientCapabilityValue" + } + }, + "type": "object" + }, + "clientCapabilityValue": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + "completedCompletionResultExample": { + "additionalProperties": true, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "completion": { + "$ref": "#/$defs/completionResult" + }, + "resultType": { + "const": "complete" + } + }, + "required": [ + "completion" + ], + "type": "object" + }, + "completedPromptResultExample": { + "additionalProperties": true, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "description": { + "type": "string" + }, + "messages": { + "items": { + "$ref": "#/$defs/promptMessageExample" + }, + "type": "array" + }, + "resultType": { + "const": "complete" + } + }, + "required": [ + "messages" + ], + "type": "object" + }, + "completedReadResourceResultExample": { + "additionalProperties": true, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "cacheScope": { + "enum": [ + "public", + "private" + ] + }, + "contents": { + "items": { + "$ref": "#/$defs/resourceContents" + }, + "minItems": 1, + "type": "array" + }, + "resultType": { + "const": "complete" + }, + "ttlMs": { + "minimum": 0, + "type": "number" + } + }, + "required": [ + "contents" + ], + "type": "object" + }, + "completedToolResultExample": { + "additionalProperties": true, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "content": { + "items": { + "$ref": "#/$defs/toolResultContent" + }, + "type": "array" + }, + "isError": { + "type": "boolean" + }, + "resultType": { + "const": "complete" + }, + "structuredContent": { + "$ref": "#/$defs/jsonValue" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "completionArgument": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "completionContext": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "arguments": { + "additionalProperties": { + "type": "string" + }, + "minProperties": 1, + "type": "object" + } + }, + "required": [ + "arguments" + ], + "type": "object" + }, + "completionExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "argument": { + "$ref": "#/$defs/completionArgument" + }, + "context": { + "$ref": "#/$defs/completionContext" + }, + "result": { + "$ref": "#/$defs/completedCompletionResultExample" + } + }, + "required": [ + "argument", + "result" + ], + "type": "object" + }, + "completionExamples": { + "additionalProperties": { + "$ref": "#/$defs/completionExample" + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "completionResult": { + "additionalProperties": true, + "properties": { + "hasMore": { + "type": "boolean" + }, + "total": { + "minimum": 0, + "type": "integer" + }, + "values": { + "items": { + "type": "string" + }, + "maxItems": 100, + "type": "array" + } + }, + "required": [ + "values" + ], + "type": "object" + }, + "componentMap": { + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "components": { + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "promptExamples": { + "allOf": [ + { + "$ref": "#/$defs/componentMap" + }, + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/promptExample" + } + ] + } + } + ] + }, + "resourceExamples": { + "allOf": [ + { + "$ref": "#/$defs/componentMap" + }, + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/resourceExample" + } + ] + } + } + ] + }, + "resourceTemplateExamples": { + "allOf": [ + { + "$ref": "#/$defs/componentMap" + }, + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/resourceTemplateExample" + } + ] + } + } + ] + }, + "schemas": { + "allOf": [ + { + "$ref": "#/$defs/componentMap" + }, + { + "additionalProperties": { + "$ref": "#/$defs/schemaComponentValue" + } + } + ] + }, + "toolExamples": { + "allOf": [ + { + "$ref": "#/$defs/componentMap" + }, + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/toolExample" + } + ] + } + } + ] + } + }, + "type": "object" + }, + "contact": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "email": { + "format": "email", + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "elicitationDeclaration": { + "additionalProperties": false, + "oneOf": [ + { + "not": { + "required": [ + "url" + ] + }, + "properties": { + "mode": { + "const": "form" + } + }, + "required": [ + "requestedSchema" + ] + }, + { + "not": { + "required": [ + "requestedSchema" + ] + }, + "properties": { + "mode": { + "const": "url" + } + } + } + ], + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "message": { + "minLength": 1, + "type": "string" + }, + "mode": { + "enum": [ + "form", + "url" + ] + }, + "name": { + "pattern": "^[A-Za-z0-9._-]+$", + "type": "string" + }, + "onCancel": { + "minLength": 1, + "type": "string" + }, + "onDecline": { + "minLength": 1, + "type": "string" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "requestedSchema": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/elicitationFormSchema" + } + ] + }, + "url": { + "format": "uri", + "type": "string" + }, + "when": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name", + "mode", + "message" + ], + "type": "object" + }, + "elicitationFormOption": { + "additionalProperties": false, + "properties": { + "const": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "const", + "title" + ], + "type": "object" + }, + "elicitationFormProperty": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "format": { + "enum": [ + "email", + "uri", + "date", + "date-time" + ] + }, + "maxLength": { + "minimum": 0, + "type": "integer" + }, + "minLength": { + "minimum": 0, + "type": "integer" + }, + "title": { + "type": "string" + }, + "type": { + "const": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "default": { + "type": "number" + }, + "description": { + "type": "string" + }, + "maximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "title": { + "type": "string" + }, + "type": { + "enum": [ + "number", + "integer" + ] + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "default": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "const": "boolean" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enum": { + "items": { + "type": "string" + }, + "type": "array" + }, + "enumNames": { + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "type": "string" + }, + "type": { + "const": "string" + } + }, + "required": [ + "type", + "enum" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "oneOf": { + "items": { + "$ref": "#/$defs/elicitationFormOption" + }, + "type": "array" + }, + "title": { + "type": "string" + }, + "type": { + "const": "string" + } + }, + "required": [ + "type", + "oneOf" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "default": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "items": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "enum": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "const": "string" + } + }, + "required": [ + "type", + "enum" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "anyOf": { + "items": { + "$ref": "#/$defs/elicitationFormOption" + }, + "type": "array" + } + }, + "required": [ + "anyOf" + ], + "type": "object" + } + ] + }, + "maxItems": { + "minimum": 0, + "type": "integer" + }, + "minItems": { + "minimum": 0, + "type": "integer" + }, + "title": { + "type": "string" + }, + "type": { + "const": "array" + } + }, + "required": [ + "type", + "items" + ], + "type": "object" + } + ] + }, + "elicitationFormSchema": { + "additionalProperties": false, + "properties": { + "$schema": { + "format": "uri", + "type": "string" + }, + "properties": { + "additionalProperties": { + "$ref": "#/$defs/elicitationFormProperty" + }, + "type": "object" + }, + "required": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "type": { + "const": "object" + } + }, + "required": [ + "type", + "properties" + ], + "type": "object" + }, + "elicitationInteractionAcceptedResponse": { + "additionalProperties": false, + "properties": { + "action": { + "const": "accept" + }, + "content": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + } + }, + "required": [ + "action" + ], + "type": "object" + }, + "elicitationInteractionDeclinedResponse": { + "additionalProperties": false, + "properties": { + "action": { + "enum": [ + "decline", + "cancel" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, + "elicitationInteractionFormRequest": { + "additionalProperties": false, + "properties": { + "message": { + "minLength": 1, + "type": "string" + }, + "mode": { + "const": "form" + }, + "requestedSchema": { + "$ref": "#/$defs/elicitationFormSchema" + } + }, + "required": [ + "mode", + "message", + "requestedSchema" + ], + "type": "object" + }, + "elicitationInteractionRequest": { + "oneOf": [ + { + "$ref": "#/$defs/elicitationInteractionFormRequest" + }, + { + "$ref": "#/$defs/elicitationInteractionUrlRequest" + } + ] + }, + "elicitationInteractionResponse": { + "oneOf": [ + { + "$ref": "#/$defs/elicitationInteractionAcceptedResponse" + }, + { + "$ref": "#/$defs/elicitationInteractionDeclinedResponse" + } + ] + }, + "elicitationInteractionUrlRequest": { + "additionalProperties": false, + "properties": { + "message": { + "minLength": 1, + "type": "string" + }, + "mode": { + "const": "url" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "mode", + "message", + "url" + ], + "type": "object" + }, + "execution": { + "additionalProperties": false, + "properties": { + "taskSupport": { + "enum": [ + "forbidden", + "optional", + "required" + ], + "type": "string" + } + }, + "type": "object" + }, + "extensionCapabilities": { + "additionalProperties": { + "type": "object" + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$" + }, + "type": "object" + }, + "icon": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "mimeType": { + "type": "string" + }, + "sizes": { + "items": { + "type": "string" + }, + "type": "array" + }, + "src": { + "format": "uri", + "type": "string" + }, + "theme": { + "enum": [ + "light", + "dark" + ], + "type": "string" + } + }, + "required": [ + "src" + ], + "type": "object" + }, + "icons": { + "items": { + "$ref": "#/$defs/icon" + }, + "minItems": 1, + "type": "array" + }, + "info": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "contact": { + "$ref": "#/$defs/contact" + }, + "description": { + "type": "string" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "id": { + "type": "string" + }, + "license": { + "$ref": "#/$defs/license" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "title": { + "type": "string" + }, + "version": { + "minLength": 1, + "type": "string" + }, + "websiteUrl": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "name", + "version" + ], + "type": "object" + }, + "jsonSchemaObject": { + "additionalProperties": true, + "type": "object" + }, + "jsonValue": { + "oneOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + { + "items": { + "$ref": "#/$defs/jsonValue" + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "license": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "metaObject": { + "additionalProperties": true, + "propertyNames": { + "pattern": "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$" + }, + "type": "object" + }, + "oauthFlow": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "authorizationUrl": { + "format": "uri", + "type": "string" + }, + "refreshUrl": { + "format": "uri", + "type": "string" + }, + "scopes": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tokenUrl": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "scopes" + ], + "type": "object" + }, + "oauthFlows": { + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "implicit" + ] + }, + { + "required": [ + "password" + ] + }, + { + "required": [ + "clientCredentials" + ] + }, + { + "required": [ + "authorizationCode" + ] + } + ], + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "authorizationCode": { + "allOf": [ + { + "$ref": "#/$defs/oauthFlow" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl" + ] + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "#/$defs/oauthFlow" + }, + { + "required": [ + "tokenUrl" + ] + } + ] + }, + "implicit": { + "allOf": [ + { + "$ref": "#/$defs/oauthFlow" + }, + { + "required": [ + "authorizationUrl" + ] + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "#/$defs/oauthFlow" + }, + { + "required": [ + "tokenUrl" + ] + } + ] + } + }, + "type": "object" + }, + "prompt": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "arguments": { + "items": { + "$ref": "#/$defs/promptArgument" + }, + "minItems": 1, + "type": "array" + }, + "clientRequirements": { + "$ref": "#/$defs/clientCapabilityRequirements" + }, + "completionExamples": { + "$ref": "#/$defs/completionExamples" + }, + "deprecated": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "elicitations": { + "items": { + "$ref": "#/$defs/elicitationDeclaration" + }, + "minItems": 1, + "type": "array" + }, + "examples": { + "$ref": "#/$defs/promptExamples" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "name": { + "type": "string" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "tags": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "title": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "promptArgument": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "title": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "promptExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "arguments": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "result": { + "$ref": "#/$defs/completedPromptResultExample" + } + }, + "required": [ + "result" + ], + "type": "object" + }, + "promptExamples": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/promptExample" + } + ] + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "promptMessageExample": { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/$defs/toolResultContent" + }, + "role": { + "enum": [ + "user", + "assistant" + ], + "type": "string" + } + }, + "required": [ + "role", + "content" + ], + "type": "object" + }, + "protocolVersionScope": { + "items": { + "$ref": "#/$defs/supportedProtocolVersion" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "referenceObject": { + "additionalProperties": false, + "properties": { + "$componentRef": { + "pattern": "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$", + "type": "string" + } + }, + "required": [ + "$componentRef" + ], + "type": "object" + }, + "resource": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "clientRequirements": { + "$ref": "#/$defs/clientCapabilityRequirements" + }, + "deprecated": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "elicitations": { + "items": { + "$ref": "#/$defs/elicitationDeclaration" + }, + "minItems": 1, + "type": "array" + }, + "examples": { + "$ref": "#/$defs/resourceExamples" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "mimeType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "size": { + "type": "number" + }, + "tags": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "title": { + "type": "string" + }, + "uri": { + "type": "string" + } + }, + "required": [ + "uri", + "name" + ], + "type": "object" + }, + "resourceAnnotations": { + "additionalProperties": true, + "properties": { + "audience": { + "items": { + "enum": [ + "user", + "assistant" + ], + "type": "string" + }, + "type": "array" + }, + "lastModified": { + "type": "string" + }, + "priority": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "resourceContents": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "mimeType": { + "type": "string" + }, + "text": { + "type": "string" + }, + "uri": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "uri", + "text" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "blob": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "uri": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "uri", + "blob" + ], + "type": "object" + } + ] + }, + "resourceExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "result": { + "$ref": "#/$defs/completedReadResourceResultExample" + } + }, + "required": [ + "result" + ], + "type": "object" + }, + "resourceExamples": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/resourceExample" + } + ] + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "resourceTemplate": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "clientRequirements": { + "$ref": "#/$defs/clientCapabilityRequirements" + }, + "completionExamples": { + "$ref": "#/$defs/completionExamples" + }, + "deprecated": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "elicitations": { + "items": { + "$ref": "#/$defs/elicitationDeclaration" + }, + "minItems": 1, + "type": "array" + }, + "examples": { + "$ref": "#/$defs/resourceTemplateExamples" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "mimeType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "tags": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "title": { + "type": "string" + }, + "uriTemplate": { + "type": "string" + } + }, + "required": [ + "uriTemplate", + "name" + ], + "type": "object" + }, + "resourceTemplateExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "result": { + "$ref": "#/$defs/completedReadResourceResultExample" + }, + "uri": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "uri", + "result" + ], + "type": "object" + }, + "resourceTemplateExamples": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/resourceTemplateExample" + } + ] + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "rootDeclaration": { + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "uri": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "uri" + ], + "type": "object" + }, + "rootsListRequest": { + "additionalProperties": false, + "maxProperties": 0, + "type": "object" + }, + "rootsListResult": { + "additionalProperties": false, + "properties": { + "roots": { + "items": { + "$ref": "#/$defs/rootDeclaration" + }, + "type": "array" + } + }, + "required": [ + "roots" + ], + "type": "object" + }, + "samplingContentBlock": { + "oneOf": [ + { + "$ref": "#/$defs/toolResultContent" + }, + { + "$ref": "#/$defs/samplingToolUseContent" + }, + { + "$ref": "#/$defs/samplingToolResultContent" + } + ] + }, + "samplingCreateMessageRequest": { + "additionalProperties": false, + "properties": { + "includeContext": { + "enum": [ + "none", + "thisServer", + "allServers" + ] + }, + "maxTokens": { + "minimum": 1, + "type": "integer" + }, + "messages": { + "items": { + "$ref": "#/$defs/samplingMessage" + }, + "minItems": 1, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + "modelPreferences": { + "$ref": "#/$defs/samplingModelPreferences" + }, + "stopSequences": { + "items": { + "type": "string" + }, + "type": "array" + }, + "systemPrompt": { + "type": "string" + }, + "temperature": { + "type": "number" + }, + "toolChoice": { + "$ref": "#/$defs/samplingToolChoice" + }, + "tools": { + "items": { + "$ref": "#/$defs/samplingRequestTool" + }, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "messages", + "maxTokens" + ], + "type": "object" + }, + "samplingCreateMessageResult": { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/$defs/samplingMessageContent" + }, + "model": { + "type": "string" + }, + "role": { + "const": "assistant" + }, + "stopReason": { + "type": "string" + } + }, + "required": [ + "role", + "content", + "model" + ], + "type": "object" + }, + "samplingMessage": { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/$defs/samplingMessageContent" + }, + "role": { + "enum": [ + "user", + "assistant" + ] + } + }, + "required": [ + "role", + "content" + ], + "type": "object" + }, + "samplingMessageContent": { + "oneOf": [ + { + "$ref": "#/$defs/samplingContentBlock" + }, + { + "items": { + "$ref": "#/$defs/samplingContentBlock" + }, + "minItems": 1, + "type": "array" + } + ] + }, + "samplingModelHint": { + "additionalProperties": false, + "properties": { + "name": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "samplingModelPreferences": { + "additionalProperties": false, + "properties": { + "costPriority": { + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "hints": { + "items": { + "$ref": "#/$defs/samplingModelHint" + }, + "minItems": 1, + "type": "array" + }, + "intelligencePriority": { + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "speedPriority": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "samplingRequestTool": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "annotations": { + "$ref": "#/$defs/toolAnnotations" + }, + "description": { + "type": "string" + }, + "inputSchema": { + "allOf": [ + { + "$ref": "#/$defs/schemaComponentValue" + }, + { + "properties": { + "type": { + "const": "object" + } + }, + "required": [ + "type" + ] + } + ] + }, + "name": { + "minLength": 1, + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "name", + "inputSchema" + ], + "type": "object" + }, + "samplingToolChoice": { + "additionalProperties": false, + "properties": { + "mode": { + "enum": [ + "auto", + "required", + "none" + ] + } + }, + "required": [ + "mode" + ], + "type": "object" + }, + "samplingToolResultContent": { + "additionalProperties": false, + "properties": { + "content": { + "oneOf": [ + { + "$ref": "#/$defs/toolResultContent" + }, + { + "items": { + "$ref": "#/$defs/toolResultContent" + }, + "minItems": 1, + "type": "array" + } + ] + }, + "isError": { + "type": "boolean" + }, + "toolUseId": { + "type": "string" + }, + "type": { + "const": "tool_result" + } + }, + "required": [ + "type", + "toolUseId", + "content" + ], + "type": "object" + }, + "samplingToolUseContent": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "input": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + "name": { + "type": "string" + }, + "type": { + "const": "tool_use" + } + }, + "required": [ + "type", + "id", + "name", + "input" + ], + "type": "object" + }, + "schemaComponentValue": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "allOf": [ + { + "$ref": "#/$defs/jsonSchemaObject" + }, + { + "not": { + "required": [ + "$componentRef" + ] + } + } + ] + } + ] + }, + "securityRequirement": { + "additionalProperties": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "securityRequirementArray": { + "items": { + "$ref": "#/$defs/securityRequirement" + }, + "type": "array" + }, + "securityScheme": { + "oneOf": [ + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "bearerFormat": { + "type": "string" + }, + "description": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "type": { + "const": "http" + } + }, + "required": [ + "type", + "scheme" + ], + "type": "object" + }, + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "description": { + "type": "string" + }, + "in": { + "enum": [ + "header", + "query", + "cookie" + ], + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "const": "apiKey" + } + }, + "required": [ + "type", + "name", + "in" + ], + "type": "object" + }, + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "description": { + "type": "string" + }, + "flows": { + "$ref": "#/$defs/oauthFlows" + }, + "type": { + "const": "oauth2" + } + }, + "required": [ + "type", + "flows" + ], + "type": "object" + }, + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "format": "uri", + "type": "string" + }, + "type": { + "const": "openIdConnect" + } + }, + "required": [ + "type", + "openIdConnectUrl" + ], + "type": "object" + } + ] + }, + "securitySchemeMap": { + "additionalProperties": { + "$ref": "#/$defs/securityScheme" + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "specificationExtensionValue": { + "$ref": "#/$defs/jsonValue" + }, + "supportedProtocolVersion": { + "enum": [ + "2024-11-05", + "2025-03-26", + "2025-06-18", + "2025-11-25", + "2026-07-28" + ], + "type": "string" + }, + "tag": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "description": { + "type": "string" + }, + "name": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "tool": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/toolAnnotations" + }, + "clientRequirements": { + "$ref": "#/$defs/clientCapabilityRequirements" + }, + "deprecated": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "elicitations": { + "items": { + "$ref": "#/$defs/elicitationDeclaration" + }, + "minItems": 1, + "type": "array" + }, + "examples": { + "$ref": "#/$defs/toolExamples" + }, + "execution": { + "$ref": "#/$defs/execution" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "inputSchema": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "allOf": [ + { + "$ref": "#/$defs/schemaComponentValue" + }, + { + "properties": { + "type": { + "const": "object" + } + }, + "required": [ + "type" + ] + } + ] + } + ] + }, + "interactionExamples": { + "$ref": "#/$defs/toolInteractionExamples" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "outputSchema": { + "$ref": "#/$defs/schemaComponentValue" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "tags": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "title": { + "type": "string" + } + }, + "required": [ + "name", + "inputSchema" + ], + "type": "object" + }, + "toolAnnotations": { + "additionalProperties": true, + "properties": { + "destructiveHint": { + "type": "boolean" + }, + "idempotentHint": { + "type": "boolean" + }, + "openWorldHint": { + "type": "boolean" + }, + "readOnlyHint": { + "type": "boolean" + }, + "title": { + "type": "string" + } + }, + "type": "object" + }, + "toolExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "input": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + "result": { + "$ref": "#/$defs/completedToolResultExample" + } + }, + "required": [ + "input", + "result" + ], + "type": "object" + }, + "toolExamples": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/toolExample" + } + ] + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "toolInteractionElicitationStep": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "declaration": { + "pattern": "^[A-Za-z0-9._-]+$", + "type": "string" + }, + "request": { + "$ref": "#/$defs/elicitationInteractionRequest" + }, + "response": { + "$ref": "#/$defs/elicitationInteractionResponse" + }, + "type": { + "const": "elicitation" + } + }, + "required": [ + "type", + "request", + "response" + ], + "type": "object" + }, + "toolInteractionExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "input": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + "result": { + "$ref": "#/$defs/completedToolResultExample" + }, + "steps": { + "items": { + "$ref": "#/$defs/toolInteractionStep" + }, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "input", + "steps", + "result" + ], + "type": "object" + }, + "toolInteractionExamples": { + "additionalProperties": { + "$ref": "#/$defs/toolInteractionExample" + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "toolInteractionRootsStep": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "request": { + "$ref": "#/$defs/rootsListRequest" + }, + "response": { + "$ref": "#/$defs/rootsListResult" + }, + "type": { + "const": "roots" + } + }, + "required": [ + "type", + "request", + "response" + ], + "type": "object" + }, + "toolInteractionSamplingStep": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "request": { + "$ref": "#/$defs/samplingCreateMessageRequest" + }, + "response": { + "$ref": "#/$defs/samplingCreateMessageResult" + }, + "type": { + "const": "sampling" + } + }, + "required": [ + "type", + "request", + "response" + ], + "type": "object" + }, + "toolInteractionStep": { + "oneOf": [ + { + "$ref": "#/$defs/toolInteractionElicitationStep" + }, + { + "$ref": "#/$defs/toolInteractionSamplingStep" + }, + { + "$ref": "#/$defs/toolInteractionRootsStep" + } + ] + }, + "toolResultContent": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "text": { + "type": "string" + }, + "type": { + "const": "text" + } + }, + "required": [ + "type", + "text" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "data": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "type": { + "enum": [ + "image", + "audio" + ] + } + }, + "required": [ + "type", + "data", + "mimeType" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "resource": { + "$ref": "#/$defs/resourceContents" + }, + "type": { + "const": "resource" + } + }, + "required": [ + "type", + "resource" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "description": { + "type": "string" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "mimeType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size": { + "type": "number" + }, + "title": { + "type": "string" + }, + "type": { + "const": "resource_link" + }, + "uri": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "type", + "uri", + "name" + ], + "type": "object" + } + ] + }, + "transport": { + "oneOf": [ + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "type": { + "const": "streamable-http" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "args": { + "items": { + "type": "string" + }, + "type": "array" + }, + "command": { + "type": "string" + }, + "env": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "type": { + "const": "stdio" + } + }, + "required": [ + "type", + "command" + ], + "type": "object" + }, + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "type": { + "const": "sse" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "type": "object" + } + ] + } + } +} diff --git a/packages/validator/src/snapshots/0.8.0-rc.3/semantic.js b/packages/validator/src/snapshots/0.8.0-rc.3/semantic.js new file mode 100644 index 0000000..3389a7a --- /dev/null +++ b/packages/validator/src/snapshots/0.8.0-rc.3/semantic.js @@ -0,0 +1,983 @@ +// Validate the immutable 0.8.0-rc.3 snapshot using only snapshot-local artifacts. + +import Ajv from 'ajv'; +import Ajv2020 from 'ajv/dist/2020.js'; +import addFormats from 'ajv-formats'; +import { UriTemplateMatcher } from 'uri-template-matcher'; +import schema from './schema.json' with { type: 'json' }; +import { + mcpExtensionCatalogue, + mcpExtensionMaturity, + semanticValidateDocument as validateBaseSemantics, + supportedProtocolVersions +} from './base.js'; + +export { mcpExtensionCatalogue, mcpExtensionMaturity, supportedProtocolVersions }; + +const TOOL_INTERACTION_SENTINEL = '__interaction_example__'; +const ajv = new Ajv2020({ allErrors: true, strict: false }); +addFormats(ajv); +const ajvDraft7 = new Ajv({ allErrors: true, strict: false }); +addFormats(ajvDraft7); +const validateStructure = ajv.compile(schema); +const primitiveCollections = ['tools', 'resources', 'resourceTemplates', 'prompts']; +const componentNamespaces = ['schemas', 'toolExamples', 'resourceExamples', 'resourceTemplateExamples', 'promptExamples']; +const knownClientCapabilities = new Set(['roots', 'sampling', 'elicitation', 'tasks', 'extensions', 'experimental']); +const protocolOrder = new Map(supportedProtocolVersions.map((version, index) => [version, index])); + +const clientCapabilitiesByVersion = { + '2024-11-05': new Set(['roots', 'sampling', 'experimental']), + '2025-03-26': new Set(['roots', 'sampling', 'experimental']), + '2025-06-18': new Set(['roots', 'sampling', 'elicitation', 'experimental']), + '2025-11-25': new Set(['roots', 'sampling', 'elicitation', 'tasks', 'experimental']), + '2026-07-28': new Set(['roots', 'sampling', 'elicitation', 'extensions', 'experimental']) +}; + +function semanticDiagnostic(code, severity, message, path) { + return { code, severity, message, path }; +} + +function usesMcpReservedPrefix(identifier) { + if (typeof identifier !== 'string' || !identifier.includes('/')) return false; + const labels = identifier.slice(0, identifier.indexOf('/')).split('.'); + return labels.length >= 2 && ['modelcontextprotocol', 'mcp'].includes(labels[1].toLowerCase()); +} + +function isReferenceObject(value) { + return value !== null + && typeof value === 'object' + && !Array.isArray(value) + && Object.hasOwn(value, '$componentRef'); +} + +function componentDiagnostic(code, rel, message, path) { + return { + code, + severity: 'error', + message: `${rel}.${path.map((segment) => typeof segment === 'number' ? `[${segment}]` : segment).join('.')} ${message}`, + path + }; +} + +export function resolveComponentReferences(document, rel = 'document') { + const resolved = structuredClone(document); + const diagnostics = []; + const provenance = []; + let substitutions = 0; + + function resolve(reference, expectedNamespace, path, stack = []) { + const match = /^#\/components\/([^/]+)\/([^/]+)$/.exec(reference?.$componentRef ?? ''); + if (!match) return reference; + const [, namespace, name] = match; + if (namespace !== expectedNamespace) { + diagnostics.push(componentDiagnostic( + 'wrong-component-reference-namespace', + rel, + `must target #/components/${expectedNamespace}, not #/components/${namespace}`, + path + )); + return { value: reference }; + } + + const key = `${namespace}/${name}`; + if (stack.includes(key)) { + diagnostics.push(componentDiagnostic( + 'component-reference-cycle', + rel, + `forms a cycle through ${[...stack, key].join(' -> ')}`, + path + )); + return { value: reference }; + } + + const target = document?.components?.[namespace]?.[name]; + if (target === undefined) { + diagnostics.push(componentDiagnostic( + 'missing-component-reference-target', + rel, + `targets missing component ${JSON.stringify(reference.$componentRef)}`, + path + )); + return { value: reference }; + } + substitutions += 1; + return isReferenceObject(target) + ? resolve(target, expectedNamespace, path, [...stack, key]) + : { + value: structuredClone(target), + targetPath: ['components', namespace, name] + }; + } + + function substitute(reference, expectedNamespace, path, stack = []) { + const result = resolve(reference, expectedNamespace, path, stack); + if (result.targetPath) { + provenance.push({ referencePath: path, targetPath: result.targetPath }); + } + return result.value; + } + + for (const namespace of componentNamespaces) { + for (const [name, value] of Object.entries(document?.components?.[namespace] ?? {})) { + if (isReferenceObject(value)) { + resolved.components[namespace][name] = substitute(value, namespace, ['components', namespace, name], [`${namespace}/${name}`]); + } + } + } + + for (const [collection, declarations] of Object.entries({ + tools: document?.tools, + resources: document?.resources, + resourceTemplates: document?.resourceTemplates, + prompts: document?.prompts + })) { + for (const [declarationIndex, declaration] of (declarations ?? []).entries()) { + const resolvedDeclaration = resolved[collection][declarationIndex]; + if (collection === 'tools') { + for (const field of ['inputSchema', 'outputSchema']) { + if (isReferenceObject(declaration[field])) { + resolvedDeclaration[field] = substitute(declaration[field], 'schemas', [collection, declarationIndex, field]); + } + } + } + + const exampleNamespace = collection === 'tools' + ? 'toolExamples' + : collection === 'resources' + ? 'resourceExamples' + : collection === 'resourceTemplates' + ? 'resourceTemplateExamples' + : 'promptExamples'; + for (const [name, example] of Object.entries(declaration.examples ?? {})) { + if (isReferenceObject(example)) { + resolvedDeclaration.examples[name] = substitute( + example, + exampleNamespace, + [collection, declarationIndex, 'examples', name] + ); + } + } + } + } + + for (const collection of primitiveCollections) { + for (const [declarationIndex, declaration] of (document?.[collection] ?? []).entries()) { + for (const [elicitationIndex, elicitation] of (declaration.elicitations ?? []).entries()) { + if (isReferenceObject(elicitation.requestedSchema)) { + resolved[collection][declarationIndex].elicitations[elicitationIndex].requestedSchema = substitute( + elicitation.requestedSchema, + 'schemas', + [collection, declarationIndex, 'elicitations', elicitationIndex, 'requestedSchema'] + ); + } + } + } + } + + return { document: resolved, diagnostics, substitutions, provenance }; +} + +function structuralPath(document, error) { + const path = error.instancePath + ? error.instancePath.slice(1).split('/').map((segment) => segment.replaceAll('~1', '/').replaceAll('~0', '~')) + : []; + if (error.keyword === 'required' && typeof error.params.missingProperty === 'string') { + path.push(error.params.missingProperty); + } else if (error.keyword === 'additionalProperties' && typeof error.params.additionalProperty === 'string') { + path.push(error.params.additionalProperty); + } + return path.map((segment) => Array.isArray(document) && /^(?:0|[1-9][0-9]*)$/.test(segment) ? Number(segment) : segment); +} + +function structuralDiagnostics(document) { + if (validateStructure(document)) return []; + return (validateStructure.errors ?? []).map((error) => ({ + code: 'schema-validation', + severity: 'error', + message: `does not validate against 0.8.0: ${error.instancePath || '/'} ${error.message ?? 'unknown error'}`, + path: structuralPath(document, error) + })); +} + +function canonicalize(value) { + if (Array.isArray(value)) return value.map(canonicalize); + if (value && typeof value === 'object') { + return Object.fromEntries( + Object.entries(value) + .sort(([left], [right]) => left.localeCompare(right)) + .map(([key, child]) => [key, canonicalize(child)]) + ); + } + return value; +} + +function canonicalString(value) { + return JSON.stringify(canonicalize(value)); +} + +function remapSyntheticToolExampleDiagnostic(diagnostic, toolIndex, exampleName) { + if (!Array.isArray(diagnostic.path)) return diagnostic; + const prefix = ['tools', 0, 'examples', TOOL_INTERACTION_SENTINEL]; + const matches = prefix.every((segment, index) => diagnostic.path[index] === segment); + if (!matches) return diagnostic; + return { + ...diagnostic, + message: diagnostic.message.replace( + `tools[0].examples[${JSON.stringify(TOOL_INTERACTION_SENTINEL)}]`, + `tools[${toolIndex}].interactionExamples[${JSON.stringify(exampleName)}]` + ), + path: ['tools', toolIndex, 'interactionExamples', exampleName, ...diagnostic.path.slice(prefix.length)] + }; +} + +function validateToolInteractionInputAndResult(tool, toolIndex, exampleName, example, scope) { + const synthetic = { + mcpdesc: '0.8.0', + info: { name: 'tool-interaction-validation', version: '1.0.0' }, + protocolVersions: [...scope], + tools: [ + { + name: tool.name, + inputSchema: structuredClone(tool.inputSchema), + ...(tool.outputSchema ? { outputSchema: structuredClone(tool.outputSchema) } : {}), + examples: { + [TOOL_INTERACTION_SENTINEL]: { + input: structuredClone(example.input), + result: structuredClone(example.result) + } + } + } + ] + }; + return validateBaseSemantics(synthetic) + .map((diagnostic) => remapSyntheticToolExampleDiagnostic(diagnostic, toolIndex, exampleName)) + .filter((diagnostic) => diagnostic.path?.[0] === 'tools' && diagnostic.path?.[1] === toolIndex && diagnostic.path?.[2] === 'interactionExamples'); +} + +function validateAgainstRequestedSchema(schemaValue, value, location, path, diagnostics) { + try { + const validate = ajv.compile(schemaValue); + if (!validate(value)) { + const details = validate.errors?.map((error) => `${error.instancePath || '/'} ${error.message}`).join('; ') ?? 'unknown validation error'; + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-content-schema-mismatch', + 'error', + `${location} does not validate against the elicitation request schema: ${details}`, + path + )); + } + } catch { + try { + const validate = ajvDraft7.compile(schemaValue); + if (!validate(value)) { + const details = validate.errors?.map((error) => `${error.instancePath || '/'} ${error.message}`).join('; ') ?? 'unknown validation error'; + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-content-schema-mismatch', + 'error', + `${location} does not validate against the elicitation request schema: ${details}`, + path + )); + } + } catch { + // The containing Elicitation Declaration schema validator reports malformed schemas. + } + } +} + +function warnClientRequirementsContradiction(tool, step, stepLocation, stepPath, diagnostics) { + const requirements = tool.clientRequirements; + if (!requirements || typeof requirements !== 'object' || Array.isArray(requirements)) return; + + function warn(message, path) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-client-requirements-contradiction', + 'warning', + `${stepLocation} ${message}`, + path + )); + } + + if (step.type === 'roots') { + if (!Object.hasOwn(requirements, 'roots')) { + warn('illustrates roots input, but the Tool clientRequirements do not declare roots', [...stepPath, 'type']); + } + return; + } + + if (step.type === 'sampling') { + if (!Object.hasOwn(requirements, 'sampling')) { + warn('illustrates sampling input, but the Tool clientRequirements do not declare sampling', [...stepPath, 'type']); + return; + } + const sampling = requirements.sampling ?? {}; + if ((Object.hasOwn(step.request, 'tools') || Object.hasOwn(step.request, 'toolChoice')) && !Object.hasOwn(sampling, 'tools')) { + warn('illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools', [...stepPath, 'request', Object.hasOwn(step.request, 'tools') ? 'tools' : 'toolChoice']); + } + if (step.request.includeContext && step.request.includeContext !== 'none' && !Object.hasOwn(sampling, 'context')) { + warn('illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context', [...stepPath, 'request', 'includeContext']); + } + return; + } + + if (step.type === 'elicitation') { + if (!Object.hasOwn(requirements, 'elicitation')) { + warn('illustrates elicitation input, but the Tool clientRequirements do not declare elicitation', [...stepPath, 'type']); + return; + } + const elicitation = requirements.elicitation ?? {}; + if (step.request.mode === 'url' && !Object.hasOwn(elicitation, 'url')) { + warn('illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url', [...stepPath, 'request', 'mode']); + } + if (step.request.mode === 'form' && Object.keys(elicitation).length > 0 && !Object.hasOwn(elicitation, 'form')) { + warn('illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form', [...stepPath, 'request', 'mode']); + } + } +} + +function validateToolInteractionExamples(document) { + const diagnostics = []; + const rootScope = document.protocolVersions ?? []; + + for (const [toolIndex, tool] of (document.tools ?? []).entries()) { + if (!tool.interactionExamples || typeof tool.interactionExamples !== 'object' || Array.isArray(tool.interactionExamples)) continue; + const scope = tool.protocolVersions ?? rootScope; + + for (const [exampleName, example] of Object.entries(tool.interactionExamples)) { + if (!example || typeof example !== 'object' || Array.isArray(example)) continue; + const exampleLocation = `tools[${toolIndex}].interactionExamples[${JSON.stringify(exampleName)}]`; + const examplePath = ['tools', toolIndex, 'interactionExamples', exampleName]; + + diagnostics.push(...validateToolInteractionInputAndResult(tool, toolIndex, exampleName, example, scope)); + + for (const [stepIndex, step] of (example.steps ?? []).entries()) { + const stepLocation = `${exampleLocation}.steps[${stepIndex}]`; + const stepPath = [...examplePath, 'steps', stepIndex]; + warnClientRequirementsContradiction(tool, step, stepLocation, stepPath, diagnostics); + + if (step.type === 'elicitation') { + const request = step.request ?? {}; + const response = step.response ?? {}; + const declaration = typeof step.declaration === 'string' + ? (tool.elicitations ?? []).find((candidate) => candidate.name === step.declaration) + : undefined; + + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-version-mismatch', + 'error', + `${stepLocation}.type is not defined for MCP ${version}`, + [...stepPath, 'type'] + )); + } + if (request.mode === 'url' && protocolOrder.get(version) < protocolOrder.get('2025-11-25')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-version-mismatch', + 'error', + `${stepLocation}.request.mode "url" is not defined for MCP ${version}`, + [...stepPath, 'request', 'mode'] + )); + } + } + + if (typeof step.declaration === 'string' && !declaration) { + diagnostics.push(semanticDiagnostic( + 'unknown-elicitation-declaration', + 'error', + `${stepLocation}.declaration identifies no Tool elicitation named ${JSON.stringify(step.declaration)}`, + [...stepPath, 'declaration'] + )); + } + + if (declaration) { + if (declaration.mode !== request.mode) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-declaration-mismatch', + 'error', + `${stepLocation}.request.mode ${JSON.stringify(request.mode)} is incompatible with elicitation declaration ${JSON.stringify(step.declaration)} mode ${JSON.stringify(declaration.mode)}`, + [...stepPath, 'request', 'mode'] + )); + } + if (request.mode === 'form' && canonicalString(declaration.requestedSchema) !== canonicalString(request.requestedSchema)) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-declaration-mismatch', + 'error', + `${stepLocation}.request.requestedSchema is incompatible with elicitation declaration ${JSON.stringify(step.declaration)}`, + [...stepPath, 'request', 'requestedSchema'] + )); + } + if (request.mode === 'url' && declaration.url !== undefined && declaration.url !== request.url) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-declaration-mismatch', + 'error', + `${stepLocation}.request.url is incompatible with elicitation declaration ${JSON.stringify(step.declaration)}`, + [...stepPath, 'request', 'url'] + )); + } + } + + if (request.mode === 'form') { + if (response.action === 'accept') { + if (!Object.hasOwn(response, 'content')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-response-mismatch', + 'error', + `${stepLocation}.response.content is required when a form elicitation is accepted`, + [...stepPath, 'response', 'content'] + )); + } else { + validateAgainstRequestedSchema( + request.requestedSchema, + response.content, + `${stepLocation}.response.content`, + [...stepPath, 'response', 'content'], + diagnostics + ); + } + } else if (Object.hasOwn(response, 'content')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-response-mismatch', + 'error', + `${stepLocation}.response.content is not allowed when action is ${JSON.stringify(response.action)}`, + [...stepPath, 'response', 'content'] + )); + } + } else if (Object.hasOwn(response, 'content')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-response-mismatch', + 'error', + `${stepLocation}.response.content is not allowed for URL elicitation responses`, + [...stepPath, 'response', 'content'] + )); + } + } + + if (step.type === 'sampling') { + for (const version of scope) { + if ((Object.hasOwn(step.request, 'tools') || Object.hasOwn(step.request, 'toolChoice')) + && protocolOrder.get(version) < protocolOrder.get('2025-11-25')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-version-mismatch', + 'error', + `${stepLocation}.request uses sampling Tool fields that are not defined for MCP ${version}`, + [...stepPath, 'request', Object.hasOwn(step.request, 'tools') ? 'tools' : 'toolChoice'] + )); + } + } + } + + if (step.type === 'roots') { + for (const [rootIndex, root] of (step.response.roots ?? []).entries()) { + if (typeof root.uri === 'string' && !root.uri.startsWith('file://')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-roots-uri', + 'error', + `${stepLocation}.response.roots[${rootIndex}].uri must be a file:// URI`, + [...stepPath, 'response', 'roots', rootIndex, 'uri'] + )); + } + } + } + } + } + } + + return diagnostics; +} + +function validateClientRequirements(document) { + const diagnostics = []; + const rootScope = document.protocolVersions ?? []; + + function invalidMember(location, path, version, member) { + diagnostics.push(semanticDiagnostic( + 'client-requirement-version-mismatch', + 'error', + `${location} member ${JSON.stringify(member)} is not defined by MCP ${version}`, + [...path, member] + )); + } + + function requireObject(value, location, path, version) { + if (value && typeof value === 'object' && !Array.isArray(value)) return true; + diagnostics.push(semanticDiagnostic( + 'invalid-client-requirement-value', + 'error', + `${location} must be an object for MCP ${version}`, + path + )); + return false; + } + + function validateClosedMembers(value, allowed, location, path, version) { + if (!requireObject(value, location, path, version)) return false; + for (const member of Object.keys(value)) { + if (!allowed.has(member)) invalidMember(location, path, version, member); + } + return true; + } + + function validateTasks(value, location, path, version) { + validateClosedMembers(value, new Set(['list', 'cancel', 'requests']), location, path, version); + for (const member of ['list', 'cancel']) { + if (Object.hasOwn(value, member)) requireObject(value[member], `${location}.${member}`, [...path, member], version); + } + if (!Object.hasOwn(value, 'requests') || !requireObject(value.requests, `${location}.requests`, [...path, 'requests'], version)) return; + validateClosedMembers(value.requests, new Set(['sampling', 'elicitation']), `${location}.requests`, [...path, 'requests'], version); + for (const [family, operation] of [['sampling', 'createMessage'], ['elicitation', 'create']]) { + if (!Object.hasOwn(value.requests, family)) continue; + const familyValue = value.requests[family]; + const familyPath = [...path, 'requests', family]; + if (!validateClosedMembers(familyValue, new Set([operation]), `${location}.requests.${family}`, familyPath, version)) continue; + if (Object.hasOwn(familyValue, operation)) { + requireObject(familyValue[operation], `${location}.requests.${family}.${operation}`, [...familyPath, operation], version); + } + } + } + + for (const collection of primitiveCollections) { + for (const [primitiveIndex, primitive] of (document[collection] ?? []).entries()) { + const requirements = primitive.clientRequirements; + if (!requirements || typeof requirements !== 'object' || Array.isArray(requirements)) continue; + const scope = primitive.protocolVersions ?? rootScope; + const baseLocation = `${collection}[${primitiveIndex}].clientRequirements`; + const basePath = [collection, primitiveIndex, 'clientRequirements']; + + for (const version of scope) { + const available = clientCapabilitiesByVersion[version] ?? new Set(); + for (const [capability, value] of Object.entries(requirements)) { + if (capability.startsWith('x-')) continue; + if (knownClientCapabilities.has(capability) && !available.has(capability)) { + diagnostics.push(semanticDiagnostic( + 'client-requirement-version-mismatch', + 'error', + `${baseLocation}.${capability} is not defined by MCP ${version}; split the primitive into disjoint protocol-scoped variants when requirements differ`, + [...basePath, capability] + )); + continue; + } + if (!available.has(capability)) continue; + + const location = `${baseLocation}.${capability}`; + const path = [...basePath, capability]; + if (capability === 'roots') { + validateClosedMembers(value, version === '2026-07-28' ? new Set() : new Set(['listChanged']), location, path, version); + if (version !== '2026-07-28' && Object.hasOwn(value, 'listChanged') && typeof value.listChanged !== 'boolean') { + diagnostics.push(semanticDiagnostic('invalid-client-requirement-value', 'error', `${location}.listChanged must be a boolean for MCP ${version}`, [...path, 'listChanged'])); + } + } else if (capability === 'sampling' && ['2025-11-25', '2026-07-28'].includes(version)) { + validateClosedMembers(value, new Set(['context', 'tools']), location, path, version); + for (const member of ['context', 'tools']) { + if (Object.hasOwn(value, member)) requireObject(value[member], `${location}.${member}`, [...path, member], version); + } + if (Object.hasOwn(value, 'context')) { + diagnostics.push(semanticDiagnostic('deprecated-client-requirement', 'warning', `${location}.context uses deprecated MCP context-inclusion capability semantics in MCP ${version}`, [...path, 'context'])); + } + } else if (capability === 'elicitation' && ['2025-11-25', '2026-07-28'].includes(version)) { + validateClosedMembers(value, new Set(['form', 'url']), location, path, version); + for (const member of ['form', 'url']) { + if (Object.hasOwn(value, member)) requireObject(value[member], `${location}.${member}`, [...path, member], version); + } + } else if (capability === 'tasks') { + validateTasks(value, location, path, version); + } else if (capability === 'extensions') { + for (const extension of Object.keys(value)) { + if (!usesMcpReservedPrefix(extension)) continue; + const maturity = mcpExtensionMaturity(extension); + if (maturity === 'official') continue; + if (maturity === 'experimental') { + diagnostics.push(semanticDiagnostic( + 'experimental-reserved-extension-identifier', + 'warning', + `${location} contains experimental MCP extension ${JSON.stringify(extension)}; preserve it and review its maturity before relying on it`, + [...path, extension] + )); + } else { + diagnostics.push(semanticDiagnostic( + 'unknown-reserved-extension-identifier', + 'warning', + `${location} contains unrecognized extension ${JSON.stringify(extension)} under an MCP-reserved prefix; preserve it and review its authority`, + [...path, extension] + )); + } + } + } + + if (version === '2026-07-28' && ['roots', 'sampling'].includes(capability)) { + diagnostics.push(semanticDiagnostic( + 'deprecated-client-requirement', + 'warning', + `${location} requires an MCP capability deprecated in MCP ${version}`, + path + )); + } + } + } + } + } + + return diagnostics; +} + +function validatePromptContentVersion(content, contentLocation, contentPath, version, diagnostics) { + if (content.type === 'audio' && protocolOrder.get(version) < protocolOrder.get('2025-03-26')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation} uses audio content, which is not defined for MCP ${version}`, [...contentPath, 'type'])); + } + if (content.type === 'resource_link' && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation} uses resource-link content, which is not defined for MCP ${version}`, [...contentPath, 'type'])); + } + if (Object.hasOwn(content, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation}._meta is not defined for MCP ${version}`, [...contentPath, '_meta'])); + } + if (content.type === 'resource' && Object.hasOwn(content.resource ?? {}, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation}.resource._meta is not defined for MCP ${version}`, [...contentPath, 'resource', '_meta'])); + } + if (content.type === 'resource_link' && Array.isArray(content.icons) && protocolOrder.get(version) < protocolOrder.get('2025-11-25')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation}.icons is not defined for MCP ${version}`, [...contentPath, 'icons'])); + } + if (content.annotations?.lastModified !== undefined && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation}.annotations.lastModified is not defined for MCP ${version}`, [...contentPath, 'annotations', 'lastModified'])); + } +} + +function validatePromptExamples(document) { + const diagnostics = []; + const rootScope = document.protocolVersions ?? []; + + for (const [promptIndex, prompt] of (document.prompts ?? []).entries()) { + if (!prompt.examples || typeof prompt.examples !== 'object' || Array.isArray(prompt.examples)) continue; + const scope = prompt.protocolVersions ?? rootScope; + const declaredArguments = new Map((prompt.arguments ?? []).map((argument) => [argument.name, argument])); + + for (const [exampleName, example] of Object.entries(prompt.examples)) { + if (!example || typeof example !== 'object' || Array.isArray(example)) continue; + const exampleLocation = `prompts[${promptIndex}].examples[${JSON.stringify(exampleName)}]`; + const examplePath = ['prompts', promptIndex, 'examples', exampleName]; + const result = example.result ?? {}; + const resultPath = [...examplePath, 'result']; + const argumentsValue = example.arguments; + + if (argumentsValue && typeof argumentsValue === 'object' && !Array.isArray(argumentsValue)) { + for (const [argumentName] of Object.entries(argumentsValue)) { + if (!declaredArguments.has(argumentName)) { + diagnostics.push(semanticDiagnostic( + 'prompt-example-unknown-argument', + 'error', + `${exampleLocation}.arguments contains undeclared Prompt argument ${JSON.stringify(argumentName)}`, + [...examplePath, 'arguments', argumentName] + )); + } + } + } + + for (const [argumentName, argument] of declaredArguments) { + if (argument.required === true && !Object.hasOwn(argumentsValue ?? {}, argumentName)) { + diagnostics.push(semanticDiagnostic( + 'prompt-example-missing-required-argument', + 'error', + `${exampleLocation}.arguments is missing required Prompt argument ${JSON.stringify(argumentName)}`, + [...examplePath, 'arguments', argumentName] + )); + } + } + + for (const envelopeField of ['jsonrpc', 'id', 'error']) { + if (Object.hasOwn(result, envelopeField)) { + diagnostics.push(semanticDiagnostic('prompt-example-json-rpc-envelope', 'error', `${exampleLocation}.result must not contain JSON-RPC envelope field ${JSON.stringify(envelopeField)}`, [...resultPath, envelopeField])); + } + } + for (const incompleteField of ['task', 'inputRequests', 'requestState']) { + if (Object.hasOwn(result, incompleteField)) { + diagnostics.push(semanticDiagnostic('incomplete-prompt-example-result', 'error', `${exampleLocation}.result must not contain non-completed workflow field ${JSON.stringify(incompleteField)}`, [...resultPath, incompleteField])); + } + } + + for (const version of scope) { + const resultLocation = `${exampleLocation}.result`; + if (version === '2026-07-28' && result.resultType !== 'complete') { + diagnostics.push(semanticDiagnostic('prompt-example-result-version-mismatch', 'error', `${resultLocation}.resultType must be "complete" for MCP ${version}`, [...resultPath, 'resultType'])); + } + if (version !== '2026-07-28' && Object.hasOwn(result, 'resultType')) { + diagnostics.push(semanticDiagnostic('prompt-example-result-version-mismatch', 'error', `${resultLocation}.resultType is not defined for MCP ${version}`, [...resultPath, 'resultType'])); + } + if (Object.hasOwn(result, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic('prompt-example-result-version-mismatch', 'error', `${resultLocation}._meta is not defined for MCP ${version}`, [...resultPath, '_meta'])); + } + (result.messages ?? []).forEach((message, messageIndex) => { + const contentLocation = `${resultLocation}.messages[${messageIndex}].content`; + const contentPath = [...resultPath, 'messages', messageIndex, 'content']; + validatePromptContentVersion(message.content ?? {}, contentLocation, contentPath, version, diagnostics); + }); + } + } + } + + return diagnostics; +} + +function extractUriTemplateVariables(uriTemplate) { + const matcher = new UriTemplateMatcher(); + matcher.add(uriTemplate); + return new Set( + matcher.templates.flatMap((template) => template.parts) + .filter((part) => part.type === 'expression') + .flatMap((part) => part.expressions.map((expression) => expression.name)) + ); +} + +function validateCompletionExampleResult(result, exampleLocation, examplePath, version, diagnostics) { + const resultLocation = `${exampleLocation}.result`; + const resultPath = [...examplePath, 'result']; + + for (const envelopeField of ['jsonrpc', 'id', 'error']) { + if (Object.hasOwn(result, envelopeField)) { + diagnostics.push(semanticDiagnostic( + 'completion-example-json-rpc-envelope', + 'error', + `${resultLocation} must not contain JSON-RPC envelope field ${JSON.stringify(envelopeField)}`, + [...resultPath, envelopeField] + )); + } + } + for (const incompleteField of ['task', 'inputRequests', 'requestState']) { + if (Object.hasOwn(result, incompleteField)) { + diagnostics.push(semanticDiagnostic( + 'incomplete-completion-example-result', + 'error', + `${resultLocation} must not contain non-completed workflow field ${JSON.stringify(incompleteField)}`, + [...resultPath, incompleteField] + )); + } + } + if (version === '2026-07-28' && result.resultType !== 'complete') { + diagnostics.push(semanticDiagnostic( + 'completion-example-result-version-mismatch', + 'error', + `${resultLocation}.resultType must be "complete" for MCP ${version}`, + [...resultPath, 'resultType'] + )); + } + if (version !== '2026-07-28' && Object.hasOwn(result, 'resultType')) { + diagnostics.push(semanticDiagnostic( + 'completion-example-result-version-mismatch', + 'error', + `${resultLocation}.resultType is not defined for MCP ${version}`, + [...resultPath, 'resultType'] + )); + } + if (Object.hasOwn(result, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic( + 'completion-example-result-version-mismatch', + 'error', + `${resultLocation}._meta is not defined for MCP ${version}`, + [...resultPath, '_meta'] + )); + } +} + +function validateCompletionExamples(document) { + const diagnostics = []; + const rootScope = document.protocolVersions ?? []; + + for (const [kind, items] of [ + ['prompts', document.prompts ?? []], + ['resourceTemplates', document.resourceTemplates ?? []] + ]) { + for (const [ownerIndex, owner] of items.entries()) { + if (!owner.completionExamples || typeof owner.completionExamples !== 'object' || Array.isArray(owner.completionExamples)) continue; + const scope = owner.protocolVersions ?? rootScope; + const ownerLocation = `${kind}[${ownerIndex}]`; + let allowedNames; + + if (kind === 'prompts') { + allowedNames = new Set((owner.arguments ?? []).map((argument) => argument.name)); + } else { + try { + allowedNames = extractUriTemplateVariables(owner.uriTemplate); + } catch (error) { + diagnostics.push(semanticDiagnostic( + 'resource-template-completion-example-invalid-template', + 'error', + `${ownerLocation}.uriTemplate is not a valid RFC 6570 template: ${error.message}`, + [kind, ownerIndex, 'uriTemplate'] + )); + allowedNames = undefined; + } + } + + for (const [exampleName, example] of Object.entries(owner.completionExamples)) { + if (!example || typeof example !== 'object' || Array.isArray(example)) continue; + const exampleLocation = `${ownerLocation}.completionExamples[${JSON.stringify(exampleName)}]`; + const examplePath = [kind, ownerIndex, 'completionExamples', exampleName]; + const targetName = example.argument?.name; + const contextArguments = example.context?.arguments; + + if (typeof targetName === 'string' && allowedNames && !allowedNames.has(targetName)) { + diagnostics.push(semanticDiagnostic( + kind === 'prompts' + ? 'prompt-completion-example-unknown-argument' + : 'resource-template-completion-example-unknown-variable', + 'error', + kind === 'prompts' + ? `${exampleLocation}.argument.name identifies undeclared Prompt argument ${JSON.stringify(targetName)}` + : `${exampleLocation}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(owner.uriTemplate)}`, + [...examplePath, 'argument', 'name'] + )); + } + + if (contextArguments && typeof contextArguments === 'object' && !Array.isArray(contextArguments)) { + for (const argumentName of Object.keys(contextArguments)) { + if (allowedNames && !allowedNames.has(argumentName)) { + diagnostics.push(semanticDiagnostic( + kind === 'prompts' + ? 'prompt-completion-example-context-unknown-argument' + : 'resource-template-completion-example-context-unknown-variable', + 'error', + kind === 'prompts' + ? `${exampleLocation}.context.arguments contains undeclared Prompt argument ${JSON.stringify(argumentName)}` + : `${exampleLocation}.context.arguments contains no RFC 6570 variable ${JSON.stringify(argumentName)} from ${JSON.stringify(owner.uriTemplate)}`, + [...examplePath, 'context', 'arguments', argumentName] + )); + } + if (argumentName === targetName) { + diagnostics.push(semanticDiagnostic( + 'completion-example-duplicate-target-context', + 'error', + `${exampleLocation}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(argumentName)}`, + [...examplePath, 'context', 'arguments', argumentName] + )); + } + } + } + + const result = example.result ?? {}; + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get('2025-03-26')) { + diagnostics.push(semanticDiagnostic( + 'completion-example-version-mismatch', + 'error', + `${exampleLocation} is not defined for MCP ${version}`, + examplePath + )); + continue; + } + if (Object.hasOwn(example, 'context') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic( + 'completion-example-context-version-mismatch', + 'error', + `${exampleLocation}.context is not defined for MCP ${version}`, + [...examplePath, 'context'] + )); + } + validateCompletionExampleResult(result, exampleLocation, examplePath, version, diagnostics); + } + } + } + } + + return diagnostics; +} + +export function evaluateClientRequirements(requirements, clientCapabilities, version) { + if (!supportedProtocolVersions.includes(version)) { + throw new Error(`Unsupported MCP protocol revision ${JSON.stringify(version)}`); + } + if (requirements === undefined) { + return { status: 'satisfied', declared: false, unsatisfied: [], indeterminate: [] }; + } + + const profile = clientCapabilities && typeof clientCapabilities === 'object' && !Array.isArray(clientCapabilities) + ? clientCapabilities + : {}; + const unsatisfied = []; + const indeterminate = []; + + function requirePresence(owner, key, path) { + if (Object.hasOwn(owner, key)) return true; + unsatisfied.push(path); + return false; + } + + function evaluateMarkerMap(required, advertised, path) { + for (const [member, settings] of Object.entries(required)) { + const memberPath = [...path, member]; + if (!requirePresence(advertised, member, memberPath)) continue; + if (Object.keys(settings).length > 0) indeterminate.push(memberPath); + } + } + + for (const [capability, required] of Object.entries(requirements)) { + if (capability.startsWith('x-')) continue; + const path = [capability]; + if (!requirePresence(profile, capability, path)) continue; + const advertised = profile[capability]; + + if (capability === 'roots') { + if (Object.hasOwn(required, 'listChanged') + && (!advertised || advertised.listChanged !== required.listChanged)) { + unsatisfied.push([...path, 'listChanged']); + } + } else if (capability === 'sampling' || capability === 'elicitation') { + evaluateMarkerMap(required, advertised ?? {}, path); + } else if (capability === 'tasks') { + for (const member of ['list', 'cancel']) { + if (Object.hasOwn(required, member)) requirePresence(advertised ?? {}, member, [...path, member]); + } + for (const [family, operation] of [['sampling', 'createMessage'], ['elicitation', 'create']]) { + if (!Object.hasOwn(required.requests ?? {}, family)) continue; + const familyPath = [...path, 'requests', family]; + if (!requirePresence(advertised?.requests ?? {}, family, familyPath)) continue; + if (Object.hasOwn(required.requests[family], operation)) { + requirePresence(advertised.requests[family] ?? {}, operation, [...familyPath, operation]); + } + } + } else if (capability === 'extensions') { + evaluateMarkerMap(required, advertised ?? {}, path); + } else if (capability === 'experimental') { + for (const member of Object.keys(required)) { + const memberPath = [...path, member]; + if (requirePresence(advertised ?? {}, member, memberPath)) indeterminate.push(memberPath); + } + } else { + indeterminate.push(path); + } + } + + return { + status: unsatisfied.length ? 'unsatisfied' : indeterminate.length ? 'indeterminate' : 'satisfied', + declared: true, + unsatisfied, + indeterminate + }; +} + +export function semanticValidateDocument(document, rel = 'document') { + const resolution = resolveComponentReferences(document, rel); + const resolvedStructureDiagnostics = resolution.diagnostics.length || resolution.substitutions === 0 + ? [] + : structuralDiagnostics(resolution.document); + const diagnostics = [ + ...resolution.diagnostics, + ...resolvedStructureDiagnostics, + ...(resolution.diagnostics.length || resolvedStructureDiagnostics.length + ? [] + : validateBaseSemantics(resolution.document, rel)), + ...validateToolInteractionExamples(resolution.document), + ...validatePromptExamples(resolution.document), + ...validateCompletionExamples(resolution.document), + ...validateClientRequirements(document) + ]; + const filtered = Object.hasOwn(document, 'transports') + ? diagnostics + : diagnostics.filter((diagnostic) => diagnostic.code !== 'transport-coverage-gap'); + return filtered.sort( + (left, right) => left.code.localeCompare(right.code) + || left.message.localeCompare(right.message) + || JSON.stringify(left.path).localeCompare(JSON.stringify(right.path)) + ); +} + +export function validateMcpdesc08Document(document) { + const diagnostics = structuralDiagnostics(document); + return diagnostics.length ? diagnostics : semanticValidateDocument(document); +} diff --git a/packages/validator/standalone.js b/packages/validator/standalone.js index b2bc0ea..a568488 100644 --- a/packages/validator/standalone.js +++ b/packages/validator/standalone.js @@ -1 +1 @@ -var df=Object.defineProperty;var _a=(r,s)=>()=>(s||r((s={exports:{}}).exports,s),s.exports),Ft=(r,s)=>{for(var d in s)df(r,d,{get:s[d],enumerable:!0})};var sl=_a(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});function tl(r){let s=r.length,d=0,b=0,u;for(;b=55296&&u<=56319&&b{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.formatNames=_r.fastFormats=_r.fullFormats=void 0;function Nr(r,s){return{validate:r,compare:s}}_r.fullFormats={date:Nr(al,rp),time:Nr(Xa(!0),tp),"date-time":Nr(il(!0),ll),"iso-time":Nr(Xa(),pl),"iso-date-time":Nr(il(),ml),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:kf,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:zf,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:jf,int32:{type:"number",validate:Af},int64:{type:"number",validate:qf},float:{type:"number",validate:nl},double:{type:"number",validate:nl},password:!0,binary:!0};_r.fastFormats={..._r.fullFormats,date:Nr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,rp),time:Nr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,tp),"date-time":Nr(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,ll),"iso-time":Nr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,pl),"iso-date-time":Nr(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,ml),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};_r.formatNames=Object.keys(_r.fullFormats);function gf(r){return r%4===0&&(r%100!==0||r%400===0)}var bf=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,$f=[0,31,28,31,30,31,30,31,31,30,31,30,31];function al(r){let s=bf.exec(r);if(!s)return!1;let d=+s[1],b=+s[2],u=+s[3];return b>=1&&b<=12&&u>=1&&u<=(b===2&&gf(d)?29:$f[b])}function rp(r,s){if(r&&s)return r>s?1:r23||i>59||r&&!t)return!1;if(u<=23&&f<=59&&e<60)return!0;let n=f-i*p,a=u-o*p-(n<0?1:0);return(a===23||a===-1)&&(n===59||n===-1)&&e<61}}function tp(r,s){if(!(r&&s))return;let d=new Date("2020-01-01T"+r).valueOf(),b=new Date("2020-01-01T"+s).valueOf();if(d&&b)return d-b}function pl(r,s){if(!(r&&s))return;let d=Ga.exec(r),b=Ga.exec(s);if(d&&b)return r=d[1]+d[2]+d[3],s=b[1]+b[2]+b[3],r>s?1:r=vf}function qf(r){return Number.isInteger(r)}function nl(){return!0}var xf=/[^\\]\\Z/;function zf(r){if(xf.test(r))return!1;try{return new RegExp(r),!0}catch{return!1}}});var ul=_a((wb,fl)=>{"use strict";fl.exports=function r(s,d){if(s===d)return!0;if(s&&d&&typeof s=="object"&&typeof d=="object"){if(s.constructor!==d.constructor)return!1;var b,u,f;if(Array.isArray(s)){if(b=s.length,b!=d.length)return!1;for(u=b;u--!==0;)if(!r(s[u],d[u]))return!1;return!0}if(s.constructor===RegExp)return s.source===d.source&&s.flags===d.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===d.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===d.toString();if(f=Object.keys(s),b=f.length,b!==Object.keys(d).length)return!1;for(u=b;u--!==0;)if(!Object.prototype.hasOwnProperty.call(d,f[u]))return!1;for(u=b;u--!==0;){var e=f[u];if(!r(s[e],d[e]))return!1}return!0}return s!==s&&d!==d}});var Ta=_a(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var cl=ul();cl.code='require("ajv/dist/runtime/equal").default';ip.default=cl});var cp={};Ft(cp,{schemaSha256:()=>uy,snapshotTag:()=>fy,specification:()=>up,supportedProtocolVersions:()=>fp,validate:()=>gy});var rl={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/0.8.0.json",title:"MCP Description",description:"MCP Description 0.8.0 Community Working Draft 1 (v0.8.0-draft.1; unreleased).",type:"object",required:["mcpdesc","info","protocolVersions","transports"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",items:{$ref:"#/$defs/tool"}},resources:{type:"array",items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",items:{$ref:"#/$defs/prompt"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},jsonSchemaObject:{type:"object",additionalProperties:!0},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},additionalProperties:!1},icons:{type:"array",items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},additionalProperties:!1,minProperties:1},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/toolExample"}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/resourceExample"}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/resourceTemplateExample"}},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},name:{type:"string",minLength:1},inputSchema:{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{required:["type"],properties:{type:{const:"object"}}}]},outputSchema:{$ref:"#/$defs/jsonSchemaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},name:{type:"string"},arguments:{type:"array",items:{$ref:"#/$defs/promptArgument"}},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},additionalProperties:!1},extensionCapabilities:{type:"object",propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!0}}};import{Validator as vc}from"@cfworker/json-schema";var Ef=Za,Nf={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"urn:mcpdesc:standalone:0.8.0-draft.1",title:"MCP Description",description:"MCP Description 0.8.0 Community Working Draft 1 (v0.8.0-draft.1; unreleased).",type:"object",required:["mcpdesc","info","protocolVersions","transports"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",items:{$ref:"#/$defs/tool"}},resources:{type:"array",items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",items:{$ref:"#/$defs/prompt"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},jsonSchemaObject:{type:"object",additionalProperties:!0},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},additionalProperties:!1},icons:{type:"array",items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},additionalProperties:!1,minProperties:1},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/toolExample"}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/resourceExample"}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/resourceTemplateExample"}},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},name:{type:"string",minLength:1},inputSchema:{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{required:["type"],properties:{type:{const:"object"}}}]},outputSchema:{$ref:"#/$defs/jsonSchemaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},name:{type:"string"},arguments:{type:"array",items:{$ref:"#/$defs/promptArgument"}},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},additionalProperties:!1},extensionCapabilities:{type:"object",propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!0}}};var re=Object.prototype.hasOwnProperty,X=sl().default,x=new RegExp("^x-","u"),_f={type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},additionalProperties:!1};var Tf={type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},additionalProperties:!1},D=sp().fullFormats.uri;function Ve(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Ve.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(r)){let o=r.length;for(let i=0;i1){e:for(;i--;)for(n=i;n--;)if(ma(r[i],r[n])){let a={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[a]:e.push(a),t++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),t++}return ce.errors=e,t===0}ce.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};var G=new RegExp("^[A-Za-z0-9._-]+$","u");function Pe(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Pe.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(r)){let i=r.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),t++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),t++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),t++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}return Pe.errors=e,t===0}Pe.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function is(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=is.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="type"||m==="url"||m==="security")){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(ce(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ce.errors:e.concat(ce.errors),t=e.length)),r.type!==void 0&&r.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.url!==void 0){let m=r.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}r.security!==void 0&&(Pe(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Pe.errors:e.concat(Pe.errors),t=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="type"||m==="command"||m==="args"||m==="env"||m==="security")){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(ce(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ce.errors:e.concat(ce.errors),t=e.length)),r.type!==void 0&&r.type!=="stdio"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"stdio"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.command!==void 0&&typeof r.command!="string"){let m={instancePath:s+"/command",schemaPath:"#/oneOf/1/properties/command/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),t++}if(r.args!==void 0){let m=r.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var l=k===t;if(!l){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=a===t;if(w){i=!0,n=0;var c=!0}let h=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}if(r.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),t++}if(r.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="data"||g==="mimeType"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0){let g=r.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:yl.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),t++}}if(r.data!==void 0&&typeof r.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.annotations!==void 0){let g=r.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var m=k===t;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=h===t;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="type"||k==="resource"||k==="annotations"||k==="_meta")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.type!==void 0&&r.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}if(r.resource!==void 0&&(Vr(r.resource,{instancePath:s+"/resource",parentData:r,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?Vr.errors:e.concat(Vr.errors),t=e.length)),r.annotations!==void 0){let k=r.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),t++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),t++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}}if(k.lastModified!==void 0&&typeof k.lastModified!="string"){let v={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}if(r._meta!==void 0){let k=r._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=t;if(typeof v=="string"&&!Y.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),t++}var y=P===t;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),t++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),t++}var w=g===t;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),t++}if(r.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),t++}if(r.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),t++}for(let P in r)if(!re.call(yl.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),t++}if(r.type!==void 0&&r.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}if(r.uri!==void 0){let P=r.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.name!==void 0&&typeof r.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.title!==void 0&&typeof r.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.description!==void 0&&typeof r.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.size!==void 0&&typeof r.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}if(r.icons!==void 0&&(Ve(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Ve.errors:e.concat(Ve.errors),t=e.length)),r.annotations!==void 0){let P=r.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let A=j.length;for(let q=0;q1||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[A]:e.push(A),t++}if(j<0||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),t++}}else{let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[A]:e.push(A),t++}}if(P.lastModified!==void 0&&typeof P.lastModified!="string"){let j={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}if(r._meta!==void 0){let P=r._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let A=t;if(typeof j=="string"&&!Y.test(j)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[q]:e.push(q),t++}var $=A===t;if(!$){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[q]:e.push(q),t++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),t++}var w=k===t;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),t++}return ls.errors=e,p.props=c,t===0}ls.evaluated={dynamicProps:!0,dynamicItems:!1};function ms(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=ms.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),t++}if(r.resultType!==void 0&&r.resultType!=="complete"){let i={instancePath:s+"/resultType",schemaPath:"#/properties/resultType/const",keyword:"const",params:{allowedValue:"complete"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),t++}if(r.content!==void 0){let i=r.content;if(Array.isArray(i)){let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.maxLength!==void 0){let y=r.maxLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),t++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.format!==void 0){let y=r.format;if(!(y==="email"||y==="uri"||y==="date"||y==="date-time")){let $={instancePath:s+"/format",schemaPath:"#/oneOf/0/properties/format/enum",keyword:"enum",params:{allowedValues:hl.oneOf[0].properties.format.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}if(r.default!==void 0&&typeof r.default!="string"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/0/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="type"||y==="title"||y==="description"||y==="minimum"||y==="maximum"||y==="default")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r.type!==void 0){let y=r.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:hl.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}if(r.title!==void 0&&typeof r.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.description!==void 0&&typeof r.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.minimum!==void 0&&typeof r.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.maximum!==void 0&&typeof r.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.default!==void 0&&typeof r.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=c===t;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="title"||g==="description"||g==="default")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0&&r.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),t++}if(r.title!==void 0&&typeof r.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.description!==void 0&&typeof r.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.default!==void 0&&typeof r.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var h=y===t;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="type"||k==="title"||k==="description"||k==="enum"||k==="enumNames"||k==="default")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.type!==void 0&&r.type!=="string"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}if(r.title!==void 0&&typeof r.title!="string"){let k={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.description!==void 0&&typeof r.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.enum!==void 0){let k=r.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.maxItems!==void 0){let A=r.maxItems;if(!(typeof A=="number"&&!(A%1)&&!isNaN(A))){let q={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[q]:e.push(q),t++}if(typeof A=="number"&&(A<0||isNaN(A))){let q={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.items!==void 0){let A=r.items,q=t,z=!1,T=null,E=t;if(A&&typeof A=="object"&&!Array.isArray(A)){if(A.type===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[N]:e.push(N),t++}if(A.enum===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[N]:e.push(N),t++}for(let N in A)if(!(N==="type"||N==="enum")){let M={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};e===null?e=[M]:e.push(M),t++}if(A.type!==void 0&&A.type!=="string"){let N={instancePath:s+"/items/type",schemaPath:"#/oneOf/5/properties/items/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[N]:e.push(N),t++}if(A.enum!==void 0){let N=A.enum;if(Array.isArray(N)){let M=N.length;for(let U=0;U1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){a=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:a},message:"must NOT have duplicate items (items ## "+a+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),t++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return ys.errors=e,t===0}ys.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function cr(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=cr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t,l=t,c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){let k;if(r.url===void 0&&(k="url")){let v={};e===null?e=[v]:e.push(v),t++}}var h=c===t;if(h){let k={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[k]:e.push(k),t++}else t=l,e!==null&&(l?e.length=l:e=null);if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.requestedSchema===void 0){let k={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[k]:e.push(k),t++}if(r.mode!==void 0&&r.mode!=="form"){let k={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}}var O=a===t;if(O){i=!0,n=0;var m={};m.mode=!0}let w=t,y=t,$=t;if(r&&typeof r=="object"&&!Array.isArray(r)){let k;if(r.requestedSchema===void 0&&(k="requestedSchema")){let v={};e===null?e=[v]:e.push(v),t++}}var g=$===t;if(g){let k={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[k]:e.push(k),t++}else t=y,e!==null&&(y?e.length=y:e=null);if(r&&typeof r=="object"&&!Array.isArray(r)&&r.mode!==void 0&&r.mode!=="url"){let k={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}var O=w===t;if(O&&i?(i=!1,n=[n,1]):O&&(i=!0,n=1,m!==!0&&(m=m||{},m.mode=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let k={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[k]:e.push(k),t++}if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let k={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[k]:e.push(k),t++}if(r.mode===void 0){let k={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[k]:e.push(k),t++}if(r.message===void 0){let k={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!re.call(dl.properties,k)){let v={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.name!==void 0){let k=r.name;if(typeof k=="string"){if(!G.test(k)){let v={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}if(r.mode!==void 0){let k=r.mode;if(!(k==="form"||k==="url")){let v={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:dl.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[v]:e.push(v),t++}}if(r.message!==void 0){let k=r.message;if(typeof k=="string"){if(X(k)<1){let v={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}if(r.when!==void 0){let k=r.when;if(typeof k=="string"){if(X(k)<1){let v={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}if(r.requestedSchema!==void 0&&(ys(r.requestedSchema,{instancePath:s+"/requestedSchema",parentData:r,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?ys.errors:e.concat(ys.errors),t=e.length)),r.url!==void 0){let k=r.url;if(typeof k=="string"){if(!D(k)){let v={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}if(r.onDecline!==void 0){let k=r.onDecline;if(typeof k=="string"){if(X(k)<1){let v={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}if(r.onCancel!==void 0){let k=r.onCancel;if(typeof k=="string"){if(X(k)<1){let v={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}r.protocolVersions!==void 0&&(ce(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ce.errors:e.concat(ce.errors),t=e.length))}else{let k={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),t++}return cr.errors=e,t===0}cr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ds(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=ds.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),t++}if(r.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!re.call(If.properties,i)){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r.protocolVersions!==void 0&&(ce(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ce.errors:e.concat(ce.errors),t=e.length)),r.title!==void 0&&typeof r.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.description!==void 0&&typeof r.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.icons!==void 0&&(Ve(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Ve.errors:e.concat(Ve.errors),t=e.length)),r.tags!==void 0){let i=r.tags;if(Array.isArray(i)){let n=i.length;for(let c=0;c1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(Pe(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Pe.errors:e.concat(Pe.errors),t=e.length)),r.name!==void 0){let i=r.name;if(typeof i=="string"){if(X(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}if(r.inputSchema!==void 0){let i=r.inputSchema;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/inputSchema",schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),t++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),t++}}}if(r.outputSchema!==void 0){let i=r.outputSchema;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/outputSchema",schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.execution!==void 0){let i=r.execution;if(i&&typeof i=="object"&&!Array.isArray(i)){for(let n in i)if(n!=="taskSupport"){let a={instancePath:s+"/execution",schemaPath:"#/$defs/execution/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[a]:e.push(a),t++}if(i.taskSupport!==void 0){let n=i.taskSupport;if(typeof n!="string"){let a={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[a]:e.push(a),t++}if(!(n==="forbidden"||n==="optional"||n==="required")){let a={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/enum",keyword:"enum",params:{allowedValues:Cf.properties.taskSupport.enum},message:"must be equal to one of the allowed values"};e===null?e=[a]:e.push(a),t++}}}else{let n={instancePath:s+"/execution",schemaPath:"#/$defs/execution/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(us(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?us.errors:e.concat(us.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),t++}}if(r.cacheScope!==void 0){let i=r.cacheScope;if(!(i==="public"||i==="private")){let n={instancePath:s+"/cacheScope",schemaPath:"#/properties/cacheScope/enum",keyword:"enum",params:{allowedValues:Df.properties.cacheScope.enum},message:"must be equal to one of the allowed values"};e===null?e=[n]:e.push(n),t++}}if(r.contents!==void 0){let i=r.contents;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/contents",schemaPath:"#/properties/contents/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(Pe(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Pe.errors:e.concat(Pe.errors),t=e.length)),r.uri!==void 0&&typeof r.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.size!==void 0&&typeof r.size!="number"){let i={instancePath:s+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(gs(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?gs.errors:e.concat(gs.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(Pe(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Pe.errors:e.concat(Pe.errors),t=e.length)),r.uriTemplate!==void 0&&typeof r.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(Ps(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Ps.errors:e.concat(Ps.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(Pe(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Pe.errors:e.concat(Pe.errors),t=e.length)),r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.arguments!==void 0){let i=r.arguments;if(Array.isArray(i)){let n=i.length;for(let a=0;a1){e:for(;i--;)for(n=i;n--;)if(ma(r[i],r[n])){let a={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[a]:e.push(a),t++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),t++}return ye.errors=e,t===0}ye.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function we(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=we.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(r)){let i=r.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),t++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),t++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),t++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}return we.errors=e,t===0}we.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function qs(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=qs.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="type"||m==="url"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(ye(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ye.errors:e.concat(ye.errors),t=e.length)),r.type!==void 0&&r.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.url!==void 0){let m=r.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}r.security!==void 0&&(we(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?we.errors:e.concat(we.errors),t=e.length));for(let m in r)x.test(m)&&(V(r[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?V.errors:e.concat(V.errors),t=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="type"||m==="command"||m==="args"||m==="env"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(ye(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ye.errors:e.concat(ye.errors),t=e.length)),r.type!==void 0&&r.type!=="stdio"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"stdio"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.command!==void 0&&typeof r.command!="string"){let m={instancePath:s+"/command",schemaPath:"#/oneOf/1/properties/command/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),t++}if(r.args!==void 0){let m=r.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/defaultIds",schemaPath:"#/$defs/provenanceIds/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/defaultIds",schemaPath:"#/$defs/provenanceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}for(let i in r)x.test(i)&&(V(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?V.errors:e.concat(V.errors),t=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return Zs.errors=e,t===0}Zs.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Be=new RegExp("^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$","u");function Or(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Or.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.$componentRef===void 0){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),t++}for(let $ in r)if($!=="$componentRef"){let g={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),t++}if(r.$componentRef!==void 0){let $=r.$componentRef;if(typeof $=="string"){if(!Be.test($)){let g={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}}}else{let $={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}var y=a===t;if(y){i=!0,n=0;var l=!0}let c=t;if(!(r&&typeof r=="object"&&!Array.isArray(r))){let $={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}let h=t,m=t;if(r&&typeof r=="object"&&!Array.isArray(r)){let $;if(r.$componentRef===void 0&&($="$componentRef")){let g={};e===null?e=[g]:e.push(g),t++}}var w=m===t;if(w){let $={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[$]:e.push($),t++}else t=h,e!==null&&(h?e.length=h:e=null);var y=c===t;if(y&&i?(i=!1,n=[n,1]):y&&(i=!0,n=1,l!==!0&&(l=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let $={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),t++}return Or.errors=e,p.props=l,t===0}Or.evaluated={dynamicProps:!0,dynamicItems:!1};var gl={oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},Gt={type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0};function Rr(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Rr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.uri===void 0){let y={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[y]:e.push(y),t++}if(r.text===void 0){let y={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="uri"||y==="mimeType"||y==="text"||y==="_meta")){let $={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r.uri!==void 0){let y=r.uri;if(typeof y=="string"){if(!D(y)){let $={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[$]:e.push($),t++}}else{let $={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),t++}}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let y={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.text!==void 0&&typeof r.text!="string"){let y={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r._meta!==void 0){let y=r._meta;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=t;if(typeof $=="string"&&!Y.test($)){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:$};e===null?e=[O]:e.push(O),t++}var l=g===t;if(!l){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};e===null?e=[O]:e.push(O),t++}}else{let $={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var w=a===t;if(w){i=!0,n=0;var c=!0}let h=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.uri===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[y]:e.push(y),t++}if(r.blob===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="uri"||y==="mimeType"||y==="blob"||y==="_meta")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r.uri!==void 0){let y=r.uri;if(typeof y=="string"){if(!D(y)){let $={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[$]:e.push($),t++}}else{let $={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),t++}}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let y={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.blob!==void 0&&typeof r.blob!="string"){let y={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r._meta!==void 0){let y=r._meta;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=t;if(typeof $=="string"&&!Y.test($)){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:$};e===null?e=[O]:e.push(O),t++}var m=g===t;if(!m){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};e===null?e=[O]:e.push(O),t++}}else{let $={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var w=h===t;if(w&&i?(i=!1,n=[n,1]):w&&(i=!0,n=1,c!==!0&&(c=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let y={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[y]:e.push(y),t++}return Rr.errors=e,p.props=c,t===0}Rr.evaluated={dynamicProps:!0,dynamicItems:!1};function Ss(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Ss.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}if(r.text===void 0){let g={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="text"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0&&r.type!=="text"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),t++}if(r.text!==void 0&&typeof r.text!="string"){let g={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.annotations!==void 0){let g=r.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var l=k===t;if(!l){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=a===t;if(w){i=!0,n=0;var c=!0}let h=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}if(r.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),t++}if(r.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="data"||g==="mimeType"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0){let g=r.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:gl.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),t++}}if(r.data!==void 0&&typeof r.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.annotations!==void 0){let g=r.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var m=k===t;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=h===t;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="type"||k==="resource"||k==="annotations"||k==="_meta")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.type!==void 0&&r.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}if(r.resource!==void 0&&(Rr(r.resource,{instancePath:s+"/resource",parentData:r,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?Rr.errors:e.concat(Rr.errors),t=e.length)),r.annotations!==void 0){let k=r.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),t++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),t++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}}if(k.lastModified!==void 0&&typeof k.lastModified!="string"){let v={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}if(r._meta!==void 0){let k=r._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=t;if(typeof v=="string"&&!Y.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),t++}var y=P===t;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),t++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),t++}var w=g===t;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),t++}if(r.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),t++}if(r.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),t++}for(let P in r)if(!re.call(gl.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),t++}if(r.type!==void 0&&r.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}if(r.uri!==void 0){let P=r.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.name!==void 0&&typeof r.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.title!==void 0&&typeof r.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.description!==void 0&&typeof r.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.size!==void 0&&typeof r.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}if(r.icons!==void 0&&(De(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?De.errors:e.concat(De.errors),t=e.length)),r.annotations!==void 0){let P=r.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let A=j.length;for(let q=0;q1||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[A]:e.push(A),t++}if(j<0||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),t++}}else{let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[A]:e.push(A),t++}}if(P.lastModified!==void 0&&typeof P.lastModified!="string"){let j={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}if(r._meta!==void 0){let P=r._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let A=t;if(typeof j=="string"&&!Y.test(j)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[q]:e.push(q),t++}var $=A===t;if(!$){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[q]:e.push(q),t++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),t++}var w=k===t;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),t++}return Ss.errors=e,p.props=c,t===0}Ss.evaluated={dynamicProps:!0,dynamicItems:!1};function Is(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Is.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),t++}if(r.resultType!==void 0&&r.resultType!=="complete"){let i={instancePath:s+"/resultType",schemaPath:"#/properties/resultType/const",keyword:"const",params:{allowedValue:"complete"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),t++}if(r.content!==void 0){let i=r.content;if(Array.isArray(i)){let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),t++}}if(r.cacheScope!==void 0){let i=r.cacheScope;if(!(i==="public"||i==="private")){let n={instancePath:s+"/cacheScope",schemaPath:"#/properties/cacheScope/enum",keyword:"enum",params:{allowedValues:Qf.properties.cacheScope.enum},message:"must be equal to one of the allowed values"};e===null?e=[n]:e.push(n),t++}}if(r.contents!==void 0){let i=r.contents;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/contents",schemaPath:"#/properties/contents/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.maxLength!==void 0){let y=r.maxLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),t++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.format!==void 0){let y=r.format;if(!(y==="email"||y==="uri"||y==="date"||y==="date-time")){let $={instancePath:s+"/format",schemaPath:"#/oneOf/0/properties/format/enum",keyword:"enum",params:{allowedValues:$l.oneOf[0].properties.format.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}if(r.default!==void 0&&typeof r.default!="string"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/0/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="type"||y==="title"||y==="description"||y==="minimum"||y==="maximum"||y==="default")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r.type!==void 0){let y=r.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:$l.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}if(r.title!==void 0&&typeof r.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.description!==void 0&&typeof r.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.minimum!==void 0&&typeof r.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.maximum!==void 0&&typeof r.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.default!==void 0&&typeof r.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=c===t;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="title"||g==="description"||g==="default")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0&&r.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),t++}if(r.title!==void 0&&typeof r.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.description!==void 0&&typeof r.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.default!==void 0&&typeof r.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var h=y===t;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="type"||k==="title"||k==="description"||k==="enum"||k==="enumNames"||k==="default")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.type!==void 0&&r.type!=="string"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}if(r.title!==void 0&&typeof r.title!="string"){let k={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.description!==void 0&&typeof r.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.enum!==void 0){let k=r.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.maxItems!==void 0){let A=r.maxItems;if(!(typeof A=="number"&&!(A%1)&&!isNaN(A))){let q={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[q]:e.push(q),t++}if(typeof A=="number"&&(A<0||isNaN(A))){let q={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.items!==void 0){let A=r.items,q=t,z=!1,T=null,E=t;if(A&&typeof A=="object"&&!Array.isArray(A)){if(A.type===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[N]:e.push(N),t++}if(A.enum===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[N]:e.push(N),t++}for(let N in A)if(!(N==="type"||N==="enum")){let M={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};e===null?e=[M]:e.push(M),t++}if(A.type!==void 0&&A.type!=="string"){let N={instancePath:s+"/items/type",schemaPath:"#/oneOf/5/properties/items/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[N]:e.push(N),t++}if(A.enum!==void 0){let N=A.enum;if(Array.isArray(N)){let M=N.length;for(let U=0;U1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){a=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:a},message:"must NOT have duplicate items (items ## "+a+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),t++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Fs.errors=e,t===0}Fs.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function dr(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=dr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t,l=t,c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){let P;if(r.url===void 0&&(P="url")){let j={};e===null?e=[j]:e.push(j),t++}}var h=c===t;if(h){let P={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),t++}else t=l,e!==null&&(l?e.length=l:e=null);if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.requestedSchema===void 0){let P={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[P]:e.push(P),t++}if(r.mode!==void 0&&r.mode!=="form"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}}var O=a===t;if(O){i=!0,n=0;var m={};m.mode=!0}let w=t,y=t,$=t;if(r&&typeof r=="object"&&!Array.isArray(r)){let P;if(r.requestedSchema===void 0&&(P="requestedSchema")){let j={};e===null?e=[j]:e.push(j),t++}}var g=$===t;if(g){let P={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),t++}else t=y,e!==null&&(y?e.length=y:e=null);if(r&&typeof r=="object"&&!Array.isArray(r)&&r.mode!==void 0&&r.mode!=="url"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}var O=w===t;if(O&&i?(i=!1,n=[n,1]):O&&(i=!0,n=1,m!==!0&&(m=m||{},m.mode=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),t++}if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),t++}if(r.mode===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[P]:e.push(P),t++}if(r.message===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[P]:e.push(P),t++}for(let P in r)if(!(re.call(bl.properties,P)||x.test(P))){let j={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),t++}if(r.name!==void 0){let P=r.name;if(typeof P=="string"){if(!G.test(P)){let j={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.mode!==void 0){let P=r.mode;if(!(P==="form"||P==="url")){let j={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:bl.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[j]:e.push(j),t++}}if(r.message!==void 0){let P=r.message;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.when!==void 0){let P=r.when;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.requestedSchema!==void 0){let P=r.requestedSchema,j=t,A=!1,q=null,z=t;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.$componentRef===void 0){let E={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[E]:e.push(E),t++}for(let E in P)if(E!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),t++}if(P.$componentRef!==void 0){let E=P.$componentRef;if(typeof E=="string"){if(!Be.test(E)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),t++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),t++}}}else{let E={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[E]:e.push(E),t++}var v=z===t;if(v){A=!0,q=0;var k=!0}let T=t;Fs(P,{instancePath:s+"/requestedSchema",parentData:r,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Fs.errors:e.concat(Fs.errors),t=e.length);var v=T===t;if(v&&A?(A=!1,q=[q,1]):v&&(A=!0,q=1,k!==!0&&(k=!0)),A)t=j,e!==null&&(j?e.length=j:e=null);else{let E={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:q},message:"must match exactly one schema in oneOf"};e===null?e=[E]:e.push(E),t++}}if(r.url!==void 0){let P=r.url;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.onDecline!==void 0){let P=r.onDecline;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.onCancel!==void 0){let P=r.onCancel;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}r.protocolVersions!==void 0&&(ye(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ye.errors:e.concat(ye.errors),t=e.length));for(let P in r)x.test(P)&&(V(r[P],{instancePath:s+"/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:P,rootData:u,dynamicAnchors:f})||(e=e===null?V.errors:e.concat(V.errors),t=e.length))}else{let P={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),t++}return dr.errors=e,t===0}dr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Js(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Js.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let l={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[l]:e.push(l),t++}if(r.inputSchema===void 0){let l={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[l]:e.push(l),t++}for(let l in r)if(!(re.call(Gf.properties,l)||x.test(l))){let c={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),t++}if(r.protocolVersions!==void 0&&(ye(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ye.errors:e.concat(ye.errors),t=e.length)),r.title!==void 0&&typeof r.title!="string"){let l={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),t++}if(r.description!==void 0&&typeof r.description!="string"){let l={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),t++}if(r.icons!==void 0&&(De(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?De.errors:e.concat(De.errors),t=e.length)),r.tags!==void 0){let l=r.tags;if(Array.isArray(l)){if(l.length<1){let w={instancePath:s+"/tags",schemaPath:"#/properties/tags/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),t++}let c=l.length;for(let w=0;w1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),t++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let l={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[l]:e.push(l),t++}if(r._meta!==void 0){let l=r._meta;if(l&&typeof l=="object"&&!Array.isArray(l))for(let c in l){let h=t;if(typeof c=="string"&&!Y.test(c)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:c};e===null?e=[m]:e.push(m),t++}var o=h===t;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:c},message:"property name must be valid"};e===null?e=[m]:e.push(m),t++}}else{let c={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.security!==void 0&&(we(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?we.errors:e.concat(we.errors),t=e.length)),r.clientRequirements!==void 0&&(yr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?yr.errors:e.concat(yr.errors),t=e.length)),r.provenanceIds!==void 0){let l=r.provenanceIds;if(Array.isArray(l)){if(l.length<1){let w={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),t++}let c=l.length;for(let w=0;w1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),t++;break}w[y]=h}}}}else{let c={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),t++}}if(r.name!==void 0){let l=r.name;if(typeof l=="string"){if(X(l)<1){let c={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[c]:e.push(c),t++}}else{let c={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}}if(r.inputSchema!==void 0){let l=r.inputSchema,c=t,h=!1,m=null,w=t;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),t++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),t++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!Be.test($)){let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}}}else{let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}var a=w===t;if(a){h=!0,m=0;var i=!0}let y=t;if(!Or(l,{instancePath:s+"/inputSchema",parentData:r,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?Or.errors:e.concat(Or.errors),t=e.length;else var n=Or.evaluated.props;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),t++}if(l.type!==void 0&&l.type!=="object"){let $={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[$]:e.push($),t++}}n!==!0&&(n=n||{},n.type=!0);var a=y===t;if(a&&h?(h=!1,m=[m,1]):a&&(h=!0,m=1,i!==!0&&n!==void 0&&(n===!0?i=!0:(i=i||{},Object.assign(i,n)))),h)t=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),t++}}if(r.outputSchema!==void 0&&(Or(r.outputSchema,{instancePath:s+"/outputSchema",parentData:r,parentDataProperty:"outputSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Or.errors:e.concat(Or.errors),t=e.length)),r.annotations!==void 0){let l=r.annotations;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.title!==void 0&&typeof l.title!="string"){let c={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}if(l.readOnlyHint!==void 0&&typeof l.readOnlyHint!="boolean"){let c={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.destructiveHint!==void 0&&typeof l.destructiveHint!="boolean"){let c={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.idempotentHint!==void 0&&typeof l.idempotentHint!="boolean"){let c={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.openWorldHint!==void 0&&typeof l.openWorldHint!="boolean"){let c={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}}else{let c={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.execution!==void 0){let l=r.execution;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let c in l)if(c!=="taskSupport"){let h={instancePath:s+"/execution",schemaPath:"#/$defs/execution/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};e===null?e=[h]:e.push(h),t++}if(l.taskSupport!==void 0){let c=l.taskSupport;if(typeof c!="string"){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),t++}if(!(c==="forbidden"||c==="optional"||c==="required")){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/enum",keyword:"enum",params:{allowedValues:Xf.properties.taskSupport.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),t++}}}else{let c={instancePath:s+"/execution",schemaPath:"#/$defs/execution/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.examples!==void 0&&(Us(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Us.errors:e.concat(Us.errors),t=e.length)),r.elicitations!==void 0){let l=r.elicitations;if(Array.isArray(l)){if(l.length<1){let h={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[h]:e.push(h),t++}let c=l.length;for(let h=0;h1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(we(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?we.errors:e.concat(we.errors),t=e.length)),r.clientRequirements!==void 0&&(yr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?yr.errors:e.concat(yr.errors),t=e.length)),r.provenanceIds!==void 0){let i=r.provenanceIds;if(Array.isArray(i)){if(i.length<1){let c={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),t++}let n=i.length;for(let c=0;c1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.uri!==void 0&&typeof r.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.size!==void 0&&typeof r.size!="number"){let i={instancePath:s+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(Hs(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Hs.errors:e.concat(Hs.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(we(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?we.errors:e.concat(we.errors),t=e.length)),r.clientRequirements!==void 0&&(yr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?yr.errors:e.concat(yr.errors),t=e.length)),r.provenanceIds!==void 0){let i=r.provenanceIds;if(Array.isArray(i)){if(i.length<1){let c={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),t++}let n=i.length;for(let c=0;c1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.uriTemplate!==void 0&&typeof r.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(Ks(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Ks.errors:e.concat(Ks.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(we(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?we.errors:e.concat(we.errors),t=e.length)),r.clientRequirements!==void 0&&(yr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?yr.errors:e.concat(yr.errors),t=e.length)),r.provenanceIds!==void 0){let i=r.provenanceIds;if(Array.isArray(i)){if(i.length<1){let c={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),t++}let n=i.length;for(let c=0;c1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.arguments!==void 0){let i=r.arguments;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){e:for(;i--;)for(n=i;n--;)if(ma(r[i],r[n])){let a={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[a]:e.push(a),t++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),t++}return de.errors=e,t===0}de.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function ke(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=ke.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(r)){let i=r.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),t++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),t++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),t++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}return ke.errors=e,t===0}ke.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function si(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=si.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="type"||m==="url"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(de(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?de.errors:e.concat(de.errors),t=e.length)),r.type!==void 0&&r.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.url!==void 0){let m=r.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}r.security!==void 0&&(ke(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ke.errors:e.concat(ke.errors),t=e.length));for(let m in r)x.test(m)&&(R(r[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?R.errors:e.concat(R.errors),t=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="type"||m==="command"||m==="args"||m==="env"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(de(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?de.errors:e.concat(de.errors),t=e.length)),r.type!==void 0&&r.type!=="stdio"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"stdio"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.command!==void 0&&typeof r.command!="string"){let m={instancePath:s+"/command",schemaPath:"#/oneOf/1/properties/command/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),t++}if(r.args!==void 0){let m=r.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var l=k===t;if(!l){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=a===t;if(w){i=!0,n=0;var c=!0}let h=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}if(r.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),t++}if(r.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="data"||g==="mimeType"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0){let g=r.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Pl.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),t++}}if(r.data!==void 0&&typeof r.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.annotations!==void 0){let g=r.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var m=k===t;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=h===t;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="type"||k==="resource"||k==="annotations"||k==="_meta")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.type!==void 0&&r.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}if(r.resource!==void 0&&(Jr(r.resource,{instancePath:s+"/resource",parentData:r,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?Jr.errors:e.concat(Jr.errors),t=e.length)),r.annotations!==void 0){let k=r.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),t++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),t++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}}if(k.lastModified!==void 0&&typeof k.lastModified!="string"){let v={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}if(r._meta!==void 0){let k=r._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=t;if(typeof v=="string"&&!Y.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),t++}var y=P===t;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),t++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),t++}var w=g===t;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),t++}if(r.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),t++}if(r.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),t++}for(let P in r)if(!re.call(Pl.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),t++}if(r.type!==void 0&&r.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}if(r.uri!==void 0){let P=r.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.name!==void 0&&typeof r.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.title!==void 0&&typeof r.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.description!==void 0&&typeof r.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.size!==void 0&&typeof r.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}if(r.icons!==void 0&&(Re(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Re.errors:e.concat(Re.errors),t=e.length)),r.annotations!==void 0){let P=r.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let A=j.length;for(let q=0;q1||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[A]:e.push(A),t++}if(j<0||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),t++}}else{let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[A]:e.push(A),t++}}if(P.lastModified!==void 0&&typeof P.lastModified!="string"){let j={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}if(r._meta!==void 0){let P=r._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let A=t;if(typeof j=="string"&&!Y.test(j)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[q]:e.push(q),t++}var $=A===t;if(!$){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[q]:e.push(q),t++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),t++}var w=k===t;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),t++}return ai.errors=e,p.props=c,t===0}ai.evaluated={dynamicProps:!0,dynamicItems:!1};function pi(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=pi.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),t++}if(r.resultType!==void 0&&r.resultType!=="complete"){let i={instancePath:s+"/resultType",schemaPath:"#/properties/resultType/const",keyword:"const",params:{allowedValue:"complete"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),t++}if(r.content!==void 0){let i=r.content;if(Array.isArray(i)){let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),t++}}if(r.cacheScope!==void 0){let i=r.cacheScope;if(!(i==="public"||i==="private")){let n={instancePath:s+"/cacheScope",schemaPath:"#/properties/cacheScope/enum",keyword:"enum",params:{allowedValues:lu.properties.cacheScope.enum},message:"must be equal to one of the allowed values"};e===null?e=[n]:e.push(n),t++}}if(r.contents!==void 0){let i=r.contents;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/contents",schemaPath:"#/properties/contents/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.maxLength!==void 0){let y=r.maxLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),t++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.format!==void 0){let y=r.format;if(!(y==="email"||y==="uri"||y==="date"||y==="date-time")){let $={instancePath:s+"/format",schemaPath:"#/oneOf/0/properties/format/enum",keyword:"enum",params:{allowedValues:kl.oneOf[0].properties.format.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}if(r.default!==void 0&&typeof r.default!="string"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/0/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="type"||y==="title"||y==="description"||y==="minimum"||y==="maximum"||y==="default")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r.type!==void 0){let y=r.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:kl.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}if(r.title!==void 0&&typeof r.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.description!==void 0&&typeof r.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.minimum!==void 0&&typeof r.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.maximum!==void 0&&typeof r.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.default!==void 0&&typeof r.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=c===t;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="title"||g==="description"||g==="default")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0&&r.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),t++}if(r.title!==void 0&&typeof r.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.description!==void 0&&typeof r.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.default!==void 0&&typeof r.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var h=y===t;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="type"||k==="title"||k==="description"||k==="enum"||k==="enumNames"||k==="default")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.type!==void 0&&r.type!=="string"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}if(r.title!==void 0&&typeof r.title!="string"){let k={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.description!==void 0&&typeof r.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.enum!==void 0){let k=r.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.maxItems!==void 0){let A=r.maxItems;if(!(typeof A=="number"&&!(A%1)&&!isNaN(A))){let q={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[q]:e.push(q),t++}if(typeof A=="number"&&(A<0||isNaN(A))){let q={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.items!==void 0){let A=r.items,q=t,z=!1,T=null,E=t;if(A&&typeof A=="object"&&!Array.isArray(A)){if(A.type===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[N]:e.push(N),t++}if(A.enum===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[N]:e.push(N),t++}for(let N in A)if(!(N==="type"||N==="enum")){let M={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};e===null?e=[M]:e.push(M),t++}if(A.type!==void 0&&A.type!=="string"){let N={instancePath:s+"/items/type",schemaPath:"#/oneOf/5/properties/items/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[N]:e.push(N),t++}if(A.enum!==void 0){let N=A.enum;if(Array.isArray(N)){let M=N.length;for(let U=0;U1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){a=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:a},message:"must NOT have duplicate items (items ## "+a+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),t++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return hi.errors=e,t===0}hi.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function gr(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=gr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t,l=t,c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){let P;if(r.url===void 0&&(P="url")){let j={};e===null?e=[j]:e.push(j),t++}}var h=c===t;if(h){let P={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),t++}else t=l,e!==null&&(l?e.length=l:e=null);if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.requestedSchema===void 0){let P={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[P]:e.push(P),t++}if(r.mode!==void 0&&r.mode!=="form"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}}var O=a===t;if(O){i=!0,n=0;var m={};m.mode=!0}let w=t,y=t,$=t;if(r&&typeof r=="object"&&!Array.isArray(r)){let P;if(r.requestedSchema===void 0&&(P="requestedSchema")){let j={};e===null?e=[j]:e.push(j),t++}}var g=$===t;if(g){let P={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),t++}else t=y,e!==null&&(y?e.length=y:e=null);if(r&&typeof r=="object"&&!Array.isArray(r)&&r.mode!==void 0&&r.mode!=="url"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}var O=w===t;if(O&&i?(i=!1,n=[n,1]):O&&(i=!0,n=1,m!==!0&&(m=m||{},m.mode=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),t++}if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),t++}if(r.mode===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[P]:e.push(P),t++}if(r.message===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[P]:e.push(P),t++}for(let P in r)if(!(re.call(wl.properties,P)||x.test(P))){let j={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),t++}if(r.name!==void 0){let P=r.name;if(typeof P=="string"){if(!G.test(P)){let j={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.mode!==void 0){let P=r.mode;if(!(P==="form"||P==="url")){let j={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:wl.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[j]:e.push(j),t++}}if(r.message!==void 0){let P=r.message;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.when!==void 0){let P=r.when;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.requestedSchema!==void 0){let P=r.requestedSchema,j=t,A=!1,q=null,z=t;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.$componentRef===void 0){let E={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[E]:e.push(E),t++}for(let E in P)if(E!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),t++}if(P.$componentRef!==void 0){let E=P.$componentRef;if(typeof E=="string"){if(!Be.test(E)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),t++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),t++}}}else{let E={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[E]:e.push(E),t++}var v=z===t;if(v){A=!0,q=0;var k=!0}let T=t;hi(P,{instancePath:s+"/requestedSchema",parentData:r,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?hi.errors:e.concat(hi.errors),t=e.length);var v=T===t;if(v&&A?(A=!1,q=[q,1]):v&&(A=!0,q=1,k!==!0&&(k=!0)),A)t=j,e!==null&&(j?e.length=j:e=null);else{let E={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:q},message:"must match exactly one schema in oneOf"};e===null?e=[E]:e.push(E),t++}}if(r.url!==void 0){let P=r.url;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.onDecline!==void 0){let P=r.onDecline;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.onCancel!==void 0){let P=r.onCancel;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}r.protocolVersions!==void 0&&(de(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?de.errors:e.concat(de.errors),t=e.length));for(let P in r)x.test(P)&&(R(r[P],{instancePath:s+"/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:P,rootData:u,dynamicAnchors:f})||(e=e===null?R.errors:e.concat(R.errors),t=e.length))}else{let P={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),t++}return gr.errors=e,t===0}gr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function gi(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=gi.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let l={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[l]:e.push(l),t++}if(r.inputSchema===void 0){let l={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[l]:e.push(l),t++}for(let l in r)if(!(re.call(fu.properties,l)||x.test(l))){let c={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),t++}if(r.protocolVersions!==void 0&&(de(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?de.errors:e.concat(de.errors),t=e.length)),r.title!==void 0&&typeof r.title!="string"){let l={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),t++}if(r.description!==void 0&&typeof r.description!="string"){let l={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),t++}if(r.icons!==void 0&&(Re(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Re.errors:e.concat(Re.errors),t=e.length)),r.tags!==void 0){let l=r.tags;if(Array.isArray(l)){if(l.length<1){let w={instancePath:s+"/tags",schemaPath:"#/properties/tags/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),t++}let c=l.length;for(let w=0;w1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),t++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let l={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[l]:e.push(l),t++}if(r._meta!==void 0){let l=r._meta;if(l&&typeof l=="object"&&!Array.isArray(l))for(let c in l){let h=t;if(typeof c=="string"&&!Y.test(c)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:c};e===null?e=[m]:e.push(m),t++}var o=h===t;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:c},message:"property name must be valid"};e===null?e=[m]:e.push(m),t++}}else{let c={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.security!==void 0&&(ke(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ke.errors:e.concat(ke.errors),t=e.length)),r.clientRequirements!==void 0&&(hr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?hr.errors:e.concat(hr.errors),t=e.length)),r.name!==void 0){let l=r.name;if(typeof l=="string"){if(X(l)<1){let c={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[c]:e.push(c),t++}}else{let c={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}}if(r.inputSchema!==void 0){let l=r.inputSchema,c=t,h=!1,m=null,w=t;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),t++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),t++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!Be.test($)){let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}}}else{let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}var a=w===t;if(a){h=!0,m=0;var i=!0}let y=t;if(!Ar(l,{instancePath:s+"/inputSchema",parentData:r,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?Ar.errors:e.concat(Ar.errors),t=e.length;else var n=Ar.evaluated.props;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),t++}if(l.type!==void 0&&l.type!=="object"){let $={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[$]:e.push($),t++}}n!==!0&&(n=n||{},n.type=!0);var a=y===t;if(a&&h?(h=!1,m=[m,1]):a&&(h=!0,m=1,i!==!0&&n!==void 0&&(n===!0?i=!0:(i=i||{},Object.assign(i,n)))),h)t=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),t++}}if(r.outputSchema!==void 0&&(Ar(r.outputSchema,{instancePath:s+"/outputSchema",parentData:r,parentDataProperty:"outputSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Ar.errors:e.concat(Ar.errors),t=e.length)),r.annotations!==void 0){let l=r.annotations;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.title!==void 0&&typeof l.title!="string"){let c={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}if(l.readOnlyHint!==void 0&&typeof l.readOnlyHint!="boolean"){let c={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.destructiveHint!==void 0&&typeof l.destructiveHint!="boolean"){let c={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.idempotentHint!==void 0&&typeof l.idempotentHint!="boolean"){let c={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.openWorldHint!==void 0&&typeof l.openWorldHint!="boolean"){let c={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}}else{let c={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.execution!==void 0){let l=r.execution;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let c in l)if(c!=="taskSupport"){let h={instancePath:s+"/execution",schemaPath:"#/$defs/execution/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};e===null?e=[h]:e.push(h),t++}if(l.taskSupport!==void 0){let c=l.taskSupport;if(typeof c!="string"){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),t++}if(!(c==="forbidden"||c==="optional"||c==="required")){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/enum",keyword:"enum",params:{allowedValues:uu.properties.taskSupport.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),t++}}}else{let c={instancePath:s+"/execution",schemaPath:"#/$defs/execution/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.examples!==void 0&&(yi(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?yi.errors:e.concat(yi.errors),t=e.length)),r.elicitations!==void 0){let l=r.elicitations;if(Array.isArray(l)){if(l.length<1){let h={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[h]:e.push(h),t++}let c=l.length;for(let h=0;h1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(ke(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ke.errors:e.concat(ke.errors),t=e.length)),r.clientRequirements!==void 0&&(hr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?hr.errors:e.concat(hr.errors),t=e.length)),r.uri!==void 0&&typeof r.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.size!==void 0&&typeof r.size!="number"){let i={instancePath:s+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(bi(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?bi.errors:e.concat(bi.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(ke(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ke.errors:e.concat(ke.errors),t=e.length)),r.clientRequirements!==void 0&&(hr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?hr.errors:e.concat(hr.errors),t=e.length)),r.uriTemplate!==void 0&&typeof r.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(Pi(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Pi.errors:e.concat(Pi.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(ke(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ke.errors:e.concat(ke.errors),t=e.length)),r.clientRequirements!==void 0&&(hr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?hr.errors:e.concat(hr.errors),t=e.length)),r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.arguments!==void 0){let i=r.arguments;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){e:for(;i--;)for(n=i;n--;)if(ma(r[i],r[n])){let a={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[a]:e.push(a),t++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),t++}return he.errors=e,t===0}he.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function je(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=je.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(r)){let i=r.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),t++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),t++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),t++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}return je.errors=e,t===0}je.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function zi(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=zi.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="type"||m==="url"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(he(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?he.errors:e.concat(he.errors),t=e.length)),r.type!==void 0&&r.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.url!==void 0){let m=r.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}r.security!==void 0&&(je(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?je.errors:e.concat(je.errors),t=e.length));for(let m in r)x.test(m)&&(Z(r[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),t=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="type"||m==="command"||m==="args"||m==="env"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(he(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?he.errors:e.concat(he.errors),t=e.length)),r.type!==void 0&&r.type!=="stdio"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"stdio"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.command!==void 0&&typeof r.command!="string"){let m={instancePath:s+"/command",schemaPath:"#/oneOf/1/properties/command/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),t++}if(r.args!==void 0){let m=r.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var l=k===t;if(!l){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=a===t;if(w){i=!0,n=0;var c=!0}let h=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}if(r.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),t++}if(r.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="data"||g==="mimeType"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0){let g=r.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:jl.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),t++}}if(r.data!==void 0&&typeof r.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.annotations!==void 0){let g=r.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var m=k===t;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=h===t;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="type"||k==="resource"||k==="annotations"||k==="_meta")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.type!==void 0&&r.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}if(r.resource!==void 0&&(Qr(r.resource,{instancePath:s+"/resource",parentData:r,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?Qr.errors:e.concat(Qr.errors),t=e.length)),r.annotations!==void 0){let k=r.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),t++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),t++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}}if(k.lastModified!==void 0&&typeof k.lastModified!="string"){let v={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}if(r._meta!==void 0){let k=r._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=t;if(typeof v=="string"&&!Y.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),t++}var y=P===t;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),t++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),t++}var w=g===t;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),t++}if(r.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),t++}if(r.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),t++}for(let P in r)if(!re.call(jl.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),t++}if(r.type!==void 0&&r.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}if(r.uri!==void 0){let P=r.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.name!==void 0&&typeof r.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.title!==void 0&&typeof r.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.description!==void 0&&typeof r.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.size!==void 0&&typeof r.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}if(r.icons!==void 0&&(Me(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Me.errors:e.concat(Me.errors),t=e.length)),r.annotations!==void 0){let P=r.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let A=j.length;for(let q=0;q1||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[A]:e.push(A),t++}if(j<0||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),t++}}else{let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[A]:e.push(A),t++}}if(P.lastModified!==void 0&&typeof P.lastModified!="string"){let j={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}if(r._meta!==void 0){let P=r._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let A=t;if(typeof j=="string"&&!Y.test(j)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[q]:e.push(q),t++}var $=A===t;if(!$){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[q]:e.push(q),t++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),t++}var w=k===t;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),t++}return He.errors=e,p.props=c,t===0}He.evaluated={dynamicProps:!0,dynamicItems:!1};function Yr(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Yr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),t++}if(r.resultType!==void 0&&r.resultType!=="complete"){let i={instancePath:s+"/resultType",schemaPath:"#/properties/resultType/const",keyword:"const",params:{allowedValue:"complete"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),t++}if(r.content!==void 0){let i=r.content;if(Array.isArray(i)){let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),t++}}if(r.cacheScope!==void 0){let i=r.cacheScope;if(!(i==="public"||i==="private")){let n={instancePath:s+"/cacheScope",schemaPath:"#/properties/cacheScope/enum",keyword:"enum",params:{allowedValues:ku.properties.cacheScope.enum},message:"must be equal to one of the allowed values"};e===null?e=[n]:e.push(n),t++}}if(r.contents!==void 0){let i=r.contents;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/contents",schemaPath:"#/properties/contents/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.maxLength!==void 0){let y=r.maxLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),t++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.format!==void 0){let y=r.format;if(!(y==="email"||y==="uri"||y==="date"||y==="date-time")){let $={instancePath:s+"/format",schemaPath:"#/oneOf/0/properties/format/enum",keyword:"enum",params:{allowedValues:vl.oneOf[0].properties.format.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}if(r.default!==void 0&&typeof r.default!="string"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/0/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="type"||y==="title"||y==="description"||y==="minimum"||y==="maximum"||y==="default")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r.type!==void 0){let y=r.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:vl.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}if(r.title!==void 0&&typeof r.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.description!==void 0&&typeof r.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.minimum!==void 0&&typeof r.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.maximum!==void 0&&typeof r.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.default!==void 0&&typeof r.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=c===t;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="title"||g==="description"||g==="default")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0&&r.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),t++}if(r.title!==void 0&&typeof r.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.description!==void 0&&typeof r.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.default!==void 0&&typeof r.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var h=y===t;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="type"||k==="title"||k==="description"||k==="enum"||k==="enumNames"||k==="default")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.type!==void 0&&r.type!=="string"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}if(r.title!==void 0&&typeof r.title!="string"){let k={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.description!==void 0&&typeof r.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.enum!==void 0){let k=r.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.maxItems!==void 0){let A=r.maxItems;if(!(typeof A=="number"&&!(A%1)&&!isNaN(A))){let q={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[q]:e.push(q),t++}if(typeof A=="number"&&(A<0||isNaN(A))){let q={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.items!==void 0){let A=r.items,q=t,z=!1,T=null,E=t;if(A&&typeof A=="object"&&!Array.isArray(A)){if(A.type===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[N]:e.push(N),t++}if(A.enum===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[N]:e.push(N),t++}for(let N in A)if(!(N==="type"||N==="enum")){let M={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};e===null?e=[M]:e.push(M),t++}if(A.type!==void 0&&A.type!=="string"){let N={instancePath:s+"/items/type",schemaPath:"#/oneOf/5/properties/items/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[N]:e.push(N),t++}if(A.enum!==void 0){let N=A.enum;if(Array.isArray(N)){let M=N.length;for(let U=0;U1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){a=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:a},message:"must NOT have duplicate items (items ## "+a+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),t++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return st.errors=e,t===0}st.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ui(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Ui.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),t++}if(r.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),t++}if(r.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="mode"||o==="message"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.mode!==void 0&&r.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}if(r.message!==void 0){let o=r.message;if(typeof o=="string"){if(X(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}r.requestedSchema!==void 0&&(st(r.requestedSchema,{instancePath:s+"/requestedSchema",parentData:r,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?st.errors:e.concat(st.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Ui.errors=e,t===0}Ui.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Li(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Li.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;Ui(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Ui.errors:e.concat(Ui.errors),t=e.length);var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.mode===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[m]:e.push(m),t++}if(r.message===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[m]:e.push(m),t++}if(r.url===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="mode"||m==="message"||m==="url")){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.mode!==void 0&&r.mode!=="url"){let m={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.message!==void 0){let m=r.message;if(typeof m=="string"){if(X(m)<1){let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}if(r.url!==void 0){let m=r.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=c===t;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),t++}return Li.errors=e,p.props=l,t===0}Li.evaluated={dynamicProps:!0,dynamicItems:!1};var qu={type:"object",required:["action"],properties:{action:{enum:["decline","cancel"]}},additionalProperties:!1};function Fi(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Fi.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.action!==void 0&&r.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}if(r.content!==void 0){let o=r.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)Z(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),t=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Fi.errors=e,t===0}Fi.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ji(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Ji.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;Fi(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Fi.errors:e.concat(Fi.errors),t=e.length);var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.action===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(m!=="action"){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.action!==void 0){let m=r.action;if(!(m==="decline"||m==="cancel")){let w={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:qu.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),t++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=c===t;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),t++}return Ji.errors=e,p.props=l,t===0}Ji.evaluated={dynamicProps:!0,dynamicItems:!1};function Hi(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Hi.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),t++}if(r.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),t++}if(r.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="type"||o==="declaration"||o==="request"||o==="response"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.type!==void 0&&r.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}if(r.declaration!==void 0){let o=r.declaration;if(typeof o=="string"){if(!G.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}r.request!==void 0&&(Li(r.request,{instancePath:s+"/request",parentData:r,parentDataProperty:"request",rootData:u,dynamicAnchors:f})||(e=e===null?Li.errors:e.concat(Li.errors),t=e.length)),r.response!==void 0&&(Ji(r.response,{instancePath:s+"/response",parentData:r,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?Ji.errors:e.concat(Ji.errors),t=e.length));for(let o in r)x.test(o)&&(Z(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Hi.errors=e,t===0}Hi.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ol={type:"object",required:["messages","maxTokens"],properties:{messages:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingMessage"}},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},systemPrompt:{type:"string"},includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{type:"integer",minimum:1},temperature:{type:"number"},stopSequences:{type:"array",items:{type:"string"}},metadata:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingRequestTool"}},toolChoice:{$ref:"#/$defs/samplingToolChoice"}},additionalProperties:!1},xu={type:"object",required:["mode"],properties:{mode:{enum:["auto","required","none"]}},additionalProperties:!1},zu={type:"object",required:["role","content"],properties:{role:{enum:["user","assistant"]},content:{$ref:"#/$defs/samplingMessageContent"}},additionalProperties:!1};function Wi(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Wi.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),t++}if(r.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),t++}if(r.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),t++}if(r.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="type"||o==="id"||o==="name"||o==="input")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.type!==void 0&&r.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}if(r.id!==void 0&&typeof r.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}if(r.name!==void 0&&typeof r.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}if(r.input!==void 0){let o=r.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)Z(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),t=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Wi.errors=e,t===0}Wi.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ki(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Ki.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),t++}if(r.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),t++}if(r.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(i==="type"||i==="toolUseId"||i==="content"||i==="isError")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r.type!==void 0&&r.type!=="tool_result"){let i={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_result"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),t++}if(r.toolUseId!==void 0&&typeof r.toolUseId!="string"){let i={instancePath:s+"/toolUseId",schemaPath:"#/properties/toolUseId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.content!==void 0){let i=r.content,n=t,a=!1,l=null,c=t;He(i,{instancePath:s+"/content",parentData:r,parentDataProperty:"content",rootData:u,dynamicAnchors:f})||(e=e===null?He.errors:e.concat(He.errors),t=e.length);var o=c===t;o&&(a=!0,l=0);let h=t;if(Array.isArray(i)){if(i.length<1){let w={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),t++}let m=i.length;for(let w=0;w1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),t++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}}if(r.speedPriority!==void 0){let o=r.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),t++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}}if(r.intelligencePriority!==void 0){let o=r.intelligencePriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),t++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Qi.errors=e,t===0}Qi.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Yi(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Yi.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),t++}if(r.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(i==="name"||i==="title"||i==="description"||i==="inputSchema"||i==="annotations"||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r.name!==void 0){let i=r.name;if(typeof i=="string"){if(X(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}if(r.title!==void 0&&typeof r.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.description!==void 0&&typeof r.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.inputSchema!==void 0){let i=r.inputSchema;if(!Ye(i,{instancePath:s+"/inputSchema",parentData:r,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?Ye.errors:e.concat(Ye.errors),t=e.length;else var o=Ye.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),t++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),t++}}o!==!0&&(o=o||{},o.type=!0)}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}for(let i in r)x.test(i)&&(Z(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),t=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return Yi.errors=e,t===0}Yi.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Gi(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Gi.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),t++}if(r.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!re.call(Ol.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.messages!==void 0){let o=r.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),t++}let i=o.length;for(let n=0;n=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),t++}}if(r.temperature!==void 0&&typeof r.temperature!="number"){let o={instancePath:s+"/temperature",schemaPath:"#/properties/temperature/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[o]:e.push(o),t++}if(r.stopSequences!==void 0){let o=r.stopSequences;if(Array.isArray(o)){let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),t++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}r.response!==void 0&&(ro(r.response,{instancePath:s+"/response",parentData:r,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?ro.errors:e.concat(ro.errors),t=e.length));for(let o in r)x.test(o)&&(Z(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return to.errors=e,t===0}to.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function so(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=so.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;Hi(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Hi.errors:e.concat(Hi.errors),t=e.length);var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;eo(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?eo.errors:e.concat(eo.errors),t=e.length);var h=c===t;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let m=t;to(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?to.errors:e.concat(to.errors),t=e.length);var h=m===t;h&&i?(i=!1,n=[n,2]):h&&(i=!0,n=2,l!==!0&&(l=!0))}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),t++}return so.errors=e,p.props=l,t===0}so.evaluated={dynamicProps:!0,dynamicItems:!1};function io(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=io.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),t++}if(r.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),t++}if(r.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="input"||o==="steps"||o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.input!==void 0){let o=r.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)Z(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),t=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}if(r.steps!==void 0){let o=r.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),t++}let i=o.length;for(let n=0;n1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),t++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let l={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[l]:e.push(l),t++}if(r._meta!==void 0){let l=r._meta;if(l&&typeof l=="object"&&!Array.isArray(l))for(let c in l){let h=t;if(typeof c=="string"&&!Y.test(c)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:c};e===null?e=[m]:e.push(m),t++}var o=h===t;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:c},message:"property name must be valid"};e===null?e=[m]:e.push(m),t++}}else{let c={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.security!==void 0&&(je(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?je.errors:e.concat(je.errors),t=e.length)),r.clientRequirements!==void 0&&(br(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?br.errors:e.concat(br.errors),t=e.length)),r.name!==void 0){let l=r.name;if(typeof l=="string"){if(X(l)<1){let c={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[c]:e.push(c),t++}}else{let c={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}}if(r.inputSchema!==void 0){let l=r.inputSchema,c=t,h=!1,m=null,w=t;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),t++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),t++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!$e.test($)){let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}}}else{let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}var a=w===t;if(a){h=!0,m=0;var i=!0}let y=t;if(!Ye(l,{instancePath:s+"/inputSchema",parentData:r,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?Ye.errors:e.concat(Ye.errors),t=e.length;else var n=Ye.evaluated.props;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),t++}if(l.type!==void 0&&l.type!=="object"){let $={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[$]:e.push($),t++}}n!==!0&&(n=n||{},n.type=!0);var a=y===t;if(a&&h?(h=!1,m=[m,1]):a&&(h=!0,m=1,i!==!0&&n!==void 0&&(n===!0?i=!0:(i=i||{},Object.assign(i,n)))),h)t=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),t++}}if(r.outputSchema!==void 0&&(Ye(r.outputSchema,{instancePath:s+"/outputSchema",parentData:r,parentDataProperty:"outputSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Ye.errors:e.concat(Ye.errors),t=e.length)),r.annotations!==void 0){let l=r.annotations;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.title!==void 0&&typeof l.title!="string"){let c={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}if(l.readOnlyHint!==void 0&&typeof l.readOnlyHint!="boolean"){let c={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.destructiveHint!==void 0&&typeof l.destructiveHint!="boolean"){let c={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.idempotentHint!==void 0&&typeof l.idempotentHint!="boolean"){let c={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.openWorldHint!==void 0&&typeof l.openWorldHint!="boolean"){let c={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}}else{let c={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.execution!==void 0){let l=r.execution;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let c in l)if(c!=="taskSupport"){let h={instancePath:s+"/execution",schemaPath:"#/$defs/execution/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};e===null?e=[h]:e.push(h),t++}if(l.taskSupport!==void 0){let c=l.taskSupport;if(typeof c!="string"){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),t++}if(!(c==="forbidden"||c==="optional"||c==="required")){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/enum",keyword:"enum",params:{allowedValues:Au.properties.taskSupport.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),t++}}}else{let c={instancePath:s+"/execution",schemaPath:"#/$defs/execution/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.examples!==void 0&&(Ri(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Ri.errors:e.concat(Ri.errors),t=e.length)),r.interactionExamples!==void 0&&(oo(r.interactionExamples,{instancePath:s+"/interactionExamples",parentData:r,parentDataProperty:"interactionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?oo.errors:e.concat(oo.errors),t=e.length)),r.elicitations!==void 0){let l=r.elicitations;if(Array.isArray(l)){if(l.length<1){let h={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[h]:e.push(h),t++}let c=l.length;for(let h=0;h1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(je(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?je.errors:e.concat(je.errors),t=e.length)),r.clientRequirements!==void 0&&(br(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?br.errors:e.concat(br.errors),t=e.length)),r.uri!==void 0&&typeof r.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.size!==void 0&&typeof r.size!="number"){let i={instancePath:s+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(ao(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?ao.errors:e.concat(ao.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a100){let l={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[l]:e.push(l),t++}let a=n.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}if(i.hasMore!==void 0&&typeof i.hasMore!="boolean"){let n={instancePath:s+"/completion/hasMore",schemaPath:"#/$defs/completionResult/properties/hasMore/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/completion",schemaPath:"#/$defs/completionResult/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return uo.errors=e,t===0}uo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function co(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=co.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.argument===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"argument"},message:"must have required property 'argument'"};e===null?e=[o]:e.push(o),t++}if(r.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="argument"||o==="context"||o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}r.argument!==void 0&&(mo(r.argument,{instancePath:s+"/argument",parentData:r,parentDataProperty:"argument",rootData:u,dynamicAnchors:f})||(e=e===null?mo.errors:e.concat(mo.errors),t=e.length)),r.context!==void 0&&(fo(r.context,{instancePath:s+"/context",parentData:r,parentDataProperty:"context",rootData:u,dynamicAnchors:f})||(e=e===null?fo.errors:e.concat(fo.errors),t=e.length)),r.result!==void 0&&(uo(r.result,{instancePath:s+"/result",parentData:r,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?uo.errors:e.concat(uo.errors),t=e.length));for(let o in r)x.test(o)&&(Z(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return co.errors=e,t===0}co.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ot(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=ot.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(Object.keys(r).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),t++}for(let i in r){let n=t;if(typeof i=="string"&&!G.test(i)){let a={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[a]:e.push(a),t++}var o=n===t;if(!o){let a={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[a]:e.push(a),t++}}for(let i in r)co(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?co.errors:e.concat(co.errors),t=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return ot.errors=e,t===0}ot.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function yo(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=yo.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),t++}if(r.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(re.call(Nu.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r.protocolVersions!==void 0&&(he(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?he.errors:e.concat(he.errors),t=e.length)),r.title!==void 0&&typeof r.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.description!==void 0&&typeof r.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.icons!==void 0&&(Me(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Me.errors:e.concat(Me.errors),t=e.length)),r.tags!==void 0){let i=r.tags;if(Array.isArray(i)){if(i.length<1){let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),t++}let n=i.length;for(let c=0;c1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(je(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?je.errors:e.concat(je.errors),t=e.length)),r.clientRequirements!==void 0&&(br(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?br.errors:e.concat(br.errors),t=e.length)),r.uriTemplate!==void 0&&typeof r.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(lo(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?lo.errors:e.concat(lo.errors),t=e.length)),r.completionExamples!==void 0&&(ot(r.completionExamples,{instancePath:s+"/completionExamples",parentData:r,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?ot.errors:e.concat(ot.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(je(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?je.errors:e.concat(je.errors),t=e.length)),r.clientRequirements!==void 0&&(br(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?br.errors:e.concat(br.errors),t=e.length)),r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.arguments!==void 0){let i=r.arguments;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){e:for(;i--;)for(n=i;n--;)if(ma(r[i],r[n])){let a={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[a]:e.push(a),t++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),t++}return ge.errors=e,t===0}ge.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function ve(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=ve.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(r)){let i=r.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),t++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),t++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),t++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}return ve.errors=e,t===0}ve.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function vo(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=vo.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="type"||m==="url"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(ge(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ge.errors:e.concat(ge.errors),t=e.length)),r.type!==void 0&&r.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.url!==void 0){let m=r.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}r.security!==void 0&&(ve(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ve.errors:e.concat(ve.errors),t=e.length));for(let m in r)x.test(m)&&(S(r[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),t=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="type"||m==="command"||m==="args"||m==="env"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(ge(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ge.errors:e.concat(ge.errors),t=e.length)),r.type!==void 0&&r.type!=="stdio"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"stdio"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.command!==void 0&&typeof r.command!="string"){let m={instancePath:s+"/command",schemaPath:"#/oneOf/1/properties/command/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),t++}if(r.args!==void 0){let m=r.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var l=k===t;if(!l){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=a===t;if(w){i=!0,n=0;var c=!0}let h=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}if(r.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),t++}if(r.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="data"||g==="mimeType"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0){let g=r.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:ql.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),t++}}if(r.data!==void 0&&typeof r.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.annotations!==void 0){let g=r.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var m=k===t;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=h===t;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="type"||k==="resource"||k==="annotations"||k==="_meta")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.type!==void 0&&r.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}if(r.resource!==void 0&&(nt(r.resource,{instancePath:s+"/resource",parentData:r,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?nt.errors:e.concat(nt.errors),t=e.length)),r.annotations!==void 0){let k=r.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),t++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),t++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}}if(k.lastModified!==void 0&&typeof k.lastModified!="string"){let v={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),t++}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}if(r._meta!==void 0){let k=r._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=t;if(typeof v=="string"&&!Y.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),t++}var y=P===t;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),t++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),t++}var w=g===t;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),t++}if(r.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),t++}if(r.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),t++}for(let P in r)if(!re.call(ql.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),t++}if(r.type!==void 0&&r.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}if(r.uri!==void 0){let P=r.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.name!==void 0&&typeof r.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.title!==void 0&&typeof r.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.description!==void 0&&typeof r.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.size!==void 0&&typeof r.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}if(r.icons!==void 0&&(Ue(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Ue.errors:e.concat(Ue.errors),t=e.length)),r.annotations!==void 0){let P=r.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let A=j.length;for(let q=0;q1||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[A]:e.push(A),t++}if(j<0||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),t++}}else{let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[A]:e.push(A),t++}}if(P.lastModified!==void 0&&typeof P.lastModified!="string"){let j={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}if(r._meta!==void 0){let P=r._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let A=t;if(typeof j=="string"&&!Y.test(j)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[q]:e.push(q),t++}var $=A===t;if(!$){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[q]:e.push(q),t++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),t++}var w=k===t;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),t++}return We.errors=e,p.props=c,t===0}We.evaluated={dynamicProps:!0,dynamicItems:!1};function at(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=at.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),t++}if(r.resultType!==void 0&&r.resultType!=="complete"){let i={instancePath:s+"/resultType",schemaPath:"#/properties/resultType/const",keyword:"const",params:{allowedValue:"complete"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),t++}if(r.content!==void 0){let i=r.content;if(Array.isArray(i)){let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),t++}}if(r.cacheScope!==void 0){let i=r.cacheScope;if(!(i==="public"||i==="private")){let n={instancePath:s+"/cacheScope",schemaPath:"#/properties/cacheScope/enum",keyword:"enum",params:{allowedValues:Du.properties.cacheScope.enum},message:"must be equal to one of the allowed values"};e===null?e=[n]:e.push(n),t++}}if(r.contents!==void 0){let i=r.contents;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/contents",schemaPath:"#/properties/contents/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.maxLength!==void 0){let y=r.maxLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),t++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.format!==void 0){let y=r.format;if(!(y==="email"||y==="uri"||y==="date"||y==="date-time")){let $={instancePath:s+"/format",schemaPath:"#/oneOf/0/properties/format/enum",keyword:"enum",params:{allowedValues:xl.oneOf[0].properties.format.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}if(r.default!==void 0&&typeof r.default!="string"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/0/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="type"||y==="title"||y==="description"||y==="minimum"||y==="maximum"||y==="default")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r.type!==void 0){let y=r.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:xl.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}if(r.title!==void 0&&typeof r.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.description!==void 0&&typeof r.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.minimum!==void 0&&typeof r.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.maximum!==void 0&&typeof r.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.default!==void 0&&typeof r.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=c===t;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="type"||g==="title"||g==="description"||g==="default")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.type!==void 0&&r.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),t++}if(r.title!==void 0&&typeof r.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.description!==void 0&&typeof r.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.default!==void 0&&typeof r.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var h=y===t;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="type"||k==="title"||k==="description"||k==="enum"||k==="enumNames"||k==="default")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.type!==void 0&&r.type!=="string"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}if(r.title!==void 0&&typeof r.title!="string"){let k={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.description!==void 0&&typeof r.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.enum!==void 0){let k=r.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.maxItems!==void 0){let A=r.maxItems;if(!(typeof A=="number"&&!(A%1)&&!isNaN(A))){let q={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[q]:e.push(q),t++}if(typeof A=="number"&&(A<0||isNaN(A))){let q={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.items!==void 0){let A=r.items,q=t,z=!1,T=null,E=t;if(A&&typeof A=="object"&&!Array.isArray(A)){if(A.type===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[N]:e.push(N),t++}if(A.enum===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[N]:e.push(N),t++}for(let N in A)if(!(N==="type"||N==="enum")){let M={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};e===null?e=[M]:e.push(M),t++}if(A.type!==void 0&&A.type!=="string"){let N={instancePath:s+"/items/type",schemaPath:"#/oneOf/5/properties/items/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[N]:e.push(N),t++}if(A.enum!==void 0){let N=A.enum;if(Array.isArray(N)){let M=N.length;for(let U=0;U1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){a=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:a},message:"must NOT have duplicate items (items ## "+a+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),t++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return ct.errors=e,t===0}ct.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Co(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Co.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),t++}if(r.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),t++}if(r.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="mode"||o==="message"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.mode!==void 0&&r.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}if(r.message!==void 0){let o=r.message;if(typeof o=="string"){if(X(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}r.requestedSchema!==void 0&&(ct(r.requestedSchema,{instancePath:s+"/requestedSchema",parentData:r,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?ct.errors:e.concat(ct.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Co.errors=e,t===0}Co.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Vo(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Vo.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;Co(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Co.errors:e.concat(Co.errors),t=e.length);var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.mode===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[m]:e.push(m),t++}if(r.message===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[m]:e.push(m),t++}if(r.url===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="mode"||m==="message"||m==="url")){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.mode!==void 0&&r.mode!=="url"){let m={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.message!==void 0){let m=r.message;if(typeof m=="string"){if(X(m)<1){let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}if(r.url!==void 0){let m=r.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=c===t;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),t++}return Vo.errors=e,p.props=l,t===0}Vo.evaluated={dynamicProps:!0,dynamicItems:!1};var Fu={type:"object",required:["action"],properties:{action:{enum:["decline","cancel"]}},additionalProperties:!1};function Do(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Do.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.action!==void 0&&r.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}if(r.content!==void 0){let o=r.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)S(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),t=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Do.errors=e,t===0}Do.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ro(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Ro.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;Do(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Do.errors:e.concat(Do.errors),t=e.length);var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.action===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(m!=="action"){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.action!==void 0){let m=r.action;if(!(m==="decline"||m==="cancel")){let w={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:Fu.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),t++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=c===t;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),t++}return Ro.errors=e,p.props=l,t===0}Ro.evaluated={dynamicProps:!0,dynamicItems:!1};function Mo(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Mo.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),t++}if(r.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),t++}if(r.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="type"||o==="declaration"||o==="request"||o==="response"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.type!==void 0&&r.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}if(r.declaration!==void 0){let o=r.declaration;if(typeof o=="string"){if(!G.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}r.request!==void 0&&(Vo(r.request,{instancePath:s+"/request",parentData:r,parentDataProperty:"request",rootData:u,dynamicAnchors:f})||(e=e===null?Vo.errors:e.concat(Vo.errors),t=e.length)),r.response!==void 0&&(Ro(r.response,{instancePath:s+"/response",parentData:r,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?Ro.errors:e.concat(Ro.errors),t=e.length));for(let o in r)x.test(o)&&(S(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Mo.errors=e,t===0}Mo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var zl={type:"object",required:["messages","maxTokens"],properties:{messages:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingMessage"}},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},systemPrompt:{type:"string"},includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{type:"integer",minimum:1},temperature:{type:"number"},stopSequences:{type:"array",items:{type:"string"}},metadata:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingRequestTool"}},toolChoice:{$ref:"#/$defs/samplingToolChoice"}},additionalProperties:!1},Ju={type:"object",required:["mode"],properties:{mode:{enum:["auto","required","none"]}},additionalProperties:!1},Hu={type:"object",required:["role","content"],properties:{role:{enum:["user","assistant"]},content:{$ref:"#/$defs/samplingMessageContent"}},additionalProperties:!1};function Uo(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Uo.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),t++}if(r.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),t++}if(r.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),t++}if(r.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="type"||o==="id"||o==="name"||o==="input")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.type!==void 0&&r.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}if(r.id!==void 0&&typeof r.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}if(r.name!==void 0&&typeof r.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}if(r.input!==void 0){let o=r.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)S(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),t=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Uo.errors=e,t===0}Uo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Lo(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Lo.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),t++}if(r.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),t++}if(r.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(i==="type"||i==="toolUseId"||i==="content"||i==="isError")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r.type!==void 0&&r.type!=="tool_result"){let i={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_result"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),t++}if(r.toolUseId!==void 0&&typeof r.toolUseId!="string"){let i={instancePath:s+"/toolUseId",schemaPath:"#/properties/toolUseId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.content!==void 0){let i=r.content,n=t,a=!1,l=null,c=t;We(i,{instancePath:s+"/content",parentData:r,parentDataProperty:"content",rootData:u,dynamicAnchors:f})||(e=e===null?We.errors:e.concat(We.errors),t=e.length);var o=c===t;o&&(a=!0,l=0);let h=t;if(Array.isArray(i)){if(i.length<1){let w={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),t++}let m=i.length;for(let w=0;w1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),t++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}}if(r.speedPriority!==void 0){let o=r.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),t++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}}if(r.intelligencePriority!==void 0){let o=r.intelligencePriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),t++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Jo.errors=e,t===0}Jo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ho(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Ho.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),t++}if(r.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(i==="name"||i==="title"||i==="description"||i==="inputSchema"||i==="annotations"||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r.name!==void 0){let i=r.name;if(typeof i=="string"){if(X(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}if(r.title!==void 0&&typeof r.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.description!==void 0&&typeof r.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.inputSchema!==void 0){let i=r.inputSchema;if(!Ge(i,{instancePath:s+"/inputSchema",parentData:r,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?Ge.errors:e.concat(Ge.errors),t=e.length;else var o=Ge.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),t++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),t++}}o!==!0&&(o=o||{},o.type=!0)}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}for(let i in r)x.test(i)&&(S(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),t=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return Ho.errors=e,t===0}Ho.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Wo(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Wo.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),t++}if(r.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!re.call(zl.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.messages!==void 0){let o=r.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),t++}let i=o.length;for(let n=0;n=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),t++}}if(r.temperature!==void 0&&typeof r.temperature!="number"){let o={instancePath:s+"/temperature",schemaPath:"#/properties/temperature/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[o]:e.push(o),t++}if(r.stopSequences!==void 0){let o=r.stopSequences;if(Array.isArray(o)){let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),t++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}r.response!==void 0&&(Qo(r.response,{instancePath:s+"/response",parentData:r,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?Qo.errors:e.concat(Qo.errors),t=e.length));for(let o in r)x.test(o)&&(S(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Yo.errors=e,t===0}Yo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Go(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Go.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;Mo(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Mo.errors:e.concat(Mo.errors),t=e.length);var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;Bo(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Bo.errors:e.concat(Bo.errors),t=e.length);var h=c===t;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let m=t;Yo(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Yo.errors:e.concat(Yo.errors),t=e.length);var h=m===t;h&&i?(i=!1,n=[n,2]):h&&(i=!0,n=2,l!==!0&&(l=!0))}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),t++}return Go.errors=e,p.props=l,t===0}Go.evaluated={dynamicProps:!0,dynamicItems:!1};function Xo(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Xo.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),t++}if(r.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),t++}if(r.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="input"||o==="steps"||o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.input!==void 0){let o=r.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)S(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),t=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}if(r.steps!==void 0){let o=r.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),t++}let i=o.length;for(let n=0;n1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),t++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let l={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[l]:e.push(l),t++}if(r._meta!==void 0){let l=r._meta;if(l&&typeof l=="object"&&!Array.isArray(l))for(let c in l){let h=t;if(typeof c=="string"&&!Y.test(c)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:c};e===null?e=[m]:e.push(m),t++}var o=h===t;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:c},message:"property name must be valid"};e===null?e=[m]:e.push(m),t++}}else{let c={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.security!==void 0&&(ve(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ve.errors:e.concat(ve.errors),t=e.length)),r.clientRequirements!==void 0&&(Pr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Pr.errors:e.concat(Pr.errors),t=e.length)),r.name!==void 0){let l=r.name;if(typeof l=="string"){if(X(l)<1){let c={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[c]:e.push(c),t++}}else{let c={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}}if(r.inputSchema!==void 0){let l=r.inputSchema,c=t,h=!1,m=null,w=t;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),t++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),t++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!$e.test($)){let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}}}else{let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}var a=w===t;if(a){h=!0,m=0;var i=!0}let y=t;if(!Ge(l,{instancePath:s+"/inputSchema",parentData:r,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?Ge.errors:e.concat(Ge.errors),t=e.length;else var n=Ge.evaluated.props;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),t++}if(l.type!==void 0&&l.type!=="object"){let $={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[$]:e.push($),t++}}n!==!0&&(n=n||{},n.type=!0);var a=y===t;if(a&&h?(h=!1,m=[m,1]):a&&(h=!0,m=1,i!==!0&&n!==void 0&&(n===!0?i=!0:(i=i||{},Object.assign(i,n)))),h)t=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),t++}}if(r.outputSchema!==void 0&&(Ge(r.outputSchema,{instancePath:s+"/outputSchema",parentData:r,parentDataProperty:"outputSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Ge.errors:e.concat(Ge.errors),t=e.length)),r.annotations!==void 0){let l=r.annotations;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.title!==void 0&&typeof l.title!="string"){let c={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}if(l.readOnlyHint!==void 0&&typeof l.readOnlyHint!="boolean"){let c={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.destructiveHint!==void 0&&typeof l.destructiveHint!="boolean"){let c={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.idempotentHint!==void 0&&typeof l.idempotentHint!="boolean"){let c={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}if(l.openWorldHint!==void 0&&typeof l.openWorldHint!="boolean"){let c={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),t++}}else{let c={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.execution!==void 0){let l=r.execution;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let c in l)if(c!=="taskSupport"){let h={instancePath:s+"/execution",schemaPath:"#/$defs/execution/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};e===null?e=[h]:e.push(h),t++}if(l.taskSupport!==void 0){let c=l.taskSupport;if(typeof c!="string"){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),t++}if(!(c==="forbidden"||c==="optional"||c==="required")){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/enum",keyword:"enum",params:{allowedValues:Lu.properties.taskSupport.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),t++}}}else{let c={instancePath:s+"/execution",schemaPath:"#/$defs/execution/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}if(r.examples!==void 0&&(So(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?So.errors:e.concat(So.errors),t=e.length)),r.interactionExamples!==void 0&&(en(r.interactionExamples,{instancePath:s+"/interactionExamples",parentData:r,parentDataProperty:"interactionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?en.errors:e.concat(en.errors),t=e.length)),r.elicitations!==void 0){let l=r.elicitations;if(Array.isArray(l)){if(l.length<1){let h={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[h]:e.push(h),t++}let c=l.length;for(let h=0;h1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(ve(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ve.errors:e.concat(ve.errors),t=e.length)),r.clientRequirements!==void 0&&(Pr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Pr.errors:e.concat(Pr.errors),t=e.length)),r.uri!==void 0&&typeof r.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.size!==void 0&&typeof r.size!="number"){let i={instancePath:s+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(tn(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?tn.errors:e.concat(tn.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a100){let l={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[l]:e.push(l),t++}let a=n.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}if(i.hasMore!==void 0&&typeof i.hasMore!="boolean"){let n={instancePath:s+"/completion/hasMore",schemaPath:"#/$defs/completionResult/properties/hasMore/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/completion",schemaPath:"#/$defs/completionResult/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return pn.errors=e,t===0}pn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ln(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=ln.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.argument===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"argument"},message:"must have required property 'argument'"};e===null?e=[o]:e.push(o),t++}if(r.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="argument"||o==="context"||o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}r.argument!==void 0&&(nn(r.argument,{instancePath:s+"/argument",parentData:r,parentDataProperty:"argument",rootData:u,dynamicAnchors:f})||(e=e===null?nn.errors:e.concat(nn.errors),t=e.length)),r.context!==void 0&&(an(r.context,{instancePath:s+"/context",parentData:r,parentDataProperty:"context",rootData:u,dynamicAnchors:f})||(e=e===null?an.errors:e.concat(an.errors),t=e.length)),r.result!==void 0&&(pn(r.result,{instancePath:s+"/result",parentData:r,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?pn.errors:e.concat(pn.errors),t=e.length));for(let o in r)x.test(o)&&(S(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return ln.errors=e,t===0}ln.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function dt(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=dt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(Object.keys(r).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),t++}for(let i in r){let n=t;if(typeof i=="string"&&!G.test(i)){let a={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[a]:e.push(a),t++}var o=n===t;if(!o){let a={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[a]:e.push(a),t++}}for(let i in r)ln(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?ln.errors:e.concat(ln.errors),t=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return dt.errors=e,t===0}dt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function mn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=mn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),t++}if(r.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(re.call(Ku.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r.protocolVersions!==void 0&&(ge(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ge.errors:e.concat(ge.errors),t=e.length)),r.title!==void 0&&typeof r.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.description!==void 0&&typeof r.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.icons!==void 0&&(Ue(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Ue.errors:e.concat(Ue.errors),t=e.length)),r.tags!==void 0){let i=r.tags;if(Array.isArray(i)){if(i.length<1){let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),t++}let n=i.length;for(let c=0;c1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(ve(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ve.errors:e.concat(ve.errors),t=e.length)),r.clientRequirements!==void 0&&(Pr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Pr.errors:e.concat(Pr.errors),t=e.length)),r.uriTemplate!==void 0&&typeof r.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.examples!==void 0&&(on(r.examples,{instancePath:s+"/examples",parentData:r,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?on.errors:e.concat(on.errors),t=e.length)),r.completionExamples!==void 0&&(dt(r.completionExamples,{instancePath:s+"/completionExamples",parentData:r,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?dt.errors:e.concat(dt.errors),t=e.length)),r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.security!==void 0&&(ve(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ve.errors:e.concat(ve.errors),t=e.length)),r.clientRequirements!==void 0&&(Pr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Pr.errors:e.concat(Pr.errors),t=e.length)),r.name!==void 0&&typeof r.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.arguments!==void 0){let i=r.arguments;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){e:for(;i--;)for(n=i;n--;)if(ma(r[i],r[n])){let a={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[a]:e.push(a),t++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),t++}return be.errors=e,t===0}be.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function hn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=hn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){for(let o in r)if(!(o==="listChanged"||o==="subscribe"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.listChanged!==void 0&&typeof r.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),t++}if(r.subscribe!==void 0&&typeof r.subscribe!="boolean"){let o={instancePath:s+"/subscribe",schemaPath:"#/properties/subscribe/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),t++}for(let o in r)x.test(o)&&(I(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return hn.errors=e,t===0}hn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function gn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=gn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){for(let o in r)if(!(o==="listChanged"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.listChanged!==void 0&&typeof r.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),t++}for(let o in r)x.test(o)&&(I(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return gn.errors=e,t===0}gn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function bn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=bn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){for(let i in r)if(!(re.call(Gu.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r.completions!==void 0){let i=r.completions;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/completions",schemaPath:"#/properties/completions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.experimental!==void 0){let i=r.experimental;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/experimental",schemaPath:"#/properties/experimental/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.extensions!==void 0){let i=r.extensions;if(i&&typeof i=="object"&&!Array.isArray(i)){if(Object.keys(i).length<1){let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[n]:e.push(n),t++}for(let n in i){let a=t;if(typeof n=="string"&&!Er.test(n)){let l={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},message:'must match pattern "^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}for(let n in i){let a=i[n];if(!(a&&typeof a=="object"&&!Array.isArray(a))){let l={instancePath:s+"/extensions/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/extensionCapabilities/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),t++}}}else{let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.logging!==void 0){let i=r.logging;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/logging",schemaPath:"#/properties/logging/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.prompts!==void 0&&(dn(r.prompts,{instancePath:s+"/prompts",parentData:r,parentDataProperty:"prompts",rootData:u,dynamicAnchors:f})||(e=e===null?dn.errors:e.concat(dn.errors),t=e.length)),r.protocolVersions!==void 0&&(be(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?be.errors:e.concat(be.errors),t=e.length)),r.resources!==void 0&&(hn(r.resources,{instancePath:s+"/resources",parentData:r,parentDataProperty:"resources",rootData:u,dynamicAnchors:f})||(e=e===null?hn.errors:e.concat(hn.errors),t=e.length)),r.tasks!==void 0){let i=r.tasks;if(i&&typeof i=="object"&&!Array.isArray(i)){for(let n in i)if(!(n==="cancel"||n==="list"||n==="requests")){let a={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[a]:e.push(a),t++}if(i.cancel!==void 0){let n=i.cancel;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let a={instancePath:s+"/tasks/cancel",schemaPath:"#/properties/tasks/properties/cancel/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[a]:e.push(a),t++}}if(i.list!==void 0){let n=i.list;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let a={instancePath:s+"/tasks/list",schemaPath:"#/properties/tasks/properties/list/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[a]:e.push(a),t++}}if(i.requests!==void 0){let n=i.requests;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let a in n)if(a!=="tools"){let l={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),t++}if(n.tools!==void 0){let a=n.tools;if(a&&typeof a=="object"&&!Array.isArray(a)){for(let l in a)if(l!=="call"){let c={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),t++}if(a.call!==void 0){let l=a.call;if(!(l&&typeof l=="object"&&!Array.isArray(l))){let c={instancePath:s+"/tasks/requests/tools/call",schemaPath:"#/properties/tasks/properties/requests/properties/tools/properties/call/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),t++}}}else{let l={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),t++}}}else{let a={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[a]:e.push(a),t++}}}else{let n={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}r.tools!==void 0&&(gn(r.tools,{instancePath:s+"/tools",parentData:r,parentDataProperty:"tools",rootData:u,dynamicAnchors:f})||(e=e===null?gn.errors:e.concat(gn.errors),t=e.length));for(let i in r)x.test(i)&&(I(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return bn.errors=e,t===0}bn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var ec={additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},Nl={oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},ts={additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"};function ht(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=ht.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.uri===void 0){let y={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[y]:e.push(y),t++}if(r.text===void 0){let y={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="_meta"||y==="mimeType"||y==="text"||y==="uri")){let $={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r._meta!==void 0){let y=r._meta;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=t;if(typeof $=="string"&&!Y.test($)){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:$};e===null?e=[O]:e.push(O),t++}var l=g===t;if(!l){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};e===null?e=[O]:e.push(O),t++}}else{let $={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let y={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.text!==void 0&&typeof r.text!="string"){let y={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.uri!==void 0){let y=r.uri;if(typeof y=="string"){if(!D(y)){let $={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[$]:e.push($),t++}}else{let $={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),t++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var w=a===t;if(w){i=!0,n=0;var c=!0}let h=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.uri===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[y]:e.push(y),t++}if(r.blob===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="_meta"||y==="blob"||y==="mimeType"||y==="uri")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r._meta!==void 0){let y=r._meta;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=t;if(typeof $=="string"&&!Y.test($)){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:$};e===null?e=[O]:e.push(O),t++}var m=g===t;if(!m){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};e===null?e=[O]:e.push(O),t++}}else{let $={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}}if(r.blob!==void 0&&typeof r.blob!="string"){let y={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let y={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.uri!==void 0){let y=r.uri;if(typeof y=="string"){if(!D(y)){let $={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[$]:e.push($),t++}}else{let $={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),t++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var w=h===t;if(w&&i?(i=!1,n=[n,1]):w&&(i=!0,n=1,c!==!0&&(c=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let y={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[y]:e.push(y),t++}return ht.errors=e,p.props=c,t===0}ht.evaluated={dynamicProps:!0,dynamicItems:!1};var rc={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"};function $n(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=$n.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.src===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"src"},message:"must have required property 'src'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="mimeType"||o==="sizes"||o==="src"||o==="theme"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let o={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}if(r.sizes!==void 0){let o=r.sizes;if(Array.isArray(o)){let i=o.length;for(let n=0;n1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r.text!==void 0&&typeof r.text!="string"){let g={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.type!==void 0&&r.type!=="text"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=a===t;if(w){i=!0,n=0;var c=!0}let h=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}if(r.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),t++}if(r.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="_meta"||g==="annotations"||g==="data"||g==="mimeType"||g==="type")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r._meta!==void 0){let g=r._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=t;if(typeof O=="string"&&!Y.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),t++}var m=k===t;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),t++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r.annotations!==void 0){let g=r.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),t++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),t++}}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),t++}}if(r.data!==void 0&&typeof r.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.mimeType!==void 0&&typeof r.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.type!==void 0){let g=r.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Nl.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),t++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var w=h===t;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="_meta"||k==="annotations"||k==="resource"||k==="type")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r._meta!==void 0){let k=r._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=t;if(typeof v=="string"&&!Y.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),t++}var y=P===t;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),t++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}if(r.annotations!==void 0){let k=r.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),t++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),t++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),t++}}if(r.resource!==void 0&&(ht(r.resource,{instancePath:s+"/resource",parentData:r,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?ht.errors:e.concat(ht.errors),t=e.length)),r.type!==void 0&&r.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),t++}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),t++}var w=g===t;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),t++}if(r.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),t++}if(r.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),t++}for(let P in r)if(!re.call(Nl.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),t++}if(r._meta!==void 0){let P=r._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let A=t;if(typeof j=="string"&&!Y.test(j)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[q]:e.push(q),t++}var $=A===t;if(!$){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[q]:e.push(q),t++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}if(r.annotations!==void 0){let P=r.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let A=j.length;for(let q=0;q1||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[A]:e.push(A),t++}if(j<0||isNaN(j)){let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),t++}}else{let A={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[A]:e.push(A),t++}}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),t++}}if(r.description!==void 0&&typeof r.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.icons!==void 0&&(Le(r.icons,{instancePath:s+"/icons",parentData:r,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Le.errors:e.concat(Le.errors),t=e.length)),r.mimeType!==void 0&&typeof r.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.name!==void 0&&typeof r.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.size!==void 0&&typeof r.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),t++}if(r.title!==void 0&&typeof r.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),t++}if(r.type!==void 0&&r.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}if(r.uri!==void 0){let P=r.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),t++}var w=k===t;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),t++}return Ke.errors=e,p.props=c,t===0}Ke.evaluated={dynamicProps:!0,dynamicItems:!1};function Pn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Pn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.role===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};e===null?e=[o]:e.push(o),t++}if(r.content===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="content"||o==="role")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.content!==void 0&&(Ke(r.content,{instancePath:s+"/content",parentData:r,parentDataProperty:"content",rootData:u,dynamicAnchors:f})||(e=e===null?Ke.errors:e.concat(Ke.errors),t=e.length)),r.role!==void 0){let o=r.role;if(typeof o!="string"){let i={instancePath:s+"/role",schemaPath:"#/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(!(o==="user"||o==="assistant")){let i={instancePath:s+"/role",schemaPath:"#/properties/role/enum",keyword:"enum",params:{allowedValues:ec.properties.role.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Pn.errors=e,t===0}Pn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function wn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=wn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.messages===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.description!==void 0&&typeof r.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.messages!==void 0){let i=r.messages;if(Array.isArray(i)){let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),t++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return bt.errors=e,t===0}bt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function $t(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=$t.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}r.result!==void 0&&(bt(r.result,{instancePath:s+"/result",parentData:r,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?bt.errors:e.concat(bt.errors),t=e.length));for(let o in r)x.test(o)&&(I(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return $t.errors=e,t===0}$t.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Pt(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Pt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.uri===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[o]:e.push(o),t++}if(r.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="result"||o==="uri"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.result!==void 0&&(bt(r.result,{instancePath:s+"/result",parentData:r,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?bt.errors:e.concat(bt.errors),t=e.length)),r.uri!==void 0){let o=r.uri;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}for(let o in r)x.test(o)&&(I(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Pt.errors=e,t===0}Pt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Xe(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Xe.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.$componentRef===void 0){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),t++}for(let $ in r)if($!=="$componentRef"){let g={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),t++}if(r.$componentRef!==void 0){let $=r.$componentRef;if(typeof $=="string"){if(!$e.test($)){let g={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}}}else{let $={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}var y=a===t;if(y){i=!0,n=0;var l=!0}let c=t;if(!(r&&typeof r=="object"&&!Array.isArray(r))){let $={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}let h=t,m=t;if(r&&typeof r=="object"&&!Array.isArray(r)){let $;if(r.$componentRef===void 0&&($="$componentRef")){let g={};e===null?e=[g]:e.push(g),t++}}var w=m===t;if(w){let $={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[$]:e.push($),t++}else t=h,e!==null&&(h?e.length=h:e=null);var y=c===t;if(y&&i?(i=!1,n=[n,1]):y&&(i=!0,n=1,l!==!0&&(l=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let $={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),t++}return Xe.errors=e,p.props=l,t===0}Xe.evaluated={dynamicProps:!0,dynamicItems:!1};function wt(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=wt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.content!==void 0){let i=r.content;if(Array.isArray(i)){let n=i.length;for(let a=0;a=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}if(i.values!==void 0){let n=i.values;if(Array.isArray(n)){if(n.length>100){let l={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[l]:e.push(l),t++}let a=n.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.minLength!==void 0){let y=r.minLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),t++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),t++}}if(r.title!==void 0&&typeof r.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/0/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.type!==void 0&&r.type!=="string"){let y={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[y]:e.push(y),t++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="default"||y==="description"||y==="maximum"||y==="minimum"||y==="title"||y==="type")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r.default!==void 0&&typeof r.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.description!==void 0&&typeof r.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.maximum!==void 0&&typeof r.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.minimum!==void 0&&typeof r.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),t++}if(r.title!==void 0&&typeof r.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.type!==void 0){let y=r.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Tl.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),t++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=c===t;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="default"||g==="description"||g==="title"||g==="type")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.default!==void 0&&typeof r.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),t++}if(r.description!==void 0&&typeof r.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.title!==void 0&&typeof r.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.type!==void 0&&r.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var h=y===t;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),t++}if(r.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),t++}for(let k in r)if(!(k==="default"||k==="description"||k==="enum"||k==="enumNames"||k==="title"||k==="type")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),t++}if(r.default!==void 0&&typeof r.default!="string"){let k={instancePath:s+"/default",schemaPath:"#/oneOf/3/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.description!==void 0&&typeof r.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),t++}if(r.enum!==void 0){let k=r.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.minItems!==void 0){let A=r.minItems;if(!(typeof A=="number"&&!(A%1)&&!isNaN(A))){let q={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[q]:e.push(q),t++}if(typeof A=="number"&&(A<0||isNaN(A))){let q={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),t++}}if(r.title!==void 0&&typeof r.title!="string"){let A={instancePath:s+"/title",schemaPath:"#/oneOf/5/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[A]:e.push(A),t++}if(r.type!==void 0&&r.type!=="array"){let A={instancePath:s+"/type",schemaPath:"#/oneOf/5/properties/type/const",keyword:"const",params:{allowedValue:"array"},message:"must be equal to constant"};e===null?e=[A]:e.push(A),t++}}else{let A={instancePath:s,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[A]:e.push(A),t++}var h=P===t;h&&i?(i=!1,n=[n,5]):h&&(i=!0,n=5,l!==!0&&(l=!0))}}}}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let y={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[y]:e.push(y),t++}return Nn.errors=e,p.props=l,t===0}Nn.evaluated={dynamicProps:!0,dynamicItems:!1};function vt(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=vt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),t++}if(r.properties===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"properties"},message:"must have required property 'properties'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="$schema"||o==="properties"||o==="required"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.$schema!==void 0){let o=r.$schema;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}if(r.properties!==void 0){let o=r.properties;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)Nn(o[i],{instancePath:s+"/properties/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Nn.errors:e.concat(Nn.errors),t=e.length);else{let i={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}if(r.required!==void 0){let o=r.required;if(Array.isArray(o)){let i=o.length;for(let l=0;l1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){a=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:a},message:"must NOT have duplicate items (items ## "+a+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),t++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}}if(r.type!==void 0&&r.type!=="object"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return vt.errors=e,t===0}vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function jr(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=jr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t,l=t,c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){let P;if(r.url===void 0&&(P="url")){let j={};e===null?e=[j]:e.push(j),t++}}var h=c===t;if(h){let P={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),t++}else t=l,e!==null&&(l?e.length=l:e=null);if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.requestedSchema===void 0){let P={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[P]:e.push(P),t++}if(r.mode!==void 0&&r.mode!=="form"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}}var O=a===t;if(O){i=!0,n=0;var m={};m.mode=!0}let w=t,y=t,$=t;if(r&&typeof r=="object"&&!Array.isArray(r)){let P;if(r.requestedSchema===void 0&&(P="requestedSchema")){let j={};e===null?e=[j]:e.push(j),t++}}var g=$===t;if(g){let P={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),t++}else t=y,e!==null&&(y?e.length=y:e=null);if(r&&typeof r=="object"&&!Array.isArray(r)&&r.mode!==void 0&&r.mode!=="url"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),t++}var O=w===t;if(O&&i?(i=!1,n=[n,1]):O&&(i=!0,n=1,m!==!0&&(m=m||{},m.mode=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),t++}if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),t++}if(r.mode===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[P]:e.push(P),t++}if(r.message===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[P]:e.push(P),t++}for(let P in r)if(!(re.call(_l.properties,P)||x.test(P))){let j={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),t++}if(r.message!==void 0){let P=r.message;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.mode!==void 0){let P=r.mode;if(!(P==="form"||P==="url")){let j={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:_l.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[j]:e.push(j),t++}}if(r.name!==void 0){let P=r.name;if(typeof P=="string"){if(!G.test(P)){let j={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.onCancel!==void 0){let P=r.onCancel;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.onDecline!==void 0){let P=r.onDecline;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.protocolVersions!==void 0&&(be(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?be.errors:e.concat(be.errors),t=e.length)),r.requestedSchema!==void 0){let P=r.requestedSchema,j=t,A=!1,q=null,z=t;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.$componentRef===void 0){let E={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[E]:e.push(E),t++}for(let E in P)if(E!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),t++}if(P.$componentRef!==void 0){let E=P.$componentRef;if(typeof E=="string"){if(!$e.test(E)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),t++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),t++}}}else{let E={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[E]:e.push(E),t++}var v=z===t;if(v){A=!0,q=0;var k=!0}let T=t;vt(P,{instancePath:s+"/requestedSchema",parentData:r,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?vt.errors:e.concat(vt.errors),t=e.length);var v=T===t;if(v&&A?(A=!1,q=[q,1]):v&&(A=!0,q=1,k!==!0&&(k=!0)),A)t=j,e!==null&&(j?e.length=j:e=null);else{let E={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:q},message:"must match exactly one schema in oneOf"};e===null?e=[E]:e.push(E),t++}}if(r.url!==void 0){let P=r.url;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}if(r.when!==void 0){let P=r.when;if(typeof P=="string"){if(X(P)<1){let j={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),t++}}else{let j={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),t++}}for(let P in r)x.test(P)&&(I(r[P],{instancePath:s+"/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:P,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let P={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),t++}return jr.errors=e,t===0}jr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function _n(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=_n.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(Object.keys(r).length<1){let a={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[a]:e.push(a),t++}for(let a in r){let l=t;if(typeof a=="string"&&!G.test(a)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:a};e===null?e=[c]:e.push(c),t++}var o=l===t;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:a},message:"property name must be valid"};e===null?e=[c]:e.push(c),t++}}for(let a in r){let l=r[a],c=t,h=!1,m=null,w=t;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),t++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),t++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!$e.test($)){let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}}}else{let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}var n=w===t;if(n){h=!0,m=0;var i=!0}let y=t;gt(l,{instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:a,rootData:u,dynamicAnchors:f})||(e=e===null?gt.errors:e.concat(gt.errors),t=e.length);var n=y===t;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)t=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),t++}}}else{let a={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[a]:e.push(a),t++}return _n.errors=e,t===0}_n.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Oe(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Oe.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(r)){let i=r.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),t++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),t++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),t++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}return Oe.errors=e,t===0}Oe.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function Tn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Tn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(re.call(ic.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.arguments!==void 0){let i=r.arguments;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.title!==void 0&&typeof r.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}for(let i in r)x.test(i)&&(I(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return Tn.errors=e,t===0}Tn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var oc={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"};function Zn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Zn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(Object.keys(r).length<1){let a={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[a]:e.push(a),t++}for(let a in r){let l=t;if(typeof a=="string"&&!G.test(a)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:a};e===null?e=[c]:e.push(c),t++}var o=l===t;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:a},message:"property name must be valid"};e===null?e=[c]:e.push(c),t++}}for(let a in r){let l=r[a],c=t,h=!1,m=null,w=t;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),t++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),t++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!$e.test($)){let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}}}else{let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}var n=w===t;if(n){h=!0,m=0;var i=!0}let y=t;Pt(l,{instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:a,rootData:u,dynamicAnchors:f})||(e=e===null?Pt.errors:e.concat(Pt.errors),t=e.length);var n=y===t;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)t=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),t++}}}else{let a={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[a]:e.push(a),t++}return Zn.errors=e,t===0}Zn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Sn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Sn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),t++}if(r.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(re.call(oc.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.clientRequirements!==void 0&&(kr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?kr.errors:e.concat(kr.errors),t=e.length)),r.completionExamples!==void 0&&(jt(r.completionExamples,{instancePath:s+"/completionExamples",parentData:r,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?jt.errors:e.concat(jt.errors),t=e.length)),r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r.description!==void 0&&typeof r.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.title!==void 0&&typeof r.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.uriTemplate!==void 0&&typeof r.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}for(let i in r)x.test(i)&&(I(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return Sn.errors=e,t===0}Sn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var nc={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"};function In(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=In.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(Object.keys(r).length<1){let a={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[a]:e.push(a),t++}for(let a in r){let l=t;if(typeof a=="string"&&!G.test(a)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:a};e===null?e=[c]:e.push(c),t++}var o=l===t;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:a},message:"property name must be valid"};e===null?e=[c]:e.push(c),t++}}for(let a in r){let l=r[a],c=t,h=!1,m=null,w=t;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),t++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),t++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!$e.test($)){let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}}}else{let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}var n=w===t;if(n){h=!0,m=0;var i=!0}let y=t;$t(l,{instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:a,rootData:u,dynamicAnchors:f})||(e=e===null?$t.errors:e.concat($t.errors),t=e.length);var n=y===t;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)t=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),t++}}}else{let a={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[a]:e.push(a),t++}return In.errors=e,t===0}In.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Cn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Cn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.uri===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[i]:e.push(i),t++}if(r.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(re.call(nc.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r._meta!==void 0){let i=r._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=t;if(typeof n=="string"&&!Y.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),t++}var o=a===t;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let a=n.length;for(let l=0;l1||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[a]:e.push(a),t++}if(n<0||isNaN(n)){let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[a]:e.push(a),t++}}else{let a={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[a]:e.push(a),t++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.clientRequirements!==void 0&&(kr(r.clientRequirements,{instancePath:s+"/clientRequirements",parentData:r,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?kr.errors:e.concat(kr.errors),t=e.length)),r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r.description!==void 0&&typeof r.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.elicitations!==void 0){let i=r.elicitations;if(Array.isArray(i)){if(i.length<1){let a={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[a]:e.push(a),t++}let n=i.length;for(let a=0;a1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.title!==void 0&&typeof r.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.uri!==void 0&&typeof r.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}for(let i in r)x.test(i)&&(I(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return Cn.errors=e,t===0}Cn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var ac={oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]};function ur(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=ur.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.scopes===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"scopes"},message:"must have required property 'scopes'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="authorizationUrl"||o==="refreshUrl"||o==="scopes"||o==="tokenUrl"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.authorizationUrl!==void 0){let o=r.authorizationUrl;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}if(r.refreshUrl!==void 0){let o=r.refreshUrl;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}if(r.scopes!==void 0){let o=r.scopes;if(o&&typeof o=="object"&&!Array.isArray(o)){for(let i in o)if(typeof o[i]!="string"){let n={instancePath:s+"/scopes/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/scopes/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let i={instancePath:s+"/scopes",schemaPath:"#/properties/scopes/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}if(r.tokenUrl!==void 0){let o=r.tokenUrl;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}for(let o in r)x.test(o)&&(I(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return ur.errors=e,t===0}ur.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Vn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Vn.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=t;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.implicit===void 0){let m={instancePath:s,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty:"implicit"},message:"must have required property 'implicit'"};e===null?e=[m]:e.push(m),t++}var h=n===t;i=i||h;let a=t;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.password===void 0){let m={instancePath:s,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty:"password"},message:"must have required property 'password'"};e===null?e=[m]:e.push(m),t++}var h=a===t;i=i||h;let l=t;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.clientCredentials===void 0){let m={instancePath:s,schemaPath:"#/anyOf/2/required",keyword:"required",params:{missingProperty:"clientCredentials"},message:"must have required property 'clientCredentials'"};e===null?e=[m]:e.push(m),t++}var h=l===t;i=i||h;let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.authorizationCode===void 0){let m={instancePath:s,schemaPath:"#/anyOf/3/required",keyword:"required",params:{missingProperty:"authorizationCode"},message:"must have required property 'authorizationCode'"};e===null?e=[m]:e.push(m),t++}var h=c===t;if(i=i||h,i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[m]:e.push(m),t++}if(r&&typeof r=="object"&&!Array.isArray(r)){for(let m in r)if(!(m==="authorizationCode"||m==="clientCredentials"||m==="implicit"||m==="password"||x.test(m))){let w={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.authorizationCode!==void 0){let m=r.authorizationCode;if(ur(m,{instancePath:s+"/authorizationCode",parentData:r,parentDataProperty:"authorizationCode",rootData:u,dynamicAnchors:f})||(e=e===null?ur.errors:e.concat(ur.errors),t=e.length),m&&typeof m=="object"&&!Array.isArray(m)){if(m.authorizationUrl===void 0){let w={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[w]:e.push(w),t++}if(m.tokenUrl===void 0){let w={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[w]:e.push(w),t++}}}if(r.clientCredentials!==void 0){let m=r.clientCredentials;if(ur(m,{instancePath:s+"/clientCredentials",parentData:r,parentDataProperty:"clientCredentials",rootData:u,dynamicAnchors:f})||(e=e===null?ur.errors:e.concat(ur.errors),t=e.length),m&&typeof m=="object"&&!Array.isArray(m)&&m.tokenUrl===void 0){let w={instancePath:s+"/clientCredentials",schemaPath:"#/properties/clientCredentials/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[w]:e.push(w),t++}}if(r.implicit!==void 0){let m=r.implicit;if(ur(m,{instancePath:s+"/implicit",parentData:r,parentDataProperty:"implicit",rootData:u,dynamicAnchors:f})||(e=e===null?ur.errors:e.concat(ur.errors),t=e.length),m&&typeof m=="object"&&!Array.isArray(m)&&m.authorizationUrl===void 0){let w={instancePath:s+"/implicit",schemaPath:"#/properties/implicit/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[w]:e.push(w),t++}}if(r.password!==void 0){let m=r.password;if(ur(m,{instancePath:s+"/password",parentData:r,parentDataProperty:"password",rootData:u,dynamicAnchors:f})||(e=e===null?ur.errors:e.concat(ur.errors),t=e.length),m&&typeof m=="object"&&!Array.isArray(m)&&m.tokenUrl===void 0){let w={instancePath:s+"/password",schemaPath:"#/properties/password/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[w]:e.push(w),t++}}for(let m in r)x.test(m)&&(I(r[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}return Vn.errors=e,t===0}Vn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Dn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Dn.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.scheme===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"scheme"},message:"must have required property 'scheme'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="bearerFormat"||m==="description"||m==="scheme"||m==="type"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.bearerFormat!==void 0&&typeof r.bearerFormat!="string"){let m={instancePath:s+"/bearerFormat",schemaPath:"#/oneOf/0/properties/bearerFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),t++}if(r.description!==void 0&&typeof r.description!="string"){let m={instancePath:s+"/description",schemaPath:"#/oneOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),t++}if(r.scheme!==void 0&&typeof r.scheme!="string"){let m={instancePath:s+"/scheme",schemaPath:"#/oneOf/0/properties/scheme/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),t++}if(r.type!==void 0&&r.type!=="http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}for(let m in r)x.test(m)&&(I(r[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.name===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[m]:e.push(m),t++}if(r.in===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"in"},message:"must have required property 'in'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="description"||m==="in"||m==="name"||m==="type"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.description!==void 0&&typeof r.description!="string"){let m={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),t++}if(r.in!==void 0){let m=r.in;if(typeof m!="string"){let w={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}if(!(m==="header"||m==="query"||m==="cookie")){let w={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/enum",keyword:"enum",params:{allowedValues:ac.oneOf[1].properties.in.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),t++}}if(r.name!==void 0&&typeof r.name!="string"){let m={instancePath:s+"/name",schemaPath:"#/oneOf/1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),t++}if(r.type!==void 0&&r.type!=="apiKey"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"apiKey"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}for(let m in r)x.test(m)&&(I(r[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=c===t;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let m=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),t++}if(r.flows===void 0){let y={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"flows"},message:"must have required property 'flows'"};e===null?e=[y]:e.push(y),t++}for(let y in r)if(!(y==="description"||y==="flows"||y==="type"||x.test(y))){let $={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),t++}if(r.description!==void 0&&typeof r.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}if(r.flows!==void 0&&(Vn(r.flows,{instancePath:s+"/flows",parentData:r,parentDataProperty:"flows",rootData:u,dynamicAnchors:f})||(e=e===null?Vn.errors:e.concat(Vn.errors),t=e.length)),r.type!==void 0&&r.type!=="oauth2"){let y={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"oauth2"},message:"must be equal to constant"};e===null?e=[y]:e.push(y),t++}for(let y in r)x.test(y)&&(I(r[y],{instancePath:s+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:y,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let y={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),t++}var h=m===t;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let y=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),t++}if(r.openIdConnectUrl===void 0){let g={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"openIdConnectUrl"},message:"must have required property 'openIdConnectUrl'"};e===null?e=[g]:e.push(g),t++}for(let g in r)if(!(g==="description"||g==="openIdConnectUrl"||g==="type"||x.test(g))){let O={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),t++}if(r.description!==void 0&&typeof r.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}if(r.openIdConnectUrl!==void 0){let g=r.openIdConnectUrl;if(typeof g=="string"){if(!D(g)){let O={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[O]:e.push(O),t++}}else{let O={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),t++}}if(r.type!==void 0&&r.type!=="openIdConnect"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"openIdConnect"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),t++}for(let g in r)x.test(g)&&(I(r[g],{instancePath:s+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:g,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let g={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),t++}var h=y===t;h&&i?(i=!1,n=[n,3]):h&&(i=!0,n=3,l!==!0&&(l=!0))}}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),t++}return Dn.errors=e,p.props=l,t===0}Dn.evaluated={dynamicProps:!0,dynamicItems:!1};function Rn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Rn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(Object.keys(r).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),t++}for(let i in r){let n=t;if(typeof i=="string"&&!G.test(i)){let a={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[a]:e.push(a),t++}var o=n===t;if(!o){let a={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[a]:e.push(a),t++}}for(let i in r)Dn(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Dn.errors:e.concat(Dn.errors),t=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return Rn.errors=e,t===0}Rn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Mn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Mn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="description"||o==="name"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.description!==void 0&&typeof r.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}if(r.name!==void 0){let o=r.name;if(typeof o=="string"){if(X(o)<1){let i={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}for(let o in r)x.test(o)&&(I(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Mn.errors=e,t===0}Mn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var pc={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"};var lc={additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"};function Un(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Un.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(Object.keys(r).length<1){let a={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[a]:e.push(a),t++}for(let a in r){let l=t;if(typeof a=="string"&&!G.test(a)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:a};e===null?e=[c]:e.push(c),t++}var o=l===t;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:a},message:"property name must be valid"};e===null?e=[c]:e.push(c),t++}}for(let a in r){let l=r[a],c=t,h=!1,m=null,w=t;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),t++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),t++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!$e.test($)){let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),t++}}else{let g={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),t++}}}else{let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}var n=w===t;if(n){h=!0,m=0;var i=!0}let y=t;kt(l,{instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:a,rootData:u,dynamicAnchors:f})||(e=e===null?kt.errors:e.concat(kt.errors),t=e.length);var n=y===t;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)t=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),t++}}}else{let a={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[a]:e.push(a),t++}return Un.errors=e,t===0}Un.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ln(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Ln.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),t++}if(r.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),t++}if(r.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="message"||o==="mode"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.message!==void 0){let o=r.message;if(typeof o=="string"){if(X(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}if(r.mode!==void 0&&r.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}r.requestedSchema!==void 0&&(vt(r.requestedSchema,{instancePath:s+"/requestedSchema",parentData:r,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?vt.errors:e.concat(vt.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Ln.errors=e,t===0}Ln.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Fn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Fn.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;Ln(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Ln.errors:e.concat(Ln.errors),t=e.length);var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.mode===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[m]:e.push(m),t++}if(r.message===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[m]:e.push(m),t++}if(r.url===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="message"||m==="mode"||m==="url")){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.message!==void 0){let m=r.message;if(typeof m=="string"){if(X(m)<1){let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}if(r.mode!==void 0&&r.mode!=="url"){let m={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.url!==void 0){let m=r.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=c===t;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),t++}return Fn.errors=e,p.props=l,t===0}Fn.evaluated={dynamicProps:!0,dynamicItems:!1};var mc={additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"};function Jn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Jn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.action!==void 0&&r.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}if(r.content!==void 0){let o=r.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)I(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Jn.errors=e,t===0}Jn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Hn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Hn.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;Jn(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Jn.errors:e.concat(Jn.errors),t=e.length);var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.action===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(m!=="action"){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.action!==void 0){let m=r.action;if(!(m==="decline"||m==="cancel")){let w={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:mc.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),t++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=c===t;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),t++}return Hn.errors=e,p.props=l,t===0}Hn.evaluated={dynamicProps:!0,dynamicItems:!1};function Wn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Wn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),t++}if(r.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),t++}if(r.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="declaration"||o==="request"||o==="response"||o==="type"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.declaration!==void 0){let o=r.declaration;if(typeof o=="string"){if(!G.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}}if(r.request!==void 0&&(Fn(r.request,{instancePath:s+"/request",parentData:r,parentDataProperty:"request",rootData:u,dynamicAnchors:f})||(e=e===null?Fn.errors:e.concat(Fn.errors),t=e.length)),r.response!==void 0&&(Hn(r.response,{instancePath:s+"/response",parentData:r,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?Hn.errors:e.concat(Hn.errors),t=e.length)),r.type!==void 0&&r.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}for(let o in r)x.test(o)&&(I(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Wn.errors=e,t===0}Wn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Zl={additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},fc={additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},uc={additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"};function Kn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Kn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),t++}if(r.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),t++}if(r.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),t++}if(r.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="id"||o==="input"||o==="name"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.id!==void 0&&typeof r.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}if(r.input!==void 0){let o=r.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)I(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}if(r.name!==void 0&&typeof r.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}if(r.type!==void 0&&r.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Kn.errors=e,t===0}Kn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Bn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Bn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),t++}if(r.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),t++}if(r.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(i==="content"||i==="isError"||i==="toolUseId"||i==="type")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r.content!==void 0){let i=r.content,n=t,a=!1,l=null,c=t;Ke(i,{instancePath:s+"/content",parentData:r,parentDataProperty:"content",rootData:u,dynamicAnchors:f})||(e=e===null?Ke.errors:e.concat(Ke.errors),t=e.length);var o=c===t;o&&(a=!0,l=0);let h=t;if(Array.isArray(i)){if(i.length<1){let w={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),t++}let m=i.length;for(let w=0;w1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),t++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}}if(r.hints!==void 0){let o=r.hints;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/hints",schemaPath:"#/properties/hints/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),t++}let i=o.length;for(let n=0;n1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),t++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}}if(r.speedPriority!==void 0){let o=r.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),t++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),t++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return Yn.errors=e,t===0}Yn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Gn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Gn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),t++}if(r.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),t++}for(let i in r)if(!(i==="annotations"||i==="description"||i==="inputSchema"||i==="name"||i==="title"||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}if(r.annotations!==void 0){let i=r.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),t++}if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}if(r.description!==void 0&&typeof r.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.inputSchema!==void 0){let i=r.inputSchema;if(!Xe(i,{instancePath:s+"/inputSchema",parentData:r,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?Xe.errors:e.concat(Xe.errors),t=e.length;else var o=Xe.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),t++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),t++}}o!==!0&&(o=o||{},o.type=!0)}if(r.name!==void 0){let i=r.name;if(typeof i=="string"){if(X(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),t++}}if(r.title!==void 0&&typeof r.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}for(let i in r)x.test(i)&&(I(r[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}return Gn.errors=e,t===0}Gn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Xn(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Xn.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),t++}if(r.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!re.call(Zl.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.includeContext!==void 0){let o=r.includeContext;if(!(o==="none"||o==="thisServer"||o==="allServers")){let i={instancePath:s+"/includeContext",schemaPath:"#/properties/includeContext/enum",keyword:"enum",params:{allowedValues:Zl.properties.includeContext.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),t++}}if(r.maxTokens!==void 0){let o=r.maxTokens;if(!(typeof o=="number"&&!(o%1)&&!isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[i]:e.push(i),t++}if(typeof o=="number"&&(o<1||isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),t++}}if(r.messages!==void 0){let o=r.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),t++}let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),t++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),t++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}if(r.response!==void 0&&(ta(r.response,{instancePath:s+"/response",parentData:r,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?ta.errors:e.concat(ta.errors),t=e.length)),r.type!==void 0&&r.type!=="roots"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"roots"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),t++}for(let o in r)x.test(o)&&(I(r[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),t++}return sa.errors=e,t===0}sa.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ia(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=ia.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;Wn(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Wn.errors:e.concat(Wn.errors),t=e.length);var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;ra(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?ra.errors:e.concat(ra.errors),t=e.length);var h=c===t;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let m=t;sa(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?sa.errors:e.concat(sa.errors),t=e.length);var h=m===t;h&&i?(i=!1,n=[n,2]):h&&(i=!0,n=2,l!==!0&&(l=!0))}if(i)t=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),t++}return ia.errors=e,p.props=l,t===0}ia.evaluated={dynamicProps:!0,dynamicItems:!1};function oa(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=oa.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),r&&typeof r=="object"&&!Array.isArray(r)){if(r.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),t++}if(r.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),t++}if(r.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),t++}for(let o in r)if(!(o==="input"||o==="result"||o==="steps"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),t++}if(r.input!==void 0){let o=r.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)I(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),t++}}if(r.result!==void 0&&(wt(r.result,{instancePath:s+"/result",parentData:r,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?wt.errors:e.concat(wt.errors),t=e.length)),r.steps!==void 0){let o=r.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),t++}let i=o.length;for(let n=0;n1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),t++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),t++}}if(r.title!==void 0&&typeof r.title!="string"){let l={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),t++}for(let l in r)x.test(l)&&(I(r[l],{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:l,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),t++}return aa.errors=e,t===0}aa.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function pa(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=pa.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=t,i=!1,n=null,a=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="protocolVersions"||m==="security"||m==="type"||m==="url"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.protocolVersions!==void 0&&(be(r.protocolVersions,{instancePath:s+"/protocolVersions",parentData:r,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?be.errors:e.concat(be.errors),t=e.length)),r.security!==void 0&&(Oe(r.security,{instancePath:s+"/security",parentData:r,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Oe.errors:e.concat(Oe.errors),t=e.length)),r.type!==void 0&&r.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),t++}if(r.url!==void 0){let m=r.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),t++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),t++}}for(let m in r)x.test(m)&&(I(r[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),t=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),t++}var h=a===t;if(h){i=!0,n=0;var l=!0}let c=t;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),t++}if(r.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),t++}for(let m in r)if(!(m==="args"||m==="command"||m==="env"||m==="protocolVersions"||m==="security"||m==="type"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),t++}if(r.args!==void 0){let m=r.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y=",limit:0},message:"must be >= 0"};f===null?f=[t]:f.push(t),e++}return Ir.errors=f,e===0}var op={validate:ue};function qr(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r}={}){let f=null,e=0;if(Array.isArray(r)){if(r.length<1){let p={instancePath:s,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};f===null?f=[p]:f.push(p),e++}let t=r.length;for(let p=0;p",limit:0},message:"must be > 0"};f===null?f=[a]:f.push(a),e++}}else{let a={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"};f===null?f=[a]:f.push(a),e++}}if(r.maximum!==void 0&&typeof r.maximum!="number"){let n={instancePath:s+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};f===null?f=[n]:f.push(n),e++}if(r.exclusiveMaximum!==void 0&&typeof r.exclusiveMaximum!="number"){let n={instancePath:s+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"};f===null?f=[n]:f.push(n),e++}if(r.minimum!==void 0&&typeof r.minimum!="number"){let n={instancePath:s+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};f===null?f=[n]:f.push(n),e++}if(r.exclusiveMinimum!==void 0&&typeof r.exclusiveMinimum!="number"){let n={instancePath:s+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"};f===null?f=[n]:f.push(n),e++}if(r.maxLength!==void 0){let n=r.maxLength;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let a={instancePath:s+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};f===null?f=[a]:f.push(a),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let a={instancePath:s+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};f===null?f=[a]:f.push(a),e++}}if(r.minLength!==void 0&&(Ir(r.minLength,{instancePath:s+"/minLength",parentData:r,parentDataProperty:"minLength",rootData:u})||(f=f===null?Ir.errors:f.concat(Ir.errors),e=f.length)),r.pattern!==void 0&&typeof r.pattern!="string"){let n={instancePath:s+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"};f===null?f=[n]:f.push(n),e++}if(r.additionalItems!==void 0&&(ue(r.additionalItems,{instancePath:s+"/additionalItems",parentData:r,parentDataProperty:"additionalItems",rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length)),r.items!==void 0){let n=r.items,a=e,l=!1,c=e;ue(n,{instancePath:s+"/items",parentData:r,parentDataProperty:"items",rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length);var t=c===e;if(l=l||t,!l){let h=e;qr(n,{instancePath:s+"/items",parentData:r,parentDataProperty:"items",rootData:u})||(f=f===null?qr.errors:f.concat(qr.errors),e=f.length);var t=h===e;l=l||t}if(l)e=a,f!==null&&(a?f.length=a:f=null);else{let h={instancePath:s+"/items",schemaPath:"#/properties/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};f===null?f=[h]:f.push(h),e++}}if(r.maxItems!==void 0){let n=r.maxItems;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let a={instancePath:s+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};f===null?f=[a]:f.push(a),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let a={instancePath:s+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};f===null?f=[a]:f.push(a),e++}}if(r.minItems!==void 0&&(Ir(r.minItems,{instancePath:s+"/minItems",parentData:r,parentDataProperty:"minItems",rootData:u})||(f=f===null?Ir.errors:f.concat(Ir.errors),e=f.length)),r.uniqueItems!==void 0&&typeof r.uniqueItems!="boolean"){let n={instancePath:s+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};f===null?f=[n]:f.push(n),e++}if(r.contains!==void 0&&(ue(r.contains,{instancePath:s+"/contains",parentData:r,parentDataProperty:"contains",rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length)),r.maxProperties!==void 0){let n=r.maxProperties;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let a={instancePath:s+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};f===null?f=[a]:f.push(a),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let a={instancePath:s+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};f===null?f=[a]:f.push(a),e++}}if(r.minProperties!==void 0&&(Ir(r.minProperties,{instancePath:s+"/minProperties",parentData:r,parentDataProperty:"minProperties",rootData:u})||(f=f===null?Ir.errors:f.concat(Ir.errors),e=f.length)),r.required!==void 0){let n=r.required;if(Array.isArray(n)){let a=n.length;for(let h=0;h1){let h={};for(;l--;){let m=n[l];if(typeof m=="string"){if(typeof h[m]=="number"){c=h[m];let w={instancePath:s+"/required",schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:l,j:c},message:"must NOT have duplicate items (items ## "+c+" and "+l+" are identical)"};f===null?f=[w]:f.push(w),e++;break}h[m]=l}}}}else{let a={instancePath:s+"/required",schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};f===null?f=[a]:f.push(a),e++}}if(r.additionalProperties!==void 0&&(ue(r.additionalProperties,{instancePath:s+"/additionalProperties",parentData:r,parentDataProperty:"additionalProperties",rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length)),r.definitions!==void 0){let n=r.definitions;if(n&&typeof n=="object"&&!Array.isArray(n))for(let a in n)ue(n[a],{instancePath:s+"/definitions/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:a,rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length);else{let a={instancePath:s+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"};f===null?f=[a]:f.push(a),e++}}if(r.properties!==void 0){let n=r.properties;if(n&&typeof n=="object"&&!Array.isArray(n))for(let a in n)ue(n[a],{instancePath:s+"/properties/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:a,rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length);else{let a={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};f===null?f=[a]:f.push(a),e++}}if(r.patternProperties!==void 0){let n=r.patternProperties;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let a in n){var p=e===e;if(!p){let c={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:a},message:"property name must be valid"};f===null?f=[c]:f.push(c),e++}}for(let a in n)ue(n[a],{instancePath:s+"/patternProperties/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:a,rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length)}else{let a={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};f===null?f=[a]:f.push(a),e++}}if(r.dependencies!==void 0){let n=r.dependencies;if(n&&typeof n=="object"&&!Array.isArray(n))for(let a in n){let l=n[a],c=e,h=!1,m=e;ue(l,{instancePath:s+"/dependencies/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:a,rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length);var o=m===e;if(h=h||o,!h){let w=e;if(Array.isArray(l)){let $=l.length;for(let k=0;k<$;k++)if(typeof l[k]!="string"){let v={instancePath:s+"/dependencies/"+a.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+k,schemaPath:"#/definitions/stringArray/items/type",keyword:"type",params:{type:"string"},message:"must be string"};f===null?f=[v]:f.push(v),e++}let g=l.length,O;if(g>1){let k={};for(;g--;){let v=l[g];if(typeof v=="string"){if(typeof k[v]=="number"){O=k[v];let P={instancePath:s+"/dependencies/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:g,j:O},message:"must NOT have duplicate items (items ## "+O+" and "+g+" are identical)"};f===null?f=[P]:f.push(P),e++;break}k[v]=g}}}}else{let $={instancePath:s+"/dependencies/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};f===null?f=[$]:f.push($),e++}var o=w===e;h=h||o}if(h)e=c,f!==null&&(c?f.length=c:f=null);else{let w={instancePath:s+"/dependencies/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};f===null?f=[w]:f.push(w),e++}}else{let a={instancePath:s+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"};f===null?f=[a]:f.push(a),e++}}if(r.propertyNames!==void 0&&(ue(r.propertyNames,{instancePath:s+"/propertyNames",parentData:r,parentDataProperty:"propertyNames",rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length)),r.enum!==void 0){let n=r.enum;if(Array.isArray(n)){if(n.length<1){let c={instancePath:s+"/enum",schemaPath:"#/properties/enum/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};f===null?f=[c]:f.push(c),e++}let a=n.length,l;if(a>1){e:for(;a--;)for(l=a;l--;)if(Cl(n[a],n[l])){let c={instancePath:s+"/enum",schemaPath:"#/properties/enum/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};f===null?f=[c]:f.push(c),e++;break e}}}else{let a={instancePath:s+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"};f===null?f=[a]:f.push(a),e++}}if(r.type!==void 0){let n=r.type,a=e,l=!1,c=e;if(!(n==="array"||n==="boolean"||n==="integer"||n==="null"||n==="number"||n==="object"||n==="string")){let h={instancePath:s+"/type",schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:Il.enum},message:"must be equal to one of the allowed values"};f===null?f=[h]:f.push(h),e++}var i=c===e;if(l=l||i,!l){let h=e;if(Array.isArray(n)){if(n.length<1){let g={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};f===null?f=[g]:f.push(g),e++}let w=n.length;for(let g=0;g1){e:for(;y--;)for($=y;$--;)if(Cl(n[y],n[$])){let g={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:y,j:$},message:"must NOT have duplicate items (items ## "+$+" and "+y+" are identical)"};f===null?f=[g]:f.push(g),e++;break e}}}else{let w={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};f===null?f=[w]:f.push(w),e++}var i=h===e;l=l||i}if(l)e=a,f!==null&&(a?f.length=a:f=null);else{let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};f===null?f=[h]:f.push(h),e++}}if(r.format!==void 0&&typeof r.format!="string"){let n={instancePath:s+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"};f===null?f=[n]:f.push(n),e++}if(r.contentMediaType!==void 0&&typeof r.contentMediaType!="string"){let n={instancePath:s+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"};f===null?f=[n]:f.push(n),e++}if(r.contentEncoding!==void 0&&typeof r.contentEncoding!="string"){let n={instancePath:s+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"};f===null?f=[n]:f.push(n),e++}r.if!==void 0&&(ue(r.if,{instancePath:s+"/if",parentData:r,parentDataProperty:"if",rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length)),r.then!==void 0&&(ue(r.then,{instancePath:s+"/then",parentData:r,parentDataProperty:"then",rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length)),r.else!==void 0&&(ue(r.else,{instancePath:s+"/else",parentData:r,parentDataProperty:"else",rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length)),r.allOf!==void 0&&(qr(r.allOf,{instancePath:s+"/allOf",parentData:r,parentDataProperty:"allOf",rootData:u})||(f=f===null?qr.errors:f.concat(qr.errors),e=f.length)),r.anyOf!==void 0&&(qr(r.anyOf,{instancePath:s+"/anyOf",parentData:r,parentDataProperty:"anyOf",rootData:u})||(f=f===null?qr.errors:f.concat(qr.errors),e=f.length)),r.oneOf!==void 0&&(qr(r.oneOf,{instancePath:s+"/oneOf",parentData:r,parentDataProperty:"oneOf",rootData:u})||(f=f===null?qr.errors:f.concat(qr.errors),e=f.length)),r.not!==void 0&&(ue(r.not,{instancePath:s+"/not",parentData:r,parentDataProperty:"not",rootData:u})||(f=f===null?ue.errors:f.concat(ue.errors),e=f.length))}return ue.errors=f,e===0}var Rl=vr,yc={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}};var dc={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}};var hc=new RegExp("^[^#]*#?$","u"),np=new RegExp("^[A-Za-z_][-A-Za-z0-9._]*$","u");function xr(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=xr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(r&&typeof r=="object"&&!Array.isArray(r))&&typeof r!="boolean"){let c={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:dc.type},message:"must be object,boolean"};e===null?e=[c]:e.push(c),t++}if(f.meta||(f.meta=xr),r&&typeof r=="object"&&!Array.isArray(r)){if(r.$id!==void 0){let c=r.$id;if(typeof c!="string"){let h={instancePath:s+"/$id",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),t++}if(typeof c=="string"&&!hc.test(c)){let h={instancePath:s+"/$id",schemaPath:"#/properties/%24id/pattern",keyword:"pattern",params:{pattern:"^[^#]*#?$"},message:'must match pattern "^[^#]*#?$"'};e===null?e=[h]:e.push(h),t++}}if(r.$schema!==void 0&&typeof r.$schema!="string"){let c={instancePath:s+"/$schema",schemaPath:"#/$defs/uriString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}if(r.$ref!==void 0&&typeof r.$ref!="string"){let c={instancePath:s+"/$ref",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}if(r.$anchor!==void 0){let c=r.$anchor;if(typeof c=="string"){if(!np.test(c)){let h={instancePath:s+"/$anchor",schemaPath:"#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[h]:e.push(h),t++}}else{let h={instancePath:s+"/$anchor",schemaPath:"#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),t++}}if(r.$dynamicRef!==void 0&&typeof r.$dynamicRef!="string"){let c={instancePath:s+"/$dynamicRef",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}if(r.$dynamicAnchor!==void 0){let c=r.$dynamicAnchor;if(typeof c=="string"){if(!np.test(c)){let h={instancePath:s+"/$dynamicAnchor",schemaPath:"#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[h]:e.push(h),t++}}else{let h={instancePath:s+"/$dynamicAnchor",schemaPath:"#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),t++}}if(r.$vocabulary!==void 0){let c=r.$vocabulary;if(c&&typeof c=="object"&&!Array.isArray(c)){for(let h in c){let m=t;if(typeof h!="string"){let w={instancePath:s+"/$vocabulary",schemaPath:"#/$defs/uriString/type",keyword:"type",params:{type:"string"},message:"must be string",propertyName:h};e===null?e=[w]:e.push(w),t++}var o=m===t;if(!o){let w={instancePath:s+"/$vocabulary",schemaPath:"#/properties/%24vocabulary/propertyNames",keyword:"propertyNames",params:{propertyName:h},message:"property name must be valid"};e===null?e=[w]:e.push(w),t++}}for(let h in c)if(typeof c[h]!="boolean"){let m={instancePath:s+"/$vocabulary/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24vocabulary/additionalProperties/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[m]:e.push(m),t++}}else{let h={instancePath:s+"/$vocabulary",schemaPath:"#/properties/%24vocabulary/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),t++}}if(r.$comment!==void 0&&typeof r.$comment!="string"){let c={instancePath:s+"/$comment",schemaPath:"#/properties/%24comment/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),t++}if(r.$defs!==void 0){let c=r.$defs;if(c&&typeof c=="object"&&!Array.isArray(c))for(let h in c){let m=c[h],w=f.meta;if(w)if(!w(m,{instancePath:s+"/$defs/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:c,parentDataProperty:h,rootData:u,dynamicAnchors:f}))e=e===null?w.errors:e.concat(w.errors),t=e.length;else var i=w.evaluated.props,n=w.evaluated.items;else if(!xr(m,{instancePath:s+"/$defs/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:c,parentDataProperty:h,rootData:u,dynamicAnchors:f}))e=e===null?xr.errors:e.concat(xr.errors),t=e.length;else{var a=xr.evaluated.props;i!==!0&&a!==void 0&&(a===!0?i=!0:(i=i||{},Object.assign(i,a)));var l=xr.evaluated.items;n!==!0&&l!==void 0&&(n=l===!0?!0:n>l?n:l)}}else{let h={instancePath:s+"/$defs",schemaPath:"#/properties/%24defs/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),t++}}}return xr.errors=e,t===0}xr.evaluated={props:{$id:!0,$schema:!0,$ref:!0,$anchor:!0,$dynamicRef:!0,$dynamicAnchor:!0,$vocabulary:!0,$comment:!0,$defs:!0},dynamicProps:!1,dynamicItems:!1};var gc={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}};function Je(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Je.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(r)){if(r.length<1){let c={instancePath:s,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),t++}let l=r.length;for(let c=0;ca?i:a)}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[l]:e.push(l),t++}return Je.errors=e,t===0}Je.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function ee(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=ee.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(r&&typeof r=="object"&&!Array.isArray(r))&&typeof r!="boolean"){let te={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:gc.type},message:"must be object,boolean"};e===null?e=[te]:e.push(te),t++}if(f.meta||(f.meta=ee),r&&typeof r=="object"&&!Array.isArray(r)){if(r.prefixItems!==void 0&&(Je(r.prefixItems,{instancePath:s+"/prefixItems",parentData:r,parentDataProperty:"prefixItems",rootData:u,dynamicAnchors:f})||(e=e===null?Je.errors:e.concat(Je.errors),t=e.length)),r.items!==void 0){let te=r.items,Q=f.meta;if(Q)if(!Q(te,{instancePath:s+"/items",parentData:r,parentDataProperty:"items",rootData:u,dynamicAnchors:f}))e=e===null?Q.errors:e.concat(Q.errors),t=e.length;else var o=Q.evaluated.props,i=Q.evaluated.items;else if(!ee(te,{instancePath:s+"/items",parentData:r,parentDataProperty:"items",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var n=ee.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var a=ee.evaluated.items;i!==!0&&a!==void 0&&(i=a===!0?!0:i>a?i:a)}}if(r.contains!==void 0){let te=r.contains,Q=f.meta;if(Q)if(!Q(te,{instancePath:s+"/contains",parentData:r,parentDataProperty:"contains",rootData:u,dynamicAnchors:f}))e=e===null?Q.errors:e.concat(Q.errors),t=e.length;else var l=Q.evaluated.props,c=Q.evaluated.items;else if(!ee(te,{instancePath:s+"/contains",parentData:r,parentDataProperty:"contains",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var h=ee.evaluated.props;l!==!0&&h!==void 0&&(h===!0?l=!0:(l=l||{},Object.assign(l,h)));var m=ee.evaluated.items;c!==!0&&m!==void 0&&(c=m===!0?!0:c>m?c:m)}}if(r.additionalProperties!==void 0){let te=r.additionalProperties,Q=f.meta;if(Q)if(!Q(te,{instancePath:s+"/additionalProperties",parentData:r,parentDataProperty:"additionalProperties",rootData:u,dynamicAnchors:f}))e=e===null?Q.errors:e.concat(Q.errors),t=e.length;else var w=Q.evaluated.props,y=Q.evaluated.items;else if(!ee(te,{instancePath:s+"/additionalProperties",parentData:r,parentDataProperty:"additionalProperties",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var $=ee.evaluated.props;w!==!0&&$!==void 0&&($===!0?w=!0:(w=w||{},Object.assign(w,$)));var g=ee.evaluated.items;y!==!0&&g!==void 0&&(y=g===!0?!0:y>g?y:g)}}if(r.properties!==void 0){let te=r.properties;if(te&&typeof te=="object"&&!Array.isArray(te))for(let Q in te){let Cr=te[Q],Ne=f.meta;if(Ne)if(!Ne(Cr,{instancePath:s+"/properties/"+Q.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:te,parentDataProperty:Q,rootData:u,dynamicAnchors:f}))e=e===null?Ne.errors:e.concat(Ne.errors),t=e.length;else var O=Ne.evaluated.props,k=Ne.evaluated.items;else if(!ee(Cr,{instancePath:s+"/properties/"+Q.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:te,parentDataProperty:Q,rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var v=ee.evaluated.props;O!==!0&&v!==void 0&&(v===!0?O=!0:(O=O||{},Object.assign(O,v)));var P=ee.evaluated.items;k!==!0&&P!==void 0&&(k=P===!0?!0:k>P?k:P)}}else{let Q={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[Q]:e.push(Q),t++}}if(r.patternProperties!==void 0){let te=r.patternProperties;if(te&&typeof te=="object"&&!Array.isArray(te)){for(let Q in te){var j=t===t;if(!j){let Ne={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:Q},message:"property name must be valid"};e===null?e=[Ne]:e.push(Ne),t++}}for(let Q in te){let Cr=te[Q],Ne=f.meta;if(Ne)if(!Ne(Cr,{instancePath:s+"/patternProperties/"+Q.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:te,parentDataProperty:Q,rootData:u,dynamicAnchors:f}))e=e===null?Ne.errors:e.concat(Ne.errors),t=e.length;else var A=Ne.evaluated.props,q=Ne.evaluated.items;else if(!ee(Cr,{instancePath:s+"/patternProperties/"+Q.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:te,parentDataProperty:Q,rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var z=ee.evaluated.props;A!==!0&&z!==void 0&&(z===!0?A=!0:(A=A||{},Object.assign(A,z)));var T=ee.evaluated.items;q!==!0&&T!==void 0&&(q=T===!0?!0:q>T?q:T)}}}else{let Q={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[Q]:e.push(Q),t++}}if(r.dependentSchemas!==void 0){let te=r.dependentSchemas;if(te&&typeof te=="object"&&!Array.isArray(te))for(let Q in te){let Cr=te[Q],Ne=f.meta;if(Ne)if(!Ne(Cr,{instancePath:s+"/dependentSchemas/"+Q.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:te,parentDataProperty:Q,rootData:u,dynamicAnchors:f}))e=e===null?Ne.errors:e.concat(Ne.errors),t=e.length;else var E=Ne.evaluated.props,_=Ne.evaluated.items;else if(!ee(Cr,{instancePath:s+"/dependentSchemas/"+Q.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:te,parentDataProperty:Q,rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var N=ee.evaluated.props;E!==!0&&N!==void 0&&(N===!0?E=!0:(E=E||{},Object.assign(E,N)));var M=ee.evaluated.items;_!==!0&&M!==void 0&&(_=M===!0?!0:_>M?_:M)}}else{let Q={instancePath:s+"/dependentSchemas",schemaPath:"#/properties/dependentSchemas/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[Q]:e.push(Q),t++}}if(r.propertyNames!==void 0){let te=r.propertyNames,Q=f.meta;if(Q)if(!Q(te,{instancePath:s+"/propertyNames",parentData:r,parentDataProperty:"propertyNames",rootData:u,dynamicAnchors:f}))e=e===null?Q.errors:e.concat(Q.errors),t=e.length;else var U=Q.evaluated.props,L=Q.evaluated.items;else if(!ee(te,{instancePath:s+"/propertyNames",parentData:r,parentDataProperty:"propertyNames",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var C=ee.evaluated.props;U!==!0&&C!==void 0&&(C===!0?U=!0:(U=U||{},Object.assign(U,C)));var _e=ee.evaluated.items;L!==!0&&_e!==void 0&&(L=_e===!0?!0:L>_e?L:_e)}}if(r.if!==void 0){let te=r.if,Q=f.meta;if(Q)if(!Q(te,{instancePath:s+"/if",parentData:r,parentDataProperty:"if",rootData:u,dynamicAnchors:f}))e=e===null?Q.errors:e.concat(Q.errors),t=e.length;else var ua=Q.evaluated.props,va=Q.evaluated.items;else if(!ee(te,{instancePath:s+"/if",parentData:r,parentDataProperty:"if",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var Wa=ee.evaluated.props;ua!==!0&&Wa!==void 0&&(Wa===!0?ua=!0:(ua=ua||{},Object.assign(ua,Wa)));var Oa=ee.evaluated.items;va!==!0&&Oa!==void 0&&(va=Oa===!0?!0:va>Oa?va:Oa)}}if(r.then!==void 0){let te=r.then,Q=f.meta;if(Q)if(!Q(te,{instancePath:s+"/then",parentData:r,parentDataProperty:"then",rootData:u,dynamicAnchors:f}))e=e===null?Q.errors:e.concat(Q.errors),t=e.length;else var ca=Q.evaluated.props,Aa=Q.evaluated.items;else if(!ee(te,{instancePath:s+"/then",parentData:r,parentDataProperty:"then",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var Ka=ee.evaluated.props;ca!==!0&&Ka!==void 0&&(Ka===!0?ca=!0:(ca=ca||{},Object.assign(ca,Ka)));var qa=ee.evaluated.items;Aa!==!0&&qa!==void 0&&(Aa=qa===!0?!0:Aa>qa?Aa:qa)}}if(r.else!==void 0){let te=r.else,Q=f.meta;if(Q)if(!Q(te,{instancePath:s+"/else",parentData:r,parentDataProperty:"else",rootData:u,dynamicAnchors:f}))e=e===null?Q.errors:e.concat(Q.errors),t=e.length;else var ya=Q.evaluated.props,xa=Q.evaluated.items;else if(!ee(te,{instancePath:s+"/else",parentData:r,parentDataProperty:"else",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var Ba=ee.evaluated.props;ya!==!0&&Ba!==void 0&&(Ba===!0?ya=!0:(ya=ya||{},Object.assign(ya,Ba)));var za=ee.evaluated.items;xa!==!0&&za!==void 0&&(xa=za===!0?!0:xa>za?xa:za)}}if(r.allOf!==void 0&&(Je(r.allOf,{instancePath:s+"/allOf",parentData:r,parentDataProperty:"allOf",rootData:u,dynamicAnchors:f})||(e=e===null?Je.errors:e.concat(Je.errors),t=e.length)),r.anyOf!==void 0&&(Je(r.anyOf,{instancePath:s+"/anyOf",parentData:r,parentDataProperty:"anyOf",rootData:u,dynamicAnchors:f})||(e=e===null?Je.errors:e.concat(Je.errors),t=e.length)),r.oneOf!==void 0&&(Je(r.oneOf,{instancePath:s+"/oneOf",parentData:r,parentDataProperty:"oneOf",rootData:u,dynamicAnchors:f})||(e=e===null?Je.errors:e.concat(Je.errors),t=e.length)),r.not!==void 0){let te=r.not,Q=f.meta;if(Q)if(!Q(te,{instancePath:s+"/not",parentData:r,parentDataProperty:"not",rootData:u,dynamicAnchors:f}))e=e===null?Q.errors:e.concat(Q.errors),t=e.length;else var da=Q.evaluated.props,Ea=Q.evaluated.items;else if(!ee(te,{instancePath:s+"/not",parentData:r,parentDataProperty:"not",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),t=e.length;else{var Qa=ee.evaluated.props;da!==!0&&Qa!==void 0&&(Qa===!0?da=!0:(da=da||{},Object.assign(da,Qa)));var Na=ee.evaluated.items;Ea!==!0&&Na!==void 0&&(Ea=Na===!0?!0:Ea>Na?Ea:Na)}}}return ee.errors=e,t===0}ee.evaluated={props:{prefixItems:!0,items:!0,contains:!0,additionalProperties:!0,properties:!0,patternProperties:!0,dependentSchemas:!0,propertyNames:!0,if:!0,then:!0,else:!0,allOf:!0,anyOf:!0,oneOf:!0,not:!0},dynamicProps:!1,dynamicItems:!1};var bc={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}};function er(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=er.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(r&&typeof r=="object"&&!Array.isArray(r))&&typeof r!="boolean"){let w={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:bc.type},message:"must be object,boolean"};e===null?e=[w]:e.push(w),t++}if(f.meta||(f.meta=er),r&&typeof r=="object"&&!Array.isArray(r)){if(r.unevaluatedItems!==void 0){let w=r.unevaluatedItems,y=f.meta;if(y)if(!y(w,{instancePath:s+"/unevaluatedItems",parentData:r,parentDataProperty:"unevaluatedItems",rootData:u,dynamicAnchors:f}))e=e===null?y.errors:e.concat(y.errors),t=e.length;else var o=y.evaluated.props,i=y.evaluated.items;else if(!er(w,{instancePath:s+"/unevaluatedItems",parentData:r,parentDataProperty:"unevaluatedItems",rootData:u,dynamicAnchors:f}))e=e===null?er.errors:e.concat(er.errors),t=e.length;else{var n=er.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var a=er.evaluated.items;i!==!0&&a!==void 0&&(i=a===!0?!0:i>a?i:a)}}if(r.unevaluatedProperties!==void 0){let w=r.unevaluatedProperties,y=f.meta;if(y)if(!y(w,{instancePath:s+"/unevaluatedProperties",parentData:r,parentDataProperty:"unevaluatedProperties",rootData:u,dynamicAnchors:f}))e=e===null?y.errors:e.concat(y.errors),t=e.length;else var l=y.evaluated.props,c=y.evaluated.items;else if(!er(w,{instancePath:s+"/unevaluatedProperties",parentData:r,parentDataProperty:"unevaluatedProperties",rootData:u,dynamicAnchors:f}))e=e===null?er.errors:e.concat(er.errors),t=e.length;else{var h=er.evaluated.props;l!==!0&&h!==void 0&&(h===!0?l=!0:(l=l||{},Object.assign(l,h)));var m=er.evaluated.items;c!==!0&&m!==void 0&&(c=m===!0?!0:c>m?c:m)}}}return er.errors=e,t===0}er.evaluated={props:{unevaluatedItems:!0,unevaluatedProperties:!0},dynamicProps:!1,dynamicItems:!1};var $c={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}},Dl={enum:["array","boolean","integer","null","number","object","string"]};var Pc=Ta().default;function Dt(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Dt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(r&&typeof r=="object"&&!Array.isArray(r))&&typeof r!="boolean"){let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:$c.type},message:"must be object,boolean"};e===null?e=[i]:e.push(i),t++}if(f.meta||(f.meta=Dt),r&&typeof r=="object"&&!Array.isArray(r)){if(r.type!==void 0){let i=r.type,n=t,a=!1,l=t;if(!(i==="array"||i==="boolean"||i==="integer"||i==="null"||i==="number"||i==="object"||i==="string")){let h={instancePath:s+"/type",schemaPath:"#/$defs/simpleTypes/enum",keyword:"enum",params:{allowedValues:Dl.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),t++}var o=l===t;a=a||o;let c=t;if(Array.isArray(i)){if(i.length<1){let y={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[y]:e.push(y),t++}let h=i.length;for(let y=0;y1){e:for(;m--;)for(w=m;w--;)if(Pc(i[m],i[w])){let y={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[y]:e.push(y),t++;break e}}}else{let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),t++}var o=c===t;if(a=a||o,a)t=n,e!==null&&(n?e.length=n:e=null);else{let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[h]:e.push(h),t++}}if(r.enum!==void 0&&!Array.isArray(r.enum)){let i={instancePath:s+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),t++}if(r.multipleOf!==void 0){let i=r.multipleOf;if(typeof i=="number"){if(i<=0||isNaN(i)){let n={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[n]:e.push(n),t++}}else{let n={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),t++}}if(r.maximum!==void 0&&typeof r.maximum!="number"){let i={instancePath:s+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}if(r.exclusiveMaximum!==void 0&&typeof r.exclusiveMaximum!="number"){let i={instancePath:s+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}if(r.minimum!==void 0&&typeof r.minimum!="number"){let i={instancePath:s+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}if(r.exclusiveMinimum!==void 0&&typeof r.exclusiveMinimum!="number"){let i={instancePath:s+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),t++}if(r.maxLength!==void 0){let i=r.maxLength;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxLength",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),t++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxLength",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}if(r.minLength!==void 0){let i=r.minLength;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minLength",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),t++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minLength",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}if(r.pattern!==void 0&&typeof r.pattern!="string"){let i={instancePath:s+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),t++}if(r.maxItems!==void 0){let i=r.maxItems;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxItems",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),t++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxItems",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}if(r.minItems!==void 0){let i=r.minItems;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minItems",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),t++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minItems",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}if(r.uniqueItems!==void 0&&typeof r.uniqueItems!="boolean"){let i={instancePath:s+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),t++}if(r.maxContains!==void 0){let i=r.maxContains;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxContains",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),t++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxContains",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}if(r.minContains!==void 0){let i=r.minContains;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minContains",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),t++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minContains",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}if(r.maxProperties!==void 0){let i=r.maxProperties;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxProperties",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),t++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxProperties",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}if(r.minProperties!==void 0){let i=r.minProperties;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minProperties",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),t++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minProperties",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),t++}}if(r.required!==void 0){let i=r.required;if(Array.isArray(i)){let n=i.length;for(let c=0;c1){let c={};for(;a--;){let h=i[a];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/required",schemaPath:"#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:a,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+a+" are identical)"};e===null?e=[m]:e.push(m),t++;break}c[h]=a}}}}else{let n={instancePath:s+"/required",schemaPath:"#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),t++}}if(r.dependentRequired!==void 0){let i=r.dependentRequired;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let a=i[n];if(Array.isArray(a)){let l=a.length;for(let m=0;m1){let m={};for(;c--;){let w=a[c];if(typeof w=="string"){if(typeof m[w]=="number"){h=m[w];let y={instancePath:s+"/dependentRequired/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:c,j:h},message:"must NOT have duplicate items (items ## "+h+" and "+c+" are identical)"};e===null?e=[y]:e.push(y),t++;break}m[w]=c}}}}else{let l={instancePath:s+"/dependentRequired/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[l]:e.push(l),t++}}else{let n={instancePath:s+"/dependentRequired",schemaPath:"#/properties/dependentRequired/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),t++}}}return Dt.errors=e,t===0}Dt.evaluated={props:{type:!0,const:!0,enum:!0,multipleOf:!0,maximum:!0,exclusiveMaximum:!0,minimum:!0,exclusiveMinimum:!0,maxLength:!0,minLength:!0,pattern:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxContains:!0,minContains:!0,maxProperties:!0,minProperties:!0,required:!0,dependentRequired:!0},dynamicProps:!1,dynamicItems:!1};var wc={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}};function Rt(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Rt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(r&&typeof r=="object"&&!Array.isArray(r))&&typeof r!="boolean"){let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:wc.type},message:"must be object,boolean"};e===null?e=[o]:e.push(o),t++}if(f.meta||(f.meta=Rt),r&&typeof r=="object"&&!Array.isArray(r)){if(r.title!==void 0&&typeof r.title!="string"){let o={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}if(r.description!==void 0&&typeof r.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}if(r.deprecated!==void 0&&typeof r.deprecated!="boolean"){let o={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),t++}if(r.readOnly!==void 0&&typeof r.readOnly!="boolean"){let o={instancePath:s+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),t++}if(r.writeOnly!==void 0&&typeof r.writeOnly!="boolean"){let o={instancePath:s+"/writeOnly",schemaPath:"#/properties/writeOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),t++}if(r.examples!==void 0&&!Array.isArray(r.examples)){let o={instancePath:s+"/examples",schemaPath:"#/properties/examples/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),t++}}return Rt.errors=e,t===0}Rt.evaluated={props:{title:!0,description:!0,default:!0,deprecated:!0,readOnly:!0,writeOnly:!0,examples:!0},dynamicProps:!1,dynamicItems:!1};var kc={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}};function Mt(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=Mt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(r&&typeof r=="object"&&!Array.isArray(r))&&typeof r!="boolean"){let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:kc.type},message:"must be object,boolean"};e===null?e=[o]:e.push(o),t++}if(f.meta||(f.meta=Mt),r&&typeof r=="object"&&!Array.isArray(r)&&r.format!==void 0&&typeof r.format!="string"){let o={instancePath:s+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),t++}return Mt.errors=e,t===0}Mt.evaluated={props:{format:!0},dynamicProps:!1,dynamicItems:!1};var jc={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}};function zr(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=zr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(r&&typeof r=="object"&&!Array.isArray(r))&&typeof r!="boolean"){let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:jc.type},message:"must be object,boolean"};e===null?e=[l]:e.push(l),t++}if(f.meta||(f.meta=zr),r&&typeof r=="object"&&!Array.isArray(r)){if(r.contentEncoding!==void 0&&typeof r.contentEncoding!="string"){let l={instancePath:s+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),t++}if(r.contentMediaType!==void 0&&typeof r.contentMediaType!="string"){let l={instancePath:s+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),t++}if(r.contentSchema!==void 0){let l=r.contentSchema,c=f.meta;if(c)if(!c(l,{instancePath:s+"/contentSchema",parentData:r,parentDataProperty:"contentSchema",rootData:u,dynamicAnchors:f}))e=e===null?c.errors:e.concat(c.errors),t=e.length;else var o=c.evaluated.props,i=c.evaluated.items;else if(!zr(l,{instancePath:s+"/contentSchema",parentData:r,parentDataProperty:"contentSchema",rootData:u,dynamicAnchors:f}))e=e===null?zr.errors:e.concat(zr.errors),t=e.length;else{var n=zr.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var a=zr.evaluated.items;i!==!0&&a!==void 0&&(i=a===!0?!0:i>a?i:a)}}}return zr.errors=e,t===0}zr.evaluated={props:{contentEncoding:!0,contentMediaType:!0,contentSchema:!0},dynamicProps:!1,dynamicItems:!1};function vr(r,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=r,dynamicAnchors:f={}}={}){let e=null,t=0,p=vr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(r&&typeof r=="object"&&!Array.isArray(r))&&typeof r!="boolean"){let y={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:yc.type},message:"must be object,boolean"};e===null?e=[y]:e.push(y),t++}if(f.meta||(f.meta=vr),xr(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?xr.errors:e.concat(xr.errors),t=e.length),ee(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?ee.errors:e.concat(ee.errors),t=e.length),er(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?er.errors:e.concat(er.errors),t=e.length),Dt(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Dt.errors:e.concat(Dt.errors),t=e.length),Rt(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Rt.errors:e.concat(Rt.errors),t=e.length),Mt(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Mt.errors:e.concat(Mt.errors),t=e.length),zr(r,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?zr.errors:e.concat(zr.errors),t=e.length),r&&typeof r=="object"&&!Array.isArray(r)){if(r.definitions!==void 0){let y=r.definitions;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=y[$],O=f.meta;if(O)if(!O(g,{instancePath:s+"/definitions/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:y,parentDataProperty:$,rootData:u,dynamicAnchors:f}))e=e===null?O.errors:e.concat(O.errors),t=e.length;else var o=O.evaluated.props,i=O.evaluated.items;else if(!vr(g,{instancePath:s+"/definitions/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:y,parentDataProperty:$,rootData:u,dynamicAnchors:f}))e=e===null?vr.errors:e.concat(vr.errors),t=e.length;else{var n=vr.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var a=vr.evaluated.items;i!==!0&&a!==void 0&&(i=a===!0?!0:i>a?i:a)}}else{let $={instancePath:s+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}}if(r.dependencies!==void 0){let y=r.dependencies;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=y[$],O=t,k=!1,v=t,P=f.meta;if(P)if(!P(g,{instancePath:s+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:y,parentDataProperty:$,rootData:u,dynamicAnchors:f}))e=e===null?P.errors:e.concat(P.errors),t=e.length;else var l=P.evaluated.props,c=P.evaluated.items;else if(!vr(g,{instancePath:s+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:y,parentDataProperty:$,rootData:u,dynamicAnchors:f}))e=e===null?vr.errors:e.concat(vr.errors),t=e.length;else{var h=vr.evaluated.props;l!==!0&&h!==void 0&&(h===!0?l=!0:(l=l||{},Object.assign(l,h)));var m=vr.evaluated.items;c!==!0&&m!==void 0&&(c=m===!0?!0:c>m?c:m)}var w=v===t;k=k||w;let j=t;if(Array.isArray(g)){let A=g.length;for(let T=0;T1){let T={};for(;q--;){let E=g[q];if(typeof E=="string"){if(typeof T[E]=="number"){z=T[E];let _={instancePath:s+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"meta/validation#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:q,j:z},message:"must NOT have duplicate items (items ## "+z+" and "+q+" are identical)"};e===null?e=[_]:e.push(_),t++;break}T[E]=q}}}}else{let A={instancePath:s+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"meta/validation#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[A]:e.push(A),t++}var w=j===t;if(k=k||w,w&&c!==!0&&(c=!0),k)t=O,e!==null&&(O?e.length=O:e=null);else{let A={instancePath:s+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[A]:e.push(A),t++}}else{let $={instancePath:s+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),t++}}if(r.$recursiveAnchor!==void 0){let y=r.$recursiveAnchor;if(typeof y=="string"){if(!np.test(y)){let $={instancePath:s+"/$recursiveAnchor",schemaPath:"meta/core#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[$]:e.push($),t++}}else{let $={instancePath:s+"/$recursiveAnchor",schemaPath:"meta/core#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),t++}}if(r.$recursiveRef!==void 0&&typeof r.$recursiveRef!="string"){let y={instancePath:s+"/$recursiveRef",schemaPath:"meta/core#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),t++}}return vr.errors=e,t===0}vr.evaluated={props:{definitions:!0,dependencies:!0,$recursiveAnchor:!0,$recursiveRef:!0,contentEncoding:!0,contentMediaType:!0,contentSchema:!0,format:!0,title:!0,description:!0,default:!0,deprecated:!0,readOnly:!0,writeOnly:!0,examples:!0,type:!0,const:!0,enum:!0,multipleOf:!0,maximum:!0,exclusiveMaximum:!0,minimum:!0,exclusiveMinimum:!0,maxLength:!0,minLength:!0,pattern:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxContains:!0,minContains:!0,maxProperties:!0,minProperties:!0,required:!0,dependentRequired:!0,unevaluatedItems:!0,unevaluatedProperties:!0,prefixItems:!0,items:!0,contains:!0,additionalProperties:!0,properties:!0,patternProperties:!0,dependentSchemas:!0,propertyNames:!0,if:!0,then:!0,else:!0,allOf:!0,anyOf:!0,oneOf:!0,not:!0,$id:!0,$schema:!0,$ref:!0,$anchor:!0,$dynamicRef:!0,$dynamicAnchor:!0,$vocabulary:!0,$comment:!0,$defs:!0},dynamicProps:!1,dynamicItems:!1};function Oc(r){return r==="#"?"":r.slice(1)}function Ml(r){return/"([^"]+)"/.exec(r)?.[1]}function Ac(r){let s={};return r.keyword==="required"&&(s.missingProperty=Ml(r.error)),r.keyword==="additionalProperties"&&(s.additionalProperty=Ml(r.error)),{instancePath:Oc(r.instanceLocation),keyword:r.keyword,params:s,message:r.error}}function qc(r){let s=new Set,d=[];function b(u){if(!(!u||typeof u!="object")){typeof u.$anchor=="string"&&s.add(u.$anchor),typeof u.$dynamicAnchor=="string"&&s.add(u.$dynamicAnchor);for(let f of["$ref","$dynamicRef","$recursiveRef"])typeof u[f]=="string"&&d.push(u[f]);for(let f of Object.values(u))b(f)}}b(r);for(let u of d){if(!u.startsWith("#"))throw new Error(`can't resolve reference ${u}`);if(u==="#"||u==="#recursive")continue;if(!u.startsWith("#/")){if(!s.has(u.slice(1)))throw new Error(`can't resolve reference ${u}`);continue}let f=r;for(let e of u.slice(2).split("/").map(t=>t.replaceAll("~1","/").replaceAll("~0","~"))){if(!f||typeof f!="object"||!Object.hasOwn(f,e))throw new Error(`can't resolve reference ${u}`);f=f[e]}}}function xc(r,s){qc(r);let d=new vc(r,s,!1),b=u=>{let f=d.validate(u);return b.errors=f.valid?null:f.errors.map(Ac),f.valid};return b.errors=null,b}var Ra=class{constructor(s={}){this.errors=null}compile(s){let d=Sl.get(s?.description);return d||xc(s,this.constructor.draft)}validateSchema(s){let d=this.constructor.draft==="7"?Vl:Rl,b=d(s);return this.errors=d.errors,b}},ap=class extends Ra{static draft="7"},Ee=class extends Ra{static draft="2020-12"},Qe=ap;function Ae(r){return r}function lp(r){let s=[],d="",b=0;for(;b0;)r[e]==="{"?t++:r[e]==="}"&&t--,e++;if(t>0)throw new Error(`Unclosed expression in template: ${r}`);let p=r.slice(f,e-1),o=zc(p);s.push(o),b=e}else d+=u,b++}return d&&s.push({type:"literal",value:d}),{template:r,parts:s}}function zc(r){if(!r.trim())throw new Error("Empty expression");let s=r[0],d=["+","#",".","/",";","?","&"],b,u=r;return d.includes(s)&&(b=s,u=r.slice(1)),{type:"expression",expressions:Ec(u).map(Nc),operator:b}}function Ec(r){let s=[],d="",b=0;for(;b=d.length)return{uri_index:s};let f=d[b];if(f.type==="literal")return r.slice(s).startsWith(f.value)?pp(r,s+f.value.length,d,b+1,u):null;{let e=d[b+1],p=_c(r,s,e).sort((o,i)=>e&&e.type==="expression"&&!e.operator?i-o:o-i);for(let o of p){let i=r.slice(s,o),n={...u};if(Tc(i,f,n,r,s)){let l=pp(r,o,d,b+1,n);if(l)return Object.assign(u,n),l}}return null}}function _c(r,s,d){let b=[];if(d&&d.type==="literal"){let u=s;for(;uu-f)}function Tc(r,s,d,b,u){if(s.type!=="expression")return!1;switch(s.operator){case"+":return Sc(r,s,d);case"#":return Zc(r,s,d);case".":return Cc(r,s,d);case"/":return Vc(r,s,d);case";":return Dc(r,s,d);case"?":case"&":return Rc(r,s,d);default:return Ic(r,s,d,b,u)}}function Zc(r,s,d){if(s.type!=="expression")return!1;if(!r.startsWith("#")){for(let u of s.expressions)d[u.name]="";return r===""}let b=r.slice(1);if(s.expressions.length===1){let u=s.expressions[0],f=b;return u.prefix&&f.length>u.prefix&&(f=f.slice(0,u.prefix)),d[u.name]=decodeURIComponent(f),!0}else{let u=b.split(",");for(let f=0;fe.prefix&&(t=t.slice(0,e.prefix)),d[e.name]=decodeURIComponent(t)}return!0}}function Sc(r,s,d){if(s.type!=="expression")return!1;if(s.expressions.length===1){let b=s.expressions[0],u=r;return b.prefix&&u.length>b.prefix&&(u=u.slice(0,b.prefix)),d[b.name]=decodeURIComponent(u),!0}else{let b=r.split(",");for(let u=0;uf.prefix&&(e=e.slice(0,f.prefix)),d[f.name]=decodeURIComponent(e)}return!0}}function Ic(r,s,d,b,u){if(s.type!=="expression")return!1;if(s.expressions.length===1){let f=s.expressions[0],e=r;return e.includes("/")||e===""&&u+r.length===b.length&&b.endsWith("/")?!1:(f.prefix&&e.length>f.prefix&&(e=e.slice(0,f.prefix)),d[f.name]=decodeURIComponent(e),!0)}else{let f=r.split(",");for(let e=0;et.prefix&&(p=p.slice(0,t.prefix)),d[t.name]=decodeURIComponent(p)}return!0}}function Cc(r,s,d){if(s.type!=="expression")return!1;if(r===""){for(let u of s.expressions)d[u.name]="";return!0}let b=r.startsWith(".")?r.slice(1):r;if(s.expressions.length===1){let u=s.expressions[0];if(u.explode){let f=b.split(".");d[u.name]=f.map(e=>decodeURIComponent(e))}else d[u.name]=decodeURIComponent(b);return!0}else{let u=b.split(".");for(let f=0;fe.prefix&&(t=t.slice(0,e.prefix)),d[e.name]=decodeURIComponent(t)}return!0}}function Vc(r,s,d){if(s.type!=="expression")return!1;let b=r.startsWith("/")?r.slice(1):r;if(s.expressions.length===1){let u=s.expressions[0];return d[u.name]=decodeURIComponent(b),!0}else{let u=b.split(",");for(let f=0;fe.prefix&&(t=t.slice(0,e.prefix)),d[e.name]=decodeURIComponent(t)}return!0}}function Dc(r,s,d){if(s.type!=="expression")return!1;let b=r.split(";").filter(u=>u);for(let u of b){let f=u.indexOf("=");if(f!==-1){let e=u.slice(0,f),t=u.slice(f+1),p=s.expressions.find(o=>o.name===e);p&&(d[p.name]=decodeURIComponent(t))}}return!0}function Rc(r,s,d){if(s.type!=="expression")return!1;let b=r.replace(/^[?&]/,"");if(s.expressions.length===1){let u=s.expressions[0];if(u.explode){let f=b.split("&");d[u.name]=f.map(e=>decodeURIComponent(e))}else{let f=b.split("&");for(let e of f){let t=e.indexOf("=");if(t!==-1){let p=e.slice(0,t),o=e.slice(t+1);p===u.name&&(d[u.name]=decodeURIComponent(o))}}}}else{let u=b.split("&");for(let f of u){let e=f.indexOf("=");if(e!==-1){let t=f.slice(0,e),p=f.slice(e+1),o=s.expressions.find(i=>i.name===t);o&&(d[o.name]=decodeURIComponent(p))}}}return!0}var Fe=class{constructor(){this.templates=[]}add(s){if(typeof s!="string")throw new Error("Template must be a string");if(s!==""&&s.trim()==="")throw new Error("Template cannot be empty");try{let d=lp(s);this.templates.push(d)}catch(d){throw new Error(`Invalid template: ${s} - ${d instanceof Error?d.message:String(d)}`)}}match(s){if(typeof s!="string")throw new Error("URI must be a string");for(let d of this.templates){let b=Ul(s,d);if(b!==null)return{template:d.template,params:b}}return null}clear(){this.templates=[]}all(){return this.templates.map(s=>s.template)}};var fp=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),se=new Map(fp.map((r,s)=>[r,s])),At="2025-11-25",mp="2025-06-18",Mc=new Set(["io.modelcontextprotocol/tasks"]),Uc=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function Ma(r){let s=r==="2020-12"?Ee:Qe,d=new s({allErrors:!0,strict:!1});return Ae(d),d}function _t(r){return[...r].sort((s,d)=>se.get(s)-se.get(d))}function tr(r,s,d){return _t(s?.protocolVersions??d??r.protocolVersions??[])}function Ll(r,s){let d=new Set(s);return r.filter(b=>d.has(b))}function Lc(r){if(!r||typeof r!="object")return new Set;let s=new Set;if(r.type==="oauth2")for(let d of Object.values(r.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function Kl(r){let s=r?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function Bl(r){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(r),externalReferences:s}}function F(r,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${r} is missing an explicit path`);return{code:r,severity:s,message:d,path:b}}function Fc(r){if(typeof r!="string")return!1;let[s]=r.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function Jc(r,s){if(typeof r!="string"||!r.includes("/"))return!1;let d=r.slice(0,r.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function Fl(r){return r&&typeof r=="object"&&!Array.isArray(r)&&typeof r.name=="string"&&typeof r.version=="string"}function Hc(r,s,d){let b=_t(r.protocolVersions??[]),u=b.filter(t=>se.get(t)0;else return!1;return l?c||d.push(F("meta-reserved-key-value","error",`${n}[${JSON.stringify(t)}] has an invalid value for MCP ${i}`,[...a,t])):d.push(F("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(t)} in a ${o} context where MCP ${i} does not define it`,[...a,t])),!0}function e(t,p,o,i,n){if(!(!t||typeof t!="object"||Array.isArray(t)))for(let[a,l]of Object.entries(t)){if(!Uc.test(a)){d.push(F("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(a)}`,[...n,a]));continue}for(let c of o.filter(h=>se.get(h)>=se.get(mp)))f(a,l,p,c,i,n)||Jc(a,c)&&d.push(F("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(a)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,a]))}}for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{let n=tr(r,o,b),a=[t,i];if(e(o._meta,"declaration",n,`${t}[${i}]._meta`,[...a,"_meta"]),t==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(t!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function Wc(r,s,d){let b=new Set;if((r.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(F("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(r,"tags"))for(let[u,f]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])f.forEach((e,t)=>{(e.tags??[]).forEach((p,o)=>{b.has(p)||d.push(F("unknown-tag-reference","error",`${u}[${t}] references undeclared tag ${JSON.stringify(p)}`,[u,t,"tags",o]))})})}function Kc(r,s,d){let b=r.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([t,p])=>[t,Lc(p)]));function e(t,p,o){Array.isArray(t)&&t.forEach((i,n)=>{for(let[a,l]of Object.entries(i)){if(!u.has(a)){d.push(F("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(a)}`,[...o,n,a]));continue}let c=b[a];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(F("duplicate-security-scope","error",`${p}[${n}].${a} contains duplicate scope values`,[...o,n,a])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(F("non-oauth-scope-misuse","error",`${p}[${n}].${a} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,a])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(a)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(F("uncatalogued-oauth-scope","warning",`${p}[${n}].${a} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,a,y]))})}}})}e(r.security,"security",["security"]),(r.transports??[]).forEach((t,p)=>{e(t.security,`transports[${p}].security`,["transports",p,"security"])});for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${t}[${i}].security`,[t,i,"security"])})}function Bc(r,s,d){let b=_t(r.protocolVersions??[]),u=new Set;function f(t,p,o,i){let n=new Set(p);for(let a of t)n.has(a)||d.push(F("protocol-scope-outside-parent","error",`${o} includes protocol version ${a} outside its parent scope`,i))}(r.transports??[]).forEach((t,p)=>{let o=tr(r,t,b);f(o,b,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let t of b)u.has(t)||d.push(F("transport-coverage-gap","error",`protocol version ${t} is present at the root but not covered by any transport`,["protocolVersions"]));let e=r.capabilities??[];e.forEach((t,p)=>{let o=tr(r,t,b);f(o,b,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let t=0;t0&&d.push(F("capability-scope-overlap","error",`capabilities[${t}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",t,"protocolVersions"]))}for(let[t,p,o]of[["tools",r.tools??[],"name"],["prompts",r.prompts??[],"name"],["resources",r.resources??[],"uri"],["resourceTemplates",r.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,a)=>{let l=n[o],c=tr(r,n,b);f(c,b,`${t}[${a}].protocolVersions`,[t,a,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=tr(r,m,c);f(y,c,`${t}[${a}].elicitations[${w}].protocolVersions`,[t,a,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=Ll(c,m.scope);w.length>0&&d.push(F("primitive-scope-overlap","error",`${t}[${a}] with identifier ${JSON.stringify(l)} overlaps ${t}[${m.index}] for protocol versions ${w.join(", ")}`,[t,a,"protocolVersions"]))}h.push({index:a,scope:c}),i.set(l,h)})}}function Qc(r,s,d){let b=_t(r.protocolVersions??[]);function u(f,e,t,p){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(F("elicitation-form-schema-version-mismatch","error",`${t}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(F("elicitation-form-required-property-unknown","error",`${t}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let a=`${t}.properties[${JSON.stringify(i)}]`,l=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(F("elicitation-form-schema-version-mismatch","error",`${a} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(F("elicitation-form-schema-version-mismatch","error",`${a}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(F("elicitation-form-enum-names-mismatch","error",`${a}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(F("elicitation-form-default-outside-enum","error",`${a}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(F("elicitation-form-default-outside-enum","error",`${a}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(F("elicitation-form-invalid-range","error",`${a}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(F("elicitation-form-invalid-range","error",`${a}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(F("elicitation-form-invalid-range","error",`${a}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])e.forEach((t,p)=>{let o=tr(r,t,b),i=new Set;(t.elicitations??[]).forEach((n,a)=>{let l=`${f}[${p}].elicitations[${a}]`,c=[f,p,"elicitations",a];i.has(n.name)&&d.push(F("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=tr(r,n,o);for(let m of h)se.get(m){let p=tr(r,e,b);if(e.type==="streamable-http")for(let o of p)se.get(o)>=se.get("2025-03-26")||d.push(F("transport-not-supported-by-version","error",`transports[${t}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",t,"type"]));if(e.type==="sse")for(let o of p)se.get(o){let p=tr(r,e,b),o=["tools",t];u(`tools[${t}]`,o,e,"title","2025-06-18",p),u(`tools[${t}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${t}]`,o,e,"_meta","2025-06-18",p),u(`tools[${t}]`,o,e,"annotations","2025-03-26",p),f(`tools[${t}]`,o,e,"execution","2025-11-25",p),u(`tools[${t}]`,o,e,"icons","2025-11-25",p)});for(let[e,t]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])t.forEach((p,o)=>{let i=tr(r,p,b),n=[e,o];if(u(`${e}[${o}]`,n,p,"title","2025-06-18",i),u(`${e}[${o}]`,n,p,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,p,"icons","2025-11-25",i),e!=="prompts"&&p.annotations?.lastModified!==void 0)for(let a of i)se.get(a)>=se.get("2025-06-18")||d.push(F("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${a}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((a,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],a,"title","2025-06-18",i)})});(r.capabilities??[]).forEach((e,t)=>{let p=tr(r,e,b),o=["capabilities",t];if("completions"in e&&u(`capabilities[${t}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${t}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&d.push(F("tasks-core-not-valid-in-2026","error",`capabilities[${t}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of p)se.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of Gc){let i=b[o];Array.isArray(i)?i.forEach((n,a)=>d(n,`${u}.${o}[${a}]`,[...f,o,a],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let p=b.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(r,"inputSchema",["inputSchema"],!0,!1),s}function sy(r,s,d,b,u){let f=ty(r.inputSchema);if(!f.length)return;for(let t of d)t!=="2026-07-28"&&u.push(F("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${t}`,["tools",s,"inputSchema"]));let e=new Map;for(let t of f){let p=`tools[${s}].${t.location}.x-mcp-header`,o=["tools",s,...t.path,"x-mcp-header"];if(t.staticallyReachable||u.push(F("invalid-x-mcp-header","error",`${p} is not on a property statically reachable from the schema root through properties only`,o)),typeof t.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(t.value)){u.push(F("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(t.type)||u.push(F("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=t.value.toLowerCase(),n=e.get(i);n?u.push(F("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function iy(r,s,d,b,u){if(Object.hasOwn(r,"properties")){let f=r.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(F("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${At}`,[...d,"properties"]));else for(let[e,t]of Object.entries(f))t&&typeof t=="object"&&!Array.isArray(t)||u.push(F("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${At}`,[...d,"properties",e]))}Object.hasOwn(r,"required")&&(!Array.isArray(r.required)||r.required.some(f=>typeof f!="string"))&&u.push(F("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${At}`,[...d,"required"]))}function oy(r,s,d){let b=_t(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{let e=tr(r,u,b);for(let t of["inputSchema","outputSchema"]){let p=u[t];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${f}].${t}`,i=["tools",f,t],n=e.some(l=>se.get(l)se.get(l)>=se.get(At));if(Object.hasOwn(p,"$schema"))for(let l of e)se.get(l)>=se.get(At)||d.push(F("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${At} or later`,[...i,"$schema"]));if(n&&iy(p,o,i,s,d),a){let l=Kl(p);if(!l)d.push(F("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=Ma(l);try{if(c.validateSchema(p,!0))c.compile(p);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(F("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=Bl(p);try{if(!m.externalReferences.length)throw h;Ma(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(F("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(F("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(t==="outputSchema"&&p.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(F("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}sy(u,f,e,s,d)})}function Jl(r,s,d,b,u,f){if(r.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(F("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of r.required??[])Object.hasOwn(s,e)||f.push(F("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(r.additionalProperties===!1&&r.properties&&typeof r.properties=="object")for(let e of Object.keys(s))Object.hasOwn(r.properties,e)||f.push(F("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function Hl(r,s,d,b,u,f){let e=Kl(r);if(!e)return;let t=Bl(r);if(t.externalReferences.length){let p=[...new Set(t.externalReferences)].sort();f.push(F("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let p=Ma(e).compile(r);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(F("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function ny(r,s,d){let b=_t(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=tr(r,u,b),t=e.filter(o=>se.get(o)se.get(o)>=se.get(At));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,a=["tools",f,"examples",o],l=i.result??{},c=[...a,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(F("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(F("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(F("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(F("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&se.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&se.get(m){Object.hasOwn(t,"_meta")&&se.get(e){let n=`${b}.result.contents[${i}]`,a=[...u,"result","contents",i];if(o.uri===s&&(p=!0,r.mimeType&&o.mimeType&&o.mimeType!==r.mimeType&&e.push(F("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(r.mimeType)}`,[...a,"mimeType"])),r.size!==void 0)){let l=typeof o.text=="string"?ry.encode(o.text).byteLength:typeof o.blob=="string"&&Wl(o.blob)?ay(o.blob):void 0;l!==void 0&&l!==r.size&&e.push(F("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${r.size}`,a))}typeof o.blob=="string"&&!Wl(o.blob)&&e.push(F("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...a,"blob"]))}),p||e.push(F("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function my(r,s,d){let b=_t(r.protocolVersions??[]);for(let[u,f]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]]])f.forEach((e,t)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=tr(r,e,b),o;if(u==="resourceTemplates")try{o=new Fe,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(F("resource-template-example-invalid-template","error",`${u}[${t}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,t,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let a=`${u}[${t}].examples[${JSON.stringify(i)}]`,l=[u,t,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(F("resource-template-example-invalid-expansion","error",`${a}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),py(c,p,`${a}.result`,[...l,"result"],s,d),typeof h=="string"&&ly(e,h,c,a,l,s,d)}})}function Ql(r,s="document"){let d=[];return Bc(r,s,d),Kc(r,s,d),Wc(r,s,d),Yc(r,s,d),Qc(r,s,d),Hc(r,s,d),oy(r,s,d),ny(r,s,d),my(r,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}function Yl(r){return Ma("2020-12").compile(r)}var up="0.8.0-draft.1",fy="v0.8.0-draft.1",uy="4ceb6042c3fd31703199cd3db869ec5c35c17d2fe9ab7b2f5b96a2a3af0cebe4";var Gl=Yl(rl);function cy(r){return r.replaceAll("~1","/").replaceAll("~0","~")}function yy(r,s){if(!s)return[];let d=[],b=r;for(let u of s.slice(1).split("/")){let f=cy(u),e=Array.isArray(b)&&/^(?:0|[1-9][0-9]*)$/.test(f)?Number(f):f;d.push(e),b=b?.[e]}return d}function dy(r,s){let d=yy(r,s.instancePath);return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d}function hy(r,s){return r.code.localeCompare(s.code)||r.message.localeCompare(s.message)||JSON.stringify(r.path).localeCompare(JSON.stringify(s.path))}function gy(r){let s;return Gl(r)?s=Ql(r):(s=(Gl.errors??[]).map(d=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${d.instancePath||"/"} ${d.message??"unknown error"}`,path:dy(r,d)})),s.sort(hy)),{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var $p={};Ft($p,{schemaSha256:()=>rd,snapshotTag:()=>ed,specification:()=>bp,supportedProtocolVersions:()=>Ua,validate:()=>td});var Xl={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/0.8.0.json",title:"MCP Description",description:"MCP Description 0.8.0 Community Working Draft 2 (v0.8.0-draft.2; unreleased).",type:"object",required:["mcpdesc","info","protocolVersions"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},provenance:{$ref:"#/$defs/provenanceRegistry"},components:{$ref:"#/$defs/components"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/tool"}},resources:{type:"array",minItems:1,items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",minItems:1,items:{$ref:"#/$defs/prompt"}},tags:{type:"array",minItems:1,items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},provenanceIds:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",minLength:1}},clientCapabilityValue:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},clientCapabilityRequirements:{type:"object",minProperties:1,properties:{roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},elicitation:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}},provenanceProducer:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},version:{type:"string",minLength:1}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},provenanceArtifact:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"uri"},digest:{type:"string",minLength:1}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},provenanceRecord:{type:"object",required:["kind"],properties:{kind:{enum:["curated","observed","generated"]},producer:{$ref:"#/$defs/provenanceProducer"},method:{type:"string",minLength:1},artifact:{$ref:"#/$defs/provenanceArtifact"},recordedAt:{type:"string",format:"date-time"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},provenanceRegistry:{type:"object",required:["records"],properties:{records:{type:"object",minProperties:1,propertyNames:{minLength:1},additionalProperties:{$ref:"#/$defs/provenanceRecord"}},defaultIds:{$ref:"#/$defs/provenanceIds"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},jsonSchemaObject:{type:"object",additionalProperties:!0},referenceObject:{type:"object",required:["$componentRef"],properties:{$componentRef:{type:"string",pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"}},additionalProperties:!1},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icons:{type:"array",minItems:1,items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}]},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}},componentMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"}},components:{type:"object",minProperties:1,properties:{schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},provenanceIds:{$ref:"#/$defs/provenanceIds"},name:{type:"string",minLength:1},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]}]},outputSchema:{$ref:"#/$defs/schemaComponentValue"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},provenanceIds:{$ref:"#/$defs/provenanceIds"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},provenanceIds:{$ref:"#/$defs/provenanceIds"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},provenanceIds:{$ref:"#/$defs/provenanceIds"},name:{type:"string"},arguments:{type:"array",minItems:1,items:{$ref:"#/$defs/promptArgument"}},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},extensionCapabilities:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}}};var Ua=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),ie=new Map(Ua.map((r,s)=>[r,s])),qt="2025-11-25",yp="2025-06-18",$y=new Set(["io.modelcontextprotocol/tasks"]),Py=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function dp(r){let s=r==="2020-12"?Ee:Qe,d=new s({allErrors:!0,strict:!1});return Ae(d),d}function Tt(r){return[...r].sort((s,d)=>ie.get(s)-ie.get(d))}function sr(r,s,d){return Tt(s?.protocolVersions??d??r.protocolVersions??[])}function em(r,s){let d=new Set(s);return r.filter(b=>d.has(b))}function wy(r){if(!r||typeof r!="object")return new Set;let s=new Set;if(r.type==="oauth2")for(let d of Object.values(r.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function om(r){let s=r?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function nm(r){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(r),externalReferences:s}}function J(r,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${r} is missing an explicit path`);return{code:r,severity:s,message:d,path:b}}function ky(r){if(typeof r!="string")return!1;let[s]=r.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function jy(r,s){if(typeof r!="string"||!r.includes("/"))return!1;let d=r.slice(0,r.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function rm(r){return r&&typeof r=="object"&&!Array.isArray(r)&&typeof r.name=="string"&&typeof r.version=="string"}function vy(r,s,d){let b=Tt(r.protocolVersions??[]),u=b.filter(t=>ie.get(t)0;else return!1;return l?c||d.push(J("meta-reserved-key-value","error",`${n}[${JSON.stringify(t)}] has an invalid value for MCP ${i}`,[...a,t])):d.push(J("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(t)} in a ${o} context where MCP ${i} does not define it`,[...a,t])),!0}function e(t,p,o,i,n){if(!(!t||typeof t!="object"||Array.isArray(t)))for(let[a,l]of Object.entries(t)){if(!Py.test(a)){d.push(J("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(a)}`,[...n,a]));continue}for(let c of o.filter(h=>ie.get(h)>=ie.get(yp)))f(a,l,p,c,i,n)||jy(a,c)&&d.push(J("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(a)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,a]))}}for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{let n=sr(r,o,b),a=[t,i];if(e(o._meta,"declaration",n,`${t}[${i}]._meta`,[...a,"_meta"]),t==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(t!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function Oy(r,s,d){let b=new Set;if((r.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(J("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(r,"tags"))for(let[u,f]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])f.forEach((e,t)=>{(e.tags??[]).forEach((p,o)=>{b.has(p)||d.push(J("unknown-tag-reference","error",`${u}[${t}] references undeclared tag ${JSON.stringify(p)}`,[u,t,"tags",o]))})})}function Ay(r,s,d){let b=r.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([t,p])=>[t,wy(p)]));function e(t,p,o){Array.isArray(t)&&t.forEach((i,n)=>{for(let[a,l]of Object.entries(i)){if(!u.has(a)){d.push(J("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(a)}`,[...o,n,a]));continue}let c=b[a];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(J("duplicate-security-scope","error",`${p}[${n}].${a} contains duplicate scope values`,[...o,n,a])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(J("non-oauth-scope-misuse","error",`${p}[${n}].${a} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,a])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(a)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(J("uncatalogued-oauth-scope","warning",`${p}[${n}].${a} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,a,y]))})}}})}e(r.security,"security",["security"]),(r.transports??[]).forEach((t,p)=>{e(t.security,`transports[${p}].security`,["transports",p,"security"])});for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${t}[${i}].security`,[t,i,"security"])})}function qy(r,s,d){let b=Tt(r.protocolVersions??[]),u=new Set;function f(t,p,o,i){let n=new Set(p);for(let a of t)n.has(a)||d.push(J("protocol-scope-outside-parent","error",`${o} includes protocol version ${a} outside its parent scope`,i))}(r.transports??[]).forEach((t,p)=>{let o=sr(r,t,b);f(o,b,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let t of b)u.has(t)||d.push(J("transport-coverage-gap","error",`protocol version ${t} is present at the root but not covered by any transport`,["protocolVersions"]));let e=r.capabilities??[];e.forEach((t,p)=>{let o=sr(r,t,b);f(o,b,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let t=0;t0&&d.push(J("capability-scope-overlap","error",`capabilities[${t}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",t,"protocolVersions"]))}for(let[t,p,o]of[["tools",r.tools??[],"name"],["prompts",r.prompts??[],"name"],["resources",r.resources??[],"uri"],["resourceTemplates",r.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,a)=>{let l=n[o],c=sr(r,n,b);f(c,b,`${t}[${a}].protocolVersions`,[t,a,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=sr(r,m,c);f(y,c,`${t}[${a}].elicitations[${w}].protocolVersions`,[t,a,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=em(c,m.scope);w.length>0&&d.push(J("primitive-scope-overlap","error",`${t}[${a}] with identifier ${JSON.stringify(l)} overlaps ${t}[${m.index}] for protocol versions ${w.join(", ")}`,[t,a,"protocolVersions"]))}h.push({index:a,scope:c}),i.set(l,h)})}}function xy(r,s,d){let b=Tt(r.protocolVersions??[]);function u(f,e,t,p){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(J("elicitation-form-schema-version-mismatch","error",`${t}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(J("elicitation-form-required-property-unknown","error",`${t}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let a=`${t}.properties[${JSON.stringify(i)}]`,l=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(J("elicitation-form-schema-version-mismatch","error",`${a} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(J("elicitation-form-schema-version-mismatch","error",`${a}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(J("elicitation-form-enum-names-mismatch","error",`${a}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(J("elicitation-form-default-outside-enum","error",`${a}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(J("elicitation-form-default-outside-enum","error",`${a}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(J("elicitation-form-invalid-range","error",`${a}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(J("elicitation-form-invalid-range","error",`${a}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(J("elicitation-form-invalid-range","error",`${a}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])e.forEach((t,p)=>{let o=sr(r,t,b),i=new Set;(t.elicitations??[]).forEach((n,a)=>{let l=`${f}[${p}].elicitations[${a}]`,c=[f,p,"elicitations",a];i.has(n.name)&&d.push(J("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=sr(r,n,o);for(let m of h)ie.get(m){let p=sr(r,e,b);if(e.type==="streamable-http")for(let o of p)ie.get(o)>=ie.get("2025-03-26")||d.push(J("transport-not-supported-by-version","error",`transports[${t}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",t,"type"]));if(e.type==="sse")for(let o of p)ie.get(o){let p=sr(r,e,b),o=["tools",t];u(`tools[${t}]`,o,e,"title","2025-06-18",p),u(`tools[${t}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${t}]`,o,e,"_meta","2025-06-18",p),u(`tools[${t}]`,o,e,"annotations","2025-03-26",p),f(`tools[${t}]`,o,e,"execution","2025-11-25",p),u(`tools[${t}]`,o,e,"icons","2025-11-25",p)});for(let[e,t]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])t.forEach((p,o)=>{let i=sr(r,p,b),n=[e,o];if(u(`${e}[${o}]`,n,p,"title","2025-06-18",i),u(`${e}[${o}]`,n,p,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,p,"icons","2025-11-25",i),e!=="prompts"&&p.annotations?.lastModified!==void 0)for(let a of i)ie.get(a)>=ie.get("2025-06-18")||d.push(J("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${a}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((a,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],a,"title","2025-06-18",i)})});(r.capabilities??[]).forEach((e,t)=>{let p=sr(r,e,b),o=["capabilities",t];if("completions"in e&&u(`capabilities[${t}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${t}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&d.push(J("tasks-core-not-valid-in-2026","error",`capabilities[${t}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of p)ie.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of Ey){let i=b[o];Array.isArray(i)?i.forEach((n,a)=>d(n,`${u}.${o}[${a}]`,[...f,o,a],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let p=b.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(r,"inputSchema",["inputSchema"],!0,!1),s}function Sy(r,s,d,b,u){let f=Zy(r.inputSchema);if(!f.length)return;for(let t of d)t!=="2026-07-28"&&u.push(J("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${t}`,["tools",s,"inputSchema"]));let e=new Map;for(let t of f){let p=`tools[${s}].${t.location}.x-mcp-header`,o=["tools",s,...t.path,"x-mcp-header"];if(t.staticallyReachable||u.push(J("invalid-x-mcp-header","error",`${p} is not on a property statically reachable from the schema root through properties only`,o)),typeof t.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(t.value)){u.push(J("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(t.type)||u.push(J("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=t.value.toLowerCase(),n=e.get(i);n?u.push(J("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function Iy(r,s,d,b,u){if(Object.hasOwn(r,"properties")){let f=r.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(J("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${qt}`,[...d,"properties"]));else for(let[e,t]of Object.entries(f))t&&typeof t=="object"&&!Array.isArray(t)||u.push(J("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${qt}`,[...d,"properties",e]))}Object.hasOwn(r,"required")&&(!Array.isArray(r.required)||r.required.some(f=>typeof f!="string"))&&u.push(J("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${qt}`,[...d,"required"]))}function Cy(r,s,d){let b=Tt(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{let e=sr(r,u,b);for(let t of["inputSchema","outputSchema"]){let p=u[t];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${f}].${t}`,i=["tools",f,t],n=e.some(l=>ie.get(l)ie.get(l)>=ie.get(qt));if(Object.hasOwn(p,"$schema"))for(let l of e)ie.get(l)>=ie.get(qt)||d.push(J("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${qt} or later`,[...i,"$schema"]));if(n&&Iy(p,o,i,s,d),a){let l=om(p);if(!l)d.push(J("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=dp(l);try{if(c.validateSchema(p,!0))c.compile(p);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(J("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=nm(p);try{if(!m.externalReferences.length)throw h;dp(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(J("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(J("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(t==="outputSchema"&&p.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(J("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}Sy(u,f,e,s,d)})}function tm(r,s,d,b,u,f){if(r.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(J("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of r.required??[])Object.hasOwn(s,e)||f.push(J("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(r.additionalProperties===!1&&r.properties&&typeof r.properties=="object")for(let e of Object.keys(s))Object.hasOwn(r.properties,e)||f.push(J("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function sm(r,s,d,b,u,f){let e=om(r);if(!e)return;let t=nm(r);if(t.externalReferences.length){let p=[...new Set(t.externalReferences)].sort();f.push(J("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let p=dp(e).compile(r);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(J("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function Vy(r,s,d){let b=Tt(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=sr(r,u,b),t=e.filter(o=>ie.get(o)ie.get(o)>=ie.get(qt));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,a=["tools",f,"examples",o],l=i.result??{},c=[...a,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(J("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(J("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(J("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(J("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&ie.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&ie.get(m){Object.hasOwn(t,"_meta")&&ie.get(e){let n=`${b}.result.contents[${i}]`,a=[...u,"result","contents",i];if(o.uri===s&&(p=!0,r.mimeType&&o.mimeType&&o.mimeType!==r.mimeType&&e.push(J("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(r.mimeType)}`,[...a,"mimeType"])),r.size!==void 0)){let l=typeof o.text=="string"?Ty.encode(o.text).byteLength:typeof o.blob=="string"&&im(o.blob)?Dy(o.blob):void 0;l!==void 0&&l!==r.size&&e.push(J("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${r.size}`,a))}typeof o.blob=="string"&&!im(o.blob)&&e.push(J("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...a,"blob"]))}),p||e.push(J("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function Uy(r,s,d){let b=Tt(r.protocolVersions??[]);for(let[u,f]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]]])f.forEach((e,t)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=sr(r,e,b),o;if(u==="resourceTemplates")try{o=new Fe,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(J("resource-template-example-invalid-template","error",`${u}[${t}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,t,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let a=`${u}[${t}].examples[${JSON.stringify(i)}]`,l=[u,t,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(J("resource-template-example-invalid-expansion","error",`${a}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),Ry(c,p,`${a}.result`,[...l,"result"],s,d),typeof h=="string"&&My(e,h,c,a,l,s,d)}})}function am(r,s="document"){let d=[];return qy(r,s,d),Ay(r,s,d),Oy(r,s,d),zy(r,s,d),xy(r,s,d),vy(r,s,d),Cy(r,s,d),Vy(r,s,d),Uy(r,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var lm=new Ee({allErrors:!0,strict:!1});Ae(lm);var pm=lm.compile(Xl),Ly=/^[A-Za-z][A-Za-z0-9+._-]*:[^\s]+$/,gp=["tools","resources","resourceTemplates","prompts"],Fy=["schemas","toolExamples","resourceExamples","resourceTemplateExamples"],Jy=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),Hy=new Set(["io.modelcontextprotocol/tasks"]),Wy={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function Ut(r,s,d,b){return{code:r,severity:s,message:d,path:b}}function Ky(r){if(typeof r!="string"||!r.includes("/"))return!1;let s=r.slice(0,r.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function ha(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)&&Object.hasOwn(r,"$componentRef")}function hp(r,s,d,b){return{code:r,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function By(r,s="document"){let d=structuredClone(r),b=[],u=0;function f(e,t,p,o=[]){let i=/^#\/components\/([^/]+)\/([^/]+)$/.exec(e?.$componentRef??"");if(!i)return e;let[,n,a]=i;if(n!==t)return b.push(hp("wrong-component-reference-namespace",s,`must target #/components/${t}, not #/components/${n}`,p)),e;let l=`${n}/${a}`;if(o.includes(l))return b.push(hp("component-reference-cycle",s,`forms a cycle through ${[...o,l].join(" -> ")}`,p)),e;let c=r?.components?.[n]?.[a];return c===void 0?(b.push(hp("missing-component-reference-target",s,`targets missing component ${JSON.stringify(e.$componentRef)}`,p)),e):(u+=1,ha(c)?f(c,t,p,[...o,l]):structuredClone(c))}for(let e of Fy)for(let[t,p]of Object.entries(r?.components?.[e]??{}))ha(p)&&(d.components[e][t]=f(p,e,["components",e,t],[`${e}/${t}`]));for(let[e,t]of Object.entries({tools:r?.tools,resources:r?.resources,resourceTemplates:r?.resourceTemplates}))for(let[p,o]of(t??[]).entries()){let i=d[e][p];if(e==="tools")for(let a of["inputSchema","outputSchema"])ha(o[a])&&(i[a]=f(o[a],"schemas",[e,p,a]));let n=e==="tools"?"toolExamples":e==="resources"?"resourceExamples":"resourceTemplateExamples";for(let[a,l]of Object.entries(o.examples??{}))ha(l)&&(i.examples[a]=f(l,n,[e,p,"examples",a]))}for(let e of gp)for(let[t,p]of(r?.[e]??[]).entries())for(let[o,i]of(p.elicitations??[]).entries())ha(i.requestedSchema)&&(d[e][t].elicitations[o].requestedSchema=f(i.requestedSchema,"schemas",[e,t,"elicitations",o,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:u}}function Qy(r,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(r)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function mm(r){return pm(r)?[]:(pm.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:Qy(r,s)}))}function Yy(r,s){let d=[],b=r?.provenance?.records??{};for(let[f,e]of Object.entries(b)){let t=e?.artifact?.digest;typeof t=="string"&&!Ly.test(t)&&d.push({code:"invalid-provenance-digest",severity:"error",message:`${s}.provenance.records[${JSON.stringify(f)}].artifact.digest must identify a digest algorithm and non-empty value separated by ":"`,path:["provenance","records",f,"artifact","digest"]})}let u=[["provenance","defaultIds",r?.provenance?.defaultIds]];for(let f of gp)for(let[e,t]of(r?.[f]??[]).entries())u.push([f,e,"provenanceIds",t?.provenanceIds]);for(let f of u){let e=f.at(-1);if(!Array.isArray(e))continue;let t=f.slice(0,-1);for(let[p,o]of e.entries())Object.hasOwn(b,o)||d.push({code:"unknown-provenance-reference",severity:"error",message:`${s}.${t.join(".")}[${p}] references unknown provenance record ${JSON.stringify(o)}`,path:[...t,p]})}return d}function Gy(r){let s=[],d=r.protocolVersions??[];function b(t,p,o,i){s.push(Ut("client-requirement-version-mismatch","error",`${t} member ${JSON.stringify(i)} is not defined by MCP ${o}`,[...p,i]))}function u(t,p,o,i){return t&&typeof t=="object"&&!Array.isArray(t)?!0:(s.push(Ut("invalid-client-requirement-value","error",`${p} must be an object for MCP ${i}`,o)),!1)}function f(t,p,o,i,n){if(!u(t,o,i,n))return!1;for(let a of Object.keys(t))p.has(a)||b(o,i,n,a);return!0}function e(t,p,o,i){f(t,new Set(["list","cancel","requests"]),p,o,i);for(let n of["list","cancel"])Object.hasOwn(t,n)&&u(t[n],`${p}.${n}`,[...o,n],i);if(!(!Object.hasOwn(t,"requests")||!u(t.requests,`${p}.requests`,[...o,"requests"],i))){f(t.requests,new Set(["sampling","elicitation"]),`${p}.requests`,[...o,"requests"],i);for(let[n,a]of[["sampling","createMessage"],["elicitation","create"]]){if(!Object.hasOwn(t.requests,n))continue;let l=t.requests[n],c=[...o,"requests",n];f(l,new Set([a]),`${p}.requests.${n}`,c,i)&&Object.hasOwn(l,a)&&u(l[a],`${p}.requests.${n}.${a}`,[...c,a],i)}}}for(let t of gp)for(let[p,o]of(r[t]??[]).entries()){let i=o.clientRequirements;if(!i||typeof i!="object"||Array.isArray(i))continue;let n=o.protocolVersions??d,a=`${t}[${p}].clientRequirements`,l=[t,p,"clientRequirements"];for(let c of n){let h=Wy[c]??new Set;for(let[m,w]of Object.entries(i)){if(m.startsWith("x-"))continue;if(Jy.has(m)&&!h.has(m)){s.push(Ut("client-requirement-version-mismatch","error",`${a}.${m} is not defined by MCP ${c}; split the primitive into disjoint protocol-scoped variants when requirements differ`,[...l,m]));continue}if(!h.has(m))continue;let y=`${a}.${m}`,$=[...l,m];if(m==="roots")f(w,c==="2026-07-28"?new Set:new Set(["listChanged"]),y,$,c),c!=="2026-07-28"&&Object.hasOwn(w,"listChanged")&&typeof w.listChanged!="boolean"&&s.push(Ut("invalid-client-requirement-value","error",`${y}.listChanged must be a boolean for MCP ${c}`,[...$,"listChanged"]));else if(m==="sampling"&&["2025-11-25","2026-07-28"].includes(c)){f(w,new Set(["context","tools"]),y,$,c);for(let g of["context","tools"])Object.hasOwn(w,g)&&u(w[g],`${y}.${g}`,[...$,g],c);Object.hasOwn(w,"context")&&s.push(Ut("deprecated-client-requirement","warning",`${y}.context uses deprecated MCP context-inclusion capability semantics in MCP ${c}`,[...$,"context"]))}else if(m==="elicitation"&&["2025-11-25","2026-07-28"].includes(c)){f(w,new Set(["form","url"]),y,$,c);for(let g of["form","url"])Object.hasOwn(w,g)&&u(w[g],`${y}.${g}`,[...$,g],c)}else if(m==="tasks")e(w,y,$,c);else if(m==="extensions")for(let g of Object.keys(w))Ky(g)&&!Hy.has(g)&&s.push(Ut("unknown-reserved-extension-identifier","warning",`${y} contains unrecognized extension ${JSON.stringify(g)} under an MCP-reserved prefix; preserve it and review its authority`,[...$,g]));c==="2026-07-28"&&["roots","sampling"].includes(m)&&s.push(Ut("deprecated-client-requirement","warning",`${y} requires an MCP capability deprecated in MCP ${c}`,$))}}}return s}function Xy(r,s="document"){let d=By(r,s),b=d.diagnostics.length||d.substitutions===0?[]:mm(d.document),u=[...d.diagnostics,...b,...d.diagnostics.length||b.length?[]:am(d.document,s),...Yy(r,s),...Gy(r)];return(Object.hasOwn(r,"transports")?u:u.filter(e=>e.code!=="transport-coverage-gap")).sort((e,t)=>e.code.localeCompare(t.code)||e.message.localeCompare(t.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(t.path)))}function fm(r){let s=mm(r);return s.length?s:Xy(r)}var bp="0.8.0-draft.2",ed="v0.8.0-draft.2",rd="ab692c1a5a0f7e5f29be1940aa8c64a56d4620be0a19d00cf0a64680b7e517fa";function td(r){let s=fm(r);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var vp={};Ft(vp,{schemaSha256:()=>Vd,snapshotTag:()=>Cd,specification:()=>jp,supportedProtocolVersions:()=>La,validate:()=>Dd});var um={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/0.8.0.json",title:"MCP Description",description:"MCP Description 0.8.0 Community Working Draft 3 (v0.8.0-draft.3; unreleased).",type:"object",required:["mcpdesc","info","protocolVersions"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},components:{$ref:"#/$defs/components"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/tool"}},resources:{type:"array",minItems:1,items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",minItems:1,items:{$ref:"#/$defs/prompt"}},tags:{type:"array",minItems:1,items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},clientCapabilityValue:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},clientCapabilityRequirements:{type:"object",minProperties:1,properties:{roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},elicitation:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}},jsonSchemaObject:{type:"object",additionalProperties:!0},referenceObject:{type:"object",required:["$componentRef"],properties:{$componentRef:{type:"string",pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"}},additionalProperties:!1},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icons:{type:"array",minItems:1,items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}]},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}},componentMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"}},components:{type:"object",minProperties:1,properties:{schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string",minLength:1},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]}]},outputSchema:{$ref:"#/$defs/schemaComponentValue"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string"},arguments:{type:"array",minItems:1,items:{$ref:"#/$defs/promptArgument"}},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},extensionCapabilities:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}}};var La=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),oe=new Map(La.map((r,s)=>[r,s])),xt="2025-11-25",Pp="2025-06-18",id=new Set(["io.modelcontextprotocol/tasks"]),od=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function wp(r){let s=r==="2020-12"?Ee:Qe,d=new s({allErrors:!0,strict:!1});return Ae(d),d}function Zt(r){return[...r].sort((s,d)=>oe.get(s)-oe.get(d))}function ir(r,s,d){return Zt(s?.protocolVersions??d??r.protocolVersions??[])}function cm(r,s){let d=new Set(s);return r.filter(b=>d.has(b))}function nd(r){if(!r||typeof r!="object")return new Set;let s=new Set;if(r.type==="oauth2")for(let d of Object.values(r.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function bm(r){let s=r?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function $m(r){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(r),externalReferences:s}}function H(r,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${r} is missing an explicit path`);return{code:r,severity:s,message:d,path:b}}function ad(r){if(typeof r!="string")return!1;let[s]=r.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function pd(r,s){if(typeof r!="string"||!r.includes("/"))return!1;let d=r.slice(0,r.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function ym(r){return r&&typeof r=="object"&&!Array.isArray(r)&&typeof r.name=="string"&&typeof r.version=="string"}function ld(r,s,d){let b=Zt(r.protocolVersions??[]),u=b.filter(t=>oe.get(t)0;else return!1;return l?c||d.push(H("meta-reserved-key-value","error",`${n}[${JSON.stringify(t)}] has an invalid value for MCP ${i}`,[...a,t])):d.push(H("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(t)} in a ${o} context where MCP ${i} does not define it`,[...a,t])),!0}function e(t,p,o,i,n){if(!(!t||typeof t!="object"||Array.isArray(t)))for(let[a,l]of Object.entries(t)){if(!od.test(a)){d.push(H("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(a)}`,[...n,a]));continue}for(let c of o.filter(h=>oe.get(h)>=oe.get(Pp)))f(a,l,p,c,i,n)||pd(a,c)&&d.push(H("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(a)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,a]))}}for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{let n=ir(r,o,b),a=[t,i];if(e(o._meta,"declaration",n,`${t}[${i}]._meta`,[...a,"_meta"]),t==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(t!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function md(r,s,d){let b=new Set;if((r.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(H("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(r,"tags"))for(let[u,f]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])f.forEach((e,t)=>{(e.tags??[]).forEach((p,o)=>{b.has(p)||d.push(H("unknown-tag-reference","error",`${u}[${t}] references undeclared tag ${JSON.stringify(p)}`,[u,t,"tags",o]))})})}function fd(r,s,d){let b=r.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([t,p])=>[t,nd(p)]));function e(t,p,o){Array.isArray(t)&&t.forEach((i,n)=>{for(let[a,l]of Object.entries(i)){if(!u.has(a)){d.push(H("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(a)}`,[...o,n,a]));continue}let c=b[a];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(H("duplicate-security-scope","error",`${p}[${n}].${a} contains duplicate scope values`,[...o,n,a])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(H("non-oauth-scope-misuse","error",`${p}[${n}].${a} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,a])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(a)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(H("uncatalogued-oauth-scope","warning",`${p}[${n}].${a} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,a,y]))})}}})}e(r.security,"security",["security"]),(r.transports??[]).forEach((t,p)=>{e(t.security,`transports[${p}].security`,["transports",p,"security"])});for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${t}[${i}].security`,[t,i,"security"])})}function ud(r,s,d){let b=Zt(r.protocolVersions??[]),u=new Set;function f(t,p,o,i){let n=new Set(p);for(let a of t)n.has(a)||d.push(H("protocol-scope-outside-parent","error",`${o} includes protocol version ${a} outside its parent scope`,i))}(r.transports??[]).forEach((t,p)=>{let o=ir(r,t,b);f(o,b,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let t of b)u.has(t)||d.push(H("transport-coverage-gap","error",`protocol version ${t} is present at the root but not covered by any transport`,["protocolVersions"]));let e=r.capabilities??[];e.forEach((t,p)=>{let o=ir(r,t,b);f(o,b,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let t=0;t0&&d.push(H("capability-scope-overlap","error",`capabilities[${t}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",t,"protocolVersions"]))}for(let[t,p,o]of[["tools",r.tools??[],"name"],["prompts",r.prompts??[],"name"],["resources",r.resources??[],"uri"],["resourceTemplates",r.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,a)=>{let l=n[o],c=ir(r,n,b);f(c,b,`${t}[${a}].protocolVersions`,[t,a,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=ir(r,m,c);f(y,c,`${t}[${a}].elicitations[${w}].protocolVersions`,[t,a,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=cm(c,m.scope);w.length>0&&d.push(H("primitive-scope-overlap","error",`${t}[${a}] with identifier ${JSON.stringify(l)} overlaps ${t}[${m.index}] for protocol versions ${w.join(", ")}`,[t,a,"protocolVersions"]))}h.push({index:a,scope:c}),i.set(l,h)})}}function cd(r,s,d){let b=Zt(r.protocolVersions??[]);function u(f,e,t,p){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(H("elicitation-form-schema-version-mismatch","error",`${t}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(H("elicitation-form-required-property-unknown","error",`${t}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let a=`${t}.properties[${JSON.stringify(i)}]`,l=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(H("elicitation-form-schema-version-mismatch","error",`${a} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(H("elicitation-form-schema-version-mismatch","error",`${a}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(H("elicitation-form-enum-names-mismatch","error",`${a}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(H("elicitation-form-default-outside-enum","error",`${a}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(H("elicitation-form-default-outside-enum","error",`${a}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(H("elicitation-form-invalid-range","error",`${a}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(H("elicitation-form-invalid-range","error",`${a}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(H("elicitation-form-invalid-range","error",`${a}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])e.forEach((t,p)=>{let o=ir(r,t,b),i=new Set;(t.elicitations??[]).forEach((n,a)=>{let l=`${f}[${p}].elicitations[${a}]`,c=[f,p,"elicitations",a];i.has(n.name)&&d.push(H("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=ir(r,n,o);for(let m of h)oe.get(m){let p=ir(r,e,b);if(e.type==="streamable-http")for(let o of p)oe.get(o)>=oe.get("2025-03-26")||d.push(H("transport-not-supported-by-version","error",`transports[${t}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",t,"type"]));if(e.type==="sse")for(let o of p)oe.get(o){let p=ir(r,e,b),o=["tools",t];u(`tools[${t}]`,o,e,"title","2025-06-18",p),u(`tools[${t}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${t}]`,o,e,"_meta","2025-06-18",p),u(`tools[${t}]`,o,e,"annotations","2025-03-26",p),f(`tools[${t}]`,o,e,"execution","2025-11-25",p),u(`tools[${t}]`,o,e,"icons","2025-11-25",p)});for(let[e,t]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])t.forEach((p,o)=>{let i=ir(r,p,b),n=[e,o];if(u(`${e}[${o}]`,n,p,"title","2025-06-18",i),u(`${e}[${o}]`,n,p,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,p,"icons","2025-11-25",i),e!=="prompts"&&p.annotations?.lastModified!==void 0)for(let a of i)oe.get(a)>=oe.get("2025-06-18")||d.push(H("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${a}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((a,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],a,"title","2025-06-18",i)})});(r.capabilities??[]).forEach((e,t)=>{let p=ir(r,e,b),o=["capabilities",t];if("completions"in e&&u(`capabilities[${t}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${t}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&d.push(H("tasks-core-not-valid-in-2026","error",`capabilities[${t}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of p)oe.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of dd){let i=b[o];Array.isArray(i)?i.forEach((n,a)=>d(n,`${u}.${o}[${a}]`,[...f,o,a],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let p=b.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(r,"inputSchema",["inputSchema"],!0,!1),s}function Pd(r,s,d,b,u){let f=$d(r.inputSchema);if(!f.length)return;for(let t of d)t!=="2026-07-28"&&u.push(H("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${t}`,["tools",s,"inputSchema"]));let e=new Map;for(let t of f){let p=`tools[${s}].${t.location}.x-mcp-header`,o=["tools",s,...t.path,"x-mcp-header"];if(t.staticallyReachable||u.push(H("invalid-x-mcp-header","error",`${p} is not on a property statically reachable from the schema root through properties only`,o)),typeof t.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(t.value)){u.push(H("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(t.type)||u.push(H("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=t.value.toLowerCase(),n=e.get(i);n?u.push(H("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function wd(r,s,d,b,u){if(Object.hasOwn(r,"properties")){let f=r.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(H("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${xt}`,[...d,"properties"]));else for(let[e,t]of Object.entries(f))t&&typeof t=="object"&&!Array.isArray(t)||u.push(H("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${xt}`,[...d,"properties",e]))}Object.hasOwn(r,"required")&&(!Array.isArray(r.required)||r.required.some(f=>typeof f!="string"))&&u.push(H("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${xt}`,[...d,"required"]))}function kd(r,s,d){let b=Zt(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{let e=ir(r,u,b);for(let t of["inputSchema","outputSchema"]){let p=u[t];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${f}].${t}`,i=["tools",f,t],n=e.some(l=>oe.get(l)oe.get(l)>=oe.get(xt));if(Object.hasOwn(p,"$schema"))for(let l of e)oe.get(l)>=oe.get(xt)||d.push(H("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${xt} or later`,[...i,"$schema"]));if(n&&wd(p,o,i,s,d),a){let l=bm(p);if(!l)d.push(H("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=wp(l);try{if(c.validateSchema(p,!0))c.compile(p);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(H("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=$m(p);try{if(!m.externalReferences.length)throw h;wp(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(H("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(H("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(t==="outputSchema"&&p.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(H("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}Pd(u,f,e,s,d)})}function dm(r,s,d,b,u,f){if(r.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(H("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of r.required??[])Object.hasOwn(s,e)||f.push(H("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(r.additionalProperties===!1&&r.properties&&typeof r.properties=="object")for(let e of Object.keys(s))Object.hasOwn(r.properties,e)||f.push(H("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function hm(r,s,d,b,u,f){let e=bm(r);if(!e)return;let t=$m(r);if(t.externalReferences.length){let p=[...new Set(t.externalReferences)].sort();f.push(H("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let p=wp(e).compile(r);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(H("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function jd(r,s,d){let b=Zt(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=ir(r,u,b),t=e.filter(o=>oe.get(o)oe.get(o)>=oe.get(xt));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,a=["tools",f,"examples",o],l=i.result??{},c=[...a,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(H("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(H("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(H("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(H("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&oe.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&oe.get(m){Object.hasOwn(t,"_meta")&&oe.get(e){let n=`${b}.result.contents[${i}]`,a=[...u,"result","contents",i];if(o.uri===s&&(p=!0,r.mimeType&&o.mimeType&&o.mimeType!==r.mimeType&&e.push(H("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(r.mimeType)}`,[...a,"mimeType"])),r.size!==void 0)){let l=typeof o.text=="string"?bd.encode(o.text).byteLength:typeof o.blob=="string"&&gm(o.blob)?vd(o.blob):void 0;l!==void 0&&l!==r.size&&e.push(H("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${r.size}`,a))}typeof o.blob=="string"&&!gm(o.blob)&&e.push(H("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...a,"blob"]))}),p||e.push(H("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function qd(r,s,d){let b=Zt(r.protocolVersions??[]);for(let[u,f]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]]])f.forEach((e,t)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=ir(r,e,b),o;if(u==="resourceTemplates")try{o=new Fe,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(H("resource-template-example-invalid-template","error",`${u}[${t}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,t,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let a=`${u}[${t}].examples[${JSON.stringify(i)}]`,l=[u,t,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(H("resource-template-example-invalid-expansion","error",`${a}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),Od(c,p,`${a}.result`,[...l,"result"],s,d),typeof h=="string"&&Ad(e,h,c,a,l,s,d)}})}function Pm(r,s="document"){let d=[];return ud(r,s,d),fd(r,s,d),md(r,s,d),yd(r,s,d),cd(r,s,d),ld(r,s,d),kd(r,s,d),jd(r,s,d),qd(r,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var km=new Ee({allErrors:!0,strict:!1});Ae(km);var wm=km.compile(um),jm=["tools","resources","resourceTemplates","prompts"],xd=["schemas","toolExamples","resourceExamples","resourceTemplateExamples"],zd=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),Ed=new Set(["io.modelcontextprotocol/tasks"]),Nd={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function Lt(r,s,d,b){return{code:r,severity:s,message:d,path:b}}function _d(r){if(typeof r!="string"||!r.includes("/"))return!1;let s=r.slice(0,r.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function ga(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)&&Object.hasOwn(r,"$componentRef")}function kp(r,s,d,b){return{code:r,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function Td(r,s="document"){let d=structuredClone(r),b=[],u=0;function f(e,t,p,o=[]){let i=/^#\/components\/([^/]+)\/([^/]+)$/.exec(e?.$componentRef??"");if(!i)return e;let[,n,a]=i;if(n!==t)return b.push(kp("wrong-component-reference-namespace",s,`must target #/components/${t}, not #/components/${n}`,p)),e;let l=`${n}/${a}`;if(o.includes(l))return b.push(kp("component-reference-cycle",s,`forms a cycle through ${[...o,l].join(" -> ")}`,p)),e;let c=r?.components?.[n]?.[a];return c===void 0?(b.push(kp("missing-component-reference-target",s,`targets missing component ${JSON.stringify(e.$componentRef)}`,p)),e):(u+=1,ga(c)?f(c,t,p,[...o,l]):structuredClone(c))}for(let e of xd)for(let[t,p]of Object.entries(r?.components?.[e]??{}))ga(p)&&(d.components[e][t]=f(p,e,["components",e,t],[`${e}/${t}`]));for(let[e,t]of Object.entries({tools:r?.tools,resources:r?.resources,resourceTemplates:r?.resourceTemplates}))for(let[p,o]of(t??[]).entries()){let i=d[e][p];if(e==="tools")for(let a of["inputSchema","outputSchema"])ga(o[a])&&(i[a]=f(o[a],"schemas",[e,p,a]));let n=e==="tools"?"toolExamples":e==="resources"?"resourceExamples":"resourceTemplateExamples";for(let[a,l]of Object.entries(o.examples??{}))ga(l)&&(i.examples[a]=f(l,n,[e,p,"examples",a]))}for(let e of jm)for(let[t,p]of(r?.[e]??[]).entries())for(let[o,i]of(p.elicitations??[]).entries())ga(i.requestedSchema)&&(d[e][t].elicitations[o].requestedSchema=f(i.requestedSchema,"schemas",[e,t,"elicitations",o,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:u}}function Zd(r,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(r)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function vm(r){return wm(r)?[]:(wm.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:Zd(r,s)}))}function Sd(r){let s=[],d=r.protocolVersions??[];function b(t,p,o,i){s.push(Lt("client-requirement-version-mismatch","error",`${t} member ${JSON.stringify(i)} is not defined by MCP ${o}`,[...p,i]))}function u(t,p,o,i){return t&&typeof t=="object"&&!Array.isArray(t)?!0:(s.push(Lt("invalid-client-requirement-value","error",`${p} must be an object for MCP ${i}`,o)),!1)}function f(t,p,o,i,n){if(!u(t,o,i,n))return!1;for(let a of Object.keys(t))p.has(a)||b(o,i,n,a);return!0}function e(t,p,o,i){f(t,new Set(["list","cancel","requests"]),p,o,i);for(let n of["list","cancel"])Object.hasOwn(t,n)&&u(t[n],`${p}.${n}`,[...o,n],i);if(!(!Object.hasOwn(t,"requests")||!u(t.requests,`${p}.requests`,[...o,"requests"],i))){f(t.requests,new Set(["sampling","elicitation"]),`${p}.requests`,[...o,"requests"],i);for(let[n,a]of[["sampling","createMessage"],["elicitation","create"]]){if(!Object.hasOwn(t.requests,n))continue;let l=t.requests[n],c=[...o,"requests",n];f(l,new Set([a]),`${p}.requests.${n}`,c,i)&&Object.hasOwn(l,a)&&u(l[a],`${p}.requests.${n}.${a}`,[...c,a],i)}}}for(let t of jm)for(let[p,o]of(r[t]??[]).entries()){let i=o.clientRequirements;if(!i||typeof i!="object"||Array.isArray(i))continue;let n=o.protocolVersions??d,a=`${t}[${p}].clientRequirements`,l=[t,p,"clientRequirements"];for(let c of n){let h=Nd[c]??new Set;for(let[m,w]of Object.entries(i)){if(m.startsWith("x-"))continue;if(zd.has(m)&&!h.has(m)){s.push(Lt("client-requirement-version-mismatch","error",`${a}.${m} is not defined by MCP ${c}; split the primitive into disjoint protocol-scoped variants when requirements differ`,[...l,m]));continue}if(!h.has(m))continue;let y=`${a}.${m}`,$=[...l,m];if(m==="roots")f(w,c==="2026-07-28"?new Set:new Set(["listChanged"]),y,$,c),c!=="2026-07-28"&&Object.hasOwn(w,"listChanged")&&typeof w.listChanged!="boolean"&&s.push(Lt("invalid-client-requirement-value","error",`${y}.listChanged must be a boolean for MCP ${c}`,[...$,"listChanged"]));else if(m==="sampling"&&["2025-11-25","2026-07-28"].includes(c)){f(w,new Set(["context","tools"]),y,$,c);for(let g of["context","tools"])Object.hasOwn(w,g)&&u(w[g],`${y}.${g}`,[...$,g],c);Object.hasOwn(w,"context")&&s.push(Lt("deprecated-client-requirement","warning",`${y}.context uses deprecated MCP context-inclusion capability semantics in MCP ${c}`,[...$,"context"]))}else if(m==="elicitation"&&["2025-11-25","2026-07-28"].includes(c)){f(w,new Set(["form","url"]),y,$,c);for(let g of["form","url"])Object.hasOwn(w,g)&&u(w[g],`${y}.${g}`,[...$,g],c)}else if(m==="tasks")e(w,y,$,c);else if(m==="extensions")for(let g of Object.keys(w))_d(g)&&!Ed.has(g)&&s.push(Lt("unknown-reserved-extension-identifier","warning",`${y} contains unrecognized extension ${JSON.stringify(g)} under an MCP-reserved prefix; preserve it and review its authority`,[...$,g]));c==="2026-07-28"&&["roots","sampling"].includes(m)&&s.push(Lt("deprecated-client-requirement","warning",`${y} requires an MCP capability deprecated in MCP ${c}`,$))}}}return s}function Id(r,s="document"){let d=Td(r,s),b=d.diagnostics.length||d.substitutions===0?[]:vm(d.document),u=[...d.diagnostics,...b,...d.diagnostics.length||b.length?[]:Pm(d.document,s),...Sd(r)];return(Object.hasOwn(r,"transports")?u:u.filter(e=>e.code!=="transport-coverage-gap")).sort((e,t)=>e.code.localeCompare(t.code)||e.message.localeCompare(t.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(t.path)))}function Om(r){let s=vm(r);return s.length?s:Id(r)}var jp="0.8.0-draft.3",Cd="v0.8.0-draft.3",Vd="8823c1f1946360b2a44d00920e2092e5e4acd139a1964befad4eb0bf3ce96002";function Dd(r){let s=Om(r);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var Tp={};Ft(Tp,{schemaSha256:()=>Nh,snapshotTag:()=>Eh,specification:()=>_p,supportedProtocolVersions:()=>ba,validate:()=>_h});var Am={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json",title:"MCP Description",description:"MCP Description 0.8.0 Community Working Draft 4 (v0.8.0-draft.4; unreleased).",type:"object",required:["mcpdesc","info","protocolVersions"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},components:{$ref:"#/$defs/components"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/tool"}},resources:{type:"array",minItems:1,items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",minItems:1,items:{$ref:"#/$defs/prompt"}},tags:{type:"array",minItems:1,items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},clientCapabilityValue:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},clientCapabilityRequirements:{type:"object",minProperties:1,properties:{roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},elicitation:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}},jsonSchemaObject:{type:"object",additionalProperties:!0},referenceObject:{type:"object",required:["$componentRef"],properties:{$componentRef:{type:"string",pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"}},additionalProperties:!1},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icons:{type:"array",minItems:1,items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}]},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}},elicitationInteractionFormRequest:{type:"object",required:["mode","message","requestedSchema"],properties:{mode:{const:"form"},message:{type:"string",minLength:1},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},additionalProperties:!1},elicitationInteractionUrlRequest:{type:"object",required:["mode","message","url"],properties:{mode:{const:"url"},message:{type:"string",minLength:1},url:{type:"string",format:"uri"}},additionalProperties:!1},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionAcceptedResponse:{type:"object",required:["action"],properties:{action:{const:"accept"},content:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}}},additionalProperties:!1},elicitationInteractionDeclinedResponse:{type:"object",required:["action"],properties:{action:{enum:["decline","cancel"]}},additionalProperties:!1},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},samplingModelHint:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1}},additionalProperties:!1},samplingModelPreferences:{type:"object",properties:{hints:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingModelHint"}},costPriority:{type:"number",minimum:0,maximum:1},speedPriority:{type:"number",minimum:0,maximum:1},intelligencePriority:{type:"number",minimum:0,maximum:1}},additionalProperties:!1},samplingToolChoice:{type:"object",required:["mode"],properties:{mode:{enum:["auto","required","none"]}},additionalProperties:!1},samplingRequestTool:{type:"object",required:["name","inputSchema"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]},annotations:{$ref:"#/$defs/toolAnnotations"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},samplingToolUseContent:{type:"object",required:["type","id","name","input"],properties:{type:{const:"tool_use"},id:{type:"string"},name:{type:"string"},input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}}},additionalProperties:!1},samplingToolResultContent:{type:"object",required:["type","toolUseId","content"],properties:{type:{const:"tool_result"},toolUseId:{type:"string"},content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{type:"array",minItems:1,items:{$ref:"#/$defs/toolResultContent"}}]},isError:{type:"boolean"}},additionalProperties:!1},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{type:"array",minItems:1,items:{$ref:"#/$defs/samplingContentBlock"}}]},samplingMessage:{type:"object",required:["role","content"],properties:{role:{enum:["user","assistant"]},content:{$ref:"#/$defs/samplingMessageContent"}},additionalProperties:!1},samplingCreateMessageRequest:{type:"object",required:["messages","maxTokens"],properties:{messages:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingMessage"}},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},systemPrompt:{type:"string"},includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{type:"integer",minimum:1},temperature:{type:"number"},stopSequences:{type:"array",items:{type:"string"}},metadata:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingRequestTool"}},toolChoice:{$ref:"#/$defs/samplingToolChoice"}},additionalProperties:!1},samplingCreateMessageResult:{type:"object",required:["role","content","model"],properties:{role:{const:"assistant"},content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},stopReason:{type:"string"}},additionalProperties:!1},rootDeclaration:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"uri"},name:{type:"string"}},additionalProperties:!1},rootsListRequest:{type:"object",maxProperties:0,additionalProperties:!1},rootsListResult:{type:"object",required:["roots"],properties:{roots:{type:"array",items:{$ref:"#/$defs/rootDeclaration"}}},additionalProperties:!1},toolInteractionElicitationStep:{type:"object",required:["type","request","response"],properties:{type:{const:"elicitation"},declaration:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionSamplingStep:{type:"object",required:["type","request","response"],properties:{type:{const:"sampling"},request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionRootsStep:{type:"object",required:["type","request","response"],properties:{type:{const:"roots"},request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolInteractionExample:{type:"object",required:["input","steps","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},steps:{type:"array",minItems:1,items:{$ref:"#/$defs/toolInteractionStep"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/toolInteractionExample"}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}},promptMessageExample:{type:"object",required:["role","content"],properties:{role:{type:"string",enum:["user","assistant"]},content:{$ref:"#/$defs/toolResultContent"}},additionalProperties:!1},completedPromptResultExample:{type:"object",required:["messages"],properties:{resultType:{const:"complete"},description:{type:"string"},messages:{type:"array",items:{$ref:"#/$defs/promptMessageExample"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},promptExample:{type:"object",required:["result"],properties:{arguments:{type:"object",additionalProperties:{type:"string"}},result:{$ref:"#/$defs/completedPromptResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}},completionArgument:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionContext:{type:"object",required:["arguments"],properties:{arguments:{type:"object",minProperties:1,additionalProperties:{type:"string"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionResult:{type:"object",required:["values"],properties:{values:{type:"array",maxItems:100,items:{type:"string"}},total:{type:"integer",minimum:0},hasMore:{type:"boolean"}},additionalProperties:!0},completedCompletionResultExample:{type:"object",required:["completion"],properties:{resultType:{const:"complete"},completion:{$ref:"#/$defs/completionResult"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},completionExample:{type:"object",required:["argument","result"],properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/completionExample"}},componentMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"}},components:{type:"object",minProperties:1,properties:{schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string",minLength:1},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]}]},outputSchema:{$ref:"#/$defs/schemaComponentValue"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},completionExamples:{$ref:"#/$defs/completionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string"},arguments:{type:"array",minItems:1,items:{$ref:"#/$defs/promptArgument"}},examples:{$ref:"#/$defs/promptExamples"},completionExamples:{$ref:"#/$defs/completionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},extensionCapabilities:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}}};var ba=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),ne=new Map(ba.map((r,s)=>[r,s])),zt="2025-11-25",Op="2025-06-18",Md=new Set(["io.modelcontextprotocol/tasks"]),Ud=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function Ap(r){let s=r==="2020-12"?Ee:Qe,d=new s({allErrors:!0,strict:!1});return Ae(d),d}function St(r){return[...r].sort((s,d)=>ne.get(s)-ne.get(d))}function or(r,s,d){return St(s?.protocolVersions??d??r.protocolVersions??[])}function qm(r,s){let d=new Set(s);return r.filter(b=>d.has(b))}function Ld(r){if(!r||typeof r!="object")return new Set;let s=new Set;if(r.type==="oauth2")for(let d of Object.values(r.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function _m(r){let s=r?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function Tm(r){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(r),externalReferences:s}}function W(r,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${r} is missing an explicit path`);return{code:r,severity:s,message:d,path:b}}function Fd(r){if(typeof r!="string")return!1;let[s]=r.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function Jd(r,s){if(typeof r!="string"||!r.includes("/"))return!1;let d=r.slice(0,r.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function xm(r){return r&&typeof r=="object"&&!Array.isArray(r)&&typeof r.name=="string"&&typeof r.version=="string"}function Hd(r,s,d){let b=St(r.protocolVersions??[]),u=b.filter(t=>ne.get(t)0;else return!1;return l?c||d.push(W("meta-reserved-key-value","error",`${n}[${JSON.stringify(t)}] has an invalid value for MCP ${i}`,[...a,t])):d.push(W("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(t)} in a ${o} context where MCP ${i} does not define it`,[...a,t])),!0}function e(t,p,o,i,n){if(!(!t||typeof t!="object"||Array.isArray(t)))for(let[a,l]of Object.entries(t)){if(!Ud.test(a)){d.push(W("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(a)}`,[...n,a]));continue}for(let c of o.filter(h=>ne.get(h)>=ne.get(Op)))f(a,l,p,c,i,n)||Jd(a,c)&&d.push(W("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(a)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,a]))}}for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{let n=or(r,o,b),a=[t,i];if(e(o._meta,"declaration",n,`${t}[${i}]._meta`,[...a,"_meta"]),t==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(t!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function Wd(r,s,d){let b=new Set;if((r.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(W("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(r,"tags"))for(let[u,f]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])f.forEach((e,t)=>{(e.tags??[]).forEach((p,o)=>{b.has(p)||d.push(W("unknown-tag-reference","error",`${u}[${t}] references undeclared tag ${JSON.stringify(p)}`,[u,t,"tags",o]))})})}function Kd(r,s,d){let b=r.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([t,p])=>[t,Ld(p)]));function e(t,p,o){Array.isArray(t)&&t.forEach((i,n)=>{for(let[a,l]of Object.entries(i)){if(!u.has(a)){d.push(W("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(a)}`,[...o,n,a]));continue}let c=b[a];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(W("duplicate-security-scope","error",`${p}[${n}].${a} contains duplicate scope values`,[...o,n,a])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(W("non-oauth-scope-misuse","error",`${p}[${n}].${a} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,a])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(a)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(W("uncatalogued-oauth-scope","warning",`${p}[${n}].${a} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,a,y]))})}}})}e(r.security,"security",["security"]),(r.transports??[]).forEach((t,p)=>{e(t.security,`transports[${p}].security`,["transports",p,"security"])});for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${t}[${i}].security`,[t,i,"security"])})}function Bd(r,s,d){let b=St(r.protocolVersions??[]),u=new Set;function f(t,p,o,i){let n=new Set(p);for(let a of t)n.has(a)||d.push(W("protocol-scope-outside-parent","error",`${o} includes protocol version ${a} outside its parent scope`,i))}(r.transports??[]).forEach((t,p)=>{let o=or(r,t,b);f(o,b,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let t of b)u.has(t)||d.push(W("transport-coverage-gap","error",`protocol version ${t} is present at the root but not covered by any transport`,["protocolVersions"]));let e=r.capabilities??[];e.forEach((t,p)=>{let o=or(r,t,b);f(o,b,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let t=0;t0&&d.push(W("capability-scope-overlap","error",`capabilities[${t}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",t,"protocolVersions"]))}for(let[t,p,o]of[["tools",r.tools??[],"name"],["prompts",r.prompts??[],"name"],["resources",r.resources??[],"uri"],["resourceTemplates",r.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,a)=>{let l=n[o],c=or(r,n,b);f(c,b,`${t}[${a}].protocolVersions`,[t,a,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=or(r,m,c);f(y,c,`${t}[${a}].elicitations[${w}].protocolVersions`,[t,a,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=qm(c,m.scope);w.length>0&&d.push(W("primitive-scope-overlap","error",`${t}[${a}] with identifier ${JSON.stringify(l)} overlaps ${t}[${m.index}] for protocol versions ${w.join(", ")}`,[t,a,"protocolVersions"]))}h.push({index:a,scope:c}),i.set(l,h)})}}function Qd(r,s,d){let b=St(r.protocolVersions??[]);function u(f,e,t,p){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(W("elicitation-form-schema-version-mismatch","error",`${t}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(W("elicitation-form-required-property-unknown","error",`${t}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let a=`${t}.properties[${JSON.stringify(i)}]`,l=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(W("elicitation-form-schema-version-mismatch","error",`${a} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(W("elicitation-form-schema-version-mismatch","error",`${a}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(W("elicitation-form-enum-names-mismatch","error",`${a}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(W("elicitation-form-default-outside-enum","error",`${a}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(W("elicitation-form-default-outside-enum","error",`${a}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(W("elicitation-form-invalid-range","error",`${a}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(W("elicitation-form-invalid-range","error",`${a}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(W("elicitation-form-invalid-range","error",`${a}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])e.forEach((t,p)=>{let o=or(r,t,b),i=new Set;(t.elicitations??[]).forEach((n,a)=>{let l=`${f}[${p}].elicitations[${a}]`,c=[f,p,"elicitations",a];i.has(n.name)&&d.push(W("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=or(r,n,o);for(let m of h)ne.get(m){let p=or(r,e,b);if(e.type==="streamable-http")for(let o of p)ne.get(o)>=ne.get("2025-03-26")||d.push(W("transport-not-supported-by-version","error",`transports[${t}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",t,"type"]));if(e.type==="sse")for(let o of p)ne.get(o){let p=or(r,e,b),o=["tools",t];u(`tools[${t}]`,o,e,"title","2025-06-18",p),u(`tools[${t}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${t}]`,o,e,"_meta","2025-06-18",p),u(`tools[${t}]`,o,e,"annotations","2025-03-26",p),f(`tools[${t}]`,o,e,"execution","2025-11-25",p),u(`tools[${t}]`,o,e,"icons","2025-11-25",p)});for(let[e,t]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])t.forEach((p,o)=>{let i=or(r,p,b),n=[e,o];if(u(`${e}[${o}]`,n,p,"title","2025-06-18",i),u(`${e}[${o}]`,n,p,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,p,"icons","2025-11-25",i),e!=="prompts"&&p.annotations?.lastModified!==void 0)for(let a of i)ne.get(a)>=ne.get("2025-06-18")||d.push(W("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${a}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((a,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],a,"title","2025-06-18",i)})});(r.capabilities??[]).forEach((e,t)=>{let p=or(r,e,b),o=["capabilities",t];if("completions"in e&&u(`capabilities[${t}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${t}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&d.push(W("tasks-core-not-valid-in-2026","error",`capabilities[${t}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of p)ne.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of Gd){let i=b[o];Array.isArray(i)?i.forEach((n,a)=>d(n,`${u}.${o}[${a}]`,[...f,o,a],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let p=b.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(r,"inputSchema",["inputSchema"],!0,!1),s}function sh(r,s,d,b,u){let f=th(r.inputSchema);if(!f.length)return;for(let t of d)t!=="2026-07-28"&&u.push(W("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${t}`,["tools",s,"inputSchema"]));let e=new Map;for(let t of f){let p=`tools[${s}].${t.location}.x-mcp-header`,o=["tools",s,...t.path,"x-mcp-header"];if(t.staticallyReachable||u.push(W("invalid-x-mcp-header","error",`${p} is not on a property statically reachable from the schema root through properties only`,o)),typeof t.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(t.value)){u.push(W("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(t.type)||u.push(W("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=t.value.toLowerCase(),n=e.get(i);n?u.push(W("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function ih(r,s,d,b,u){if(Object.hasOwn(r,"properties")){let f=r.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(W("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${zt}`,[...d,"properties"]));else for(let[e,t]of Object.entries(f))t&&typeof t=="object"&&!Array.isArray(t)||u.push(W("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${zt}`,[...d,"properties",e]))}Object.hasOwn(r,"required")&&(!Array.isArray(r.required)||r.required.some(f=>typeof f!="string"))&&u.push(W("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${zt}`,[...d,"required"]))}function oh(r,s,d){let b=St(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{let e=or(r,u,b);for(let t of["inputSchema","outputSchema"]){let p=u[t];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${f}].${t}`,i=["tools",f,t],n=e.some(l=>ne.get(l)ne.get(l)>=ne.get(zt));if(Object.hasOwn(p,"$schema"))for(let l of e)ne.get(l)>=ne.get(zt)||d.push(W("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${zt} or later`,[...i,"$schema"]));if(n&&ih(p,o,i,s,d),a){let l=_m(p);if(!l)d.push(W("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=Ap(l);try{if(c.validateSchema(p,!0))c.compile(p);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(W("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=Tm(p);try{if(!m.externalReferences.length)throw h;Ap(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(W("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(W("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(t==="outputSchema"&&p.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(W("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}sh(u,f,e,s,d)})}function zm(r,s,d,b,u,f){if(r.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(W("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of r.required??[])Object.hasOwn(s,e)||f.push(W("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(r.additionalProperties===!1&&r.properties&&typeof r.properties=="object")for(let e of Object.keys(s))Object.hasOwn(r.properties,e)||f.push(W("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function Em(r,s,d,b,u,f){let e=_m(r);if(!e)return;let t=Tm(r);if(t.externalReferences.length){let p=[...new Set(t.externalReferences)].sort();f.push(W("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let p=Ap(e).compile(r);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(W("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function nh(r,s,d){let b=St(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=or(r,u,b),t=e.filter(o=>ne.get(o)ne.get(o)>=ne.get(zt));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,a=["tools",f,"examples",o],l=i.result??{},c=[...a,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(W("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(W("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(W("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(W("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&ne.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&ne.get(m){Object.hasOwn(t,"_meta")&&ne.get(e){let n=`${b}.result.contents[${i}]`,a=[...u,"result","contents",i];if(o.uri===s&&(p=!0,r.mimeType&&o.mimeType&&o.mimeType!==r.mimeType&&e.push(W("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(r.mimeType)}`,[...a,"mimeType"])),r.size!==void 0)){let l=typeof o.text=="string"?rh.encode(o.text).byteLength:typeof o.blob=="string"&&Nm(o.blob)?ah(o.blob):void 0;l!==void 0&&l!==r.size&&e.push(W("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${r.size}`,a))}typeof o.blob=="string"&&!Nm(o.blob)&&e.push(W("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...a,"blob"]))}),p||e.push(W("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function mh(r,s,d){let b=St(r.protocolVersions??[]);for(let[u,f]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]]])f.forEach((e,t)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=or(r,e,b),o;if(u==="resourceTemplates")try{o=new Fe,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(W("resource-template-example-invalid-template","error",`${u}[${t}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,t,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let a=`${u}[${t}].examples[${JSON.stringify(i)}]`,l=[u,t,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(W("resource-template-example-invalid-expansion","error",`${a}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),ph(c,p,`${a}.result`,[...l,"result"],s,d),typeof h=="string"&&lh(e,h,c,a,l,s,d)}})}function qp(r,s="document"){let d=[];return Bd(r,s,d),Kd(r,s,d),Wd(r,s,d),Yd(r,s,d),Qd(r,s,d),Hd(r,s,d),oh(r,s,d),nh(r,s,d),mh(r,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var zp="__interaction_example__",Np=new Ee({allErrors:!0,strict:!1});Ae(Np);var Im=new Qe({allErrors:!0,strict:!1});Ae(Im);var Zm=Np.compile(Am),Cm=["tools","resources","resourceTemplates","prompts"],fh=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],uh=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),ch=new Set(["io.modelcontextprotocol/tasks"]),qe=new Map(ba.map((r,s)=>[r,s])),yh={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function me(r,s,d,b){return{code:r,severity:s,message:d,path:b}}function dh(r){if(typeof r!="string"||!r.includes("/"))return!1;let s=r.slice(0,r.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function $a(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)&&Object.hasOwn(r,"$componentRef")}function xp(r,s,d,b){return{code:r,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function hh(r,s="document"){let d=structuredClone(r),b=[],u=0;function f(e,t,p,o=[]){let i=/^#\/components\/([^/]+)\/([^/]+)$/.exec(e?.$componentRef??"");if(!i)return e;let[,n,a]=i;if(n!==t)return b.push(xp("wrong-component-reference-namespace",s,`must target #/components/${t}, not #/components/${n}`,p)),e;let l=`${n}/${a}`;if(o.includes(l))return b.push(xp("component-reference-cycle",s,`forms a cycle through ${[...o,l].join(" -> ")}`,p)),e;let c=r?.components?.[n]?.[a];return c===void 0?(b.push(xp("missing-component-reference-target",s,`targets missing component ${JSON.stringify(e.$componentRef)}`,p)),e):(u+=1,$a(c)?f(c,t,p,[...o,l]):structuredClone(c))}for(let e of fh)for(let[t,p]of Object.entries(r?.components?.[e]??{}))$a(p)&&(d.components[e][t]=f(p,e,["components",e,t],[`${e}/${t}`]));for(let[e,t]of Object.entries({tools:r?.tools,resources:r?.resources,resourceTemplates:r?.resourceTemplates,prompts:r?.prompts}))for(let[p,o]of(t??[]).entries()){let i=d[e][p];if(e==="tools")for(let a of["inputSchema","outputSchema"])$a(o[a])&&(i[a]=f(o[a],"schemas",[e,p,a]));let n=e==="tools"?"toolExamples":e==="resources"?"resourceExamples":e==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[a,l]of Object.entries(o.examples??{}))$a(l)&&(i.examples[a]=f(l,n,[e,p,"examples",a]))}for(let e of Cm)for(let[t,p]of(r?.[e]??[]).entries())for(let[o,i]of(p.elicitations??[]).entries())$a(i.requestedSchema)&&(d[e][t].elicitations[o].requestedSchema=f(i.requestedSchema,"schemas",[e,t,"elicitations",o,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:u}}function gh(r,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(r)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function Vm(r){return Zm(r)?[]:(Zm.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:gh(r,s)}))}function Ep(r){return Array.isArray(r)?r.map(Ep):r&&typeof r=="object"?Object.fromEntries(Object.entries(r).sort(([s],[d])=>s.localeCompare(d)).map(([s,d])=>[s,Ep(d)])):r}function Sm(r){return JSON.stringify(Ep(r))}function bh(r,s,d){if(!Array.isArray(r.path))return r;let b=["tools",0,"examples",zp];return b.every((f,e)=>r.path[e]===f)?{...r,message:r.message.replace(`tools[0].examples[${JSON.stringify(zp)}]`,`tools[${s}].interactionExamples[${JSON.stringify(d)}]`),path:["tools",s,"interactionExamples",d,...r.path.slice(b.length)]}:r}function $h(r,s,d,b,u){let f={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:r.name,inputSchema:structuredClone(r.inputSchema),...r.outputSchema?{outputSchema:structuredClone(r.outputSchema)}:{},examples:{[zp]:{input:structuredClone(b.input),result:structuredClone(b.result)}}}]};return qp(f).map(e=>bh(e,s,d)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function Ph(r,s,d,b,u){try{let f=Np.compile(r);if(!f(s)){let e=f.errors?.map(t=>`${t.instancePath||"/"} ${t.message}`).join("; ")??"unknown validation error";u.push(me("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{try{let f=Im.compile(r);if(!f(s)){let e=f.errors?.map(t=>`${t.instancePath||"/"} ${t.message}`).join("; ")??"unknown validation error";u.push(me("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{}}}function wh(r,s,d,b,u){let f=r.clientRequirements;if(!f||typeof f!="object"||Array.isArray(f))return;function e(t,p){u.push(me("interaction-example-client-requirements-contradiction","warning",`${d} ${t}`,p))}if(s.type==="roots"){Object.hasOwn(f,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...b,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(f,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...b,"type"]);return}let t=f.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(t,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...b,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(t,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...b,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(f,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...b,"type"]);return}let t=f.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(t,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...b,"request","mode"]),s.request.mode==="form"&&Object.keys(t).length>0&&!Object.hasOwn(t,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...b,"request","mode"])}}function kh(r){let s=[],d=r.protocolVersions??[];for(let[b,u]of(r.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let f=u.protocolVersions??d;for(let[e,t]of Object.entries(u.interactionExamples)){if(!t||typeof t!="object"||Array.isArray(t))continue;let p=`tools[${b}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",b,"interactionExamples",e];s.push(...$h(u,b,e,t,f));for(let[i,n]of(t.steps??[]).entries()){let a=`${p}.steps[${i}]`,l=[...o,"steps",i];if(wh(u,n,a,l,s),n.type==="elicitation"){let c=n.request??{},h=n.response??{},m=typeof n.declaration=="string"?(u.elicitations??[]).find(w=>w.name===n.declaration):void 0;for(let w of f)qe.get(w)[t.name,t]));for(let[t,p]of Object.entries(u.examples)){if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`prompts[${b}].examples[${JSON.stringify(t)}]`,i=["prompts",b,"examples",t],n=p.result??{},a=[...i,"result"],l=p.arguments;if(l&&typeof l=="object"&&!Array.isArray(l))for(let[c]of Object.entries(l))e.has(c)||s.push(me("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,h]of e)h.required===!0&&!Object.hasOwn(l??{},c)&&s.push(me("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(me("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...a,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(me("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...a,c]));for(let c of f){let h=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(me("prompt-example-result-version-mismatch","error",`${h}.resultType must be "complete" for MCP ${c}`,[...a,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(me("prompt-example-result-version-mismatch","error",`${h}.resultType is not defined for MCP ${c}`,[...a,"resultType"])),Object.hasOwn(n,"_meta")&&qe.get(c){let y=`${h}.messages[${w}].content`,$=[...a,"messages",w,"content"];vh(m.content??{},y,$,c,s)})}}}return s}function Ah(r){let s=new Fe;return s.add(r),new Set(s.templates.flatMap(d=>d.parts).filter(d=>d.type==="expression").flatMap(d=>d.expressions.map(b=>b.name)))}function qh(r,s,d,b,u){let f=`${s}.result`,e=[...d,"result"];for(let t of["jsonrpc","id","error"])Object.hasOwn(r,t)&&u.push(me("completion-example-json-rpc-envelope","error",`${f} must not contain JSON-RPC envelope field ${JSON.stringify(t)}`,[...e,t]));for(let t of["task","inputRequests","requestState"])Object.hasOwn(r,t)&&u.push(me("incomplete-completion-example-result","error",`${f} must not contain non-completed workflow field ${JSON.stringify(t)}`,[...e,t]));b==="2026-07-28"&&r.resultType!=="complete"&&u.push(me("completion-example-result-version-mismatch","error",`${f}.resultType must be "complete" for MCP ${b}`,[...e,"resultType"])),b!=="2026-07-28"&&Object.hasOwn(r,"resultType")&&u.push(me("completion-example-result-version-mismatch","error",`${f}.resultType is not defined for MCP ${b}`,[...e,"resultType"])),Object.hasOwn(r,"_meta")&&qe.get(b)i.name));else try{o=Ah(e.uriTemplate)}catch(i){s.push(me("resource-template-completion-example-invalid-template","error",`${p}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[b,f,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let a=`${p}.completionExamples[${JSON.stringify(i)}]`,l=[b,f,"completionExamples",i],c=n.argument?.name,h=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(me(b==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",b==="prompts"?`${a}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${a}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...l,"argument","name"])),h&&typeof h=="object"&&!Array.isArray(h))for(let w of Object.keys(h))o&&!o.has(w)&&s.push(me(b==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",b==="prompts"?`${a}.context.arguments contains undeclared Prompt argument ${JSON.stringify(w)}`:`${a}.context.arguments contains no RFC 6570 variable ${JSON.stringify(w)} from ${JSON.stringify(e.uriTemplate)}`,[...l,"context","arguments",w])),w===c&&s.push(me("completion-example-duplicate-target-context","error",`${a}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(w)}`,[...l,"context","arguments",w]));let m=n.result??{};for(let w of t){if(qe.get(w)e.code!=="transport-coverage-gap")).sort((e,t)=>e.code.localeCompare(t.code)||e.message.localeCompare(t.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(t.path)))}function Dm(r){let s=Vm(r);return s.length?s:zh(r)}var _p="0.8.0-draft.4",Eh="v0.8.0-draft.4",Nh="93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b";function _h(r){let s=Dm(r);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var Lp={};Ft(Lp,{schemaSha256:()=>jg,snapshotTag:()=>kg,specification:()=>Up,supportedProtocolVersions:()=>Pa,validate:()=>vg});var Rm={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json",title:"MCP Description",description:"MCP Description 0.8.0 Release Candidate 1 (v0.8.0-rc.1; prerelease).",type:"object",required:["mcpdesc","info","protocolVersions"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},components:{$ref:"#/$defs/components"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/tool"}},resources:{type:"array",minItems:1,items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",minItems:1,items:{$ref:"#/$defs/prompt"}},tags:{type:"array",minItems:1,items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},clientCapabilityValue:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},clientCapabilityRequirements:{type:"object",minProperties:1,properties:{roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},elicitation:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}},jsonSchemaObject:{type:"object",additionalProperties:!0},referenceObject:{type:"object",required:["$componentRef"],properties:{$componentRef:{type:"string",pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"}},additionalProperties:!1},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icons:{type:"array",minItems:1,items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}]},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}},elicitationInteractionFormRequest:{type:"object",required:["mode","message","requestedSchema"],properties:{mode:{const:"form"},message:{type:"string",minLength:1},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},additionalProperties:!1},elicitationInteractionUrlRequest:{type:"object",required:["mode","message","url"],properties:{mode:{const:"url"},message:{type:"string",minLength:1},url:{type:"string",format:"uri"}},additionalProperties:!1},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionAcceptedResponse:{type:"object",required:["action"],properties:{action:{const:"accept"},content:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}}},additionalProperties:!1},elicitationInteractionDeclinedResponse:{type:"object",required:["action"],properties:{action:{enum:["decline","cancel"]}},additionalProperties:!1},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},samplingModelHint:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1}},additionalProperties:!1},samplingModelPreferences:{type:"object",properties:{hints:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingModelHint"}},costPriority:{type:"number",minimum:0,maximum:1},speedPriority:{type:"number",minimum:0,maximum:1},intelligencePriority:{type:"number",minimum:0,maximum:1}},additionalProperties:!1},samplingToolChoice:{type:"object",required:["mode"],properties:{mode:{enum:["auto","required","none"]}},additionalProperties:!1},samplingRequestTool:{type:"object",required:["name","inputSchema"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]},annotations:{$ref:"#/$defs/toolAnnotations"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},samplingToolUseContent:{type:"object",required:["type","id","name","input"],properties:{type:{const:"tool_use"},id:{type:"string"},name:{type:"string"},input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}}},additionalProperties:!1},samplingToolResultContent:{type:"object",required:["type","toolUseId","content"],properties:{type:{const:"tool_result"},toolUseId:{type:"string"},content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{type:"array",minItems:1,items:{$ref:"#/$defs/toolResultContent"}}]},isError:{type:"boolean"}},additionalProperties:!1},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{type:"array",minItems:1,items:{$ref:"#/$defs/samplingContentBlock"}}]},samplingMessage:{type:"object",required:["role","content"],properties:{role:{enum:["user","assistant"]},content:{$ref:"#/$defs/samplingMessageContent"}},additionalProperties:!1},samplingCreateMessageRequest:{type:"object",required:["messages","maxTokens"],properties:{messages:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingMessage"}},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},systemPrompt:{type:"string"},includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{type:"integer",minimum:1},temperature:{type:"number"},stopSequences:{type:"array",items:{type:"string"}},metadata:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingRequestTool"}},toolChoice:{$ref:"#/$defs/samplingToolChoice"}},additionalProperties:!1},samplingCreateMessageResult:{type:"object",required:["role","content","model"],properties:{role:{const:"assistant"},content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},stopReason:{type:"string"}},additionalProperties:!1},rootDeclaration:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"uri"},name:{type:"string"}},additionalProperties:!1},rootsListRequest:{type:"object",maxProperties:0,additionalProperties:!1},rootsListResult:{type:"object",required:["roots"],properties:{roots:{type:"array",items:{$ref:"#/$defs/rootDeclaration"}}},additionalProperties:!1},toolInteractionElicitationStep:{type:"object",required:["type","request","response"],properties:{type:{const:"elicitation"},declaration:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionSamplingStep:{type:"object",required:["type","request","response"],properties:{type:{const:"sampling"},request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionRootsStep:{type:"object",required:["type","request","response"],properties:{type:{const:"roots"},request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolInteractionExample:{type:"object",required:["input","steps","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},steps:{type:"array",minItems:1,items:{$ref:"#/$defs/toolInteractionStep"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/toolInteractionExample"}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}},promptMessageExample:{type:"object",required:["role","content"],properties:{role:{type:"string",enum:["user","assistant"]},content:{$ref:"#/$defs/toolResultContent"}},additionalProperties:!1},completedPromptResultExample:{type:"object",required:["messages"],properties:{resultType:{const:"complete"},description:{type:"string"},messages:{type:"array",items:{$ref:"#/$defs/promptMessageExample"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},promptExample:{type:"object",required:["result"],properties:{arguments:{type:"object",additionalProperties:{type:"string"}},result:{$ref:"#/$defs/completedPromptResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}},completionArgument:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionContext:{type:"object",required:["arguments"],properties:{arguments:{type:"object",minProperties:1,additionalProperties:{type:"string"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionResult:{type:"object",required:["values"],properties:{values:{type:"array",maxItems:100,items:{type:"string"}},total:{type:"integer",minimum:0},hasMore:{type:"boolean"}},additionalProperties:!0},completedCompletionResultExample:{type:"object",required:["completion"],properties:{resultType:{const:"complete"},completion:{$ref:"#/$defs/completionResult"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},completionExample:{type:"object",required:["argument","result"],properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/completionExample"}},componentMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"}},components:{type:"object",minProperties:1,properties:{schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string",minLength:1},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]}]},outputSchema:{$ref:"#/$defs/schemaComponentValue"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},completionExamples:{$ref:"#/$defs/completionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string"},arguments:{type:"array",minItems:1,items:{$ref:"#/$defs/promptArgument"}},examples:{$ref:"#/$defs/promptExamples"},completionExamples:{$ref:"#/$defs/completionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},extensionCapabilities:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}}};var Pa=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),ae=new Map(Pa.map((r,s)=>[r,s])),Et="2025-11-25",Zp="2025-06-18",Zh=new Set(["io.modelcontextprotocol/tasks"]),Sh=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function Sp(r){let s=r==="2020-12"?Ee:Qe,d=new s({allErrors:!0,strict:!1});return Ae(d),d}function It(r){return[...r].sort((s,d)=>ae.get(s)-ae.get(d))}function nr(r,s,d){return It(s?.protocolVersions??d??r.protocolVersions??[])}function Mm(r,s){let d=new Set(s);return r.filter(b=>d.has(b))}function Ih(r){if(!r||typeof r!="object")return new Set;let s=new Set;if(r.type==="oauth2")for(let d of Object.values(r.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function Hm(r){let s=r?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function Wm(r){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(r),externalReferences:s}}function K(r,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${r} is missing an explicit path`);return{code:r,severity:s,message:d,path:b}}function Ch(r){if(typeof r!="string")return!1;let[s]=r.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function Vh(r,s){if(typeof r!="string"||!r.includes("/"))return!1;let d=r.slice(0,r.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function Um(r){return r&&typeof r=="object"&&!Array.isArray(r)&&typeof r.name=="string"&&typeof r.version=="string"}function Dh(r,s,d){let b=It(r.protocolVersions??[]),u=b.filter(t=>ae.get(t)0;else return!1;return l?c||d.push(K("meta-reserved-key-value","error",`${n}[${JSON.stringify(t)}] has an invalid value for MCP ${i}`,[...a,t])):d.push(K("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(t)} in a ${o} context where MCP ${i} does not define it`,[...a,t])),!0}function e(t,p,o,i,n){if(!(!t||typeof t!="object"||Array.isArray(t)))for(let[a,l]of Object.entries(t)){if(!Sh.test(a)){d.push(K("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(a)}`,[...n,a]));continue}for(let c of o.filter(h=>ae.get(h)>=ae.get(Zp)))f(a,l,p,c,i,n)||Vh(a,c)&&d.push(K("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(a)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,a]))}}for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{let n=nr(r,o,b),a=[t,i];if(e(o._meta,"declaration",n,`${t}[${i}]._meta`,[...a,"_meta"]),t==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(t!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function Rh(r,s,d){let b=new Set;if((r.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(K("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(r,"tags"))for(let[u,f]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])f.forEach((e,t)=>{(e.tags??[]).forEach((p,o)=>{b.has(p)||d.push(K("unknown-tag-reference","error",`${u}[${t}] references undeclared tag ${JSON.stringify(p)}`,[u,t,"tags",o]))})})}function Mh(r,s,d){let b=r.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([t,p])=>[t,Ih(p)]));function e(t,p,o){Array.isArray(t)&&t.forEach((i,n)=>{for(let[a,l]of Object.entries(i)){if(!u.has(a)){d.push(K("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(a)}`,[...o,n,a]));continue}let c=b[a];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(K("duplicate-security-scope","error",`${p}[${n}].${a} contains duplicate scope values`,[...o,n,a])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(K("non-oauth-scope-misuse","error",`${p}[${n}].${a} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,a])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(a)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(K("uncatalogued-oauth-scope","warning",`${p}[${n}].${a} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,a,y]))})}}})}e(r.security,"security",["security"]),(r.transports??[]).forEach((t,p)=>{e(t.security,`transports[${p}].security`,["transports",p,"security"])});for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${t}[${i}].security`,[t,i,"security"])})}function Uh(r,s,d){let b=It(r.protocolVersions??[]),u=new Set;function f(t,p,o,i){let n=new Set(p);for(let a of t)n.has(a)||d.push(K("protocol-scope-outside-parent","error",`${o} includes protocol version ${a} outside its parent scope`,i))}(r.transports??[]).forEach((t,p)=>{let o=nr(r,t,b);f(o,b,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let t of b)u.has(t)||d.push(K("transport-coverage-gap","error",`protocol version ${t} is present at the root but not covered by any transport`,["protocolVersions"]));let e=r.capabilities??[];e.forEach((t,p)=>{let o=nr(r,t,b);f(o,b,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let t=0;t0&&d.push(K("capability-scope-overlap","error",`capabilities[${t}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",t,"protocolVersions"]))}for(let[t,p,o]of[["tools",r.tools??[],"name"],["prompts",r.prompts??[],"name"],["resources",r.resources??[],"uri"],["resourceTemplates",r.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,a)=>{let l=n[o],c=nr(r,n,b);f(c,b,`${t}[${a}].protocolVersions`,[t,a,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=nr(r,m,c);f(y,c,`${t}[${a}].elicitations[${w}].protocolVersions`,[t,a,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=Mm(c,m.scope);w.length>0&&d.push(K("primitive-scope-overlap","error",`${t}[${a}] with identifier ${JSON.stringify(l)} overlaps ${t}[${m.index}] for protocol versions ${w.join(", ")}`,[t,a,"protocolVersions"]))}h.push({index:a,scope:c}),i.set(l,h)})}}function Lh(r,s,d){let b=It(r.protocolVersions??[]);function u(f,e,t,p){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(K("elicitation-form-schema-version-mismatch","error",`${t}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(K("elicitation-form-required-property-unknown","error",`${t}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let a=`${t}.properties[${JSON.stringify(i)}]`,l=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(K("elicitation-form-schema-version-mismatch","error",`${a} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(K("elicitation-form-schema-version-mismatch","error",`${a}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(K("elicitation-form-enum-names-mismatch","error",`${a}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(K("elicitation-form-default-outside-enum","error",`${a}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(K("elicitation-form-default-outside-enum","error",`${a}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(K("elicitation-form-invalid-range","error",`${a}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(K("elicitation-form-invalid-range","error",`${a}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(K("elicitation-form-invalid-range","error",`${a}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])e.forEach((t,p)=>{let o=nr(r,t,b),i=new Set;(t.elicitations??[]).forEach((n,a)=>{let l=`${f}[${p}].elicitations[${a}]`,c=[f,p,"elicitations",a];i.has(n.name)&&d.push(K("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=nr(r,n,o);for(let m of h)ae.get(m){let p=nr(r,e,b);if(e.type==="streamable-http")for(let o of p)ae.get(o)>=ae.get("2025-03-26")||d.push(K("transport-not-supported-by-version","error",`transports[${t}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",t,"type"]));if(e.type==="sse")for(let o of p)ae.get(o){let p=nr(r,e,b),o=["tools",t];u(`tools[${t}]`,o,e,"title","2025-06-18",p),u(`tools[${t}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${t}]`,o,e,"_meta","2025-06-18",p),u(`tools[${t}]`,o,e,"annotations","2025-03-26",p),f(`tools[${t}]`,o,e,"execution","2025-11-25",p),u(`tools[${t}]`,o,e,"icons","2025-11-25",p)});for(let[e,t]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])t.forEach((p,o)=>{let i=nr(r,p,b),n=[e,o];if(u(`${e}[${o}]`,n,p,"title","2025-06-18",i),u(`${e}[${o}]`,n,p,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,p,"icons","2025-11-25",i),e!=="prompts"&&p.annotations?.lastModified!==void 0)for(let a of i)ae.get(a)>=ae.get("2025-06-18")||d.push(K("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${a}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((a,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],a,"title","2025-06-18",i)})});(r.capabilities??[]).forEach((e,t)=>{let p=nr(r,e,b),o=["capabilities",t];if("completions"in e&&u(`capabilities[${t}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${t}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&d.push(K("tasks-core-not-valid-in-2026","error",`capabilities[${t}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of p)ae.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of Jh){let i=b[o];Array.isArray(i)?i.forEach((n,a)=>d(n,`${u}.${o}[${a}]`,[...f,o,a],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let p=b.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(r,"inputSchema",["inputSchema"],!0,!1),s}function Qh(r,s,d,b,u){let f=Bh(r.inputSchema);if(!f.length)return;for(let t of d)t!=="2026-07-28"&&u.push(K("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${t}`,["tools",s,"inputSchema"]));let e=new Map;for(let t of f){let p=`tools[${s}].${t.location}.x-mcp-header`,o=["tools",s,...t.path,"x-mcp-header"];if(t.staticallyReachable||u.push(K("invalid-x-mcp-header","error",`${p} is not on a property statically reachable from the schema root through properties only`,o)),typeof t.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(t.value)){u.push(K("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(t.type)||u.push(K("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=t.value.toLowerCase(),n=e.get(i);n?u.push(K("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function Yh(r,s,d,b,u){if(Object.hasOwn(r,"properties")){let f=r.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(K("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${Et}`,[...d,"properties"]));else for(let[e,t]of Object.entries(f))t&&typeof t=="object"&&!Array.isArray(t)||u.push(K("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${Et}`,[...d,"properties",e]))}Object.hasOwn(r,"required")&&(!Array.isArray(r.required)||r.required.some(f=>typeof f!="string"))&&u.push(K("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${Et}`,[...d,"required"]))}function Gh(r,s,d){let b=It(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{let e=nr(r,u,b);for(let t of["inputSchema","outputSchema"]){let p=u[t];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${f}].${t}`,i=["tools",f,t],n=e.some(l=>ae.get(l)ae.get(l)>=ae.get(Et));if(Object.hasOwn(p,"$schema"))for(let l of e)ae.get(l)>=ae.get(Et)||d.push(K("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${Et} or later`,[...i,"$schema"]));if(n&&Yh(p,o,i,s,d),a){let l=Hm(p);if(!l)d.push(K("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=Sp(l);try{if(c.validateSchema(p,!0))c.compile(p);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(K("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=Wm(p);try{if(!m.externalReferences.length)throw h;Sp(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(K("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(K("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(t==="outputSchema"&&p.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(K("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}Qh(u,f,e,s,d)})}function Lm(r,s,d,b,u,f){if(r.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(K("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of r.required??[])Object.hasOwn(s,e)||f.push(K("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(r.additionalProperties===!1&&r.properties&&typeof r.properties=="object")for(let e of Object.keys(s))Object.hasOwn(r.properties,e)||f.push(K("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function Fm(r,s,d,b,u,f){let e=Hm(r);if(!e)return;let t=Wm(r);if(t.externalReferences.length){let p=[...new Set(t.externalReferences)].sort();f.push(K("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let p=Sp(e).compile(r);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(K("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function Xh(r,s,d){let b=It(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=nr(r,u,b),t=e.filter(o=>ae.get(o)ae.get(o)>=ae.get(Et));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,a=["tools",f,"examples",o],l=i.result??{},c=[...a,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(K("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(K("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(K("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(K("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&ae.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&ae.get(m){Object.hasOwn(t,"_meta")&&ae.get(e){let n=`${b}.result.contents[${i}]`,a=[...u,"result","contents",i];if(o.uri===s&&(p=!0,r.mimeType&&o.mimeType&&o.mimeType!==r.mimeType&&e.push(K("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(r.mimeType)}`,[...a,"mimeType"])),r.size!==void 0)){let l=typeof o.text=="string"?Kh.encode(o.text).byteLength:typeof o.blob=="string"&&Jm(o.blob)?eg(o.blob):void 0;l!==void 0&&l!==r.size&&e.push(K("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${r.size}`,a))}typeof o.blob=="string"&&!Jm(o.blob)&&e.push(K("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...a,"blob"]))}),p||e.push(K("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function sg(r,s,d){let b=It(r.protocolVersions??[]);for(let[u,f]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]]])f.forEach((e,t)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=nr(r,e,b),o;if(u==="resourceTemplates")try{o=new Fe,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(K("resource-template-example-invalid-template","error",`${u}[${t}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,t,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let a=`${u}[${t}].examples[${JSON.stringify(i)}]`,l=[u,t,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(K("resource-template-example-invalid-expansion","error",`${a}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),rg(c,p,`${a}.result`,[...l,"result"],s,d),typeof h=="string"&&tg(e,h,c,a,l,s,d)}})}function Ip(r,s="document"){let d=[];return Uh(r,s,d),Mh(r,s,d),Rh(r,s,d),Fh(r,s,d),Lh(r,s,d),Dh(r,s,d),Gh(r,s,d),Xh(r,s,d),sg(r,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var Vp="__interaction_example__",Rp=new Ee({allErrors:!0,strict:!1});Ae(Rp);var Qm=new Qe({allErrors:!0,strict:!1});Ae(Qm);var Km=Rp.compile(Rm),Ym=["tools","resources","resourceTemplates","prompts"],ig=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],og=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),ng=new Set(["io.modelcontextprotocol/tasks"]),xe=new Map(Pa.map((r,s)=>[r,s])),ag={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function fe(r,s,d,b){return{code:r,severity:s,message:d,path:b}}function pg(r){if(typeof r!="string"||!r.includes("/"))return!1;let s=r.slice(0,r.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function wa(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)&&Object.hasOwn(r,"$componentRef")}function Cp(r,s,d,b){return{code:r,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function Mp(r,s="document"){let d=structuredClone(r),b=[],u=[],f=0;function e(p,o,i,n=[]){let a=/^#\/components\/([^/]+)\/([^/]+)$/.exec(p?.$componentRef??"");if(!a)return{value:p};let[,l,c]=a;if(l!==o)return b.push(Cp("wrong-component-reference-namespace",s,`must target #/components/${o}, not #/components/${l}`,i)),{value:p};let h=`${l}/${c}`;if(n.includes(h))return b.push(Cp("component-reference-cycle",s,`forms a cycle through ${[...n,h].join(" -> ")}`,i)),{value:p};let m=r?.components?.[l]?.[c];return m===void 0?(b.push(Cp("missing-component-reference-target",s,`targets missing component ${JSON.stringify(p.$componentRef)}`,i)),{value:p}):(f+=1,wa(m)?e(m,o,i,[...n,h]):{value:structuredClone(m),targetPath:["components",l,c]})}function t(p,o,i,n=[]){let a=e(p,o,i,n);return a.targetPath&&u.push({referencePath:i,targetPath:a.targetPath}),a.value}for(let p of ig)for(let[o,i]of Object.entries(r?.components?.[p]??{}))wa(i)&&(d.components[p][o]=t(i,p,["components",p,o],[`${p}/${o}`]));for(let[p,o]of Object.entries({tools:r?.tools,resources:r?.resources,resourceTemplates:r?.resourceTemplates,prompts:r?.prompts}))for(let[i,n]of(o??[]).entries()){let a=d[p][i];if(p==="tools")for(let c of["inputSchema","outputSchema"])wa(n[c])&&(a[c]=t(n[c],"schemas",[p,i,c]));let l=p==="tools"?"toolExamples":p==="resources"?"resourceExamples":p==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[c,h]of Object.entries(n.examples??{}))wa(h)&&(a.examples[c]=t(h,l,[p,i,"examples",c]))}for(let p of Ym)for(let[o,i]of(r?.[p]??[]).entries())for(let[n,a]of(i.elicitations??[]).entries())wa(a.requestedSchema)&&(d[p][o].elicitations[n].requestedSchema=t(a.requestedSchema,"schemas",[p,o,"elicitations",n,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:f,provenance:u}}function lg(r,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(r)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function Gm(r){return Km(r)?[]:(Km.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:lg(r,s)}))}function Dp(r){return Array.isArray(r)?r.map(Dp):r&&typeof r=="object"?Object.fromEntries(Object.entries(r).sort(([s],[d])=>s.localeCompare(d)).map(([s,d])=>[s,Dp(d)])):r}function Bm(r){return JSON.stringify(Dp(r))}function mg(r,s,d){if(!Array.isArray(r.path))return r;let b=["tools",0,"examples",Vp];return b.every((f,e)=>r.path[e]===f)?{...r,message:r.message.replace(`tools[0].examples[${JSON.stringify(Vp)}]`,`tools[${s}].interactionExamples[${JSON.stringify(d)}]`),path:["tools",s,"interactionExamples",d,...r.path.slice(b.length)]}:r}function fg(r,s,d,b,u){let f={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:r.name,inputSchema:structuredClone(r.inputSchema),...r.outputSchema?{outputSchema:structuredClone(r.outputSchema)}:{},examples:{[Vp]:{input:structuredClone(b.input),result:structuredClone(b.result)}}}]};return Ip(f).map(e=>mg(e,s,d)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function ug(r,s,d,b,u){try{let f=Rp.compile(r);if(!f(s)){let e=f.errors?.map(t=>`${t.instancePath||"/"} ${t.message}`).join("; ")??"unknown validation error";u.push(fe("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{try{let f=Qm.compile(r);if(!f(s)){let e=f.errors?.map(t=>`${t.instancePath||"/"} ${t.message}`).join("; ")??"unknown validation error";u.push(fe("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{}}}function cg(r,s,d,b,u){let f=r.clientRequirements;if(!f||typeof f!="object"||Array.isArray(f))return;function e(t,p){u.push(fe("interaction-example-client-requirements-contradiction","warning",`${d} ${t}`,p))}if(s.type==="roots"){Object.hasOwn(f,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...b,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(f,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...b,"type"]);return}let t=f.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(t,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...b,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(t,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...b,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(f,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...b,"type"]);return}let t=f.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(t,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...b,"request","mode"]),s.request.mode==="form"&&Object.keys(t).length>0&&!Object.hasOwn(t,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...b,"request","mode"])}}function yg(r){let s=[],d=r.protocolVersions??[];for(let[b,u]of(r.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let f=u.protocolVersions??d;for(let[e,t]of Object.entries(u.interactionExamples)){if(!t||typeof t!="object"||Array.isArray(t))continue;let p=`tools[${b}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",b,"interactionExamples",e];s.push(...fg(u,b,e,t,f));for(let[i,n]of(t.steps??[]).entries()){let a=`${p}.steps[${i}]`,l=[...o,"steps",i];if(cg(u,n,a,l,s),n.type==="elicitation"){let c=n.request??{},h=n.response??{},m=typeof n.declaration=="string"?(u.elicitations??[]).find(w=>w.name===n.declaration):void 0;for(let w of f)xe.get(w)[t.name,t]));for(let[t,p]of Object.entries(u.examples)){if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`prompts[${b}].examples[${JSON.stringify(t)}]`,i=["prompts",b,"examples",t],n=p.result??{},a=[...i,"result"],l=p.arguments;if(l&&typeof l=="object"&&!Array.isArray(l))for(let[c]of Object.entries(l))e.has(c)||s.push(fe("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,h]of e)h.required===!0&&!Object.hasOwn(l??{},c)&&s.push(fe("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(fe("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...a,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(fe("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...a,c]));for(let c of f){let h=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(fe("prompt-example-result-version-mismatch","error",`${h}.resultType must be "complete" for MCP ${c}`,[...a,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(fe("prompt-example-result-version-mismatch","error",`${h}.resultType is not defined for MCP ${c}`,[...a,"resultType"])),Object.hasOwn(n,"_meta")&&xe.get(c){let y=`${h}.messages[${w}].content`,$=[...a,"messages",w,"content"];hg(m.content??{},y,$,c,s)})}}}return s}function bg(r){let s=new Fe;return s.add(r),new Set(s.templates.flatMap(d=>d.parts).filter(d=>d.type==="expression").flatMap(d=>d.expressions.map(b=>b.name)))}function $g(r,s,d,b,u){let f=`${s}.result`,e=[...d,"result"];for(let t of["jsonrpc","id","error"])Object.hasOwn(r,t)&&u.push(fe("completion-example-json-rpc-envelope","error",`${f} must not contain JSON-RPC envelope field ${JSON.stringify(t)}`,[...e,t]));for(let t of["task","inputRequests","requestState"])Object.hasOwn(r,t)&&u.push(fe("incomplete-completion-example-result","error",`${f} must not contain non-completed workflow field ${JSON.stringify(t)}`,[...e,t]));b==="2026-07-28"&&r.resultType!=="complete"&&u.push(fe("completion-example-result-version-mismatch","error",`${f}.resultType must be "complete" for MCP ${b}`,[...e,"resultType"])),b!=="2026-07-28"&&Object.hasOwn(r,"resultType")&&u.push(fe("completion-example-result-version-mismatch","error",`${f}.resultType is not defined for MCP ${b}`,[...e,"resultType"])),Object.hasOwn(r,"_meta")&&xe.get(b)i.name));else try{o=bg(e.uriTemplate)}catch(i){s.push(fe("resource-template-completion-example-invalid-template","error",`${p}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[b,f,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let a=`${p}.completionExamples[${JSON.stringify(i)}]`,l=[b,f,"completionExamples",i],c=n.argument?.name,h=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(fe(b==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",b==="prompts"?`${a}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${a}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...l,"argument","name"])),h&&typeof h=="object"&&!Array.isArray(h))for(let w of Object.keys(h))o&&!o.has(w)&&s.push(fe(b==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",b==="prompts"?`${a}.context.arguments contains undeclared Prompt argument ${JSON.stringify(w)}`:`${a}.context.arguments contains no RFC 6570 variable ${JSON.stringify(w)} from ${JSON.stringify(e.uriTemplate)}`,[...l,"context","arguments",w])),w===c&&s.push(fe("completion-example-duplicate-target-context","error",`${a}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(w)}`,[...l,"context","arguments",w]));let m=n.result??{};for(let w of t){if(xe.get(w)e.code!=="transport-coverage-gap")).sort((e,t)=>e.code.localeCompare(t.code)||e.message.localeCompare(t.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(t.path)))}function Xm(r){let s=Gm(r);return s.length?s:wg(r)}var Up="0.8.0-rc.1",kg="v0.8.0-rc.1",jg="936a0f24ade501fcabf3d6498c0440c445daa672a575573a35954cee49430ac4";function vg(r){let s=Xm(r);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var Gp={};Ft(Gp,{schemaSha256:()=>yb,snapshotTag:()=>cb,specification:()=>Yp,supportedProtocolVersions:()=>ka,validate:()=>db});var ef={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json",title:"MCP Description",description:"MCP Description 0.8.0 Release Candidate 2 (v0.8.0-rc.2; prerelease).",type:"object",required:["mcpdesc","info","protocolVersions"],additionalProperties:!1,properties:{$schema:{type:"string"},capabilities:{items:{$ref:"#/$defs/capabilities"},minItems:1,type:"array"},components:{$ref:"#/$defs/components"},info:{$ref:"#/$defs/info"},instructions:{type:"string"},mcpdesc:{const:"0.8.0",type:"string"},prompts:{items:{$ref:"#/$defs/prompt"},minItems:1,type:"array"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resourceTemplates:{items:{$ref:"#/$defs/resourceTemplate"},minItems:1,type:"array"},resources:{items:{$ref:"#/$defs/resource"},minItems:1,type:"array"},security:{$ref:"#/$defs/securityRequirementArray"},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},tags:{items:{$ref:"#/$defs/tag"},minItems:1,type:"array"},tools:{items:{$ref:"#/$defs/tool"},minItems:1,type:"array"},transports:{items:{$ref:"#/$defs/transport"},minItems:1,type:"array"}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},$defs:{capabilities:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"},capabilityPrompts:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},capabilityResources:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"},subscribe:{type:"boolean"}},type:"object"},capabilityTools:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},clientCapabilityRequirements:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{elicitation:{$ref:"#/$defs/clientCapabilityValue"},experimental:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"}},type:"object"},clientCapabilityValue:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},completedCompletionResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},completion:{$ref:"#/$defs/completionResult"},resultType:{const:"complete"}},required:["completion"],type:"object"},completedPromptResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},description:{type:"string"},messages:{items:{$ref:"#/$defs/promptMessageExample"},type:"array"},resultType:{const:"complete"}},required:["messages"],type:"object"},completedReadResourceResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},cacheScope:{enum:["public","private"]},contents:{items:{$ref:"#/$defs/resourceContents"},minItems:1,type:"array"},resultType:{const:"complete"},ttlMs:{minimum:0,type:"number"}},required:["contents"],type:"object"},completedToolResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},content:{items:{$ref:"#/$defs/toolResultContent"},type:"array"},isError:{type:"boolean"},resultType:{const:"complete"},structuredContent:{$ref:"#/$defs/jsonValue"}},required:["content"],type:"object"},completionArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],type:"object"},completionContext:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},minProperties:1,type:"object"}},required:["arguments"],type:"object"},completionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},required:["argument","result"],type:"object"},completionExamples:{additionalProperties:{$ref:"#/$defs/completionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},completionResult:{additionalProperties:!0,properties:{hasMore:{type:"boolean"},total:{minimum:0,type:"integer"},values:{items:{type:"string"},maxItems:100,type:"array"}},required:["values"],type:"object"},componentMap:{minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},components:{additionalProperties:!1,minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]}},type:"object"},contact:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{email:{format:"email",type:"string"},name:{type:"string"},url:{format:"uri",type:"string"}},type:"object"},elicitationDeclaration:{additionalProperties:!1,oneOf:[{not:{required:["url"]},properties:{mode:{const:"form"}},required:["requestedSchema"]},{not:{required:["requestedSchema"]},properties:{mode:{const:"url"}}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{message:{minLength:1,type:"string"},mode:{enum:["form","url"]},name:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},onCancel:{minLength:1,type:"string"},onDecline:{minLength:1,type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{format:"uri",type:"string"},when:{minLength:1,type:"string"}},required:["name","mode","message"],type:"object"},elicitationFormOption:{additionalProperties:!1,properties:{const:{type:"string"},title:{type:"string"}},required:["const","title"],type:"object"},elicitationFormProperty:{oneOf:[{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},format:{enum:["email","uri","date","date-time"]},maxLength:{minimum:0,type:"integer"},minLength:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"string"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"number"},description:{type:"string"},maximum:{type:"number"},minimum:{type:"number"},title:{type:"string"},type:{enum:["number","integer"]}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"boolean"},description:{type:"string"},title:{type:"string"},type:{const:"boolean"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},enum:{items:{type:"string"},type:"array"},enumNames:{items:{type:"string"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},oneOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","oneOf"],type:"object"},{additionalProperties:!1,properties:{default:{items:{type:"string"},type:"array"},description:{type:"string"},items:{oneOf:[{additionalProperties:!1,properties:{enum:{items:{type:"string"},type:"array"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{anyOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"}},required:["anyOf"],type:"object"}]},maxItems:{minimum:0,type:"integer"},minItems:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"array"}},required:["type","items"],type:"object"}]},elicitationFormSchema:{additionalProperties:!1,properties:{$schema:{format:"uri",type:"string"},properties:{additionalProperties:{$ref:"#/$defs/elicitationFormProperty"},type:"object"},required:{items:{type:"string"},type:"array",uniqueItems:!0},type:{const:"object"}},required:["type","properties"],type:"object"},elicitationInteractionAcceptedResponse:{additionalProperties:!1,properties:{action:{const:"accept"},content:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"}},required:["action"],type:"object"},elicitationInteractionDeclinedResponse:{additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"},elicitationInteractionFormRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"form"},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},required:["mode","message","requestedSchema"],type:"object"},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},elicitationInteractionUrlRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"url"},url:{format:"uri",type:"string"}},required:["mode","message","url"],type:"object"},execution:{additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"},extensionCapabilities:{additionalProperties:{type:"object"},minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},type:"object"},icon:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"},icons:{items:{$ref:"#/$defs/icon"},minItems:1,type:"array"},info:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{contact:{$ref:"#/$defs/contact"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},id:{type:"string"},license:{$ref:"#/$defs/license"},name:{minLength:1,type:"string"},title:{type:"string"},version:{minLength:1,type:"string"},websiteUrl:{format:"uri",type:"string"}},required:["name","version"],type:"object"},jsonSchemaObject:{additionalProperties:!0,type:"object"},jsonValue:{oneOf:[{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},{items:{$ref:"#/$defs/jsonValue"},type:"array"},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},license:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},url:{format:"uri",type:"string"}},required:["name"],type:"object"},metaObject:{additionalProperties:!0,propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},type:"object"},oauthFlow:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationUrl:{format:"uri",type:"string"},refreshUrl:{format:"uri",type:"string"},scopes:{additionalProperties:{type:"string"},type:"object"},tokenUrl:{format:"uri",type:"string"}},required:["scopes"],type:"object"},oauthFlows:{additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]}},type:"object"},prompt:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},arguments:{items:{$ref:"#/$defs/promptArgument"},minItems:1,type:"array"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/promptExamples"},icons:{$ref:"#/$defs/icons"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name"],type:"object"},promptArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{type:"string"},required:{type:"boolean"},title:{type:"string"}},required:["name"],type:"object"},promptExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},type:"object"},result:{$ref:"#/$defs/completedPromptResultExample"}},required:["result"],type:"object"},promptExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},promptMessageExample:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},protocolVersionScope:{items:{$ref:"#/$defs/supportedProtocolVersion"},minItems:1,type:"array",uniqueItems:!0},referenceObject:{additionalProperties:!1,properties:{$componentRef:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$",type:"string"}},required:["$componentRef"],type:"object"},resource:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"},resourceAnnotations:{additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"},resourceContents:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},mimeType:{type:"string"},text:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},blob:{type:"string"},mimeType:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","blob"],type:"object"}]},resourceExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},required:["result"],type:"object"},resourceExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},resourceTemplate:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"},resourceTemplateExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"},uri:{format:"uri",type:"string"}},required:["uri","result"],type:"object"},resourceTemplateExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},rootDeclaration:{additionalProperties:!1,properties:{name:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri"],type:"object"},rootsListRequest:{additionalProperties:!1,maxProperties:0,type:"object"},rootsListResult:{additionalProperties:!1,properties:{roots:{items:{$ref:"#/$defs/rootDeclaration"},type:"array"}},required:["roots"],type:"object"},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingCreateMessageRequest:{additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},samplingCreateMessageResult:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},role:{const:"assistant"},stopReason:{type:"string"}},required:["role","content","model"],type:"object"},samplingMessage:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{items:{$ref:"#/$defs/samplingContentBlock"},minItems:1,type:"array"}]},samplingModelHint:{additionalProperties:!1,properties:{name:{minLength:1,type:"string"}},required:["name"],type:"object"},samplingModelPreferences:{additionalProperties:!1,properties:{costPriority:{maximum:1,minimum:0,type:"number"},hints:{items:{$ref:"#/$defs/samplingModelHint"},minItems:1,type:"array"},intelligencePriority:{maximum:1,minimum:0,type:"number"},speedPriority:{maximum:1,minimum:0,type:"number"}},type:"object"},samplingRequestTool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{annotations:{$ref:"#/$defs/toolAnnotations"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]},name:{minLength:1,type:"string"},title:{type:"string"}},required:["name","inputSchema"],type:"object"},samplingToolChoice:{additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},samplingToolResultContent:{additionalProperties:!1,properties:{content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{items:{$ref:"#/$defs/toolResultContent"},minItems:1,type:"array"}]},isError:{type:"boolean"},toolUseId:{type:"string"},type:{const:"tool_result"}},required:["type","toolUseId","content"],type:"object"},samplingToolUseContent:{additionalProperties:!1,properties:{id:{type:"string"},input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},name:{type:"string"},type:{const:"tool_use"}},required:["type","id","name","input"],type:"object"},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},securityRequirement:{additionalProperties:{items:{type:"string"},type:"array",uniqueItems:!0},propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},securityRequirementArray:{items:{$ref:"#/$defs/securityRequirement"},type:"array"},securityScheme:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]},securitySchemeMap:{additionalProperties:{$ref:"#/$defs/securityScheme"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},supportedProtocolVersion:{enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"],type:"string"},tag:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{minLength:1,type:"string"}},required:["name"],type:"object"},tool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"},toolAnnotations:{additionalProperties:!0,properties:{destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"},readOnlyHint:{type:"boolean"},title:{type:"string"}},type:"object"},toolExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"}},required:["input","result"],type:"object"},toolExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionElicitationStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{declaration:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"},type:{const:"elicitation"}},required:["type","request","response"],type:"object"},toolInteractionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"},steps:{items:{$ref:"#/$defs/toolInteractionStep"},minItems:1,type:"array"}},required:["input","steps","result"],type:"object"},toolInteractionExamples:{additionalProperties:{$ref:"#/$defs/toolInteractionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionRootsStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"},type:{const:"roots"}},required:["type","request","response"],type:"object"},toolInteractionSamplingStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"},type:{const:"sampling"}},required:["type","request","response"],type:"object"},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolResultContent:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},transport:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"streamable-http"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{args:{items:{type:"string"},type:"array"},command:{type:"string"},env:{additionalProperties:{type:"string"},type:"object"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"stdio"}},required:["type","command"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"sse"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"}]}}};var ka=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),pe=new Map(ka.map((r,s)=>[r,s])),Nt="2025-11-25",Fp="2025-06-18",Fa=Object.freeze({effectiveDate:"2026-09-04",source:"https://modelcontextprotocol.io/extensions/overview",officialIdentifiers:Object.freeze(["io.modelcontextprotocol/enterprise-managed-authorization","io.modelcontextprotocol/oauth-client-credentials","io.modelcontextprotocol/tasks","io.modelcontextprotocol/ui"]),experimentalIdentifiers:Object.freeze([])}),Ag=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function Ja(r){return Fa.officialIdentifiers.includes(r)?"official":Fa.experimentalIdentifiers.includes(r)?"experimental":"uncatalogued"}function Jp(r){let s=r==="2020-12"?Ee:Qe,d=new s({allErrors:!0,strict:!1});return Ae(d),d}function Ct(r){return[...r].sort((s,d)=>pe.get(s)-pe.get(d))}function ar(r,s,d){return Ct(s?.protocolVersions??d??r.protocolVersions??[])}function rf(r,s){let d=new Set(s);return r.filter(b=>d.has(b))}function qg(r){if(!r||typeof r!="object")return new Set;let s=new Set;if(r.type==="oauth2")for(let d of Object.values(r.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function af(r){let s=r?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function pf(r){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(r),externalReferences:s}}function B(r,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${r} is missing an explicit path`);return{code:r,severity:s,message:d,path:b}}function xg(r){if(typeof r!="string")return!1;let[s]=r.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function zg(r,s){if(typeof r!="string"||!r.includes("/"))return!1;let d=r.slice(0,r.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function tf(r){return r&&typeof r=="object"&&!Array.isArray(r)&&typeof r.name=="string"&&typeof r.version=="string"}function Eg(r,s,d){let b=Ct(r.protocolVersions??[]),u=b.filter(t=>pe.get(t)0;else return!1;return l?c||d.push(B("meta-reserved-key-value","error",`${n}[${JSON.stringify(t)}] has an invalid value for MCP ${i}`,[...a,t])):d.push(B("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(t)} in a ${o} context where MCP ${i} does not define it`,[...a,t])),!0}function e(t,p,o,i,n){if(!(!t||typeof t!="object"||Array.isArray(t)))for(let[a,l]of Object.entries(t)){if(!Ag.test(a)){d.push(B("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(a)}`,[...n,a]));continue}for(let c of o.filter(h=>pe.get(h)>=pe.get(Fp)))f(a,l,p,c,i,n)||zg(a,c)&&d.push(B("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(a)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,a]))}}for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{let n=ar(r,o,b),a=[t,i];if(e(o._meta,"declaration",n,`${t}[${i}]._meta`,[...a,"_meta"]),t==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(t!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${t}[${i}].examples[${JSON.stringify(l)}].result`,w=[...a,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function Ng(r,s,d){let b=new Set;if((r.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(B("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(r,"tags"))for(let[u,f]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])f.forEach((e,t)=>{(e.tags??[]).forEach((p,o)=>{b.has(p)||d.push(B("unknown-tag-reference","error",`${u}[${t}] references undeclared tag ${JSON.stringify(p)}`,[u,t,"tags",o]))})})}function _g(r,s,d){let b=r.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([t,p])=>[t,qg(p)]));function e(t,p,o){Array.isArray(t)&&t.forEach((i,n)=>{for(let[a,l]of Object.entries(i)){if(!u.has(a)){d.push(B("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(a)}`,[...o,n,a]));continue}let c=b[a];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(B("duplicate-security-scope","error",`${p}[${n}].${a} contains duplicate scope values`,[...o,n,a])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(B("non-oauth-scope-misuse","error",`${p}[${n}].${a} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,a])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(a)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(B("uncatalogued-oauth-scope","warning",`${p}[${n}].${a} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,a,y]))})}}})}e(r.security,"security",["security"]),(r.transports??[]).forEach((t,p)=>{e(t.security,`transports[${p}].security`,["transports",p,"security"])});for(let[t,p]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${t}[${i}].security`,[t,i,"security"])})}function Tg(r,s,d){let b=Ct(r.protocolVersions??[]),u=new Set;function f(t,p,o,i){let n=new Set(p);for(let a of t)n.has(a)||d.push(B("protocol-scope-outside-parent","error",`${o} includes protocol version ${a} outside its parent scope`,i))}(r.transports??[]).forEach((t,p)=>{let o=ar(r,t,b);f(o,b,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let t of b)u.has(t)||d.push(B("transport-coverage-gap","error",`protocol version ${t} is present at the root but not covered by any transport`,["protocolVersions"]));let e=r.capabilities??[];e.forEach((t,p)=>{let o=ar(r,t,b);f(o,b,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let t=0;t0&&d.push(B("capability-scope-overlap","error",`capabilities[${t}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",t,"protocolVersions"]))}for(let[t,p,o]of[["tools",r.tools??[],"name"],["prompts",r.prompts??[],"name"],["resources",r.resources??[],"uri"],["resourceTemplates",r.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,a)=>{let l=n[o],c=ar(r,n,b);f(c,b,`${t}[${a}].protocolVersions`,[t,a,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=ar(r,m,c);f(y,c,`${t}[${a}].elicitations[${w}].protocolVersions`,[t,a,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=rf(c,m.scope);w.length>0&&d.push(B("primitive-scope-overlap","error",`${t}[${a}] with identifier ${JSON.stringify(l)} overlaps ${t}[${m.index}] for protocol versions ${w.join(", ")}`,[t,a,"protocolVersions"]))}h.push({index:a,scope:c}),i.set(l,h)})}}function Zg(r,s,d){let b=Ct(r.protocolVersions??[]);function u(f,e,t,p){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(B("elicitation-form-schema-version-mismatch","error",`${t}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(B("elicitation-form-required-property-unknown","error",`${t}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let a=`${t}.properties[${JSON.stringify(i)}]`,l=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(B("elicitation-form-schema-version-mismatch","error",`${a} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(B("elicitation-form-schema-version-mismatch","error",`${a}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(B("elicitation-form-enum-names-mismatch","error",`${a}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(B("elicitation-form-default-outside-enum","error",`${a}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(B("elicitation-form-default-outside-enum","error",`${a}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(B("elicitation-form-invalid-range","error",`${a}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(B("elicitation-form-invalid-range","error",`${a}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(B("elicitation-form-invalid-range","error",`${a}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",r.tools??[]],["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])e.forEach((t,p)=>{let o=ar(r,t,b),i=new Set;(t.elicitations??[]).forEach((n,a)=>{let l=`${f}[${p}].elicitations[${a}]`,c=[f,p,"elicitations",a];i.has(n.name)&&d.push(B("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=ar(r,n,o);for(let m of h)pe.get(m){let p=ar(r,e,b);if(e.type==="streamable-http")for(let o of p)pe.get(o)>=pe.get("2025-03-26")||d.push(B("transport-not-supported-by-version","error",`transports[${t}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",t,"type"]));if(e.type==="sse")for(let o of p)pe.get(o){let p=ar(r,e,b),o=["tools",t];u(`tools[${t}]`,o,e,"title","2025-06-18",p),u(`tools[${t}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${t}]`,o,e,"_meta","2025-06-18",p),u(`tools[${t}]`,o,e,"annotations","2025-03-26",p),f(`tools[${t}]`,o,e,"execution","2025-11-25",p),u(`tools[${t}]`,o,e,"icons","2025-11-25",p)});for(let[e,t]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]],["prompts",r.prompts??[]]])t.forEach((p,o)=>{let i=ar(r,p,b),n=[e,o];if(u(`${e}[${o}]`,n,p,"title","2025-06-18",i),u(`${e}[${o}]`,n,p,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,p,"icons","2025-11-25",i),e!=="prompts"&&p.annotations?.lastModified!==void 0)for(let a of i)pe.get(a)>=pe.get("2025-06-18")||d.push(B("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${a}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((a,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],a,"title","2025-06-18",i)})});(r.capabilities??[]).forEach((e,t)=>{let p=ar(r,e,b),o=["capabilities",t];if("completions"in e&&u(`capabilities[${t}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${t}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&d.push(B("tasks-core-not-valid-in-2026","error",`capabilities[${t}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of p)pe.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of Ig){let i=b[o];Array.isArray(i)?i.forEach((n,a)=>d(n,`${u}.${o}[${a}]`,[...f,o,a],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let p=b.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(r,"inputSchema",["inputSchema"],!0,!1),s}function Mg(r,s,d,b,u){let f=Rg(r.inputSchema);if(!f.length)return;for(let t of d)t!=="2026-07-28"&&u.push(B("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${t}`,["tools",s,"inputSchema"]));let e=new Map;for(let t of f){let p=`tools[${s}].${t.location}.x-mcp-header`,o=["tools",s,...t.path,"x-mcp-header"];if(t.staticallyReachable||u.push(B("invalid-x-mcp-header","error",`${p} is not on a property statically reachable from the schema root through properties only`,o)),typeof t.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(t.value)){u.push(B("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(t.type)||u.push(B("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=t.value.toLowerCase(),n=e.get(i);n?u.push(B("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function Ug(r,s,d,b,u){if(Object.hasOwn(r,"properties")){let f=r.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(B("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${Nt}`,[...d,"properties"]));else for(let[e,t]of Object.entries(f))t&&typeof t=="object"&&!Array.isArray(t)||u.push(B("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${Nt}`,[...d,"properties",e]))}Object.hasOwn(r,"required")&&(!Array.isArray(r.required)||r.required.some(f=>typeof f!="string"))&&u.push(B("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${Nt}`,[...d,"required"]))}function Lg(r,s,d){let b=Ct(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{let e=ar(r,u,b);for(let t of["inputSchema","outputSchema"]){let p=u[t];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${f}].${t}`,i=["tools",f,t],n=e.some(l=>pe.get(l)pe.get(l)>=pe.get(Nt));if(Object.hasOwn(p,"$schema"))for(let l of e)pe.get(l)>=pe.get(Nt)||d.push(B("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${Nt} or later`,[...i,"$schema"]));if(n&&Ug(p,o,i,s,d),a){let l=af(p);if(!l)d.push(B("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=Jp(l);try{if(c.validateSchema(p,!0))c.compile(p);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(B("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=pf(p);try{if(!m.externalReferences.length)throw h;Jp(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(B("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(B("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(t==="outputSchema"&&p.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(B("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}Mg(u,f,e,s,d)})}function sf(r,s,d,b,u,f){if(r.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(B("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of r.required??[])Object.hasOwn(s,e)||f.push(B("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(r.additionalProperties===!1&&r.properties&&typeof r.properties=="object")for(let e of Object.keys(s))Object.hasOwn(r.properties,e)||f.push(B("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function of(r,s,d,b,u,f){let e=af(r);if(!e)return;let t=pf(r);if(t.externalReferences.length){let p=[...new Set(t.externalReferences)].sort();f.push(B("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let p=Jp(e).compile(r);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(B("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function Fg(r,s,d){let b=Ct(r.protocolVersions??[]);(r.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=ar(r,u,b),t=e.filter(o=>pe.get(o)pe.get(o)>=pe.get(Nt));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,a=["tools",f,"examples",o],l=i.result??{},c=[...a,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(B("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(B("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(B("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(B("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&pe.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&pe.get(m){Object.hasOwn(t,"_meta")&&pe.get(e){let n=`${b}.result.contents[${i}]`,a=[...u,"result","contents",i];if(o.uri===s&&(p=!0,r.mimeType&&o.mimeType&&o.mimeType!==r.mimeType&&e.push(B("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(r.mimeType)}`,[...a,"mimeType"])),r.size!==void 0)){let l=typeof o.text=="string"?Dg.encode(o.text).byteLength:typeof o.blob=="string"&&nf(o.blob)?Jg(o.blob):void 0;l!==void 0&&l!==r.size&&e.push(B("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${r.size}`,a))}typeof o.blob=="string"&&!nf(o.blob)&&e.push(B("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...a,"blob"]))}),p||e.push(B("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function Kg(r,s,d){let b=Ct(r.protocolVersions??[]);for(let[u,f]of[["resources",r.resources??[]],["resourceTemplates",r.resourceTemplates??[]]])f.forEach((e,t)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=ar(r,e,b),o;if(u==="resourceTemplates")try{o=new Fe,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(B("resource-template-example-invalid-template","error",`${u}[${t}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,t,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let a=`${u}[${t}].examples[${JSON.stringify(i)}]`,l=[u,t,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(B("resource-template-example-invalid-expansion","error",`${a}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),Hg(c,p,`${a}.result`,[...l,"result"],s,d),typeof h=="string"&&Wg(e,h,c,a,l,s,d)}})}function Hp(r,s="document"){let d=[];return Tg(r,s,d),_g(r,s,d),Ng(r,s,d),Sg(r,s,d),Zg(r,s,d),Eg(r,s,d),Lg(r,s,d),Fg(r,s,d),Kg(r,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var Kp="__interaction_example__",Qp=new Ee({allErrors:!0,strict:!1});Ae(Qp);var ff=new Qe({allErrors:!0,strict:!1});Ae(ff);var lf=Qp.compile(ef),uf=["tools","resources","resourceTemplates","prompts"],Bg=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],Qg=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),ze=new Map(ka.map((r,s)=>[r,s])),Yg={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function le(r,s,d,b){return{code:r,severity:s,message:d,path:b}}function Gg(r){if(typeof r!="string"||!r.includes("/"))return!1;let s=r.slice(0,r.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function ja(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)&&Object.hasOwn(r,"$componentRef")}function Wp(r,s,d,b){return{code:r,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function Xg(r,s="document"){let d=structuredClone(r),b=[],u=0;function f(e,t,p,o=[]){let i=/^#\/components\/([^/]+)\/([^/]+)$/.exec(e?.$componentRef??"");if(!i)return e;let[,n,a]=i;if(n!==t)return b.push(Wp("wrong-component-reference-namespace",s,`must target #/components/${t}, not #/components/${n}`,p)),e;let l=`${n}/${a}`;if(o.includes(l))return b.push(Wp("component-reference-cycle",s,`forms a cycle through ${[...o,l].join(" -> ")}`,p)),e;let c=r?.components?.[n]?.[a];return c===void 0?(b.push(Wp("missing-component-reference-target",s,`targets missing component ${JSON.stringify(e.$componentRef)}`,p)),e):(u+=1,ja(c)?f(c,t,p,[...o,l]):structuredClone(c))}for(let e of Bg)for(let[t,p]of Object.entries(r?.components?.[e]??{}))ja(p)&&(d.components[e][t]=f(p,e,["components",e,t],[`${e}/${t}`]));for(let[e,t]of Object.entries({tools:r?.tools,resources:r?.resources,resourceTemplates:r?.resourceTemplates,prompts:r?.prompts}))for(let[p,o]of(t??[]).entries()){let i=d[e][p];if(e==="tools")for(let a of["inputSchema","outputSchema"])ja(o[a])&&(i[a]=f(o[a],"schemas",[e,p,a]));let n=e==="tools"?"toolExamples":e==="resources"?"resourceExamples":e==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[a,l]of Object.entries(o.examples??{}))ja(l)&&(i.examples[a]=f(l,n,[e,p,"examples",a]))}for(let e of uf)for(let[t,p]of(r?.[e]??[]).entries())for(let[o,i]of(p.elicitations??[]).entries())ja(i.requestedSchema)&&(d[e][t].elicitations[o].requestedSchema=f(i.requestedSchema,"schemas",[e,t,"elicitations",o,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:u}}function eb(r,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(r)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function cf(r){return lf(r)?[]:(lf.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:eb(r,s)}))}function Bp(r){return Array.isArray(r)?r.map(Bp):r&&typeof r=="object"?Object.fromEntries(Object.entries(r).sort(([s],[d])=>s.localeCompare(d)).map(([s,d])=>[s,Bp(d)])):r}function mf(r){return JSON.stringify(Bp(r))}function rb(r,s,d){if(!Array.isArray(r.path))return r;let b=["tools",0,"examples",Kp];return b.every((f,e)=>r.path[e]===f)?{...r,message:r.message.replace(`tools[0].examples[${JSON.stringify(Kp)}]`,`tools[${s}].interactionExamples[${JSON.stringify(d)}]`),path:["tools",s,"interactionExamples",d,...r.path.slice(b.length)]}:r}function tb(r,s,d,b,u){let f={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:r.name,inputSchema:structuredClone(r.inputSchema),...r.outputSchema?{outputSchema:structuredClone(r.outputSchema)}:{},examples:{[Kp]:{input:structuredClone(b.input),result:structuredClone(b.result)}}}]};return Hp(f).map(e=>rb(e,s,d)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function sb(r,s,d,b,u){try{let f=Qp.compile(r);if(!f(s)){let e=f.errors?.map(t=>`${t.instancePath||"/"} ${t.message}`).join("; ")??"unknown validation error";u.push(le("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{try{let f=ff.compile(r);if(!f(s)){let e=f.errors?.map(t=>`${t.instancePath||"/"} ${t.message}`).join("; ")??"unknown validation error";u.push(le("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{}}}function ib(r,s,d,b,u){let f=r.clientRequirements;if(!f||typeof f!="object"||Array.isArray(f))return;function e(t,p){u.push(le("interaction-example-client-requirements-contradiction","warning",`${d} ${t}`,p))}if(s.type==="roots"){Object.hasOwn(f,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...b,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(f,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...b,"type"]);return}let t=f.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(t,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...b,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(t,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...b,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(f,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...b,"type"]);return}let t=f.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(t,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...b,"request","mode"]),s.request.mode==="form"&&Object.keys(t).length>0&&!Object.hasOwn(t,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...b,"request","mode"])}}function ob(r){let s=[],d=r.protocolVersions??[];for(let[b,u]of(r.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let f=u.protocolVersions??d;for(let[e,t]of Object.entries(u.interactionExamples)){if(!t||typeof t!="object"||Array.isArray(t))continue;let p=`tools[${b}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",b,"interactionExamples",e];s.push(...tb(u,b,e,t,f));for(let[i,n]of(t.steps??[]).entries()){let a=`${p}.steps[${i}]`,l=[...o,"steps",i];if(ib(u,n,a,l,s),n.type==="elicitation"){let c=n.request??{},h=n.response??{},m=typeof n.declaration=="string"?(u.elicitations??[]).find(w=>w.name===n.declaration):void 0;for(let w of f)ze.get(w)[t.name,t]));for(let[t,p]of Object.entries(u.examples)){if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`prompts[${b}].examples[${JSON.stringify(t)}]`,i=["prompts",b,"examples",t],n=p.result??{},a=[...i,"result"],l=p.arguments;if(l&&typeof l=="object"&&!Array.isArray(l))for(let[c]of Object.entries(l))e.has(c)||s.push(le("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,h]of e)h.required===!0&&!Object.hasOwn(l??{},c)&&s.push(le("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(le("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...a,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(le("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...a,c]));for(let c of f){let h=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(le("prompt-example-result-version-mismatch","error",`${h}.resultType must be "complete" for MCP ${c}`,[...a,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(le("prompt-example-result-version-mismatch","error",`${h}.resultType is not defined for MCP ${c}`,[...a,"resultType"])),Object.hasOwn(n,"_meta")&&ze.get(c){let y=`${h}.messages[${w}].content`,$=[...a,"messages",w,"content"];ab(m.content??{},y,$,c,s)})}}}return s}function lb(r){let s=new Fe;return s.add(r),new Set(s.templates.flatMap(d=>d.parts).filter(d=>d.type==="expression").flatMap(d=>d.expressions.map(b=>b.name)))}function mb(r,s,d,b,u){let f=`${s}.result`,e=[...d,"result"];for(let t of["jsonrpc","id","error"])Object.hasOwn(r,t)&&u.push(le("completion-example-json-rpc-envelope","error",`${f} must not contain JSON-RPC envelope field ${JSON.stringify(t)}`,[...e,t]));for(let t of["task","inputRequests","requestState"])Object.hasOwn(r,t)&&u.push(le("incomplete-completion-example-result","error",`${f} must not contain non-completed workflow field ${JSON.stringify(t)}`,[...e,t]));b==="2026-07-28"&&r.resultType!=="complete"&&u.push(le("completion-example-result-version-mismatch","error",`${f}.resultType must be "complete" for MCP ${b}`,[...e,"resultType"])),b!=="2026-07-28"&&Object.hasOwn(r,"resultType")&&u.push(le("completion-example-result-version-mismatch","error",`${f}.resultType is not defined for MCP ${b}`,[...e,"resultType"])),Object.hasOwn(r,"_meta")&&ze.get(b)i.name));else try{o=lb(e.uriTemplate)}catch(i){s.push(le("resource-template-completion-example-invalid-template","error",`${p}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[b,f,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let a=`${p}.completionExamples[${JSON.stringify(i)}]`,l=[b,f,"completionExamples",i],c=n.argument?.name,h=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(le(b==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",b==="prompts"?`${a}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${a}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...l,"argument","name"])),h&&typeof h=="object"&&!Array.isArray(h))for(let w of Object.keys(h))o&&!o.has(w)&&s.push(le(b==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",b==="prompts"?`${a}.context.arguments contains undeclared Prompt argument ${JSON.stringify(w)}`:`${a}.context.arguments contains no RFC 6570 variable ${JSON.stringify(w)} from ${JSON.stringify(e.uriTemplate)}`,[...l,"context","arguments",w])),w===c&&s.push(le("completion-example-duplicate-target-context","error",`${a}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(w)}`,[...l,"context","arguments",w]));let m=n.result??{};for(let w of t){if(ze.get(w)e.code!=="transport-coverage-gap")).sort((e,t)=>e.code.localeCompare(t.code)||e.message.localeCompare(t.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(t.path)))}function yf(r){let s=cf(r);return s.length?s:ub(r)}var Yp="0.8.0-rc.2",cb="v0.8.0-rc.2",yb="40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8";function db(r){let s=yf(r);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var Vt=Object.freeze({[up]:cp,[bp]:$p,[jp]:vp,[_p]:Tp,[Up]:Lp,[Yp]:Gp}),Ha=Object.freeze({"0.8.0-draft.1":"https://mcpdesc.org/schema/0.8.0.json","0.8.0-draft.2":"https://mcpdesc.org/schema/0.8.0.json","0.8.0-draft.3":"https://mcpdesc.org/schema/0.8.0.json","0.8.0-draft.4":"https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json","0.8.0-rc.1":"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json","0.8.0-rc.2":"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json"}),mP=Object.freeze(Object.keys(Vt)),fP=Object.freeze([...new Set(Object.values(Vt).flatMap(r=>r.supportedProtocolVersions))]),hb=Object.freeze(Object.fromEntries(Object.entries(Vt).map(([r,s])=>[r,Object.freeze({snapshotTag:s.snapshotTag,schemaUri:Ha[r],schemaSha256:s.schemaSha256})]))),el=new Map;for(let r of Object.values(Vt)){let s=Ha[r.specification],d=el.get(s)??[];d.push(r.specification),el.set(s,d)}function fa(r,s,d=[]){return{code:r,severity:"error",message:s,path:d}}function Xp(r,s=[]){let d=Vt[r];return{status:"resolved",specification:r,schemaUri:Ha[r],provenance:hb[r],diagnostics:s}}function uP(r,s={}){let d=s?.specification;if(d!==void 0&&(typeof d!="string"||!Object.hasOwn(Vt,d)))return{status:"unresolved",diagnostics:[fa("unsupported-specification",`Unsupported MCP Description specification: ${String(d)}`)]};let b=r!==null&&typeof r=="object"&&!Array.isArray(r)&&Object.hasOwn(r,"$schema")?r.$schema:void 0;if(b===void 0)return d!==void 0?Xp(d):{status:"unresolved",diagnostics:[fa("missing-snapshot-identity","An exact specification selector or recognized $schema identity is required",["$schema"])]};if(typeof b!="string")return{status:"unresolved",diagnostics:[fa("invalid-schema-identity","$schema must be a string to resolve an MCP Description specification",["$schema"])]};let u=el.get(b)??[];return d!==void 0?Ha[d]===b?Xp(d):{status:"unresolved",diagnostics:[fa("contradictory-snapshot-identity",`$schema ${JSON.stringify(b)} does not identify specification ${JSON.stringify(d)}`,["$schema"])]}:u.length===1?Xp(u[0]):u.length>1?{status:"unresolved",diagnostics:[fa("ambiguous-schema-identity",`$schema ${JSON.stringify(b)} is shared by ${u.join(", ")} and does not select one immutable snapshot`,["$schema"])]}:{status:"unresolved",diagnostics:[fa("unknown-schema-identity",`Unknown MCP Description $schema identity: ${JSON.stringify(b)}`,["$schema"])]}}function cP(r,s){if(!s||typeof s!="object"||Array.isArray(s)||!Object.hasOwn(s,"specification"))throw new TypeError("options.specification is required");if(typeof s.specification!="string"||!Object.hasOwn(Vt,s.specification))throw new RangeError(`Unsupported MCP Description specification: ${String(s.specification)}`);return Vt[s.specification].validate(r)}function yP(r,s){if(!s||typeof s!="object"||Array.isArray(s)||!Object.hasOwn(s,"specification"))throw new TypeError("options.specification is required");if(s.specification!=="0.8.0-rc.1")throw new RangeError(`Component reference resolution does not support specification: ${String(s.specification)}`);return Mp(r)}export{Fa as mcpExtensionCatalogue,Ja as mcpExtensionMaturity,yP as resolveMcpDescriptionComponentReferences,uP as resolveMcpDescriptionSpecification,hb as specificationProvenance,fP as supportedProtocolVersions,mP as supportedSpecifications,cP as validateMcpDescription}; +var Pc=Object.defineProperty;var il=(t,s)=>()=>(s||t((s={exports:{}}).exports,s),s.exports),cs=(t,s)=>{for(var d in s)Pc(t,d,{get:s[d],enumerable:!0})};var Lm=il(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});function Um(t){let s=t.length,d=0,b=0,u;for(;b=55296&&u<=56319&&b{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.formatNames=Wt.fastFormats=Wt.fullFormats=void 0;function Ht(t,s){return{validate:t,compare:s}}Wt.fullFormats={date:Ht(Wm,xl),time:Ht(ql(!0),zl),"date-time":Ht(Fm(!0),Bm),"iso-time":Ht(ql(),Km),"iso-date-time":Ht(Fm(),Qm),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Ac,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Zc,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:xc,int32:{type:"number",validate:Nc},int64:{type:"number",validate:_c},float:{type:"number",validate:Hm},double:{type:"number",validate:Hm},password:!0,binary:!0};Wt.fastFormats={...Wt.fullFormats,date:Ht(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,xl),time:Ht(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,zl),"date-time":Ht(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Bm),"iso-time":Ht(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Km),"iso-date-time":Ht(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Qm),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Wt.formatNames=Object.keys(Wt.fullFormats);function kc(t){return t%4===0&&(t%100!==0||t%400===0)}var jc=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,vc=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Wm(t){let s=jc.exec(t);if(!s)return!1;let d=+s[1],b=+s[2],u=+s[3];return b>=1&&b<=12&&u>=1&&u<=(b===2&&kc(d)?29:vc[b])}function xl(t,s){if(t&&s)return t>s?1:t23||i>59||t&&!r)return!1;if(u<=23&&f<=59&&e<60)return!0;let n=f-i*a,p=u-o*a-(n<0?1:0);return(p===23||p===-1)&&(n===59||n===-1)&&e<61}}function zl(t,s){if(!(t&&s))return;let d=new Date("2020-01-01T"+t).valueOf(),b=new Date("2020-01-01T"+s).valueOf();if(d&&b)return d-b}function Km(t,s){if(!(t&&s))return;let d=Ol.exec(t),b=Ol.exec(s);if(d&&b)return t=d[1]+d[2]+d[3],s=b[1]+b[2]+b[3],t>s?1:t=zc}function _c(t){return Number.isInteger(t)}function Hm(){return!0}var Tc=/[^\\]\\Z/;function Zc(t){if(Tc.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Gm=il((_0,Ym)=>{"use strict";Ym.exports=function t(s,d){if(s===d)return!0;if(s&&d&&typeof s=="object"&&typeof d=="object"){if(s.constructor!==d.constructor)return!1;var b,u,f;if(Array.isArray(s)){if(b=s.length,b!=d.length)return!1;for(u=b;u--!==0;)if(!t(s[u],d[u]))return!1;return!0}if(s.constructor===RegExp)return s.source===d.source&&s.flags===d.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===d.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===d.toString();if(f=Object.keys(s),b=f.length,b!==Object.keys(d).length)return!1;for(u=b;u--!==0;)if(!Object.prototype.hasOwnProperty.call(d,f[u]))return!1;for(u=b;u--!==0;){var e=f[u];if(!t(s[e],d[e]))return!1}return!0}return s!==s&&d!==d}});var ol=il(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});var Xm=Gm();Xm.code='require("ajv/dist/runtime/equal").default';Nl.default=Xm});var Rl={};cs(Rl,{schemaSha256:()=>Zh,snapshotTag:()=>Th,specification:()=>Dl,supportedProtocolVersions:()=>Vl,validate:()=>Dh});var Mm={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/0.8.0.json",title:"MCP Description",description:"MCP Description 0.8.0 Community Working Draft 1 (v0.8.0-draft.1; unreleased).",type:"object",required:["mcpdesc","info","protocolVersions","transports"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",items:{$ref:"#/$defs/tool"}},resources:{type:"array",items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",items:{$ref:"#/$defs/prompt"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},jsonSchemaObject:{type:"object",additionalProperties:!0},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},additionalProperties:!1},icons:{type:"array",items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},additionalProperties:!1,minProperties:1},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/toolExample"}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/resourceExample"}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/resourceTemplateExample"}},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},name:{type:"string",minLength:1},inputSchema:{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{required:["type"],properties:{type:{const:"object"}}}]},outputSchema:{$ref:"#/$defs/jsonSchemaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},name:{type:"string"},arguments:{type:"array",items:{$ref:"#/$defs/promptArgument"}},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},additionalProperties:!1},extensionCapabilities:{type:"object",propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!0}}};import{Validator as Hd}from"@cfworker/json-schema";var Sc=nl,Ic={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"urn:mcpdesc:standalone:0.8.0-draft.1",title:"MCP Description",description:"MCP Description 0.8.0 Community Working Draft 1 (v0.8.0-draft.1; unreleased).",type:"object",required:["mcpdesc","info","protocolVersions","transports"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",items:{$ref:"#/$defs/tool"}},resources:{type:"array",items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",items:{$ref:"#/$defs/prompt"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},jsonSchemaObject:{type:"object",additionalProperties:!0},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},additionalProperties:!1},icons:{type:"array",items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},additionalProperties:!1,minProperties:1},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/toolExample"}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/resourceExample"}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/resourceTemplateExample"}},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},name:{type:"string",minLength:1},inputSchema:{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{required:["type"],properties:{type:{const:"object"}}}]},outputSchema:{$ref:"#/$defs/jsonSchemaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},name:{type:"string"},arguments:{type:"array",items:{$ref:"#/$defs/promptArgument"}},elicitations:{type:"array",items:{$ref:"#/$defs/elicitationDeclaration"}}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},additionalProperties:!1},extensionCapabilities:{type:"object",propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!0}}};var re=Object.prototype.hasOwnProperty,te=Lm().default,x=new RegExp("^x-","u"),Cc={type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},additionalProperties:!1};var Vc={type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},additionalProperties:!1},D=El().fullFormats.uri;function Ke(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ke.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),Array.isArray(t)){let o=t.length;for(let i=0;i1){e:for(;i--;)for(n=i;n--;)if(ds(t[i],t[n])){let p={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[p]:e.push(p),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return be.errors=e,r===0}be.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};var H=new RegExp("^[A-Za-z0-9._-]+$","u");function Ae(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ae.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),r++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),r++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return Ae.errors=e,r===0}Ae.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function Is(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Is.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="type"||m==="url"||m==="security")){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&(be(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?be.errors:e.concat(be.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}t.security!==void 0&&(Ae(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ae.errors:e.concat(Ae.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="type"||m==="command"||m==="args"||m==="env"||m==="security")){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&(be(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?be.errors:e.concat(be.errors),r=e.length)),t.type!==void 0&&t.type!=="stdio"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"stdio"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.command!==void 0&&typeof t.command!="string"){let m={instancePath:s+"/command",schemaPath:"#/oneOf/1/properties/command/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.args!==void 0){let m=t.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var l=k===r;if(!l){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=p===r;if(w){i=!0,n=0;var c=!0}let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}if(t.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),r++}if(t.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="data"||g==="mimeType"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0){let g=t.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:ef.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),r++}}if(t.data!==void 0&&typeof t.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.annotations!==void 0){let g=t.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var m=k===r;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=h===r;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="type"||k==="resource"||k==="annotations"||k==="_meta")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}if(t.resource!==void 0&&(er(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?er.errors:e.concat(er.errors),r=e.length)),t.annotations!==void 0){let k=t.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),r++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}}if(k.lastModified!==void 0&&typeof k.lastModified!="string"){let v={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}if(t._meta!==void 0){let k=t._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=r;if(typeof v=="string"&&!J.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),r++}var y=P===r;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}var w=g===r;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),r++}if(t.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),r++}if(t.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!re.call(ef.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.type!==void 0&&t.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}if(t.uri!==void 0){let P=t.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.name!==void 0&&typeof t.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.title!==void 0&&typeof t.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.size!==void 0&&typeof t.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}if(t.icons!==void 0&&(Ke(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Ke.errors:e.concat(Ke.errors),r=e.length)),t.annotations!==void 0){let P=t.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let q=j.length;for(let A=0;A1||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[q]:e.push(q),r++}if(j<0||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[q]:e.push(q),r++}}if(P.lastModified!==void 0&&typeof P.lastModified!="string"){let j={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t._meta!==void 0){let P=t._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let q=r;if(typeof j=="string"&&!J.test(j)){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[A]:e.push(A),r++}var $=q===r;if(!$){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[A]:e.push(A),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var w=k===r;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),r++}return Ms.errors=e,a.props=c,r===0}Ms.evaluated={dynamicProps:!0,dynamicItems:!1};function Us(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Us.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t.resultType!==void 0&&t.resultType!=="complete"){let i={instancePath:s+"/resultType",schemaPath:"#/properties/resultType/const",keyword:"const",params:{allowedValue:"complete"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.maxLength!==void 0){let y=t.maxLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),r++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.format!==void 0){let y=t.format;if(!(y==="email"||y==="uri"||y==="date"||y==="date-time")){let $={instancePath:s+"/format",schemaPath:"#/oneOf/0/properties/format/enum",keyword:"enum",params:{allowedValues:rf.oneOf[0].properties.format.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}if(t.default!==void 0&&typeof t.default!="string"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/0/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="type"||y==="title"||y==="description"||y==="minimum"||y==="maximum"||y==="default")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let y=t.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:rf.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}if(t.title!==void 0&&typeof t.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.description!==void 0&&typeof t.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.default!==void 0&&typeof t.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="title"||g==="description"||g==="default")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0&&t.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}if(t.title!==void 0&&typeof t.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.description!==void 0&&typeof t.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var h=y===r;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="type"||k==="title"||k==="description"||k==="enum"||k==="enumNames"||k==="default")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="string"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}if(t.title!==void 0&&typeof t.title!="string"){let k={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.description!==void 0&&typeof t.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.enum!==void 0){let k=t.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.maxItems!==void 0){let q=t.maxItems;if(!(typeof q=="number"&&!(q%1)&&!isNaN(q))){let A={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[A]:e.push(A),r++}if(typeof q=="number"&&(q<0||isNaN(q))){let A={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.items!==void 0){let q=t.items,A=r,E=!1,T=null,z=r;if(q&&typeof q=="object"&&!Array.isArray(q)){if(q.type===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[N]:e.push(N),r++}if(q.enum===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[N]:e.push(N),r++}for(let N in q)if(!(N==="type"||N==="enum")){let R={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};e===null?e=[R]:e.push(R),r++}if(q.type!==void 0&&q.type!=="string"){let N={instancePath:s+"/items/type",schemaPath:"#/oneOf/5/properties/items/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[N]:e.push(N),r++}if(q.enum!==void 0){let N=q.enum;if(Array.isArray(N)){let R=N.length;for(let U=0;U1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){p=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:p},message:"must NOT have duplicate items (items ## "+p+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),r++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Hs.errors=e,r===0}Hs.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function qt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=qt.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r,l=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let k;if(t.url===void 0&&(k="url")){let v={};e===null?e=[v]:e.push(v),r++}}var h=c===r;if(h){let k={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[k]:e.push(k),r++}else r=l,e!==null&&(l?e.length=l:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let k={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[k]:e.push(k),r++}if(t.mode!==void 0&&t.mode!=="form"){let k={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}}var O=p===r;if(O){i=!0,n=0;var m={};m.mode=!0}let w=r,y=r,$=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let k;if(t.requestedSchema===void 0&&(k="requestedSchema")){let v={};e===null?e=[v]:e.push(v),r++}}var g=$===r;if(g){let k={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[k]:e.push(k),r++}else r=y,e!==null&&(y?e.length=y:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let k={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}var O=w===r;if(O&&i?(i=!1,n=[n,1]):O&&(i=!0,n=1,m!==!0&&(m=m||{},m.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let k={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[k]:e.push(k),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let k={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[k]:e.push(k),r++}if(t.mode===void 0){let k={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[k]:e.push(k),r++}if(t.message===void 0){let k={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!re.call(tf.properties,k)){let v={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.name!==void 0){let k=t.name;if(typeof k=="string"){if(!H.test(k)){let v={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}if(t.mode!==void 0){let k=t.mode;if(!(k==="form"||k==="url")){let v={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:tf.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[v]:e.push(v),r++}}if(t.message!==void 0){let k=t.message;if(typeof k=="string"){if(te(k)<1){let v={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}if(t.when!==void 0){let k=t.when;if(typeof k=="string"){if(te(k)<1){let v={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}if(t.requestedSchema!==void 0&&(Hs(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Hs.errors:e.concat(Hs.errors),r=e.length)),t.url!==void 0){let k=t.url;if(typeof k=="string"){if(!D(k)){let v={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}if(t.onDecline!==void 0){let k=t.onDecline;if(typeof k=="string"){if(te(k)<1){let v={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}if(t.onCancel!==void 0){let k=t.onCancel;if(typeof k=="string"){if(te(k)<1){let v={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}t.protocolVersions!==void 0&&(be(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?be.errors:e.concat(be.errors),r=e.length))}else{let k={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}return qt.errors=e,r===0}qt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ws(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ws.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!re.call(Mc.properties,i)){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.protocolVersions!==void 0&&(be(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?be.errors:e.concat(be.errors),r=e.length)),t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.icons!==void 0&&(Ke(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Ke.errors:e.concat(Ke.errors),r=e.length)),t.tags!==void 0){let i=t.tags;if(Array.isArray(i)){let n=i.length;for(let c=0;c1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(Ae(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ae.errors:e.concat(Ae.errors),r=e.length)),t.name!==void 0){let i=t.name;if(typeof i=="string"){if(te(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}if(t.inputSchema!==void 0){let i=t.inputSchema;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/inputSchema",schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),r++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),r++}}}if(t.outputSchema!==void 0){let i=t.outputSchema;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/outputSchema",schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.execution!==void 0){let i=t.execution;if(i&&typeof i=="object"&&!Array.isArray(i)){for(let n in i)if(n!=="taskSupport"){let p={instancePath:s+"/execution",schemaPath:"#/$defs/execution/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[p]:e.push(p),r++}if(i.taskSupport!==void 0){let n=i.taskSupport;if(typeof n!="string"){let p={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[p]:e.push(p),r++}if(!(n==="forbidden"||n==="optional"||n==="required")){let p={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/enum",keyword:"enum",params:{allowedValues:Uc.properties.taskSupport.enum},message:"must be equal to one of the allowed values"};e===null?e=[p]:e.push(p),r++}}}else{let n={instancePath:s+"/execution",schemaPath:"#/$defs/execution/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(Fs(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Fs.errors:e.concat(Fs.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}if(t.cacheScope!==void 0){let i=t.cacheScope;if(!(i==="public"||i==="private")){let n={instancePath:s+"/cacheScope",schemaPath:"#/properties/cacheScope/enum",keyword:"enum",params:{allowedValues:Fc.properties.cacheScope.enum},message:"must be equal to one of the allowed values"};e===null?e=[n]:e.push(n),r++}}if(t.contents!==void 0){let i=t.contents;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/contents",schemaPath:"#/properties/contents/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(Ae(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ae.errors:e.concat(Ae.errors),r=e.length)),t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.size!==void 0&&typeof t.size!="number"){let i={instancePath:s+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(Bs(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Bs.errors:e.concat(Bs.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(Ae(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ae.errors:e.concat(Ae.errors),r=e.length)),t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(Gs(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Gs.errors:e.concat(Gs.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(Ae(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ae.errors:e.concat(Ae.errors),r=e.length)),t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){let n=i.length;for(let p=0;p1){e:for(;i--;)for(n=i;n--;)if(ds(t[i],t[n])){let p={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[p]:e.push(p),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return $e.errors=e,r===0}$e.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function xe(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=xe.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),r++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),r++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return xe.errors=e,r===0}xe.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function oi(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=oi.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="type"||m==="url"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&($e(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?$e.errors:e.concat($e.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}t.security!==void 0&&(xe(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?xe.errors:e.concat(xe.errors),r=e.length));for(let m in t)x.test(m)&&(M(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?M.errors:e.concat(M.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="type"||m==="command"||m==="args"||m==="env"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&($e(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?$e.errors:e.concat($e.errors),r=e.length)),t.type!==void 0&&t.type!=="stdio"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"stdio"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.command!==void 0&&typeof t.command!="string"){let m={instancePath:s+"/command",schemaPath:"#/oneOf/1/properties/command/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.args!==void 0){let m=t.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/defaultIds",schemaPath:"#/$defs/provenanceIds/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/defaultIds",schemaPath:"#/$defs/provenanceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}for(let i in t)x.test(i)&&(M(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?M.errors:e.concat(M.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return ui.errors=e,r===0}ui.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var nt=new RegExp("^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$","u");function Rt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Rt.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.$componentRef===void 0){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if($!=="$componentRef"){let g={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(t.$componentRef!==void 0){let $=t.$componentRef;if(typeof $=="string"){if(!nt.test($)){let g={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var y=p===r;if(y){i=!0,n=0;var l=!0}let c=r;if(!(t&&typeof t=="object"&&!Array.isArray(t))){let $={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}let h=r,m=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let $;if(t.$componentRef===void 0&&($="$componentRef")){let g={};e===null?e=[g]:e.push(g),r++}}var w=m===r;if(w){let $={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[$]:e.push($),r++}else r=h,e!==null&&(h?e.length=h:e=null);var y=c===r;if(y&&i?(i=!1,n=[n,1]):y&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let $={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}return Rt.errors=e,a.props=l,r===0}Rt.evaluated={dynamicProps:!0,dynamicItems:!1};var sf={oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},zs={type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0};function rr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=rr.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let y={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[y]:e.push(y),r++}if(t.text===void 0){let y={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="uri"||y==="mimeType"||y==="text"||y==="_meta")){let $={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.uri!==void 0){let y=t.uri;if(typeof y=="string"){if(!D(y)){let $={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let y={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.text!==void 0&&typeof t.text!="string"){let y={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t._meta!==void 0){let y=t._meta;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=r;if(typeof $=="string"&&!J.test($)){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:$};e===null?e=[O]:e.push(O),r++}var l=g===r;if(!l){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};e===null?e=[O]:e.push(O),r++}}else{let $={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var w=p===r;if(w){i=!0,n=0;var c=!0}let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[y]:e.push(y),r++}if(t.blob===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="uri"||y==="mimeType"||y==="blob"||y==="_meta")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.uri!==void 0){let y=t.uri;if(typeof y=="string"){if(!D(y)){let $={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let y={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.blob!==void 0&&typeof t.blob!="string"){let y={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t._meta!==void 0){let y=t._meta;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=r;if(typeof $=="string"&&!J.test($)){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:$};e===null?e=[O]:e.push(O),r++}var m=g===r;if(!m){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};e===null?e=[O]:e.push(O),r++}}else{let $={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var w=h===r;if(w&&i?(i=!1,n=[n,1]):w&&(i=!0,n=1,c!==!0&&(c=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let y={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[y]:e.push(y),r++}return rr.errors=e,a.props=c,r===0}rr.evaluated={dynamicProps:!0,dynamicItems:!1};function ci(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ci.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}if(t.text===void 0){let g={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="text"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0&&t.type!=="text"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}if(t.text!==void 0&&typeof t.text!="string"){let g={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.annotations!==void 0){let g=t.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var l=k===r;if(!l){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=p===r;if(w){i=!0,n=0;var c=!0}let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}if(t.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),r++}if(t.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="data"||g==="mimeType"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0){let g=t.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:sf.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),r++}}if(t.data!==void 0&&typeof t.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.annotations!==void 0){let g=t.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var m=k===r;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=h===r;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="type"||k==="resource"||k==="annotations"||k==="_meta")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}if(t.resource!==void 0&&(rr(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?rr.errors:e.concat(rr.errors),r=e.length)),t.annotations!==void 0){let k=t.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),r++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}}if(k.lastModified!==void 0&&typeof k.lastModified!="string"){let v={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}if(t._meta!==void 0){let k=t._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=r;if(typeof v=="string"&&!J.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),r++}var y=P===r;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}var w=g===r;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),r++}if(t.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),r++}if(t.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!re.call(sf.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.type!==void 0&&t.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}if(t.uri!==void 0){let P=t.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.name!==void 0&&typeof t.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.title!==void 0&&typeof t.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.size!==void 0&&typeof t.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}if(t.icons!==void 0&&(Be(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Be.errors:e.concat(Be.errors),r=e.length)),t.annotations!==void 0){let P=t.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let q=j.length;for(let A=0;A1||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[q]:e.push(q),r++}if(j<0||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[q]:e.push(q),r++}}if(P.lastModified!==void 0&&typeof P.lastModified!="string"){let j={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t._meta!==void 0){let P=t._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let q=r;if(typeof j=="string"&&!J.test(j)){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[A]:e.push(A),r++}var $=q===r;if(!$){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[A]:e.push(A),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var w=k===r;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),r++}return ci.errors=e,a.props=c,r===0}ci.evaluated={dynamicProps:!0,dynamicItems:!1};function yi(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=yi.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t.resultType!==void 0&&t.resultType!=="complete"){let i={instancePath:s+"/resultType",schemaPath:"#/properties/resultType/const",keyword:"const",params:{allowedValue:"complete"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}if(t.cacheScope!==void 0){let i=t.cacheScope;if(!(i==="public"||i==="private")){let n={instancePath:s+"/cacheScope",schemaPath:"#/properties/cacheScope/enum",keyword:"enum",params:{allowedValues:ty.properties.cacheScope.enum},message:"must be equal to one of the allowed values"};e===null?e=[n]:e.push(n),r++}}if(t.contents!==void 0){let i=t.contents;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/contents",schemaPath:"#/properties/contents/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.maxLength!==void 0){let y=t.maxLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),r++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.format!==void 0){let y=t.format;if(!(y==="email"||y==="uri"||y==="date"||y==="date-time")){let $={instancePath:s+"/format",schemaPath:"#/oneOf/0/properties/format/enum",keyword:"enum",params:{allowedValues:nf.oneOf[0].properties.format.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}if(t.default!==void 0&&typeof t.default!="string"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/0/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="type"||y==="title"||y==="description"||y==="minimum"||y==="maximum"||y==="default")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let y=t.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:nf.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}if(t.title!==void 0&&typeof t.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.description!==void 0&&typeof t.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.default!==void 0&&typeof t.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="title"||g==="description"||g==="default")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0&&t.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}if(t.title!==void 0&&typeof t.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.description!==void 0&&typeof t.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var h=y===r;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="type"||k==="title"||k==="description"||k==="enum"||k==="enumNames"||k==="default")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="string"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}if(t.title!==void 0&&typeof t.title!="string"){let k={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.description!==void 0&&typeof t.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.enum!==void 0){let k=t.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.maxItems!==void 0){let q=t.maxItems;if(!(typeof q=="number"&&!(q%1)&&!isNaN(q))){let A={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[A]:e.push(A),r++}if(typeof q=="number"&&(q<0||isNaN(q))){let A={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.items!==void 0){let q=t.items,A=r,E=!1,T=null,z=r;if(q&&typeof q=="object"&&!Array.isArray(q)){if(q.type===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[N]:e.push(N),r++}if(q.enum===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[N]:e.push(N),r++}for(let N in q)if(!(N==="type"||N==="enum")){let R={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};e===null?e=[R]:e.push(R),r++}if(q.type!==void 0&&q.type!=="string"){let N={instancePath:s+"/items/type",schemaPath:"#/oneOf/5/properties/items/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[N]:e.push(N),r++}if(q.enum!==void 0){let N=q.enum;if(Array.isArray(N)){let R=N.length;for(let U=0;U1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){p=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:p},message:"must NOT have duplicate items (items ## "+p+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),r++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return ki.errors=e,r===0}ki.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function xt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=xt.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r,l=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.url===void 0&&(P="url")){let j={};e===null?e=[j]:e.push(j),r++}}var h=c===r;if(h){let P={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=l,e!==null&&(l?e.length=l:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let P={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[P]:e.push(P),r++}if(t.mode!==void 0&&t.mode!=="form"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}}var O=p===r;if(O){i=!0,n=0;var m={};m.mode=!0}let w=r,y=r,$=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.requestedSchema===void 0&&(P="requestedSchema")){let j={};e===null?e=[j]:e.push(j),r++}}var g=$===r;if(g){let P={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=y,e!==null&&(y?e.length=y:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}var O=w===r;if(O&&i?(i=!1,n=[n,1]):O&&(i=!0,n=1,m!==!0&&(m=m||{},m.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}if(t.mode===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[P]:e.push(P),r++}if(t.message===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!(re.call(of.properties,P)||x.test(P))){let j={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.name!==void 0){let P=t.name;if(typeof P=="string"){if(!H.test(P)){let j={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.mode!==void 0){let P=t.mode;if(!(P==="form"||P==="url")){let j={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:of.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[j]:e.push(j),r++}}if(t.message!==void 0){let P=t.message;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.when!==void 0){let P=t.when;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.requestedSchema!==void 0){let P=t.requestedSchema,j=r,q=!1,A=null,E=r;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.$componentRef===void 0){let z={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[z]:e.push(z),r++}for(let z in P)if(z!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:z},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),r++}if(P.$componentRef!==void 0){let z=P.$componentRef;if(typeof z=="string"){if(!nt.test(z)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),r++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),r++}}}else{let z={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[z]:e.push(z),r++}var v=E===r;if(v){q=!0,A=0;var k=!0}let T=r;ki(P,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?ki.errors:e.concat(ki.errors),r=e.length);var v=T===r;if(v&&q?(q=!1,A=[A,1]):v&&(q=!0,A=1,k!==!0&&(k=!0)),q)r=j,e!==null&&(j?e.length=j:e=null);else{let z={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:A},message:"must match exactly one schema in oneOf"};e===null?e=[z]:e.push(z),r++}}if(t.url!==void 0){let P=t.url;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.onDecline!==void 0){let P=t.onDecline;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.onCancel!==void 0){let P=t.onCancel;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}t.protocolVersions!==void 0&&($e(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?$e.errors:e.concat($e.errors),r=e.length));for(let P in t)x.test(P)&&(M(t[P],{instancePath:s+"/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:P,rootData:u,dynamicAnchors:f})||(e=e===null?M.errors:e.concat(M.errors),r=e.length))}else{let P={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}return xt.errors=e,r===0}xt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ji(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ji.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let l={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[l]:e.push(l),r++}if(t.inputSchema===void 0){let l={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[l]:e.push(l),r++}for(let l in t)if(!(re.call(sy.properties,l)||x.test(l))){let c={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),r++}if(t.protocolVersions!==void 0&&($e(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?$e.errors:e.concat($e.errors),r=e.length)),t.title!==void 0&&typeof t.title!="string"){let l={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),r++}if(t.description!==void 0&&typeof t.description!="string"){let l={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),r++}if(t.icons!==void 0&&(Be(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Be.errors:e.concat(Be.errors),r=e.length)),t.tags!==void 0){let l=t.tags;if(Array.isArray(l)){if(l.length<1){let w={instancePath:s+"/tags",schemaPath:"#/properties/tags/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),r++}let c=l.length;for(let w=0;w1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),r++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let l={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[l]:e.push(l),r++}if(t._meta!==void 0){let l=t._meta;if(l&&typeof l=="object"&&!Array.isArray(l))for(let c in l){let h=r;if(typeof c=="string"&&!J.test(c)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:c};e===null?e=[m]:e.push(m),r++}var o=h===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:c},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let c={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.security!==void 0&&(xe(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?xe.errors:e.concat(xe.errors),r=e.length)),t.clientRequirements!==void 0&&(At(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?At.errors:e.concat(At.errors),r=e.length)),t.provenanceIds!==void 0){let l=t.provenanceIds;if(Array.isArray(l)){if(l.length<1){let w={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),r++}let c=l.length;for(let w=0;w1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),r++;break}w[y]=h}}}}else{let c={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.name!==void 0){let l=t.name;if(typeof l=="string"){if(te(l)<1){let c={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[c]:e.push(c),r++}}else{let c={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}}if(t.inputSchema!==void 0){let l=t.inputSchema,c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!nt.test($)){let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var p=w===r;if(p){h=!0,m=0;var i=!0}let y=r;if(!Rt(l,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?Rt.errors:e.concat(Rt.errors),r=e.length;else var n=Rt.evaluated.props;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(l.type!==void 0&&l.type!=="object"){let $={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}n!==!0&&(n=n||{},n.type=!0);var p=y===r;if(p&&h?(h=!1,m=[m,1]):p&&(h=!0,m=1,i!==!0&&n!==void 0&&(n===!0?i=!0:(i=i||{},Object.assign(i,n)))),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}if(t.outputSchema!==void 0&&(Rt(t.outputSchema,{instancePath:s+"/outputSchema",parentData:t,parentDataProperty:"outputSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Rt.errors:e.concat(Rt.errors),r=e.length)),t.annotations!==void 0){let l=t.annotations;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.title!==void 0&&typeof l.title!="string"){let c={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(l.readOnlyHint!==void 0&&typeof l.readOnlyHint!="boolean"){let c={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.destructiveHint!==void 0&&typeof l.destructiveHint!="boolean"){let c={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.idempotentHint!==void 0&&typeof l.idempotentHint!="boolean"){let c={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.openWorldHint!==void 0&&typeof l.openWorldHint!="boolean"){let c={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}}else{let c={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.execution!==void 0){let l=t.execution;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let c in l)if(c!=="taskSupport"){let h={instancePath:s+"/execution",schemaPath:"#/$defs/execution/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};e===null?e=[h]:e.push(h),r++}if(l.taskSupport!==void 0){let c=l.taskSupport;if(typeof c!="string"){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(!(c==="forbidden"||c==="optional"||c==="required")){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/enum",keyword:"enum",params:{allowedValues:iy.properties.taskSupport.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),r++}}}else{let c={instancePath:s+"/execution",schemaPath:"#/$defs/execution/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.examples!==void 0&&(Pi(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Pi.errors:e.concat(Pi.errors),r=e.length)),t.elicitations!==void 0){let l=t.elicitations;if(Array.isArray(l)){if(l.length<1){let h={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[h]:e.push(h),r++}let c=l.length;for(let h=0;h1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(xe(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?xe.errors:e.concat(xe.errors),r=e.length)),t.clientRequirements!==void 0&&(At(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?At.errors:e.concat(At.errors),r=e.length)),t.provenanceIds!==void 0){let i=t.provenanceIds;if(Array.isArray(i)){if(i.length<1){let c={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),r++}let n=i.length;for(let c=0;c1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.size!==void 0&&typeof t.size!="number"){let i={instancePath:s+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(vi(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?vi.errors:e.concat(vi.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(xe(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?xe.errors:e.concat(xe.errors),r=e.length)),t.clientRequirements!==void 0&&(At(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?At.errors:e.concat(At.errors),r=e.length)),t.provenanceIds!==void 0){let i=t.provenanceIds;if(Array.isArray(i)){if(i.length<1){let c={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),r++}let n=i.length;for(let c=0;c1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(qi(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?qi.errors:e.concat(qi.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(xe(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?xe.errors:e.concat(xe.errors),r=e.length)),t.clientRequirements!==void 0&&(At(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?At.errors:e.concat(At.errors),r=e.length)),t.provenanceIds!==void 0){let i=t.provenanceIds;if(Array.isArray(i)){if(i.length<1){let c={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),r++}let n=i.length;for(let c=0;c1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/provenanceIds",schemaPath:"#/$defs/provenanceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){e:for(;i--;)for(n=i;n--;)if(ds(t[i],t[n])){let p={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[p]:e.push(p),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return Pe.errors=e,r===0}Pe.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function ze(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ze.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),r++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),r++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return ze.errors=e,r===0}ze.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function Si(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Si.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="type"||m==="url"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&(Pe(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?Pe.errors:e.concat(Pe.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}t.security!==void 0&&(ze(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ze.errors:e.concat(ze.errors),r=e.length));for(let m in t)x.test(m)&&(L(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?L.errors:e.concat(L.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="type"||m==="command"||m==="args"||m==="env"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&(Pe(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?Pe.errors:e.concat(Pe.errors),r=e.length)),t.type!==void 0&&t.type!=="stdio"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"stdio"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.command!==void 0&&typeof t.command!="string"){let m={instancePath:s+"/command",schemaPath:"#/oneOf/1/properties/command/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.args!==void 0){let m=t.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var l=k===r;if(!l){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=p===r;if(w){i=!0,n=0;var c=!0}let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}if(t.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),r++}if(t.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="data"||g==="mimeType"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0){let g=t.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:af.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),r++}}if(t.data!==void 0&&typeof t.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.annotations!==void 0){let g=t.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var m=k===r;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=h===r;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="type"||k==="resource"||k==="annotations"||k==="_meta")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}if(t.resource!==void 0&&(ar(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?ar.errors:e.concat(ar.errors),r=e.length)),t.annotations!==void 0){let k=t.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),r++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}}if(k.lastModified!==void 0&&typeof k.lastModified!="string"){let v={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}if(t._meta!==void 0){let k=t._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=r;if(typeof v=="string"&&!J.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),r++}var y=P===r;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}var w=g===r;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),r++}if(t.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),r++}if(t.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!re.call(af.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.type!==void 0&&t.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}if(t.uri!==void 0){let P=t.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.name!==void 0&&typeof t.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.title!==void 0&&typeof t.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.size!==void 0&&typeof t.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}if(t.icons!==void 0&&(Qe(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Qe.errors:e.concat(Qe.errors),r=e.length)),t.annotations!==void 0){let P=t.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let q=j.length;for(let A=0;A1||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[q]:e.push(q),r++}if(j<0||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[q]:e.push(q),r++}}if(P.lastModified!==void 0&&typeof P.lastModified!="string"){let j={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t._meta!==void 0){let P=t._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let q=r;if(typeof j=="string"&&!J.test(j)){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[A]:e.push(A),r++}var $=q===r;if(!$){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[A]:e.push(A),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var w=k===r;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),r++}return Di.errors=e,a.props=c,r===0}Di.evaluated={dynamicProps:!0,dynamicItems:!1};function Ri(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ri.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t.resultType!==void 0&&t.resultType!=="complete"){let i={instancePath:s+"/resultType",schemaPath:"#/properties/resultType/const",keyword:"const",params:{allowedValue:"complete"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}if(t.cacheScope!==void 0){let i=t.cacheScope;if(!(i==="public"||i==="private")){let n={instancePath:s+"/cacheScope",schemaPath:"#/properties/cacheScope/enum",keyword:"enum",params:{allowedValues:yy.properties.cacheScope.enum},message:"must be equal to one of the allowed values"};e===null?e=[n]:e.push(n),r++}}if(t.contents!==void 0){let i=t.contents;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/contents",schemaPath:"#/properties/contents/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.maxLength!==void 0){let y=t.maxLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),r++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.format!==void 0){let y=t.format;if(!(y==="email"||y==="uri"||y==="date"||y==="date-time")){let $={instancePath:s+"/format",schemaPath:"#/oneOf/0/properties/format/enum",keyword:"enum",params:{allowedValues:lf.oneOf[0].properties.format.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}if(t.default!==void 0&&typeof t.default!="string"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/0/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="type"||y==="title"||y==="description"||y==="minimum"||y==="maximum"||y==="default")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let y=t.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:lf.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}if(t.title!==void 0&&typeof t.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.description!==void 0&&typeof t.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.default!==void 0&&typeof t.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="title"||g==="description"||g==="default")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0&&t.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}if(t.title!==void 0&&typeof t.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.description!==void 0&&typeof t.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var h=y===r;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="type"||k==="title"||k==="description"||k==="enum"||k==="enumNames"||k==="default")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="string"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}if(t.title!==void 0&&typeof t.title!="string"){let k={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.description!==void 0&&typeof t.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.enum!==void 0){let k=t.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.maxItems!==void 0){let q=t.maxItems;if(!(typeof q=="number"&&!(q%1)&&!isNaN(q))){let A={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[A]:e.push(A),r++}if(typeof q=="number"&&(q<0||isNaN(q))){let A={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.items!==void 0){let q=t.items,A=r,E=!1,T=null,z=r;if(q&&typeof q=="object"&&!Array.isArray(q)){if(q.type===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[N]:e.push(N),r++}if(q.enum===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[N]:e.push(N),r++}for(let N in q)if(!(N==="type"||N==="enum")){let R={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};e===null?e=[R]:e.push(R),r++}if(q.type!==void 0&&q.type!=="string"){let N={instancePath:s+"/items/type",schemaPath:"#/oneOf/5/properties/items/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[N]:e.push(N),r++}if(q.enum!==void 0){let N=q.enum;if(Array.isArray(N)){let R=N.length;for(let U=0;U1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){p=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:p},message:"must NOT have duplicate items (items ## "+p+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),r++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ki.errors=e,r===0}Ki.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Et(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Et.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r,l=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.url===void 0&&(P="url")){let j={};e===null?e=[j]:e.push(j),r++}}var h=c===r;if(h){let P={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=l,e!==null&&(l?e.length=l:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let P={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[P]:e.push(P),r++}if(t.mode!==void 0&&t.mode!=="form"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}}var O=p===r;if(O){i=!0,n=0;var m={};m.mode=!0}let w=r,y=r,$=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.requestedSchema===void 0&&(P="requestedSchema")){let j={};e===null?e=[j]:e.push(j),r++}}var g=$===r;if(g){let P={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=y,e!==null&&(y?e.length=y:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}var O=w===r;if(O&&i?(i=!1,n=[n,1]):O&&(i=!0,n=1,m!==!0&&(m=m||{},m.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}if(t.mode===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[P]:e.push(P),r++}if(t.message===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!(re.call(pf.properties,P)||x.test(P))){let j={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.name!==void 0){let P=t.name;if(typeof P=="string"){if(!H.test(P)){let j={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.mode!==void 0){let P=t.mode;if(!(P==="form"||P==="url")){let j={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:pf.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[j]:e.push(j),r++}}if(t.message!==void 0){let P=t.message;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.when!==void 0){let P=t.when;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.requestedSchema!==void 0){let P=t.requestedSchema,j=r,q=!1,A=null,E=r;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.$componentRef===void 0){let z={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[z]:e.push(z),r++}for(let z in P)if(z!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:z},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),r++}if(P.$componentRef!==void 0){let z=P.$componentRef;if(typeof z=="string"){if(!nt.test(z)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),r++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),r++}}}else{let z={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[z]:e.push(z),r++}var v=E===r;if(v){q=!0,A=0;var k=!0}let T=r;Ki(P,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Ki.errors:e.concat(Ki.errors),r=e.length);var v=T===r;if(v&&q?(q=!1,A=[A,1]):v&&(q=!0,A=1,k!==!0&&(k=!0)),q)r=j,e!==null&&(j?e.length=j:e=null);else{let z={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:A},message:"must match exactly one schema in oneOf"};e===null?e=[z]:e.push(z),r++}}if(t.url!==void 0){let P=t.url;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.onDecline!==void 0){let P=t.onDecline;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.onCancel!==void 0){let P=t.onCancel;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}t.protocolVersions!==void 0&&(Pe(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?Pe.errors:e.concat(Pe.errors),r=e.length));for(let P in t)x.test(P)&&(L(t[P],{instancePath:s+"/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:P,rootData:u,dynamicAnchors:f})||(e=e===null?L.errors:e.concat(L.errors),r=e.length))}else{let P={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}return Et.errors=e,r===0}Et.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Bi(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Bi.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let l={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[l]:e.push(l),r++}if(t.inputSchema===void 0){let l={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[l]:e.push(l),r++}for(let l in t)if(!(re.call(hy.properties,l)||x.test(l))){let c={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),r++}if(t.protocolVersions!==void 0&&(Pe(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?Pe.errors:e.concat(Pe.errors),r=e.length)),t.title!==void 0&&typeof t.title!="string"){let l={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),r++}if(t.description!==void 0&&typeof t.description!="string"){let l={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),r++}if(t.icons!==void 0&&(Qe(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Qe.errors:e.concat(Qe.errors),r=e.length)),t.tags!==void 0){let l=t.tags;if(Array.isArray(l)){if(l.length<1){let w={instancePath:s+"/tags",schemaPath:"#/properties/tags/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),r++}let c=l.length;for(let w=0;w1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),r++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let l={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[l]:e.push(l),r++}if(t._meta!==void 0){let l=t._meta;if(l&&typeof l=="object"&&!Array.isArray(l))for(let c in l){let h=r;if(typeof c=="string"&&!J.test(c)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:c};e===null?e=[m]:e.push(m),r++}var o=h===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:c},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let c={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.security!==void 0&&(ze(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ze.errors:e.concat(ze.errors),r=e.length)),t.clientRequirements!==void 0&&(zt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?zt.errors:e.concat(zt.errors),r=e.length)),t.name!==void 0){let l=t.name;if(typeof l=="string"){if(te(l)<1){let c={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[c]:e.push(c),r++}}else{let c={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}}if(t.inputSchema!==void 0){let l=t.inputSchema,c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!nt.test($)){let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var p=w===r;if(p){h=!0,m=0;var i=!0}let y=r;if(!Mt(l,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?Mt.errors:e.concat(Mt.errors),r=e.length;else var n=Mt.evaluated.props;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(l.type!==void 0&&l.type!=="object"){let $={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}n!==!0&&(n=n||{},n.type=!0);var p=y===r;if(p&&h?(h=!1,m=[m,1]):p&&(h=!0,m=1,i!==!0&&n!==void 0&&(n===!0?i=!0:(i=i||{},Object.assign(i,n)))),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}if(t.outputSchema!==void 0&&(Mt(t.outputSchema,{instancePath:s+"/outputSchema",parentData:t,parentDataProperty:"outputSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Mt.errors:e.concat(Mt.errors),r=e.length)),t.annotations!==void 0){let l=t.annotations;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.title!==void 0&&typeof l.title!="string"){let c={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(l.readOnlyHint!==void 0&&typeof l.readOnlyHint!="boolean"){let c={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.destructiveHint!==void 0&&typeof l.destructiveHint!="boolean"){let c={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.idempotentHint!==void 0&&typeof l.idempotentHint!="boolean"){let c={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.openWorldHint!==void 0&&typeof l.openWorldHint!="boolean"){let c={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}}else{let c={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.execution!==void 0){let l=t.execution;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let c in l)if(c!=="taskSupport"){let h={instancePath:s+"/execution",schemaPath:"#/$defs/execution/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};e===null?e=[h]:e.push(h),r++}if(l.taskSupport!==void 0){let c=l.taskSupport;if(typeof c!="string"){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(!(c==="forbidden"||c==="optional"||c==="required")){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/enum",keyword:"enum",params:{allowedValues:gy.properties.taskSupport.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),r++}}}else{let c={instancePath:s+"/execution",schemaPath:"#/$defs/execution/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.examples!==void 0&&(Hi(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Hi.errors:e.concat(Hi.errors),r=e.length)),t.elicitations!==void 0){let l=t.elicitations;if(Array.isArray(l)){if(l.length<1){let h={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[h]:e.push(h),r++}let c=l.length;for(let h=0;h1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(ze(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ze.errors:e.concat(ze.errors),r=e.length)),t.clientRequirements!==void 0&&(zt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?zt.errors:e.concat(zt.errors),r=e.length)),t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.size!==void 0&&typeof t.size!="number"){let i={instancePath:s+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(Qi(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Qi.errors:e.concat(Qi.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(ze(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ze.errors:e.concat(ze.errors),r=e.length)),t.clientRequirements!==void 0&&(zt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?zt.errors:e.concat(zt.errors),r=e.length)),t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(Gi(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Gi.errors:e.concat(Gi.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(ze(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?ze.errors:e.concat(ze.errors),r=e.length)),t.clientRequirements!==void 0&&(zt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?zt.errors:e.concat(zt.errors),r=e.length)),t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){e:for(;i--;)for(n=i;n--;)if(ds(t[i],t[n])){let p={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[p]:e.push(p),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return we.errors=e,r===0}we.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function Ee(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ee.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),r++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),r++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return Ee.errors=e,r===0}Ee.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function ao(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ao.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="type"||m==="url"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&(we(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?we.errors:e.concat(we.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}t.security!==void 0&&(Ee(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length));for(let m in t)x.test(m)&&(Z(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="type"||m==="command"||m==="args"||m==="env"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&(we(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?we.errors:e.concat(we.errors),r=e.length)),t.type!==void 0&&t.type!=="stdio"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"stdio"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.command!==void 0&&typeof t.command!="string"){let m={instancePath:s+"/command",schemaPath:"#/oneOf/1/properties/command/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.args!==void 0){let m=t.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var l=k===r;if(!l){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=p===r;if(w){i=!0,n=0;var c=!0}let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}if(t.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),r++}if(t.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="data"||g==="mimeType"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0){let g=t.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:mf.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),r++}}if(t.data!==void 0&&typeof t.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.annotations!==void 0){let g=t.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var m=k===r;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=h===r;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="type"||k==="resource"||k==="annotations"||k==="_meta")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}if(t.resource!==void 0&&(ur(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?ur.errors:e.concat(ur.errors),r=e.length)),t.annotations!==void 0){let k=t.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),r++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}}if(k.lastModified!==void 0&&typeof k.lastModified!="string"){let v={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}if(t._meta!==void 0){let k=t._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=r;if(typeof v=="string"&&!J.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),r++}var y=P===r;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}var w=g===r;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),r++}if(t.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),r++}if(t.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!re.call(mf.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.type!==void 0&&t.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}if(t.uri!==void 0){let P=t.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.name!==void 0&&typeof t.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.title!==void 0&&typeof t.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.size!==void 0&&typeof t.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}if(t.icons!==void 0&&(Ye(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Ye.errors:e.concat(Ye.errors),r=e.length)),t.annotations!==void 0){let P=t.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let q=j.length;for(let A=0;A1||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[q]:e.push(q),r++}if(j<0||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[q]:e.push(q),r++}}if(P.lastModified!==void 0&&typeof P.lastModified!="string"){let j={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t._meta!==void 0){let P=t._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let q=r;if(typeof j=="string"&&!J.test(j)){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[A]:e.push(A),r++}var $=q===r;if(!$){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[A]:e.push(A),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var w=k===r;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),r++}return rt.errors=e,a.props=c,r===0}rt.evaluated={dynamicProps:!0,dynamicItems:!1};function cr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=cr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t.resultType!==void 0&&t.resultType!=="complete"){let i={instancePath:s+"/resultType",schemaPath:"#/properties/resultType/const",keyword:"const",params:{allowedValue:"complete"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}if(t.cacheScope!==void 0){let i=t.cacheScope;if(!(i==="public"||i==="private")){let n={instancePath:s+"/cacheScope",schemaPath:"#/properties/cacheScope/enum",keyword:"enum",params:{allowedValues:Ay.properties.cacheScope.enum},message:"must be equal to one of the allowed values"};e===null?e=[n]:e.push(n),r++}}if(t.contents!==void 0){let i=t.contents;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/contents",schemaPath:"#/properties/contents/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.maxLength!==void 0){let y=t.maxLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),r++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.format!==void 0){let y=t.format;if(!(y==="email"||y==="uri"||y==="date"||y==="date-time")){let $={instancePath:s+"/format",schemaPath:"#/oneOf/0/properties/format/enum",keyword:"enum",params:{allowedValues:ff.oneOf[0].properties.format.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}if(t.default!==void 0&&typeof t.default!="string"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/0/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="type"||y==="title"||y==="description"||y==="minimum"||y==="maximum"||y==="default")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let y=t.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:ff.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}if(t.title!==void 0&&typeof t.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.description!==void 0&&typeof t.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.default!==void 0&&typeof t.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="title"||g==="description"||g==="default")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0&&t.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}if(t.title!==void 0&&typeof t.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.description!==void 0&&typeof t.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var h=y===r;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="type"||k==="title"||k==="description"||k==="enum"||k==="enumNames"||k==="default")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="string"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}if(t.title!==void 0&&typeof t.title!="string"){let k={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.description!==void 0&&typeof t.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.enum!==void 0){let k=t.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.maxItems!==void 0){let q=t.maxItems;if(!(typeof q=="number"&&!(q%1)&&!isNaN(q))){let A={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[A]:e.push(A),r++}if(typeof q=="number"&&(q<0||isNaN(q))){let A={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.items!==void 0){let q=t.items,A=r,E=!1,T=null,z=r;if(q&&typeof q=="object"&&!Array.isArray(q)){if(q.type===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[N]:e.push(N),r++}if(q.enum===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[N]:e.push(N),r++}for(let N in q)if(!(N==="type"||N==="enum")){let R={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};e===null?e=[R]:e.push(R),r++}if(q.type!==void 0&&q.type!=="string"){let N={instancePath:s+"/items/type",schemaPath:"#/oneOf/5/properties/items/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[N]:e.push(N),r++}if(q.enum!==void 0){let N=q.enum;if(Array.isArray(N)){let R=N.length;for(let U=0;U1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){p=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:p},message:"must NOT have duplicate items (items ## "+p+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),r++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return $r.errors=e,r===0}$r.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function wo(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=wo.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),r++}if(t.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),r++}if(t.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="mode"||o==="message"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.mode!==void 0&&t.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.message!==void 0){let o=t.message;if(typeof o=="string"){if(te(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}t.requestedSchema!==void 0&&($r(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?$r.errors:e.concat($r.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return wo.errors=e,r===0}wo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ko(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ko.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;wo(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?wo.errors:e.concat(wo.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[m]:e.push(m),r++}if(t.message===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="mode"||m==="message"||m==="url")){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.mode!==void 0&&t.mode!=="url"){let m={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.message!==void 0){let m=t.message;if(typeof m=="string"){if(te(m)<1){let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return ko.errors=e,a.props=l,r===0}ko.evaluated={dynamicProps:!0,dynamicItems:!1};var _y={type:"object",required:["action"],properties:{action:{enum:["decline","cancel"]}},additionalProperties:!1};function jo(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=jo.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.action!==void 0&&t.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.content!==void 0){let o=t.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)Z(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),r=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return jo.errors=e,r===0}jo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function vo(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=vo.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;jo(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?jo.errors:e.concat(jo.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(m!=="action"){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.action!==void 0){let m=t.action;if(!(m==="decline"||m==="cancel")){let w={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:_y.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),r++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return vo.errors=e,a.props=l,r===0}vo.evaluated={dynamicProps:!0,dynamicItems:!1};function Oo(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Oo.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),r++}if(t.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="type"||o==="declaration"||o==="request"||o==="response"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.type!==void 0&&t.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.declaration!==void 0){let o=t.declaration;if(typeof o=="string"){if(!H.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}t.request!==void 0&&(ko(t.request,{instancePath:s+"/request",parentData:t,parentDataProperty:"request",rootData:u,dynamicAnchors:f})||(e=e===null?ko.errors:e.concat(ko.errors),r=e.length)),t.response!==void 0&&(vo(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?vo.errors:e.concat(vo.errors),r=e.length));for(let o in t)x.test(o)&&(Z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Oo.errors=e,r===0}Oo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var uf={type:"object",required:["messages","maxTokens"],properties:{messages:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingMessage"}},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},systemPrompt:{type:"string"},includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{type:"integer",minimum:1},temperature:{type:"number"},stopSequences:{type:"array",items:{type:"string"}},metadata:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingRequestTool"}},toolChoice:{$ref:"#/$defs/samplingToolChoice"}},additionalProperties:!1},Ty={type:"object",required:["mode"],properties:{mode:{enum:["auto","required","none"]}},additionalProperties:!1},Zy={type:"object",required:["role","content"],properties:{role:{enum:["user","assistant"]},content:{$ref:"#/$defs/samplingMessageContent"}},additionalProperties:!1};function qo(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=qo.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),r++}if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="type"||o==="id"||o==="name"||o==="input")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.type!==void 0&&t.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.id!==void 0&&typeof t.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.name!==void 0&&typeof t.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)Z(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return qo.errors=e,r===0}qo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ao(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ao.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),r++}if(t.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),r++}if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="type"||i==="toolUseId"||i==="content"||i==="isError")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.type!==void 0&&t.type!=="tool_result"){let i={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_result"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),r++}if(t.toolUseId!==void 0&&typeof t.toolUseId!="string"){let i={instancePath:s+"/toolUseId",schemaPath:"#/properties/toolUseId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0){let i=t.content,n=r,p=!1,l=null,c=r;rt(i,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:f})||(e=e===null?rt.errors:e.concat(rt.errors),r=e.length);var o=c===r;o&&(p=!0,l=0);let h=r;if(Array.isArray(i)){if(i.length<1){let w={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),r++}let m=i.length;for(let w=0;w1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.speedPriority!==void 0){let o=t.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.intelligencePriority!==void 0){let o=t.intelligencePriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return zo.errors=e,r===0}zo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Eo(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Eo.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="name"||i==="title"||i==="description"||i==="inputSchema"||i==="annotations"||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.name!==void 0){let i=t.name;if(typeof i=="string"){if(te(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema!==void 0){let i=t.inputSchema;if(!at(i,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?at.errors:e.concat(at.errors),r=e.length;else var o=at.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),r++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),r++}}o!==!0&&(o=o||{},o.type=!0)}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}for(let i in t)x.test(i)&&(Z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Eo.errors=e,r===0}Eo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function No(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=No.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),r++}if(t.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!re.call(uf.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.messages!==void 0){let o=t.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),r++}}if(t.temperature!==void 0&&typeof t.temperature!="number"){let o={instancePath:s+"/temperature",schemaPath:"#/properties/temperature/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[o]:e.push(o),r++}if(t.stopSequences!==void 0){let o=t.stopSequences;if(Array.isArray(o)){let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),r++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}t.response!==void 0&&(Zo(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?Zo.errors:e.concat(Zo.errors),r=e.length));for(let o in t)x.test(o)&&(Z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return So.errors=e,r===0}So.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Io(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Io.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;Oo(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Oo.errors:e.concat(Oo.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;To(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?To.errors:e.concat(To.errors),r=e.length);var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let m=r;So(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?So.errors:e.concat(So.errors),r=e.length);var h=m===r;h&&i?(i=!1,n=[n,2]):h&&(i=!0,n=2,l!==!0&&(l=!0))}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return Io.errors=e,a.props=l,r===0}Io.evaluated={dynamicProps:!0,dynamicItems:!1};function Co(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Co.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}if(t.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="input"||o==="steps"||o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)Z(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.steps!==void 0){let o=t.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),r++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let l={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[l]:e.push(l),r++}if(t._meta!==void 0){let l=t._meta;if(l&&typeof l=="object"&&!Array.isArray(l))for(let c in l){let h=r;if(typeof c=="string"&&!J.test(c)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:c};e===null?e=[m]:e.push(m),r++}var o=h===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:c},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let c={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.security!==void 0&&(Ee(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length)),t.clientRequirements!==void 0&&(Nt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Nt.errors:e.concat(Nt.errors),r=e.length)),t.name!==void 0){let l=t.name;if(typeof l=="string"){if(te(l)<1){let c={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[c]:e.push(c),r++}}else{let c={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}}if(t.inputSchema!==void 0){let l=t.inputSchema,c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var p=w===r;if(p){h=!0,m=0;var i=!0}let y=r;if(!at(l,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?at.errors:e.concat(at.errors),r=e.length;else var n=at.evaluated.props;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(l.type!==void 0&&l.type!=="object"){let $={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}n!==!0&&(n=n||{},n.type=!0);var p=y===r;if(p&&h?(h=!1,m=[m,1]):p&&(h=!0,m=1,i!==!0&&n!==void 0&&(n===!0?i=!0:(i=i||{},Object.assign(i,n)))),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}if(t.outputSchema!==void 0&&(at(t.outputSchema,{instancePath:s+"/outputSchema",parentData:t,parentDataProperty:"outputSchema",rootData:u,dynamicAnchors:f})||(e=e===null?at.errors:e.concat(at.errors),r=e.length)),t.annotations!==void 0){let l=t.annotations;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.title!==void 0&&typeof l.title!="string"){let c={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(l.readOnlyHint!==void 0&&typeof l.readOnlyHint!="boolean"){let c={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.destructiveHint!==void 0&&typeof l.destructiveHint!="boolean"){let c={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.idempotentHint!==void 0&&typeof l.idempotentHint!="boolean"){let c={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.openWorldHint!==void 0&&typeof l.openWorldHint!="boolean"){let c={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}}else{let c={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.execution!==void 0){let l=t.execution;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let c in l)if(c!=="taskSupport"){let h={instancePath:s+"/execution",schemaPath:"#/$defs/execution/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};e===null?e=[h]:e.push(h),r++}if(l.taskSupport!==void 0){let c=l.taskSupport;if(typeof c!="string"){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(!(c==="forbidden"||c==="optional"||c==="required")){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/enum",keyword:"enum",params:{allowedValues:Ny.properties.taskSupport.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),r++}}}else{let c={instancePath:s+"/execution",schemaPath:"#/$defs/execution/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.examples!==void 0&&($o(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?$o.errors:e.concat($o.errors),r=e.length)),t.interactionExamples!==void 0&&(Vo(t.interactionExamples,{instancePath:s+"/interactionExamples",parentData:t,parentDataProperty:"interactionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?Vo.errors:e.concat(Vo.errors),r=e.length)),t.elicitations!==void 0){let l=t.elicitations;if(Array.isArray(l)){if(l.length<1){let h={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[h]:e.push(h),r++}let c=l.length;for(let h=0;h1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(Ee(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length)),t.clientRequirements!==void 0&&(Nt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Nt.errors:e.concat(Nt.errors),r=e.length)),t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.size!==void 0&&typeof t.size!="number"){let i={instancePath:s+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(Ro(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Ro.errors:e.concat(Ro.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p100){let l={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[l]:e.push(l),r++}let p=n.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}if(i.hasMore!==void 0&&typeof i.hasMore!="boolean"){let n={instancePath:s+"/completion/hasMore",schemaPath:"#/$defs/completionResult/properties/hasMore/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/completion",schemaPath:"#/$defs/completionResult/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Jo.errors=e,r===0}Jo.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ho(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ho.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.argument===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"argument"},message:"must have required property 'argument'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="argument"||o==="context"||o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}t.argument!==void 0&&(Lo(t.argument,{instancePath:s+"/argument",parentData:t,parentDataProperty:"argument",rootData:u,dynamicAnchors:f})||(e=e===null?Lo.errors:e.concat(Lo.errors),r=e.length)),t.context!==void 0&&(Fo(t.context,{instancePath:s+"/context",parentData:t,parentDataProperty:"context",rootData:u,dynamicAnchors:f})||(e=e===null?Fo.errors:e.concat(Fo.errors),r=e.length)),t.result!==void 0&&(Jo(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?Jo.errors:e.concat(Jo.errors),r=e.length));for(let o in t)x.test(o)&&(Z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?Z.errors:e.concat(Z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ho.errors=e,r===0}Ho.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function wr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=wr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),r++}for(let i in t){let n=r;if(typeof i=="string"&&!H.test(i)){let p={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[p]:e.push(p),r++}var o=n===r;if(!o){let p={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[p]:e.push(p),r++}}for(let i in t)Ho(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Ho.errors:e.concat(Ho.errors),r=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return wr.errors=e,r===0}wr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Wo(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Wo.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(re.call(Iy.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.protocolVersions!==void 0&&(we(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?we.errors:e.concat(we.errors),r=e.length)),t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.icons!==void 0&&(Ye(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Ye.errors:e.concat(Ye.errors),r=e.length)),t.tags!==void 0){let i=t.tags;if(Array.isArray(i)){if(i.length<1){let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),r++}let n=i.length;for(let c=0;c1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(Ee(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length)),t.clientRequirements!==void 0&&(Nt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Nt.errors:e.concat(Nt.errors),r=e.length)),t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(Uo(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Uo.errors:e.concat(Uo.errors),r=e.length)),t.completionExamples!==void 0&&(wr(t.completionExamples,{instancePath:s+"/completionExamples",parentData:t,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?wr.errors:e.concat(wr.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(Ee(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length)),t.clientRequirements!==void 0&&(Nt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Nt.errors:e.concat(Nt.errors),r=e.length)),t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){e:for(;i--;)for(n=i;n--;)if(ds(t[i],t[n])){let p={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[p]:e.push(p),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return ke.errors=e,r===0}ke.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function Ne(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ne.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),r++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),r++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return Ne.errors=e,r===0}Ne.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function rn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=rn.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="type"||m==="url"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&(ke(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ke.errors:e.concat(ke.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}t.security!==void 0&&(Ne(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ne.errors:e.concat(Ne.errors),r=e.length));for(let m in t)x.test(m)&&(S(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="type"||m==="command"||m==="args"||m==="env"||m==="security"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&(ke(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ke.errors:e.concat(ke.errors),r=e.length)),t.type!==void 0&&t.type!=="stdio"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"stdio"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.command!==void 0&&typeof t.command!="string"){let m={instancePath:s+"/command",schemaPath:"#/oneOf/1/properties/command/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.args!==void 0){let m=t.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var l=k===r;if(!l){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=p===r;if(w){i=!0,n=0;var c=!0}let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}if(t.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),r++}if(t.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="data"||g==="mimeType"||g==="annotations"||g==="_meta")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0){let g=t.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:yf.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),r++}}if(t.data!==void 0&&typeof t.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.annotations!==void 0){let g=t.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}if(g.lastModified!==void 0&&typeof g.lastModified!="string"){let O={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var m=k===r;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=h===r;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="type"||k==="resource"||k==="annotations"||k==="_meta")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}if(t.resource!==void 0&&(kr(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?kr.errors:e.concat(kr.errors),r=e.length)),t.annotations!==void 0){let k=t.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),r++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}}if(k.lastModified!==void 0&&typeof k.lastModified!="string"){let v={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}if(t._meta!==void 0){let k=t._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=r;if(typeof v=="string"&&!J.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),r++}var y=P===r;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}var w=g===r;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),r++}if(t.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),r++}if(t.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!re.call(yf.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.type!==void 0&&t.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}if(t.uri!==void 0){let P=t.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.name!==void 0&&typeof t.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.title!==void 0&&typeof t.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.size!==void 0&&typeof t.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}if(t.icons!==void 0&&(Ge(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Ge.errors:e.concat(Ge.errors),r=e.length)),t.annotations!==void 0){let P=t.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let q=j.length;for(let A=0;A1||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[q]:e.push(q),r++}if(j<0||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[q]:e.push(q),r++}}if(P.lastModified!==void 0&&typeof P.lastModified!="string"){let j={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t._meta!==void 0){let P=t._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let q=r;if(typeof j=="string"&&!J.test(j)){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[A]:e.push(A),r++}var $=q===r;if(!$){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[A]:e.push(A),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var w=k===r;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),r++}return st.errors=e,a.props=c,r===0}st.evaluated={dynamicProps:!0,dynamicItems:!1};function jr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=jr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t.resultType!==void 0&&t.resultType!=="complete"){let i={instancePath:s+"/resultType",schemaPath:"#/properties/resultType/const",keyword:"const",params:{allowedValue:"complete"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}if(t.cacheScope!==void 0){let i=t.cacheScope;if(!(i==="public"||i==="private")){let n={instancePath:s+"/cacheScope",schemaPath:"#/properties/cacheScope/enum",keyword:"enum",params:{allowedValues:Fy.properties.cacheScope.enum},message:"must be equal to one of the allowed values"};e===null?e=[n]:e.push(n),r++}}if(t.contents!==void 0){let i=t.contents;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/contents",schemaPath:"#/properties/contents/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.maxLength!==void 0){let y=t.maxLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),r++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/maxLength",schemaPath:"#/oneOf/0/properties/maxLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.format!==void 0){let y=t.format;if(!(y==="email"||y==="uri"||y==="date"||y==="date-time")){let $={instancePath:s+"/format",schemaPath:"#/oneOf/0/properties/format/enum",keyword:"enum",params:{allowedValues:df.oneOf[0].properties.format.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}if(t.default!==void 0&&typeof t.default!="string"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/0/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="type"||y==="title"||y==="description"||y==="minimum"||y==="maximum"||y==="default")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let y=t.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:df.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}if(t.title!==void 0&&typeof t.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.description!==void 0&&typeof t.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.default!==void 0&&typeof t.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="type"||g==="title"||g==="description"||g==="default")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0&&t.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}if(t.title!==void 0&&typeof t.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.description!==void 0&&typeof t.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var h=y===r;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="type"||k==="title"||k==="description"||k==="enum"||k==="enumNames"||k==="default")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="string"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}if(t.title!==void 0&&typeof t.title!="string"){let k={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.description!==void 0&&typeof t.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.enum!==void 0){let k=t.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.maxItems!==void 0){let q=t.maxItems;if(!(typeof q=="number"&&!(q%1)&&!isNaN(q))){let A={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[A]:e.push(A),r++}if(typeof q=="number"&&(q<0||isNaN(q))){let A={instancePath:s+"/maxItems",schemaPath:"#/oneOf/5/properties/maxItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.items!==void 0){let q=t.items,A=r,E=!1,T=null,z=r;if(q&&typeof q=="object"&&!Array.isArray(q)){if(q.type===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[N]:e.push(N),r++}if(q.enum===void 0){let N={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[N]:e.push(N),r++}for(let N in q)if(!(N==="type"||N==="enum")){let R={instancePath:s+"/items",schemaPath:"#/oneOf/5/properties/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};e===null?e=[R]:e.push(R),r++}if(q.type!==void 0&&q.type!=="string"){let N={instancePath:s+"/items/type",schemaPath:"#/oneOf/5/properties/items/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[N]:e.push(N),r++}if(q.enum!==void 0){let N=q.enum;if(Array.isArray(N)){let R=N.length;for(let U=0;U1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){p=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:p},message:"must NOT have duplicate items (items ## "+p+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),r++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return zr.errors=e,r===0}zr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function hn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=hn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),r++}if(t.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),r++}if(t.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="mode"||o==="message"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.mode!==void 0&&t.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.message!==void 0){let o=t.message;if(typeof o=="string"){if(te(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}t.requestedSchema!==void 0&&(zr(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?zr.errors:e.concat(zr.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return hn.errors=e,r===0}hn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function gn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=gn.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;hn(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?hn.errors:e.concat(hn.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[m]:e.push(m),r++}if(t.message===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="mode"||m==="message"||m==="url")){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.mode!==void 0&&t.mode!=="url"){let m={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.message!==void 0){let m=t.message;if(typeof m=="string"){if(te(m)<1){let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return gn.errors=e,a.props=l,r===0}gn.evaluated={dynamicProps:!0,dynamicItems:!1};var By={type:"object",required:["action"],properties:{action:{enum:["decline","cancel"]}},additionalProperties:!1};function bn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=bn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.action!==void 0&&t.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.content!==void 0){let o=t.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)S(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),r=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return bn.errors=e,r===0}bn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function $n(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=$n.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;bn(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?bn.errors:e.concat(bn.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(m!=="action"){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.action!==void 0){let m=t.action;if(!(m==="decline"||m==="cancel")){let w={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:By.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),r++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return $n.errors=e,a.props=l,r===0}$n.evaluated={dynamicProps:!0,dynamicItems:!1};function Pn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Pn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),r++}if(t.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="type"||o==="declaration"||o==="request"||o==="response"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.type!==void 0&&t.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.declaration!==void 0){let o=t.declaration;if(typeof o=="string"){if(!H.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}t.request!==void 0&&(gn(t.request,{instancePath:s+"/request",parentData:t,parentDataProperty:"request",rootData:u,dynamicAnchors:f})||(e=e===null?gn.errors:e.concat(gn.errors),r=e.length)),t.response!==void 0&&($n(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?$n.errors:e.concat($n.errors),r=e.length));for(let o in t)x.test(o)&&(S(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Pn.errors=e,r===0}Pn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var hf={type:"object",required:["messages","maxTokens"],properties:{messages:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingMessage"}},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},systemPrompt:{type:"string"},includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{type:"integer",minimum:1},temperature:{type:"number"},stopSequences:{type:"array",items:{type:"string"}},metadata:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingRequestTool"}},toolChoice:{$ref:"#/$defs/samplingToolChoice"}},additionalProperties:!1},Qy={type:"object",required:["mode"],properties:{mode:{enum:["auto","required","none"]}},additionalProperties:!1},Yy={type:"object",required:["role","content"],properties:{role:{enum:["user","assistant"]},content:{$ref:"#/$defs/samplingMessageContent"}},additionalProperties:!1};function wn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=wn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),r++}if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="type"||o==="id"||o==="name"||o==="input")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.type!==void 0&&t.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.id!==void 0&&typeof t.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.name!==void 0&&typeof t.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)S(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return wn.errors=e,r===0}wn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function kn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=kn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),r++}if(t.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),r++}if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="type"||i==="toolUseId"||i==="content"||i==="isError")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.type!==void 0&&t.type!=="tool_result"){let i={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_result"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),r++}if(t.toolUseId!==void 0&&typeof t.toolUseId!="string"){let i={instancePath:s+"/toolUseId",schemaPath:"#/properties/toolUseId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0){let i=t.content,n=r,p=!1,l=null,c=r;st(i,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:f})||(e=e===null?st.errors:e.concat(st.errors),r=e.length);var o=c===r;o&&(p=!0,l=0);let h=r;if(Array.isArray(i)){if(i.length<1){let w={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),r++}let m=i.length;for(let w=0;w1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.speedPriority!==void 0){let o=t.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.intelligencePriority!==void 0){let o=t.intelligencePriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return vn.errors=e,r===0}vn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function On(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=On.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="name"||i==="title"||i==="description"||i==="inputSchema"||i==="annotations"||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.name!==void 0){let i=t.name;if(typeof i=="string"){if(te(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema!==void 0){let i=t.inputSchema;if(!pt(i,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?pt.errors:e.concat(pt.errors),r=e.length;else var o=pt.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),r++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),r++}}o!==!0&&(o=o||{},o.type=!0)}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}for(let i in t)x.test(i)&&(S(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return On.errors=e,r===0}On.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function qn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=qn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),r++}if(t.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!re.call(hf.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.messages!==void 0){let o=t.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),r++}}if(t.temperature!==void 0&&typeof t.temperature!="number"){let o={instancePath:s+"/temperature",schemaPath:"#/properties/temperature/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[o]:e.push(o),r++}if(t.stopSequences!==void 0){let o=t.stopSequences;if(Array.isArray(o)){let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),r++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}t.response!==void 0&&(zn(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?zn.errors:e.concat(zn.errors),r=e.length));for(let o in t)x.test(o)&&(S(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return En.errors=e,r===0}En.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Nn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Nn.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;Pn(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Pn.errors:e.concat(Pn.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;xn(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?xn.errors:e.concat(xn.errors),r=e.length);var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let m=r;En(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?En.errors:e.concat(En.errors),r=e.length);var h=m===r;h&&i?(i=!1,n=[n,2]):h&&(i=!0,n=2,l!==!0&&(l=!0))}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return Nn.errors=e,a.props=l,r===0}Nn.evaluated={dynamicProps:!0,dynamicItems:!1};function _n(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=_n.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}if(t.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="input"||o==="steps"||o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)S(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.steps!==void 0){let o=t.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),r++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let l={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[l]:e.push(l),r++}if(t._meta!==void 0){let l=t._meta;if(l&&typeof l=="object"&&!Array.isArray(l))for(let c in l){let h=r;if(typeof c=="string"&&!J.test(c)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:c};e===null?e=[m]:e.push(m),r++}var o=h===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:c},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let c={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.security!==void 0&&(Ne(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ne.errors:e.concat(Ne.errors),r=e.length)),t.clientRequirements!==void 0&&(Tt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Tt.errors:e.concat(Tt.errors),r=e.length)),t.name!==void 0){let l=t.name;if(typeof l=="string"){if(te(l)<1){let c={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[c]:e.push(c),r++}}else{let c={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}}if(t.inputSchema!==void 0){let l=t.inputSchema,c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/inputSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/inputSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var p=w===r;if(p){h=!0,m=0;var i=!0}let y=r;if(!pt(l,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?pt.errors:e.concat(pt.errors),r=e.length;else var n=pt.evaluated.props;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===void 0){let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(l.type!==void 0&&l.type!=="object"){let $={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/oneOf/1/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}n!==!0&&(n=n||{},n.type=!0);var p=y===r;if(p&&h?(h=!1,m=[m,1]):p&&(h=!0,m=1,i!==!0&&n!==void 0&&(n===!0?i=!0:(i=i||{},Object.assign(i,n)))),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}if(t.outputSchema!==void 0&&(pt(t.outputSchema,{instancePath:s+"/outputSchema",parentData:t,parentDataProperty:"outputSchema",rootData:u,dynamicAnchors:f})||(e=e===null?pt.errors:e.concat(pt.errors),r=e.length)),t.annotations!==void 0){let l=t.annotations;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.title!==void 0&&typeof l.title!="string"){let c={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(l.readOnlyHint!==void 0&&typeof l.readOnlyHint!="boolean"){let c={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.destructiveHint!==void 0&&typeof l.destructiveHint!="boolean"){let c={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.idempotentHint!==void 0&&typeof l.idempotentHint!="boolean"){let c={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}if(l.openWorldHint!==void 0&&typeof l.openWorldHint!="boolean"){let c={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[c]:e.push(c),r++}}else{let c={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.execution!==void 0){let l=t.execution;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let c in l)if(c!=="taskSupport"){let h={instancePath:s+"/execution",schemaPath:"#/$defs/execution/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};e===null?e=[h]:e.push(h),r++}if(l.taskSupport!==void 0){let c=l.taskSupport;if(typeof c!="string"){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(!(c==="forbidden"||c==="optional"||c==="required")){let h={instancePath:s+"/execution/taskSupport",schemaPath:"#/$defs/execution/properties/taskSupport/enum",keyword:"enum",params:{allowedValues:Ky.properties.taskSupport.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),r++}}}else{let c={instancePath:s+"/execution",schemaPath:"#/$defs/execution/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}if(t.examples!==void 0&&(yn(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?yn.errors:e.concat(yn.errors),r=e.length)),t.interactionExamples!==void 0&&(Tn(t.interactionExamples,{instancePath:s+"/interactionExamples",parentData:t,parentDataProperty:"interactionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?Tn.errors:e.concat(Tn.errors),r=e.length)),t.elicitations!==void 0){let l=t.elicitations;if(Array.isArray(l)){if(l.length<1){let h={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[h]:e.push(h),r++}let c=l.length;for(let h=0;h1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(Ne(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ne.errors:e.concat(Ne.errors),r=e.length)),t.clientRequirements!==void 0&&(Tt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Tt.errors:e.concat(Tt.errors),r=e.length)),t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.size!==void 0&&typeof t.size!="number"){let i={instancePath:s+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(Sn(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Sn.errors:e.concat(Sn.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p100){let l={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[l]:e.push(l),r++}let p=n.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}if(i.hasMore!==void 0&&typeof i.hasMore!="boolean"){let n={instancePath:s+"/completion/hasMore",schemaPath:"#/$defs/completionResult/properties/hasMore/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/completion",schemaPath:"#/$defs/completionResult/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Rn.errors=e,r===0}Rn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Mn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Mn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.argument===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"argument"},message:"must have required property 'argument'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="argument"||o==="context"||o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}t.argument!==void 0&&(Vn(t.argument,{instancePath:s+"/argument",parentData:t,parentDataProperty:"argument",rootData:u,dynamicAnchors:f})||(e=e===null?Vn.errors:e.concat(Vn.errors),r=e.length)),t.context!==void 0&&(Dn(t.context,{instancePath:s+"/context",parentData:t,parentDataProperty:"context",rootData:u,dynamicAnchors:f})||(e=e===null?Dn.errors:e.concat(Dn.errors),r=e.length)),t.result!==void 0&&(Rn(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?Rn.errors:e.concat(Rn.errors),r=e.length));for(let o in t)x.test(o)&&(S(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?S.errors:e.concat(S.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Mn.errors=e,r===0}Mn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Nr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Nr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),r++}for(let i in t){let n=r;if(typeof i=="string"&&!H.test(i)){let p={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[p]:e.push(p),r++}var o=n===r;if(!o){let p={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[p]:e.push(p),r++}}for(let i in t)Mn(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?Mn.errors:e.concat(Mn.errors),r=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Nr.errors=e,r===0}Nr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Un(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Un.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(re.call(Xy.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.protocolVersions!==void 0&&(ke(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ke.errors:e.concat(ke.errors),r=e.length)),t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.icons!==void 0&&(Ge(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Ge.errors:e.concat(Ge.errors),r=e.length)),t.tags!==void 0){let i=t.tags;if(Array.isArray(i)){if(i.length<1){let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),r++}let n=i.length;for(let c=0;c1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(Ne(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ne.errors:e.concat(Ne.errors),r=e.length)),t.clientRequirements!==void 0&&(Tt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Tt.errors:e.concat(Tt.errors),r=e.length)),t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let i={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}if(i.lastModified!==void 0&&typeof i.lastModified!="string"){let n={instancePath:s+"/annotations/lastModified",schemaPath:"#/$defs/resourceAnnotations/properties/lastModified/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.examples!==void 0&&(Cn(t.examples,{instancePath:s+"/examples",parentData:t,parentDataProperty:"examples",rootData:u,dynamicAnchors:f})||(e=e===null?Cn.errors:e.concat(Cn.errors),r=e.length)),t.completionExamples!==void 0&&(Nr(t.completionExamples,{instancePath:s+"/completionExamples",parentData:t,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?Nr.errors:e.concat(Nr.errors),r=e.length)),t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.security!==void 0&&(Ne(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Ne.errors:e.concat(Ne.errors),r=e.length)),t.clientRequirements!==void 0&&(Tt(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Tt.errors:e.concat(Tt.errors),r=e.length)),t.name!==void 0&&typeof t.name!="string"){let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){e:for(;i--;)for(n=i;n--;)if(ds(t[i],t[n])){let p={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[p]:e.push(p),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return je.errors=e,r===0}je.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function Kn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Kn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||o==="subscribe"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.subscribe!==void 0&&typeof t.subscribe!="boolean"){let o={instancePath:s+"/subscribe",schemaPath:"#/properties/subscribe/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)x.test(o)&&(I(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Kn.errors=e,r===0}Kn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Bn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Bn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)x.test(o)&&(I(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Bn.errors=e,r===0}Bn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Qn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Qn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let i in t)if(!(re.call(sd.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.completions!==void 0){let i=t.completions;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/completions",schemaPath:"#/properties/completions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.experimental!==void 0){let i=t.experimental;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/experimental",schemaPath:"#/properties/experimental/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.extensions!==void 0){let i=t.extensions;if(i&&typeof i=="object"&&!Array.isArray(i)){if(Object.keys(i).length<1){let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[n]:e.push(n),r++}for(let n in i){let p=r;if(typeof n=="string"&&!Ut.test(n)){let l={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},message:'must match pattern "^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}for(let n in i){let p=i[n];if(!(p&&typeof p=="object"&&!Array.isArray(p))){let l={instancePath:s+"/extensions/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/extensionCapabilities/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.logging!==void 0){let i=t.logging;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/logging",schemaPath:"#/properties/logging/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.prompts!==void 0&&(Wn(t.prompts,{instancePath:s+"/prompts",parentData:t,parentDataProperty:"prompts",rootData:u,dynamicAnchors:f})||(e=e===null?Wn.errors:e.concat(Wn.errors),r=e.length)),t.protocolVersions!==void 0&&(je(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?je.errors:e.concat(je.errors),r=e.length)),t.resources!==void 0&&(Kn(t.resources,{instancePath:s+"/resources",parentData:t,parentDataProperty:"resources",rootData:u,dynamicAnchors:f})||(e=e===null?Kn.errors:e.concat(Kn.errors),r=e.length)),t.tasks!==void 0){let i=t.tasks;if(i&&typeof i=="object"&&!Array.isArray(i)){for(let n in i)if(!(n==="cancel"||n==="list"||n==="requests")){let p={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[p]:e.push(p),r++}if(i.cancel!==void 0){let n=i.cancel;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let p={instancePath:s+"/tasks/cancel",schemaPath:"#/properties/tasks/properties/cancel/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}}if(i.list!==void 0){let n=i.list;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let p={instancePath:s+"/tasks/list",schemaPath:"#/properties/tasks/properties/list/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}}if(i.requests!==void 0){let n=i.requests;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let p in n)if(p!=="tools"){let l={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),r++}if(n.tools!==void 0){let p=n.tools;if(p&&typeof p=="object"&&!Array.isArray(p)){for(let l in p)if(l!=="call"){let c={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),r++}if(p.call!==void 0){let l=p.call;if(!(l&&typeof l=="object"&&!Array.isArray(l))){let c={instancePath:s+"/tasks/requests/tools/call",schemaPath:"#/properties/tasks/properties/requests/properties/tools/properties/call/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}}else{let l={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let p={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}}}else{let n={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}t.tools!==void 0&&(Bn(t.tools,{instancePath:s+"/tools",parentData:t,parentDataProperty:"tools",rootData:u,dynamicAnchors:f})||(e=e===null?Bn.errors:e.concat(Bn.errors),r=e.length));for(let i in t)x.test(i)&&(I(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Qn.errors=e,r===0}Qn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var od={additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},bf={oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},Ts={additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"};function _r(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=_r.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let y={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[y]:e.push(y),r++}if(t.text===void 0){let y={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="_meta"||y==="mimeType"||y==="text"||y==="uri")){let $={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t._meta!==void 0){let y=t._meta;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=r;if(typeof $=="string"&&!J.test($)){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:$};e===null?e=[O]:e.push(O),r++}var l=g===r;if(!l){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};e===null?e=[O]:e.push(O),r++}}else{let $={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let y={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.text!==void 0&&typeof t.text!="string"){let y={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.uri!==void 0){let y=t.uri;if(typeof y=="string"){if(!D(y)){let $={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var w=p===r;if(w){i=!0,n=0;var c=!0}let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[y]:e.push(y),r++}if(t.blob===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="_meta"||y==="blob"||y==="mimeType"||y==="uri")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t._meta!==void 0){let y=t._meta;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=r;if(typeof $=="string"&&!J.test($)){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:$};e===null?e=[O]:e.push(O),r++}var m=g===r;if(!m){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};e===null?e=[O]:e.push(O),r++}}else{let $={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}}if(t.blob!==void 0&&typeof t.blob!="string"){let y={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let y={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.uri!==void 0){let y=t.uri;if(typeof y=="string"){if(!D(y)){let $={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var w=h===r;if(w&&i?(i=!1,n=[n,1]):w&&(i=!0,n=1,c!==!0&&(c=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let y={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[y]:e.push(y),r++}return _r.errors=e,a.props=c,r===0}_r.evaluated={dynamicProps:!0,dynamicItems:!1};var nd={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"};function Yn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Yn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.src===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"src"},message:"must have required property 'src'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="mimeType"||o==="sizes"||o==="src"||o==="theme"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let o={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.sizes!==void 0){let o=t.sizes;if(Array.isArray(o)){let i=o.length;for(let n=0;n1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t.text!==void 0&&typeof t.text!="string"){let g={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.type!==void 0&&t.type!=="text"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=p===r;if(w){i=!0,n=0;var c=!0}let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}if(t.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),r++}if(t.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="_meta"||g==="annotations"||g==="data"||g==="mimeType"||g==="type")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var m=k===r;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t.annotations!==void 0){let g=t.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t.data!==void 0&&typeof t.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.type!==void 0){let g=t.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:bf.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=h===r;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="_meta"||k==="annotations"||k==="resource"||k==="type")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t._meta!==void 0){let k=t._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=r;if(typeof v=="string"&&!J.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),r++}var y=P===r;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}if(t.annotations!==void 0){let k=t.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),r++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}if(t.resource!==void 0&&(_r(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?_r.errors:e.concat(_r.errors),r=e.length)),t.type!==void 0&&t.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}var w=g===r;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),r++}if(t.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),r++}if(t.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!re.call(bf.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t._meta!==void 0){let P=t._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let q=r;if(typeof j=="string"&&!J.test(j)){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[A]:e.push(A),r++}var $=q===r;if(!$){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[A]:e.push(A),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.annotations!==void 0){let P=t.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let q=j.length;for(let A=0;A1||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[q]:e.push(q),r++}if(j<0||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[q]:e.push(q),r++}}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.description!==void 0&&typeof t.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.icons!==void 0&&(Xe(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?Xe.errors:e.concat(Xe.errors),r=e.length)),t.mimeType!==void 0&&typeof t.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.name!==void 0&&typeof t.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.size!==void 0&&typeof t.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}if(t.title!==void 0&&typeof t.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.type!==void 0&&t.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}if(t.uri!==void 0){let P=t.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var w=k===r;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),r++}return it.errors=e,a.props=c,r===0}it.evaluated={dynamicProps:!0,dynamicItems:!1};function Gn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Gn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.role===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};e===null?e=[o]:e.push(o),r++}if(t.content===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="content"||o==="role")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0&&(it(t.content,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:f})||(e=e===null?it.errors:e.concat(it.errors),r=e.length)),t.role!==void 0){let o=t.role;if(typeof o!="string"){let i={instancePath:s+"/role",schemaPath:"#/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(!(o==="user"||o==="assistant")){let i={instancePath:s+"/role",schemaPath:"#/properties/role/enum",keyword:"enum",params:{allowedValues:od.properties.role.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Gn.errors=e,r===0}Gn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Xn(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Xn.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.messages!==void 0){let i=t.messages;if(Array.isArray(i)){let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Zr.errors=e,r===0}Zr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Sr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Sr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}t.result!==void 0&&(Zr(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?Zr.errors:e.concat(Zr.errors),r=e.length));for(let o in t)x.test(o)&&(I(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Sr.errors=e,r===0}Sr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ir(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ir.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||o==="uri"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.result!==void 0&&(Zr(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?Zr.errors:e.concat(Zr.errors),r=e.length)),t.uri!==void 0){let o=t.uri;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)x.test(o)&&(I(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ir.errors=e,r===0}Ir.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function lt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=lt.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.$componentRef===void 0){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if($!=="$componentRef"){let g={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(t.$componentRef!==void 0){let $=t.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var y=p===r;if(y){i=!0,n=0;var l=!0}let c=r;if(!(t&&typeof t=="object"&&!Array.isArray(t))){let $={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}let h=r,m=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let $;if(t.$componentRef===void 0&&($="$componentRef")){let g={};e===null?e=[g]:e.push(g),r++}}var w=m===r;if(w){let $={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[$]:e.push($),r++}else r=h,e!==null&&(h?e.length=h:e=null);var y=c===r;if(y&&i?(i=!1,n=[n,1]):y&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let $={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}return lt.errors=e,a.props=l,r===0}lt.evaluated={dynamicProps:!0,dynamicItems:!1};function Cr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Cr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}if(i.values!==void 0){let n=i.values;if(Array.isArray(n)){if(n.length>100){let l={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[l]:e.push(l),r++}let p=n.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.minLength!==void 0){let y=t.minLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),r++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.title!==void 0&&typeof t.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/0/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.type!==void 0&&t.type!=="string"){let y={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="default"||y==="description"||y==="maximum"||y==="minimum"||y==="title"||y==="type")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.default!==void 0&&typeof t.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.description!==void 0&&typeof t.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.title!==void 0&&typeof t.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.type!==void 0){let y=t.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Pf.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="default"||g==="description"||g==="title"||g==="type")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),r++}if(t.description!==void 0&&typeof t.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.title!==void 0&&typeof t.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.type!==void 0&&t.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var h=y===r;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="default"||k==="description"||k==="enum"||k==="enumNames"||k==="title"||k==="type")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.default!==void 0&&typeof t.default!="string"){let k={instancePath:s+"/default",schemaPath:"#/oneOf/3/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.description!==void 0&&typeof t.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.enum!==void 0){let k=t.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.minItems!==void 0){let q=t.minItems;if(!(typeof q=="number"&&!(q%1)&&!isNaN(q))){let A={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[A]:e.push(A),r++}if(typeof q=="number"&&(q<0||isNaN(q))){let A={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.title!==void 0&&typeof t.title!="string"){let q={instancePath:s+"/title",schemaPath:"#/oneOf/5/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[q]:e.push(q),r++}if(t.type!==void 0&&t.type!=="array"){let q={instancePath:s+"/type",schemaPath:"#/oneOf/5/properties/type/const",keyword:"const",params:{allowedValue:"array"},message:"must be equal to constant"};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}var h=P===r;h&&i?(i=!1,n=[n,5]):h&&(i=!0,n=5,l!==!0&&(l=!0))}}}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let y={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[y]:e.push(y),r++}return la.errors=e,a.props=l,r===0}la.evaluated={dynamicProps:!0,dynamicItems:!1};function Rr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Rr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.properties===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"properties"},message:"must have required property 'properties'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="$schema"||o==="properties"||o==="required"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.$schema!==void 0){let o=t.$schema;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.properties!==void 0){let o=t.properties;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)la(o[i],{instancePath:s+"/properties/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?la.errors:e.concat(la.errors),r=e.length);else{let i={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.required!==void 0){let o=t.required;if(Array.isArray(o)){let i=o.length;for(let l=0;l1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){p=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:p},message:"must NOT have duplicate items (items ## "+p+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),r++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}if(t.type!==void 0&&t.type!=="object"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Rr.errors=e,r===0}Rr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function It(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=It.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r,l=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.url===void 0&&(P="url")){let j={};e===null?e=[j]:e.push(j),r++}}var h=c===r;if(h){let P={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=l,e!==null&&(l?e.length=l:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let P={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[P]:e.push(P),r++}if(t.mode!==void 0&&t.mode!=="form"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}}var O=p===r;if(O){i=!0,n=0;var m={};m.mode=!0}let w=r,y=r,$=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.requestedSchema===void 0&&(P="requestedSchema")){let j={};e===null?e=[j]:e.push(j),r++}}var g=$===r;if(g){let P={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=y,e!==null&&(y?e.length=y:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}var O=w===r;if(O&&i?(i=!1,n=[n,1]):O&&(i=!0,n=1,m!==!0&&(m=m||{},m.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}if(t.mode===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[P]:e.push(P),r++}if(t.message===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!(re.call($f.properties,P)||x.test(P))){let j={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.message!==void 0){let P=t.message;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.mode!==void 0){let P=t.mode;if(!(P==="form"||P==="url")){let j={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:$f.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[j]:e.push(j),r++}}if(t.name!==void 0){let P=t.name;if(typeof P=="string"){if(!H.test(P)){let j={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.onCancel!==void 0){let P=t.onCancel;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.onDecline!==void 0){let P=t.onDecline;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.protocolVersions!==void 0&&(je(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?je.errors:e.concat(je.errors),r=e.length)),t.requestedSchema!==void 0){let P=t.requestedSchema,j=r,q=!1,A=null,E=r;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.$componentRef===void 0){let z={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[z]:e.push(z),r++}for(let z in P)if(z!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:z},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),r++}if(P.$componentRef!==void 0){let z=P.$componentRef;if(typeof z=="string"){if(!he.test(z)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),r++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),r++}}}else{let z={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[z]:e.push(z),r++}var v=E===r;if(v){q=!0,A=0;var k=!0}let T=r;Rr(P,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Rr.errors:e.concat(Rr.errors),r=e.length);var v=T===r;if(v&&q?(q=!1,A=[A,1]):v&&(q=!0,A=1,k!==!0&&(k=!0)),q)r=j,e!==null&&(j?e.length=j:e=null);else{let z={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:A},message:"must match exactly one schema in oneOf"};e===null?e=[z]:e.push(z),r++}}if(t.url!==void 0){let P=t.url;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.when!==void 0){let P=t.when;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}for(let P in t)x.test(P)&&(I(t[P],{instancePath:s+"/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:P,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let P={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}return It.errors=e,r===0}It.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ma(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ma.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let p={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[p]:e.push(p),r++}for(let p in t){let l=r;if(typeof p=="string"&&!H.test(p)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:p};e===null?e=[c]:e.push(c),r++}var o=l===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:p},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let p in t){let l=t[p],c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var n=w===r;if(n){h=!0,m=0;var i=!0}let y=r;Tr(l,{instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:p,rootData:u,dynamicAnchors:f})||(e=e===null?Tr.errors:e.concat(Tr.errors),r=e.length);var n=y===r;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}}else{let p={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}return ma.errors=e,r===0}ma.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function _e(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=_e.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),r++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),r++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return _e.errors=e,r===0}_e.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function fa(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=fa.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(re.call(ld.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)x.test(i)&&(I(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return fa.errors=e,r===0}fa.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var md={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"};function ua(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ua.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let p={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[p]:e.push(p),r++}for(let p in t){let l=r;if(typeof p=="string"&&!H.test(p)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:p};e===null?e=[c]:e.push(c),r++}var o=l===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:p},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let p in t){let l=t[p],c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var n=w===r;if(n){h=!0,m=0;var i=!0}let y=r;Ir(l,{instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:p,rootData:u,dynamicAnchors:f})||(e=e===null?Ir.errors:e.concat(Ir.errors),r=e.length);var n=y===r;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}}else{let p={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}return ua.errors=e,r===0}ua.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ca(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ca.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(re.call(md.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(St(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?St.errors:e.concat(St.errors),r=e.length)),t.completionExamples!==void 0&&(Dr(t.completionExamples,{instancePath:s+"/completionExamples",parentData:t,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?Dr.errors:e.concat(Dr.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)x.test(i)&&(I(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return ca.errors=e,r===0}ca.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var fd={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"};function ya(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ya.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let p={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[p]:e.push(p),r++}for(let p in t){let l=r;if(typeof p=="string"&&!H.test(p)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:p};e===null?e=[c]:e.push(c),r++}var o=l===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:p},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let p in t){let l=t[p],c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var n=w===r;if(n){h=!0,m=0;var i=!0}let y=r;Sr(l,{instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:p,rootData:u,dynamicAnchors:f})||(e=e===null?Sr.errors:e.concat(Sr.errors),r=e.length);var n=y===r;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}}else{let p={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}return ya.errors=e,r===0}ya.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function da(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=da.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(re.call(fd.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(St(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?St.errors:e.concat(St.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)x.test(i)&&(I(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return da.errors=e,r===0}da.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var ud={oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]};function vt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=vt.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.scopes===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"scopes"},message:"must have required property 'scopes'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="authorizationUrl"||o==="refreshUrl"||o==="scopes"||o==="tokenUrl"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.authorizationUrl!==void 0){let o=t.authorizationUrl;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.refreshUrl!==void 0){let o=t.refreshUrl;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.scopes!==void 0){let o=t.scopes;if(o&&typeof o=="object"&&!Array.isArray(o)){for(let i in o)if(typeof o[i]!="string"){let n={instancePath:s+"/scopes/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/scopes/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/scopes",schemaPath:"#/properties/scopes/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.tokenUrl!==void 0){let o=t.tokenUrl;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)x.test(o)&&(I(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return vt.errors=e,r===0}vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ha(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ha.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.implicit===void 0){let m={instancePath:s,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty:"implicit"},message:"must have required property 'implicit'"};e===null?e=[m]:e.push(m),r++}var h=n===r;i=i||h;let p=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.password===void 0){let m={instancePath:s,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty:"password"},message:"must have required property 'password'"};e===null?e=[m]:e.push(m),r++}var h=p===r;i=i||h;let l=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.clientCredentials===void 0){let m={instancePath:s,schemaPath:"#/anyOf/2/required",keyword:"required",params:{missingProperty:"clientCredentials"},message:"must have required property 'clientCredentials'"};e===null?e=[m]:e.push(m),r++}var h=l===r;i=i||h;let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.authorizationCode===void 0){let m={instancePath:s,schemaPath:"#/anyOf/3/required",keyword:"required",params:{missingProperty:"authorizationCode"},message:"must have required property 'authorizationCode'"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(i=i||h,i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[m]:e.push(m),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){for(let m in t)if(!(m==="authorizationCode"||m==="clientCredentials"||m==="implicit"||m==="password"||x.test(m))){let w={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.authorizationCode!==void 0){let m=t.authorizationCode;if(vt(m,{instancePath:s+"/authorizationCode",parentData:t,parentDataProperty:"authorizationCode",rootData:u,dynamicAnchors:f})||(e=e===null?vt.errors:e.concat(vt.errors),r=e.length),m&&typeof m=="object"&&!Array.isArray(m)){if(m.authorizationUrl===void 0){let w={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[w]:e.push(w),r++}if(m.tokenUrl===void 0){let w={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[w]:e.push(w),r++}}}if(t.clientCredentials!==void 0){let m=t.clientCredentials;if(vt(m,{instancePath:s+"/clientCredentials",parentData:t,parentDataProperty:"clientCredentials",rootData:u,dynamicAnchors:f})||(e=e===null?vt.errors:e.concat(vt.errors),r=e.length),m&&typeof m=="object"&&!Array.isArray(m)&&m.tokenUrl===void 0){let w={instancePath:s+"/clientCredentials",schemaPath:"#/properties/clientCredentials/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[w]:e.push(w),r++}}if(t.implicit!==void 0){let m=t.implicit;if(vt(m,{instancePath:s+"/implicit",parentData:t,parentDataProperty:"implicit",rootData:u,dynamicAnchors:f})||(e=e===null?vt.errors:e.concat(vt.errors),r=e.length),m&&typeof m=="object"&&!Array.isArray(m)&&m.authorizationUrl===void 0){let w={instancePath:s+"/implicit",schemaPath:"#/properties/implicit/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[w]:e.push(w),r++}}if(t.password!==void 0){let m=t.password;if(vt(m,{instancePath:s+"/password",parentData:t,parentDataProperty:"password",rootData:u,dynamicAnchors:f})||(e=e===null?vt.errors:e.concat(vt.errors),r=e.length),m&&typeof m=="object"&&!Array.isArray(m)&&m.tokenUrl===void 0){let w={instancePath:s+"/password",schemaPath:"#/properties/password/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[w]:e.push(w),r++}}for(let m in t)x.test(m)&&(I(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}return ha.errors=e,r===0}ha.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ga(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ga.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.scheme===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"scheme"},message:"must have required property 'scheme'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="bearerFormat"||m==="description"||m==="scheme"||m==="type"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.bearerFormat!==void 0&&typeof t.bearerFormat!="string"){let m={instancePath:s+"/bearerFormat",schemaPath:"#/oneOf/0/properties/bearerFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.description!==void 0&&typeof t.description!="string"){let m={instancePath:s+"/description",schemaPath:"#/oneOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.scheme!==void 0&&typeof t.scheme!="string"){let m={instancePath:s+"/scheme",schemaPath:"#/oneOf/0/properties/scheme/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.type!==void 0&&t.type!=="http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}for(let m in t)x.test(m)&&(I(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.name===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[m]:e.push(m),r++}if(t.in===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"in"},message:"must have required property 'in'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="description"||m==="in"||m==="name"||m==="type"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.description!==void 0&&typeof t.description!="string"){let m={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.in!==void 0){let m=t.in;if(typeof m!="string"){let w={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(!(m==="header"||m==="query"||m==="cookie")){let w={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/enum",keyword:"enum",params:{allowedValues:ud.oneOf[1].properties.in.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),r++}}if(t.name!==void 0&&typeof t.name!="string"){let m={instancePath:s+"/name",schemaPath:"#/oneOf/1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.type!==void 0&&t.type!=="apiKey"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"apiKey"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}for(let m in t)x.test(m)&&(I(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let m=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),r++}if(t.flows===void 0){let y={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"flows"},message:"must have required property 'flows'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="description"||y==="flows"||y==="type"||x.test(y))){let $={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.description!==void 0&&typeof t.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.flows!==void 0&&(ha(t.flows,{instancePath:s+"/flows",parentData:t,parentDataProperty:"flows",rootData:u,dynamicAnchors:f})||(e=e===null?ha.errors:e.concat(ha.errors),r=e.length)),t.type!==void 0&&t.type!=="oauth2"){let y={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"oauth2"},message:"must be equal to constant"};e===null?e=[y]:e.push(y),r++}for(let y in t)x.test(y)&&(I(t[y],{instancePath:s+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:y,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let y={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=m===r;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let y=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}if(t.openIdConnectUrl===void 0){let g={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"openIdConnectUrl"},message:"must have required property 'openIdConnectUrl'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="description"||g==="openIdConnectUrl"||g==="type"||x.test(g))){let O={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.description!==void 0&&typeof t.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.openIdConnectUrl!==void 0){let g=t.openIdConnectUrl;if(typeof g=="string"){if(!D(g)){let O={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}if(t.type!==void 0&&t.type!=="openIdConnect"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"openIdConnect"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}for(let g in t)x.test(g)&&(I(t[g],{instancePath:s+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:g,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let g={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var h=y===r;h&&i?(i=!1,n=[n,3]):h&&(i=!0,n=3,l!==!0&&(l=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return ga.errors=e,a.props=l,r===0}ga.evaluated={dynamicProps:!0,dynamicItems:!1};function ba(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ba.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),r++}for(let i in t){let n=r;if(typeof i=="string"&&!H.test(i)){let p={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[p]:e.push(p),r++}var o=n===r;if(!o){let p={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[p]:e.push(p),r++}}for(let i in t)ga(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?ga.errors:e.concat(ga.errors),r=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return ba.errors=e,r===0}ba.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function $a(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=$a.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="description"||o==="name"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.name!==void 0){let o=t.name;if(typeof o=="string"){if(te(o)<1){let i={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)x.test(o)&&(I(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return $a.errors=e,r===0}$a.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var cd={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"};var yd={additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"};function Pa(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Pa.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let p={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[p]:e.push(p),r++}for(let p in t){let l=r;if(typeof p=="string"&&!H.test(p)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:p};e===null?e=[c]:e.push(c),r++}var o=l===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:p},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let p in t){let l=t[p],c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var n=w===r;if(n){h=!0,m=0;var i=!0}let y=r;Vr(l,{instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:p,rootData:u,dynamicAnchors:f})||(e=e===null?Vr.errors:e.concat(Vr.errors),r=e.length);var n=y===r;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}}else{let p={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}return Pa.errors=e,r===0}Pa.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function wa(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=wa.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),r++}if(t.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),r++}if(t.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="message"||o==="mode"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.message!==void 0){let o=t.message;if(typeof o=="string"){if(te(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.mode!==void 0&&t.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}t.requestedSchema!==void 0&&(Rr(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Rr.errors:e.concat(Rr.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return wa.errors=e,r===0}wa.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ka(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ka.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;wa(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?wa.errors:e.concat(wa.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[m]:e.push(m),r++}if(t.message===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="message"||m==="mode"||m==="url")){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.message!==void 0){let m=t.message;if(typeof m=="string"){if(te(m)<1){let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}if(t.mode!==void 0&&t.mode!=="url"){let m={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return ka.errors=e,a.props=l,r===0}ka.evaluated={dynamicProps:!0,dynamicItems:!1};var dd={additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"};function ja(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ja.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.action!==void 0&&t.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.content!==void 0){let o=t.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)I(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return ja.errors=e,r===0}ja.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function va(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=va.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;ja(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?ja.errors:e.concat(ja.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(m!=="action"){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.action!==void 0){let m=t.action;if(!(m==="decline"||m==="cancel")){let w={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:dd.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),r++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return va.errors=e,a.props=l,r===0}va.evaluated={dynamicProps:!0,dynamicItems:!1};function Oa(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Oa.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),r++}if(t.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="declaration"||o==="request"||o==="response"||o==="type"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.declaration!==void 0){let o=t.declaration;if(typeof o=="string"){if(!H.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.request!==void 0&&(ka(t.request,{instancePath:s+"/request",parentData:t,parentDataProperty:"request",rootData:u,dynamicAnchors:f})||(e=e===null?ka.errors:e.concat(ka.errors),r=e.length)),t.response!==void 0&&(va(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?va.errors:e.concat(va.errors),r=e.length)),t.type!==void 0&&t.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)x.test(o)&&(I(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Oa.errors=e,r===0}Oa.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var wf={additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},hd={additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},gd={additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"};function qa(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=qa.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),r++}if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="id"||o==="input"||o==="name"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.id!==void 0&&typeof t.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)I(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.name!==void 0&&typeof t.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.type!==void 0&&t.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return qa.errors=e,r===0}qa.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Aa(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Aa.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),r++}if(t.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),r++}if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="content"||i==="isError"||i==="toolUseId"||i==="type")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.content!==void 0){let i=t.content,n=r,p=!1,l=null,c=r;it(i,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:f})||(e=e===null?it.errors:e.concat(it.errors),r=e.length);var o=c===r;o&&(p=!0,l=0);let h=r;if(Array.isArray(i)){if(i.length<1){let w={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),r++}let m=i.length;for(let w=0;w1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.hints!==void 0){let o=t.hints;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/hints",schemaPath:"#/properties/hints/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.speedPriority!==void 0){let o=t.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return za.errors=e,r===0}za.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ea(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ea.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="annotations"||i==="description"||i==="inputSchema"||i==="name"||i==="title"||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema!==void 0){let i=t.inputSchema;if(!lt(i,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?lt.errors:e.concat(lt.errors),r=e.length;else var o=lt.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),r++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),r++}}o!==!0&&(o=o||{},o.type=!0)}if(t.name!==void 0){let i=t.name;if(typeof i=="string"){if(te(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)x.test(i)&&(I(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Ea.errors=e,r===0}Ea.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Na(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Na.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),r++}if(t.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!re.call(wf.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.includeContext!==void 0){let o=t.includeContext;if(!(o==="none"||o==="thisServer"||o==="allServers")){let i={instancePath:s+"/includeContext",schemaPath:"#/properties/includeContext/enum",keyword:"enum",params:{allowedValues:wf.properties.includeContext.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}if(t.maxTokens!==void 0){let o=t.maxTokens;if(!(typeof o=="number"&&!(o%1)&&!isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[i]:e.push(i),r++}if(typeof o=="number"&&(o<1||isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),r++}}if(t.messages!==void 0){let o=t.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),r++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.response!==void 0&&(Za(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?Za.errors:e.concat(Za.errors),r=e.length)),t.type!==void 0&&t.type!=="roots"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"roots"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)x.test(o)&&(I(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Sa.errors=e,r===0}Sa.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ia(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ia.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;Oa(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Oa.errors:e.concat(Oa.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;Ta(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Ta.errors:e.concat(Ta.errors),r=e.length);var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let m=r;Sa(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Sa.errors:e.concat(Sa.errors),r=e.length);var h=m===r;h&&i?(i=!1,n=[n,2]):h&&(i=!0,n=2,l!==!0&&(l=!0))}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return Ia.errors=e,a.props=l,r===0}Ia.evaluated={dynamicProps:!0,dynamicItems:!1};function Ca(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ca.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}if(t.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="input"||o==="result"||o==="steps"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)I(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.result!==void 0&&(Cr(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?Cr.errors:e.concat(Cr.errors),r=e.length)),t.steps!==void 0){let o=t.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),r++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.title!==void 0&&typeof t.title!="string"){let l={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),r++}for(let l in t)x.test(l)&&(I(t[l],{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Da.errors=e,r===0}Da.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ra(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ra.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="security"||m==="type"||m==="url"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&(je(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?je.errors:e.concat(je.errors),r=e.length)),t.security!==void 0&&(_e(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?_e.errors:e.concat(_e.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}for(let m in t)x.test(m)&&(I(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?I.errors:e.concat(I.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="args"||m==="command"||m==="env"||m==="protocolVersions"||m==="security"||m==="type"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.args!==void 0){let m=t.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y1){e:for(;i--;)for(n=i;n--;)if(ds(t[i],t[n])){let p={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[p]:e.push(p),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return ve.errors=e,r===0}ve.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function Ua(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ua.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||o==="subscribe"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.subscribe!==void 0&&typeof t.subscribe!="boolean"){let o={instancePath:s+"/subscribe",schemaPath:"#/properties/subscribe/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)x.test(o)&&(C(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ua.errors=e,r===0}Ua.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function La(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=La.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)x.test(o)&&(C(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return La.errors=e,r===0}La.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Fa(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Fa.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let i in t)if(!(re.call(Pd.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.completions!==void 0){let i=t.completions;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/completions",schemaPath:"#/properties/completions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.experimental!==void 0){let i=t.experimental;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/experimental",schemaPath:"#/properties/experimental/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.extensions!==void 0){let i=t.extensions;if(i&&typeof i=="object"&&!Array.isArray(i)){if(Object.keys(i).length<1){let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[n]:e.push(n),r++}for(let n in i){let p=r;if(typeof n=="string"&&!Ut.test(n)){let l={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},message:'must match pattern "^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}for(let n in i){let p=i[n];if(!(p&&typeof p=="object"&&!Array.isArray(p))){let l={instancePath:s+"/extensions/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/extensionCapabilities/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.logging!==void 0){let i=t.logging;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/logging",schemaPath:"#/properties/logging/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.prompts!==void 0&&(Ma(t.prompts,{instancePath:s+"/prompts",parentData:t,parentDataProperty:"prompts",rootData:u,dynamicAnchors:f})||(e=e===null?Ma.errors:e.concat(Ma.errors),r=e.length)),t.protocolVersions!==void 0&&(ve(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length)),t.resources!==void 0&&(Ua(t.resources,{instancePath:s+"/resources",parentData:t,parentDataProperty:"resources",rootData:u,dynamicAnchors:f})||(e=e===null?Ua.errors:e.concat(Ua.errors),r=e.length)),t.tasks!==void 0){let i=t.tasks;if(i&&typeof i=="object"&&!Array.isArray(i)){for(let n in i)if(!(n==="cancel"||n==="list"||n==="requests")){let p={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[p]:e.push(p),r++}if(i.cancel!==void 0){let n=i.cancel;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let p={instancePath:s+"/tasks/cancel",schemaPath:"#/properties/tasks/properties/cancel/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}}if(i.list!==void 0){let n=i.list;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let p={instancePath:s+"/tasks/list",schemaPath:"#/properties/tasks/properties/list/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}}if(i.requests!==void 0){let n=i.requests;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let p in n)if(p!=="tools"){let l={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),r++}if(n.tools!==void 0){let p=n.tools;if(p&&typeof p=="object"&&!Array.isArray(p)){for(let l in p)if(l!=="call"){let c={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),r++}if(p.call!==void 0){let l=p.call;if(!(l&&typeof l=="object"&&!Array.isArray(l))){let c={instancePath:s+"/tasks/requests/tools/call",schemaPath:"#/properties/tasks/properties/requests/properties/tools/properties/call/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}}else{let l={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let p={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}}}else{let n={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}t.tools!==void 0&&(La(t.tools,{instancePath:s+"/tools",parentData:t,parentDataProperty:"tools",rootData:u,dynamicAnchors:f})||(e=e===null?La.errors:e.concat(La.errors),r=e.length));for(let i in t)x.test(i)&&(C(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Fa.errors=e,r===0}Fa.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var kd={additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},kf={oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},Zs={additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"};function Ur(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ur.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let y={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[y]:e.push(y),r++}if(t.text===void 0){let y={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="_meta"||y==="mimeType"||y==="text"||y==="uri")){let $={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t._meta!==void 0){let y=t._meta;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=r;if(typeof $=="string"&&!J.test($)){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:$};e===null?e=[O]:e.push(O),r++}var l=g===r;if(!l){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};e===null?e=[O]:e.push(O),r++}}else{let $={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let y={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.text!==void 0&&typeof t.text!="string"){let y={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.uri!==void 0){let y=t.uri;if(typeof y=="string"){if(!D(y)){let $={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var w=p===r;if(w){i=!0,n=0;var c=!0}let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[y]:e.push(y),r++}if(t.blob===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="_meta"||y==="blob"||y==="mimeType"||y==="uri")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t._meta!==void 0){let y=t._meta;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=r;if(typeof $=="string"&&!J.test($)){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:$};e===null?e=[O]:e.push(O),r++}var m=g===r;if(!m){let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:$},message:"property name must be valid"};e===null?e=[O]:e.push(O),r++}}else{let $={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}}if(t.blob!==void 0&&typeof t.blob!="string"){let y={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let y={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.uri!==void 0){let y=t.uri;if(typeof y=="string"){if(!D(y)){let $={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var w=h===r;if(w&&i?(i=!1,n=[n,1]):w&&(i=!0,n=1,c!==!0&&(c=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let y={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[y]:e.push(y),r++}return Ur.errors=e,a.props=c,r===0}Ur.evaluated={dynamicProps:!0,dynamicItems:!1};var jd={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"};function Ja(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ja.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.src===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"src"},message:"must have required property 'src'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="mimeType"||o==="sizes"||o==="src"||o==="theme"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let o={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.sizes!==void 0){let o=t.sizes;if(Array.isArray(o)){let i=o.length;for(let n=0;n1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t.text!==void 0&&typeof t.text!="string"){let g={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.type!==void 0&&t.type!=="text"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=p===r;if(w){i=!0,n=0;var c=!0}let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}if(t.data===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[g]:e.push(g),r++}if(t.mimeType===void 0){let g={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="_meta"||g==="annotations"||g==="data"||g==="mimeType"||g==="type")){let O={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t._meta!==void 0){let g=t._meta;if(g&&typeof g=="object"&&!Array.isArray(g))for(let O in g){let k=r;if(typeof O=="string"&&!J.test(O)){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:O};e===null?e=[v]:e.push(v),r++}var m=k===r;if(!m){let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:O},message:"property name must be valid"};e===null?e=[v]:e.push(v),r++}}else{let O={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t.annotations!==void 0){let g=t.annotations;if(g&&typeof g=="object"&&!Array.isArray(g)){if(g.audience!==void 0){let O=g.audience;if(Array.isArray(O)){let k=O.length;for(let v=0;v1||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[k]:e.push(k),r++}if(O<0||isNaN(O)){let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[k]:e.push(k),r++}}}else{let O={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}}if(t.data!==void 0&&typeof t.data!="string"){let g={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let g={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.type!==void 0){let g=t.type;if(!(g==="image"||g==="audio")){let O={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:kf.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[O]:e.push(O),r++}}}else{let g={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var w=h===r;if(w&&i)i=!1,n=[n,1];else{w&&(i=!0,n=1,c!==!0&&(c=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.resource===void 0){let k={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="_meta"||k==="annotations"||k==="resource"||k==="type")){let v={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t._meta!==void 0){let k=t._meta;if(k&&typeof k=="object"&&!Array.isArray(k))for(let v in k){let P=r;if(typeof v=="string"&&!J.test(v)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:v};e===null?e=[j]:e.push(j),r++}var y=P===r;if(!y){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:v},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let v={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}if(t.annotations!==void 0){let k=t.annotations;if(k&&typeof k=="object"&&!Array.isArray(k)){if(k.audience!==void 0){let v=k.audience;if(Array.isArray(v)){let P=v.length;for(let j=0;j1||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[P]:e.push(P),r++}if(v<0||isNaN(v)){let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}}}else{let v={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}}if(t.resource!==void 0&&(Ur(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:f})||(e=e===null?Ur.errors:e.concat(Ur.errors),r=e.length)),t.type!==void 0&&t.type!=="resource"){let k={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}var w=g===r;if(w&&i)i=!1,n=[n,2];else{w&&(i=!0,n=2,c!==!0&&(c=!0));let k=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[P]:e.push(P),r++}if(t.uri===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[P]:e.push(P),r++}if(t.name===void 0){let P={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!re.call(kf.oneOf[3].properties,P)){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t._meta!==void 0){let P=t._meta;if(P&&typeof P=="object"&&!Array.isArray(P))for(let j in P){let q=r;if(typeof j=="string"&&!J.test(j)){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[A]:e.push(A),r++}var $=q===r;if(!$){let A={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[A]:e.push(A),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.annotations!==void 0){let P=t.annotations;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.audience!==void 0){let j=P.audience;if(Array.isArray(j)){let q=j.length;for(let A=0;A1||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[q]:e.push(q),r++}if(j<0||isNaN(j)){let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[q]:e.push(q),r++}}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.description!==void 0&&typeof t.description!="string"){let P={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.icons!==void 0&&(et(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:f})||(e=e===null?et.errors:e.concat(et.errors),r=e.length)),t.mimeType!==void 0&&typeof t.mimeType!="string"){let P={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.name!==void 0&&typeof t.name!="string"){let P={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.size!==void 0&&typeof t.size!="number"){let P={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[P]:e.push(P),r++}if(t.title!==void 0&&typeof t.title!="string"){let P={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}if(t.type!==void 0&&t.type!=="resource_link"){let P={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}if(t.uri!==void 0){let P=t.uri;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}}else{let P={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var w=k===r;w&&i?(i=!1,n=[n,3]):w&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let g={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[g]:e.push(g),r++}return ot.errors=e,a.props=c,r===0}ot.evaluated={dynamicProps:!0,dynamicItems:!1};function Ha(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ha.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.role===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};e===null?e=[o]:e.push(o),r++}if(t.content===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="content"||o==="role")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0&&(ot(t.content,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:f})||(e=e===null?ot.errors:e.concat(ot.errors),r=e.length)),t.role!==void 0){let o=t.role;if(typeof o!="string"){let i={instancePath:s+"/role",schemaPath:"#/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(!(o==="user"||o==="assistant")){let i={instancePath:s+"/role",schemaPath:"#/properties/role/enum",keyword:"enum",params:{allowedValues:kd.properties.role.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ha.errors=e,r===0}Ha.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Wa(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Wa.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.messages!==void 0){let i=t.messages;if(Array.isArray(i)){let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Fr.errors=e,r===0}Fr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Jr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Jr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}t.result!==void 0&&(Fr(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?Fr.errors:e.concat(Fr.errors),r=e.length));for(let o in t)x.test(o)&&(C(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Jr.errors=e,r===0}Jr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Hr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Hr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||o==="uri"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.result!==void 0&&(Fr(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?Fr.errors:e.concat(Fr.errors),r=e.length)),t.uri!==void 0){let o=t.uri;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)x.test(o)&&(C(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Hr.errors=e,r===0}Hr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function mt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=mt.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.$componentRef===void 0){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if($!=="$componentRef"){let g={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(t.$componentRef!==void 0){let $=t.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var y=p===r;if(y){i=!0,n=0;var l=!0}let c=r;if(!(t&&typeof t=="object"&&!Array.isArray(t))){let $={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}let h=r,m=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let $;if(t.$componentRef===void 0&&($="$componentRef")){let g={};e===null?e=[g]:e.push(g),r++}}var w=m===r;if(w){let $={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[$]:e.push($),r++}else r=h,e!==null&&(h?e.length=h:e=null);var y=c===r;if(y&&i?(i=!1,n=[n,1]):y&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let $={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}return mt.errors=e,a.props=l,r===0}mt.evaluated={dynamicProps:!0,dynamicItems:!1};function Wr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Wr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let p=0;p=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}if(i.values!==void 0){let n=i.values;if(Array.isArray(n)){if(n.length>100){let l={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[l]:e.push(l),r++}let p=n.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.minLength!==void 0){let y=t.minLength;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let $={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[$]:e.push($),r++}if(typeof y=="number"&&(y<0||isNaN(y))){let $={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[$]:e.push($),r++}}if(t.title!==void 0&&typeof t.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/0/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.type!==void 0&&t.type!=="string"){let y={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[y]:e.push(y),r++}}else{let y={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="default"||y==="description"||y==="maximum"||y==="minimum"||y==="title"||y==="type")){let $={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.default!==void 0&&typeof t.default!="number"){let y={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.description!==void 0&&typeof t.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let y={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let y={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[y]:e.push(y),r++}if(t.title!==void 0&&typeof t.title!="string"){let y={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.type!==void 0){let y=t.type;if(!(y==="number"||y==="integer")){let $={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:vf.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[$]:e.push($),r++}}}else{let y={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let y=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="default"||g==="description"||g==="title"||g==="type")){let O={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let g={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[g]:e.push(g),r++}if(t.description!==void 0&&typeof t.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.title!==void 0&&typeof t.title!="string"){let g={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.type!==void 0&&t.type!=="boolean"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var h=y===r;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let g=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[k]:e.push(k),r++}if(t.enum===void 0){let k={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[k]:e.push(k),r++}for(let k in t)if(!(k==="default"||k==="description"||k==="enum"||k==="enumNames"||k==="title"||k==="type")){let v={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};e===null?e=[v]:e.push(v),r++}if(t.default!==void 0&&typeof t.default!="string"){let k={instancePath:s+"/default",schemaPath:"#/oneOf/3/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.description!==void 0&&typeof t.description!="string"){let k={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}if(t.enum!==void 0){let k=t.enum;if(Array.isArray(k)){let v=k.length;for(let P=0;P=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.minItems!==void 0){let q=t.minItems;if(!(typeof q=="number"&&!(q%1)&&!isNaN(q))){let A={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[A]:e.push(A),r++}if(typeof q=="number"&&(q<0||isNaN(q))){let A={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[A]:e.push(A),r++}}if(t.title!==void 0&&typeof t.title!="string"){let q={instancePath:s+"/title",schemaPath:"#/oneOf/5/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[q]:e.push(q),r++}if(t.type!==void 0&&t.type!=="array"){let q={instancePath:s+"/type",schemaPath:"#/oneOf/5/properties/type/const",keyword:"const",params:{allowedValue:"array"},message:"must be equal to constant"};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}var h=P===r;h&&i?(i=!1,n=[n,5]):h&&(i=!0,n=5,l!==!0&&(l=!0))}}}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let y={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[y]:e.push(y),r++}return sp.errors=e,a.props=l,r===0}sp.evaluated={dynamicProps:!0,dynamicItems:!1};function Qr(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Qr.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.properties===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"properties"},message:"must have required property 'properties'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="$schema"||o==="properties"||o==="required"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.$schema!==void 0){let o=t.$schema;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.properties!==void 0){let o=t.properties;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)sp(o[i],{instancePath:s+"/properties/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?sp.errors:e.concat(sp.errors),r=e.length);else{let i={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.required!==void 0){let o=t.required;if(Array.isArray(o)){let i=o.length;for(let l=0;l1){let l={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof l[c]=="number"){p=l[c];let h={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:p},message:"must NOT have duplicate items (items ## "+p+" and "+n+" are identical)"};e===null?e=[h]:e.push(h),r++;break}l[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}if(t.type!==void 0&&t.type!=="object"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Qr.errors=e,r===0}Qr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Vt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Vt.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r,l=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.url===void 0&&(P="url")){let j={};e===null?e=[j]:e.push(j),r++}}var h=c===r;if(h){let P={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=l,e!==null&&(l?e.length=l:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let P={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[P]:e.push(P),r++}if(t.mode!==void 0&&t.mode!=="form"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}}var O=p===r;if(O){i=!0,n=0;var m={};m.mode=!0}let w=r,y=r,$=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.requestedSchema===void 0&&(P="requestedSchema")){let j={};e===null?e=[j]:e.push(j),r++}}var g=$===r;if(g){let P={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=y,e!==null&&(y?e.length=y:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let P={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[P]:e.push(P),r++}var O=w===r;if(O&&i?(i=!1,n=[n,1]):O&&(i=!0,n=1,m!==!0&&(m=m||{},m.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[P]:e.push(P),r++}if(t.mode===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[P]:e.push(P),r++}if(t.message===void 0){let P={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(!(re.call(jf.properties,P)||x.test(P))){let j={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.message!==void 0){let P=t.message;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.mode!==void 0){let P=t.mode;if(!(P==="form"||P==="url")){let j={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:jf.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[j]:e.push(j),r++}}if(t.name!==void 0){let P=t.name;if(typeof P=="string"){if(!H.test(P)){let j={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.onCancel!==void 0){let P=t.onCancel;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.onDecline!==void 0){let P=t.onDecline;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.protocolVersions!==void 0&&(ve(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length)),t.requestedSchema!==void 0){let P=t.requestedSchema,j=r,q=!1,A=null,E=r;if(P&&typeof P=="object"&&!Array.isArray(P)){if(P.$componentRef===void 0){let z={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[z]:e.push(z),r++}for(let z in P)if(z!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:z},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),r++}if(P.$componentRef!==void 0){let z=P.$componentRef;if(typeof z=="string"){if(!he.test(z)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),r++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),r++}}}else{let z={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[z]:e.push(z),r++}var v=E===r;if(v){q=!0,A=0;var k=!0}let T=r;Qr(P,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Qr.errors:e.concat(Qr.errors),r=e.length);var v=T===r;if(v&&q?(q=!1,A=[A,1]):v&&(q=!0,A=1,k!==!0&&(k=!0)),q)r=j,e!==null&&(j?e.length=j:e=null);else{let z={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:A},message:"must match exactly one schema in oneOf"};e===null?e=[z]:e.push(z),r++}}if(t.url!==void 0){let P=t.url;if(typeof P=="string"){if(!D(P)){let j={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}if(t.when!==void 0){let P=t.when;if(typeof P=="string"){if(te(P)<1){let j={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[j]:e.push(j),r++}}else{let j={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[j]:e.push(j),r++}}for(let P in t)x.test(P)&&(C(t[P],{instancePath:s+"/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:P,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let P={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}return Vt.errors=e,r===0}Vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ip(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ip.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let p={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[p]:e.push(p),r++}for(let p in t){let l=r;if(typeof p=="string"&&!H.test(p)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:p};e===null?e=[c]:e.push(c),r++}var o=l===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:p},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let p in t){let l=t[p],c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var n=w===r;if(n){h=!0,m=0;var i=!0}let y=r;Lr(l,{instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:p,rootData:u,dynamicAnchors:f})||(e=e===null?Lr.errors:e.concat(Lr.errors),r=e.length);var n=y===r;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}}else{let p={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}return ip.errors=e,r===0}ip.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Te(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Te.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let y={};for(;m--;){let $=c[m];if(typeof $=="string"){if(typeof y[$]=="number"){w=y[$];let g={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[g]:e.push(g),r++;break}y[$]=m}}}}else{let h={instancePath:s+"/"+n+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),r++}}}else{let l={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return Te.errors=e,r===0}Te.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function op(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=op.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(re.call(qd.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)x.test(i)&&(C(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return op.errors=e,r===0}op.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ad={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"};function np(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=np.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let p={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[p]:e.push(p),r++}for(let p in t){let l=r;if(typeof p=="string"&&!H.test(p)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:p};e===null?e=[c]:e.push(c),r++}var o=l===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:p},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let p in t){let l=t[p],c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var n=w===r;if(n){h=!0,m=0;var i=!0}let y=r;Hr(l,{instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:p,rootData:u,dynamicAnchors:f})||(e=e===null?Hr.errors:e.concat(Hr.errors),r=e.length);var n=y===r;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}}else{let p={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}return np.errors=e,r===0}np.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ap(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ap.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(re.call(Ad.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(Ct(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Ct.errors:e.concat(Ct.errors),r=e.length)),t.completionExamples!==void 0&&(Br(t.completionExamples,{instancePath:s+"/completionExamples",parentData:t,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:f})||(e=e===null?Br.errors:e.concat(Br.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)x.test(i)&&(C(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return ap.errors=e,r===0}ap.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var xd={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"};function pp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=pp.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let p={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[p]:e.push(p),r++}for(let p in t){let l=r;if(typeof p=="string"&&!H.test(p)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:p};e===null?e=[c]:e.push(c),r++}var o=l===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:p},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let p in t){let l=t[p],c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var n=w===r;if(n){h=!0,m=0;var i=!0}let y=r;Jr(l,{instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:p,rootData:u,dynamicAnchors:f})||(e=e===null?Jr.errors:e.concat(Jr.errors),r=e.length);var n=y===r;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}}else{let p={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}return pp.errors=e,r===0}pp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function lp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=lp.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(re.call(xd.properties,i)||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=r;if(typeof n=="string"&&!J.test(n)){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[l]:e.push(l),r++}var o=p===r;if(!o){let l={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let p=n.length;for(let l=0;l1||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[p]:e.push(p),r++}if(n<0||isNaN(n)){let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[p]:e.push(p),r++}}else{let p={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[p]:e.push(p),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(Ct(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:f})||(e=e===null?Ct.errors:e.concat(Ct.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let p={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[p]:e.push(p),r++}let n=i.length;for(let p=0;p1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)x.test(i)&&(C(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return lp.errors=e,r===0}lp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var zd={oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]};function Ot(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ot.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.scopes===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"scopes"},message:"must have required property 'scopes'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="authorizationUrl"||o==="refreshUrl"||o==="scopes"||o==="tokenUrl"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.authorizationUrl!==void 0){let o=t.authorizationUrl;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.refreshUrl!==void 0){let o=t.refreshUrl;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.scopes!==void 0){let o=t.scopes;if(o&&typeof o=="object"&&!Array.isArray(o)){for(let i in o)if(typeof o[i]!="string"){let n={instancePath:s+"/scopes/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/scopes/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/scopes",schemaPath:"#/properties/scopes/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.tokenUrl!==void 0){let o=t.tokenUrl;if(typeof o=="string"){if(!D(o)){let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)x.test(o)&&(C(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ot.errors=e,r===0}Ot.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function mp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=mp.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.implicit===void 0){let m={instancePath:s,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty:"implicit"},message:"must have required property 'implicit'"};e===null?e=[m]:e.push(m),r++}var h=n===r;i=i||h;let p=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.password===void 0){let m={instancePath:s,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty:"password"},message:"must have required property 'password'"};e===null?e=[m]:e.push(m),r++}var h=p===r;i=i||h;let l=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.clientCredentials===void 0){let m={instancePath:s,schemaPath:"#/anyOf/2/required",keyword:"required",params:{missingProperty:"clientCredentials"},message:"must have required property 'clientCredentials'"};e===null?e=[m]:e.push(m),r++}var h=l===r;i=i||h;let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.authorizationCode===void 0){let m={instancePath:s,schemaPath:"#/anyOf/3/required",keyword:"required",params:{missingProperty:"authorizationCode"},message:"must have required property 'authorizationCode'"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(i=i||h,i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[m]:e.push(m),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){for(let m in t)if(!(m==="authorizationCode"||m==="clientCredentials"||m==="implicit"||m==="password"||x.test(m))){let w={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.authorizationCode!==void 0){let m=t.authorizationCode;if(Ot(m,{instancePath:s+"/authorizationCode",parentData:t,parentDataProperty:"authorizationCode",rootData:u,dynamicAnchors:f})||(e=e===null?Ot.errors:e.concat(Ot.errors),r=e.length),m&&typeof m=="object"&&!Array.isArray(m)){if(m.authorizationUrl===void 0){let w={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[w]:e.push(w),r++}if(m.tokenUrl===void 0){let w={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[w]:e.push(w),r++}}}if(t.clientCredentials!==void 0){let m=t.clientCredentials;if(Ot(m,{instancePath:s+"/clientCredentials",parentData:t,parentDataProperty:"clientCredentials",rootData:u,dynamicAnchors:f})||(e=e===null?Ot.errors:e.concat(Ot.errors),r=e.length),m&&typeof m=="object"&&!Array.isArray(m)&&m.tokenUrl===void 0){let w={instancePath:s+"/clientCredentials",schemaPath:"#/properties/clientCredentials/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[w]:e.push(w),r++}}if(t.implicit!==void 0){let m=t.implicit;if(Ot(m,{instancePath:s+"/implicit",parentData:t,parentDataProperty:"implicit",rootData:u,dynamicAnchors:f})||(e=e===null?Ot.errors:e.concat(Ot.errors),r=e.length),m&&typeof m=="object"&&!Array.isArray(m)&&m.authorizationUrl===void 0){let w={instancePath:s+"/implicit",schemaPath:"#/properties/implicit/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[w]:e.push(w),r++}}if(t.password!==void 0){let m=t.password;if(Ot(m,{instancePath:s+"/password",parentData:t,parentDataProperty:"password",rootData:u,dynamicAnchors:f})||(e=e===null?Ot.errors:e.concat(Ot.errors),r=e.length),m&&typeof m=="object"&&!Array.isArray(m)&&m.tokenUrl===void 0){let w={instancePath:s+"/password",schemaPath:"#/properties/password/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[w]:e.push(w),r++}}for(let m in t)x.test(m)&&(C(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}return mp.errors=e,r===0}mp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function fp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=fp.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.scheme===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"scheme"},message:"must have required property 'scheme'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="bearerFormat"||m==="description"||m==="scheme"||m==="type"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.bearerFormat!==void 0&&typeof t.bearerFormat!="string"){let m={instancePath:s+"/bearerFormat",schemaPath:"#/oneOf/0/properties/bearerFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.description!==void 0&&typeof t.description!="string"){let m={instancePath:s+"/description",schemaPath:"#/oneOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.scheme!==void 0&&typeof t.scheme!="string"){let m={instancePath:s+"/scheme",schemaPath:"#/oneOf/0/properties/scheme/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.type!==void 0&&t.type!=="http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}for(let m in t)x.test(m)&&(C(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.name===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[m]:e.push(m),r++}if(t.in===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"in"},message:"must have required property 'in'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="description"||m==="in"||m==="name"||m==="type"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.description!==void 0&&typeof t.description!="string"){let m={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.in!==void 0){let m=t.in;if(typeof m!="string"){let w={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(!(m==="header"||m==="query"||m==="cookie")){let w={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/enum",keyword:"enum",params:{allowedValues:zd.oneOf[1].properties.in.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),r++}}if(t.name!==void 0&&typeof t.name!="string"){let m={instancePath:s+"/name",schemaPath:"#/oneOf/1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.type!==void 0&&t.type!=="apiKey"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"apiKey"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}for(let m in t)x.test(m)&&(C(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let m=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let y={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[y]:e.push(y),r++}if(t.flows===void 0){let y={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"flows"},message:"must have required property 'flows'"};e===null?e=[y]:e.push(y),r++}for(let y in t)if(!(y==="description"||y==="flows"||y==="type"||x.test(y))){let $={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.description!==void 0&&typeof t.description!="string"){let y={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}if(t.flows!==void 0&&(mp(t.flows,{instancePath:s+"/flows",parentData:t,parentDataProperty:"flows",rootData:u,dynamicAnchors:f})||(e=e===null?mp.errors:e.concat(mp.errors),r=e.length)),t.type!==void 0&&t.type!=="oauth2"){let y={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"oauth2"},message:"must be equal to constant"};e===null?e=[y]:e.push(y),r++}for(let y in t)x.test(y)&&(C(t[y],{instancePath:s+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:y,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let y={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),r++}var h=m===r;if(h&&i)i=!1,n=[n,2];else{h&&(i=!0,n=2,l!==!0&&(l=!0));let y=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let g={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[g]:e.push(g),r++}if(t.openIdConnectUrl===void 0){let g={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"openIdConnectUrl"},message:"must have required property 'openIdConnectUrl'"};e===null?e=[g]:e.push(g),r++}for(let g in t)if(!(g==="description"||g==="openIdConnectUrl"||g==="type"||x.test(g))){let O={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};e===null?e=[O]:e.push(O),r++}if(t.description!==void 0&&typeof t.description!="string"){let g={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}if(t.openIdConnectUrl!==void 0){let g=t.openIdConnectUrl;if(typeof g=="string"){if(!D(g)){let O={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}}if(t.type!==void 0&&t.type!=="openIdConnect"){let g={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"openIdConnect"},message:"must be equal to constant"};e===null?e=[g]:e.push(g),r++}for(let g in t)x.test(g)&&(C(t[g],{instancePath:s+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:g,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let g={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[g]:e.push(g),r++}var h=y===r;h&&i?(i=!1,n=[n,3]):h&&(i=!0,n=3,l!==!0&&(l=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return fp.errors=e,a.props=l,r===0}fp.evaluated={dynamicProps:!0,dynamicItems:!1};function up(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=up.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),r++}for(let i in t){let n=r;if(typeof i=="string"&&!H.test(i)){let p={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[p]:e.push(p),r++}var o=n===r;if(!o){let p={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[p]:e.push(p),r++}}for(let i in t)fp(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?fp.errors:e.concat(fp.errors),r=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return up.errors=e,r===0}up.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function cp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=cp.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="description"||o==="name"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.name!==void 0){let o=t.name;if(typeof o=="string"){if(te(o)<1){let i={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)x.test(o)&&(C(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return cp.errors=e,r===0}cp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ed={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"};var Nd={additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"};function yp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=yp.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let p={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[p]:e.push(p),r++}for(let p in t){let l=r;if(typeof p=="string"&&!H.test(p)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:p};e===null?e=[c]:e.push(c),r++}var o=l===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:p},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let p in t){let l=t[p],c=r,h=!1,m=null,w=r;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.$componentRef===void 0){let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[$]:e.push($),r++}for(let $ in l)if($!=="$componentRef"){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[g]:e.push(g),r++}if(l.$componentRef!==void 0){let $=l.$componentRef;if(typeof $=="string"){if(!he.test($)){let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[g]:e.push(g),r++}}else{let g={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[g]:e.push(g),r++}}}else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var n=w===r;if(n){h=!0,m=0;var i=!0}let y=r;Kr(l,{instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:p,rootData:u,dynamicAnchors:f})||(e=e===null?Kr.errors:e.concat(Kr.errors),r=e.length);var n=y===r;if(n&&h?(h=!1,m=[m,1]):n&&(h=!0,m=1,i!==!0&&(i=!0)),h)r=c,e!==null&&(c?e.length=c:e=null);else{let $={instancePath:s+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}}}else{let p={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[p]:e.push(p),r++}return yp.errors=e,r===0}yp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function dp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=dp.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),r++}if(t.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),r++}if(t.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="message"||o==="mode"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.message!==void 0){let o=t.message;if(typeof o=="string"){if(te(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.mode!==void 0&&t.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}t.requestedSchema!==void 0&&(Qr(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:f})||(e=e===null?Qr.errors:e.concat(Qr.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return dp.errors=e,r===0}dp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function hp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=hp.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;dp(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?dp.errors:e.concat(dp.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[m]:e.push(m),r++}if(t.message===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="message"||m==="mode"||m==="url")){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.message!==void 0){let m=t.message;if(typeof m=="string"){if(te(m)<1){let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}if(t.mode!==void 0&&t.mode!=="url"){let m={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return hp.errors=e,a.props=l,r===0}hp.evaluated={dynamicProps:!0,dynamicItems:!1};var _d={additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"};function gp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=gp.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.action!==void 0&&t.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.content!==void 0){let o=t.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)C(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return gp.errors=e,r===0}gp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function bp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=bp.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;gp(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?gp.errors:e.concat(gp.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(m!=="action"){let w={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.action!==void 0){let m=t.action;if(!(m==="decline"||m==="cancel")){let w={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:_d.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),r++}}}else{let m={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,l!==!0&&(l=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return bp.errors=e,a.props=l,r===0}bp.evaluated={dynamicProps:!0,dynamicItems:!1};function $p(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=$p.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),r++}if(t.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="declaration"||o==="request"||o==="response"||o==="type"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.declaration!==void 0){let o=t.declaration;if(typeof o=="string"){if(!H.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.request!==void 0&&(hp(t.request,{instancePath:s+"/request",parentData:t,parentDataProperty:"request",rootData:u,dynamicAnchors:f})||(e=e===null?hp.errors:e.concat(hp.errors),r=e.length)),t.response!==void 0&&(bp(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?bp.errors:e.concat(bp.errors),r=e.length)),t.type!==void 0&&t.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)x.test(o)&&(C(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return $p.errors=e,r===0}$p.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Of={additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},Td={additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},Zd={additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"};function Pp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Pp.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),r++}if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="id"||o==="input"||o==="name"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.id!==void 0&&typeof t.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)C(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.name!==void 0&&typeof t.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.type!==void 0&&t.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Pp.errors=e,r===0}Pp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function wp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=wp.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),r++}if(t.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),r++}if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="content"||i==="isError"||i==="toolUseId"||i==="type")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.content!==void 0){let i=t.content,n=r,p=!1,l=null,c=r;ot(i,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:f})||(e=e===null?ot.errors:e.concat(ot.errors),r=e.length);var o=c===r;o&&(p=!0,l=0);let h=r;if(Array.isArray(i)){if(i.length<1){let w={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[w]:e.push(w),r++}let m=i.length;for(let w=0;w1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.hints!==void 0){let o=t.hints;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/hints",schemaPath:"#/properties/hints/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.speedPriority!==void 0){let o=t.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return jp.errors=e,r===0}jp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function vp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=vp.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="annotations"||i==="description"||i==="inputSchema"||i==="name"||i==="title"||x.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema!==void 0){let i=t.inputSchema;if(!mt(i,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:f}))e=e===null?mt.errors:e.concat(mt.errors),r=e.length;else var o=mt.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),r++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),r++}}o!==!0&&(o=o||{},o.type=!0)}if(t.name!==void 0){let i=t.name;if(typeof i=="string"){if(te(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)x.test(i)&&(C(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return vp.errors=e,r===0}vp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Op(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Op.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),r++}if(t.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!re.call(Of.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.includeContext!==void 0){let o=t.includeContext;if(!(o==="none"||o==="thisServer"||o==="allServers")){let i={instancePath:s+"/includeContext",schemaPath:"#/properties/includeContext/enum",keyword:"enum",params:{allowedValues:Of.properties.includeContext.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}if(t.maxTokens!==void 0){let o=t.maxTokens;if(!(typeof o=="number"&&!(o%1)&&!isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[i]:e.push(i),r++}if(typeof o=="number"&&(o<1||isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),r++}}if(t.messages!==void 0){let o=t.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),r++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.response!==void 0&&(xp(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:f})||(e=e===null?xp.errors:e.concat(xp.errors),r=e.length)),t.type!==void 0&&t.type!=="roots"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"roots"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)x.test(o)&&(C(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return zp.errors=e,r===0}zp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ep(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ep.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;$p(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?$p.errors:e.concat($p.errors),r=e.length);var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;Ap(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Ap.errors:e.concat(Ap.errors),r=e.length);var h=c===r;if(h&&i)i=!1,n=[n,1];else{h&&(i=!0,n=1,l!==!0&&(l=!0));let m=r;zp(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?zp.errors:e.concat(zp.errors),r=e.length);var h=m===r;h&&i?(i=!1,n=[n,2]):h&&(i=!0,n=2,l!==!0&&(l=!0))}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let m={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[m]:e.push(m),r++}return Ep.errors=e,a.props=l,r===0}Ep.evaluated={dynamicProps:!0,dynamicItems:!1};function Np(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Np.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}if(t.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="input"||o==="result"||o==="steps"||x.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)C(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.result!==void 0&&(Wr(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:f})||(e=e===null?Wr.errors:e.concat(Wr.errors),r=e.length)),t.steps!==void 0){let o=t.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1){let w={};for(;h--;){let y=l[h];if(typeof y=="string"){if(typeof w[y]=="number"){m=w[y];let $={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:h,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+h+" are identical)"};e===null?e=[$]:e.push($),r++;break}w[y]=h}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.title!==void 0&&typeof t.title!="string"){let l={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),r++}for(let l in t)x.test(l)&&(C(t[l],{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Tp.errors=e,r===0}Tp.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Zp(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Zp.evaluated;a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0);let o=r,i=!1,n=null,p=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.url===void 0){let m={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="protocolVersions"||m==="security"||m==="type"||m==="url"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.protocolVersions!==void 0&&(ve(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:f})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length)),t.security!==void 0&&(Te(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:f})||(e=e===null?Te.errors:e.concat(Te.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let m={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[m]:e.push(m),r++}if(t.url!==void 0){let m=t.url;if(typeof m=="string"){if(!D(m)){let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}}for(let m in t)x.test(m)&&(C(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:f})||(e=e===null?C.errors:e.concat(C.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}var h=p===r;if(h){i=!0,n=0;var l=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[m]:e.push(m),r++}if(t.command===void 0){let m={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[m]:e.push(m),r++}for(let m in t)if(!(m==="args"||m==="command"||m==="env"||m==="protocolVersions"||m==="security"||m==="type"||x.test(m))){let w={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),r++}if(t.args!==void 0){let m=t.args;if(Array.isArray(m)){let w=m.length;for(let y=0;y=",limit:0},message:"must be >= 0"};f===null?f=[r]:f.push(r),e++}return Gt.errors=f,e===0}var _l={validate:ge};function Lt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t}={}){let f=null,e=0;if(Array.isArray(t)){if(t.length<1){let a={instancePath:s,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};f===null?f=[a]:f.push(a),e++}let r=t.length;for(let a=0;a",limit:0},message:"must be > 0"};f===null?f=[p]:f.push(p),e++}}else{let p={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"};f===null?f=[p]:f.push(p),e++}}if(t.maximum!==void 0&&typeof t.maximum!="number"){let n={instancePath:s+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};f===null?f=[n]:f.push(n),e++}if(t.exclusiveMaximum!==void 0&&typeof t.exclusiveMaximum!="number"){let n={instancePath:s+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"};f===null?f=[n]:f.push(n),e++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let n={instancePath:s+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};f===null?f=[n]:f.push(n),e++}if(t.exclusiveMinimum!==void 0&&typeof t.exclusiveMinimum!="number"){let n={instancePath:s+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"};f===null?f=[n]:f.push(n),e++}if(t.maxLength!==void 0){let n=t.maxLength;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let p={instancePath:s+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};f===null?f=[p]:f.push(p),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let p={instancePath:s+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};f===null?f=[p]:f.push(p),e++}}if(t.minLength!==void 0&&(Gt(t.minLength,{instancePath:s+"/minLength",parentData:t,parentDataProperty:"minLength",rootData:u})||(f=f===null?Gt.errors:f.concat(Gt.errors),e=f.length)),t.pattern!==void 0&&typeof t.pattern!="string"){let n={instancePath:s+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"};f===null?f=[n]:f.push(n),e++}if(t.additionalItems!==void 0&&(ge(t.additionalItems,{instancePath:s+"/additionalItems",parentData:t,parentDataProperty:"additionalItems",rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length)),t.items!==void 0){let n=t.items,p=e,l=!1,c=e;ge(n,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length);var r=c===e;if(l=l||r,!l){let h=e;Lt(n,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u})||(f=f===null?Lt.errors:f.concat(Lt.errors),e=f.length);var r=h===e;l=l||r}if(l)e=p,f!==null&&(p?f.length=p:f=null);else{let h={instancePath:s+"/items",schemaPath:"#/properties/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};f===null?f=[h]:f.push(h),e++}}if(t.maxItems!==void 0){let n=t.maxItems;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let p={instancePath:s+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};f===null?f=[p]:f.push(p),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let p={instancePath:s+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};f===null?f=[p]:f.push(p),e++}}if(t.minItems!==void 0&&(Gt(t.minItems,{instancePath:s+"/minItems",parentData:t,parentDataProperty:"minItems",rootData:u})||(f=f===null?Gt.errors:f.concat(Gt.errors),e=f.length)),t.uniqueItems!==void 0&&typeof t.uniqueItems!="boolean"){let n={instancePath:s+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};f===null?f=[n]:f.push(n),e++}if(t.contains!==void 0&&(ge(t.contains,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length)),t.maxProperties!==void 0){let n=t.maxProperties;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let p={instancePath:s+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};f===null?f=[p]:f.push(p),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let p={instancePath:s+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};f===null?f=[p]:f.push(p),e++}}if(t.minProperties!==void 0&&(Gt(t.minProperties,{instancePath:s+"/minProperties",parentData:t,parentDataProperty:"minProperties",rootData:u})||(f=f===null?Gt.errors:f.concat(Gt.errors),e=f.length)),t.required!==void 0){let n=t.required;if(Array.isArray(n)){let p=n.length;for(let h=0;h1){let h={};for(;l--;){let m=n[l];if(typeof m=="string"){if(typeof h[m]=="number"){c=h[m];let w={instancePath:s+"/required",schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:l,j:c},message:"must NOT have duplicate items (items ## "+c+" and "+l+" are identical)"};f===null?f=[w]:f.push(w),e++;break}h[m]=l}}}}else{let p={instancePath:s+"/required",schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};f===null?f=[p]:f.push(p),e++}}if(t.additionalProperties!==void 0&&(ge(t.additionalProperties,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length)),t.definitions!==void 0){let n=t.definitions;if(n&&typeof n=="object"&&!Array.isArray(n))for(let p in n)ge(n[p],{instancePath:s+"/definitions/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:p,rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length);else{let p={instancePath:s+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"};f===null?f=[p]:f.push(p),e++}}if(t.properties!==void 0){let n=t.properties;if(n&&typeof n=="object"&&!Array.isArray(n))for(let p in n)ge(n[p],{instancePath:s+"/properties/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:p,rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length);else{let p={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};f===null?f=[p]:f.push(p),e++}}if(t.patternProperties!==void 0){let n=t.patternProperties;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let p in n){var a=e===e;if(!a){let c={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:p},message:"property name must be valid"};f===null?f=[c]:f.push(c),e++}}for(let p in n)ge(n[p],{instancePath:s+"/patternProperties/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:p,rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length)}else{let p={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};f===null?f=[p]:f.push(p),e++}}if(t.dependencies!==void 0){let n=t.dependencies;if(n&&typeof n=="object"&&!Array.isArray(n))for(let p in n){let l=n[p],c=e,h=!1,m=e;ge(l,{instancePath:s+"/dependencies/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:p,rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length);var o=m===e;if(h=h||o,!h){let w=e;if(Array.isArray(l)){let $=l.length;for(let k=0;k<$;k++)if(typeof l[k]!="string"){let v={instancePath:s+"/dependencies/"+p.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+k,schemaPath:"#/definitions/stringArray/items/type",keyword:"type",params:{type:"string"},message:"must be string"};f===null?f=[v]:f.push(v),e++}let g=l.length,O;if(g>1){let k={};for(;g--;){let v=l[g];if(typeof v=="string"){if(typeof k[v]=="number"){O=k[v];let P={instancePath:s+"/dependencies/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:g,j:O},message:"must NOT have duplicate items (items ## "+O+" and "+g+" are identical)"};f===null?f=[P]:f.push(P),e++;break}k[v]=g}}}}else{let $={instancePath:s+"/dependencies/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};f===null?f=[$]:f.push($),e++}var o=w===e;h=h||o}if(h)e=c,f!==null&&(c?f.length=c:f=null);else{let w={instancePath:s+"/dependencies/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};f===null?f=[w]:f.push(w),e++}}else{let p={instancePath:s+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"};f===null?f=[p]:f.push(p),e++}}if(t.propertyNames!==void 0&&(ge(t.propertyNames,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length)),t.enum!==void 0){let n=t.enum;if(Array.isArray(n)){if(n.length<1){let c={instancePath:s+"/enum",schemaPath:"#/properties/enum/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};f===null?f=[c]:f.push(c),e++}let p=n.length,l;if(p>1){e:for(;p--;)for(l=p;l--;)if(xf(n[p],n[l])){let c={instancePath:s+"/enum",schemaPath:"#/properties/enum/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};f===null?f=[c]:f.push(c),e++;break e}}}else{let p={instancePath:s+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"};f===null?f=[p]:f.push(p),e++}}if(t.type!==void 0){let n=t.type,p=e,l=!1,c=e;if(!(n==="array"||n==="boolean"||n==="integer"||n==="null"||n==="number"||n==="object"||n==="string")){let h={instancePath:s+"/type",schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:Af.enum},message:"must be equal to one of the allowed values"};f===null?f=[h]:f.push(h),e++}var i=c===e;if(l=l||i,!l){let h=e;if(Array.isArray(n)){if(n.length<1){let g={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};f===null?f=[g]:f.push(g),e++}let w=n.length;for(let g=0;g1){e:for(;y--;)for($=y;$--;)if(xf(n[y],n[$])){let g={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:y,j:$},message:"must NOT have duplicate items (items ## "+$+" and "+y+" are identical)"};f===null?f=[g]:f.push(g),e++;break e}}}else{let w={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};f===null?f=[w]:f.push(w),e++}var i=h===e;l=l||i}if(l)e=p,f!==null&&(p?f.length=p:f=null);else{let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};f===null?f=[h]:f.push(h),e++}}if(t.format!==void 0&&typeof t.format!="string"){let n={instancePath:s+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"};f===null?f=[n]:f.push(n),e++}if(t.contentMediaType!==void 0&&typeof t.contentMediaType!="string"){let n={instancePath:s+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"};f===null?f=[n]:f.push(n),e++}if(t.contentEncoding!==void 0&&typeof t.contentEncoding!="string"){let n={instancePath:s+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"};f===null?f=[n]:f.push(n),e++}t.if!==void 0&&(ge(t.if,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length)),t.then!==void 0&&(ge(t.then,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length)),t.else!==void 0&&(ge(t.else,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length)),t.allOf!==void 0&&(Lt(t.allOf,{instancePath:s+"/allOf",parentData:t,parentDataProperty:"allOf",rootData:u})||(f=f===null?Lt.errors:f.concat(Lt.errors),e=f.length)),t.anyOf!==void 0&&(Lt(t.anyOf,{instancePath:s+"/anyOf",parentData:t,parentDataProperty:"anyOf",rootData:u})||(f=f===null?Lt.errors:f.concat(Lt.errors),e=f.length)),t.oneOf!==void 0&&(Lt(t.oneOf,{instancePath:s+"/oneOf",parentData:t,parentDataProperty:"oneOf",rootData:u})||(f=f===null?Lt.errors:f.concat(Lt.errors),e=f.length)),t.not!==void 0&&(ge(t.not,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u})||(f=f===null?ge.errors:f.concat(ge.errors),e=f.length))}return ge.errors=f,e===0}var Nf=Dt,Id={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}};var Cd={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}};var Vd=new RegExp("^[^#]*#?$","u"),Tl=new RegExp("^[A-Za-z_][-A-Za-z0-9._]*$","u");function Ft(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Ft.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let c={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Cd.type},message:"must be object,boolean"};e===null?e=[c]:e.push(c),r++}if(f.meta||(f.meta=Ft),t&&typeof t=="object"&&!Array.isArray(t)){if(t.$id!==void 0){let c=t.$id;if(typeof c!="string"){let h={instancePath:s+"/$id",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(typeof c=="string"&&!Vd.test(c)){let h={instancePath:s+"/$id",schemaPath:"#/properties/%24id/pattern",keyword:"pattern",params:{pattern:"^[^#]*#?$"},message:'must match pattern "^[^#]*#?$"'};e===null?e=[h]:e.push(h),r++}}if(t.$schema!==void 0&&typeof t.$schema!="string"){let c={instancePath:s+"/$schema",schemaPath:"#/$defs/uriString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$ref!==void 0&&typeof t.$ref!="string"){let c={instancePath:s+"/$ref",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$anchor!==void 0){let c=t.$anchor;if(typeof c=="string"){if(!Tl.test(c)){let h={instancePath:s+"/$anchor",schemaPath:"#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[h]:e.push(h),r++}}else{let h={instancePath:s+"/$anchor",schemaPath:"#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}}if(t.$dynamicRef!==void 0&&typeof t.$dynamicRef!="string"){let c={instancePath:s+"/$dynamicRef",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$dynamicAnchor!==void 0){let c=t.$dynamicAnchor;if(typeof c=="string"){if(!Tl.test(c)){let h={instancePath:s+"/$dynamicAnchor",schemaPath:"#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[h]:e.push(h),r++}}else{let h={instancePath:s+"/$dynamicAnchor",schemaPath:"#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}}if(t.$vocabulary!==void 0){let c=t.$vocabulary;if(c&&typeof c=="object"&&!Array.isArray(c)){for(let h in c){let m=r;if(typeof h!="string"){let w={instancePath:s+"/$vocabulary",schemaPath:"#/$defs/uriString/type",keyword:"type",params:{type:"string"},message:"must be string",propertyName:h};e===null?e=[w]:e.push(w),r++}var o=m===r;if(!o){let w={instancePath:s+"/$vocabulary",schemaPath:"#/properties/%24vocabulary/propertyNames",keyword:"propertyNames",params:{propertyName:h},message:"property name must be valid"};e===null?e=[w]:e.push(w),r++}}for(let h in c)if(typeof c[h]!="boolean"){let m={instancePath:s+"/$vocabulary/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24vocabulary/additionalProperties/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[m]:e.push(m),r++}}else{let h={instancePath:s+"/$vocabulary",schemaPath:"#/properties/%24vocabulary/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}}if(t.$comment!==void 0&&typeof t.$comment!="string"){let c={instancePath:s+"/$comment",schemaPath:"#/properties/%24comment/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$defs!==void 0){let c=t.$defs;if(c&&typeof c=="object"&&!Array.isArray(c))for(let h in c){let m=c[h],w=f.meta;if(w)if(!w(m,{instancePath:s+"/$defs/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:c,parentDataProperty:h,rootData:u,dynamicAnchors:f}))e=e===null?w.errors:e.concat(w.errors),r=e.length;else var i=w.evaluated.props,n=w.evaluated.items;else if(!Ft(m,{instancePath:s+"/$defs/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:c,parentDataProperty:h,rootData:u,dynamicAnchors:f}))e=e===null?Ft.errors:e.concat(Ft.errors),r=e.length;else{var p=Ft.evaluated.props;i!==!0&&p!==void 0&&(p===!0?i=!0:(i=i||{},Object.assign(i,p)));var l=Ft.evaluated.items;n!==!0&&l!==void 0&&(n=l===!0?!0:n>l?n:l)}}else{let h={instancePath:s+"/$defs",schemaPath:"#/properties/%24defs/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}}}return Ft.errors=e,r===0}Ft.evaluated={props:{$id:!0,$schema:!0,$ref:!0,$anchor:!0,$dynamicRef:!0,$dynamicAnchor:!0,$vocabulary:!0,$comment:!0,$defs:!0},dynamicProps:!1,dynamicItems:!1};var Dd={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}};function tt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=tt.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),Array.isArray(t)){if(t.length<1){let c={instancePath:s,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),r++}let l=t.length;for(let c=0;cp?i:p)}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[l]:e.push(l),r++}return tt.errors=e,r===0}tt.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function se(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=se.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let ie={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Dd.type},message:"must be object,boolean"};e===null?e=[ie]:e.push(ie),r++}if(f.meta||(f.meta=se),t&&typeof t=="object"&&!Array.isArray(t)){if(t.prefixItems!==void 0&&(tt(t.prefixItems,{instancePath:s+"/prefixItems",parentData:t,parentDataProperty:"prefixItems",rootData:u,dynamicAnchors:f})||(e=e===null?tt.errors:e.concat(tt.errors),r=e.length)),t.items!==void 0){let ie=t.items,ee=f.meta;if(ee)if(!ee(ie,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),r=e.length;else var o=ee.evaluated.props,i=ee.evaluated.items;else if(!se(ie,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var n=se.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var p=se.evaluated.items;i!==!0&&p!==void 0&&(i=p===!0?!0:i>p?i:p)}}if(t.contains!==void 0){let ie=t.contains,ee=f.meta;if(ee)if(!ee(ie,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),r=e.length;else var l=ee.evaluated.props,c=ee.evaluated.items;else if(!se(ie,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var h=se.evaluated.props;l!==!0&&h!==void 0&&(h===!0?l=!0:(l=l||{},Object.assign(l,h)));var m=se.evaluated.items;c!==!0&&m!==void 0&&(c=m===!0?!0:c>m?c:m)}}if(t.additionalProperties!==void 0){let ie=t.additionalProperties,ee=f.meta;if(ee)if(!ee(ie,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),r=e.length;else var w=ee.evaluated.props,y=ee.evaluated.items;else if(!se(ie,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var $=se.evaluated.props;w!==!0&&$!==void 0&&($===!0?w=!0:(w=w||{},Object.assign(w,$)));var g=se.evaluated.items;y!==!0&&g!==void 0&&(y=g===!0?!0:y>g?y:g)}}if(t.properties!==void 0){let ie=t.properties;if(ie&&typeof ie=="object"&&!Array.isArray(ie))for(let ee in ie){let Xt=ie[ee],Re=f.meta;if(Re)if(!Re(Xt,{instancePath:s+"/properties/"+ee.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:ie,parentDataProperty:ee,rootData:u,dynamicAnchors:f}))e=e===null?Re.errors:e.concat(Re.errors),r=e.length;else var O=Re.evaluated.props,k=Re.evaluated.items;else if(!se(Xt,{instancePath:s+"/properties/"+ee.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:ie,parentDataProperty:ee,rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var v=se.evaluated.props;O!==!0&&v!==void 0&&(v===!0?O=!0:(O=O||{},Object.assign(O,v)));var P=se.evaluated.items;k!==!0&&P!==void 0&&(k=P===!0?!0:k>P?k:P)}}else{let ee={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[ee]:e.push(ee),r++}}if(t.patternProperties!==void 0){let ie=t.patternProperties;if(ie&&typeof ie=="object"&&!Array.isArray(ie)){for(let ee in ie){var j=r===r;if(!j){let Re={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:ee},message:"property name must be valid"};e===null?e=[Re]:e.push(Re),r++}}for(let ee in ie){let Xt=ie[ee],Re=f.meta;if(Re)if(!Re(Xt,{instancePath:s+"/patternProperties/"+ee.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:ie,parentDataProperty:ee,rootData:u,dynamicAnchors:f}))e=e===null?Re.errors:e.concat(Re.errors),r=e.length;else var q=Re.evaluated.props,A=Re.evaluated.items;else if(!se(Xt,{instancePath:s+"/patternProperties/"+ee.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:ie,parentDataProperty:ee,rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var E=se.evaluated.props;q!==!0&&E!==void 0&&(E===!0?q=!0:(q=q||{},Object.assign(q,E)));var T=se.evaluated.items;A!==!0&&T!==void 0&&(A=T===!0?!0:A>T?A:T)}}}else{let ee={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[ee]:e.push(ee),r++}}if(t.dependentSchemas!==void 0){let ie=t.dependentSchemas;if(ie&&typeof ie=="object"&&!Array.isArray(ie))for(let ee in ie){let Xt=ie[ee],Re=f.meta;if(Re)if(!Re(Xt,{instancePath:s+"/dependentSchemas/"+ee.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:ie,parentDataProperty:ee,rootData:u,dynamicAnchors:f}))e=e===null?Re.errors:e.concat(Re.errors),r=e.length;else var z=Re.evaluated.props,_=Re.evaluated.items;else if(!se(Xt,{instancePath:s+"/dependentSchemas/"+ee.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:ie,parentDataProperty:ee,rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var N=se.evaluated.props;z!==!0&&N!==void 0&&(N===!0?z=!0:(z=z||{},Object.assign(z,N)));var R=se.evaluated.items;_!==!0&&R!==void 0&&(_=R===!0?!0:_>R?_:R)}}else{let ee={instancePath:s+"/dependentSchemas",schemaPath:"#/properties/dependentSchemas/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[ee]:e.push(ee),r++}}if(t.propertyNames!==void 0){let ie=t.propertyNames,ee=f.meta;if(ee)if(!ee(ie,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),r=e.length;else var U=ee.evaluated.props,F=ee.evaluated.items;else if(!se(ie,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var V=se.evaluated.props;U!==!0&&V!==void 0&&(V===!0?U=!0:(U=U||{},Object.assign(U,V)));var Ve=se.evaluated.items;F!==!0&&Ve!==void 0&&(F=Ve===!0?!0:F>Ve?F:Ve)}}if(t.if!==void 0){let ie=t.if,ee=f.meta;if(ee)if(!ee(ie,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),r=e.length;else var Ip=ee.evaluated.props,Qp=ee.evaluated.items;else if(!se(ie,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var Pl=se.evaluated.props;Ip!==!0&&Pl!==void 0&&(Pl===!0?Ip=!0:(Ip=Ip||{},Object.assign(Ip,Pl)));var Yp=se.evaluated.items;Qp!==!0&&Yp!==void 0&&(Qp=Yp===!0?!0:Qp>Yp?Qp:Yp)}}if(t.then!==void 0){let ie=t.then,ee=f.meta;if(ee)if(!ee(ie,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),r=e.length;else var Cp=ee.evaluated.props,Gp=ee.evaluated.items;else if(!se(ie,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var wl=se.evaluated.props;Cp!==!0&&wl!==void 0&&(wl===!0?Cp=!0:(Cp=Cp||{},Object.assign(Cp,wl)));var Xp=se.evaluated.items;Gp!==!0&&Xp!==void 0&&(Gp=Xp===!0?!0:Gp>Xp?Gp:Xp)}}if(t.else!==void 0){let ie=t.else,ee=f.meta;if(ee)if(!ee(ie,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),r=e.length;else var Vp=ee.evaluated.props,el=ee.evaluated.items;else if(!se(ie,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var kl=se.evaluated.props;Vp!==!0&&kl!==void 0&&(kl===!0?Vp=!0:(Vp=Vp||{},Object.assign(Vp,kl)));var tl=se.evaluated.items;el!==!0&&tl!==void 0&&(el=tl===!0?!0:el>tl?el:tl)}}if(t.allOf!==void 0&&(tt(t.allOf,{instancePath:s+"/allOf",parentData:t,parentDataProperty:"allOf",rootData:u,dynamicAnchors:f})||(e=e===null?tt.errors:e.concat(tt.errors),r=e.length)),t.anyOf!==void 0&&(tt(t.anyOf,{instancePath:s+"/anyOf",parentData:t,parentDataProperty:"anyOf",rootData:u,dynamicAnchors:f})||(e=e===null?tt.errors:e.concat(tt.errors),r=e.length)),t.oneOf!==void 0&&(tt(t.oneOf,{instancePath:s+"/oneOf",parentData:t,parentDataProperty:"oneOf",rootData:u,dynamicAnchors:f})||(e=e===null?tt.errors:e.concat(tt.errors),r=e.length)),t.not!==void 0){let ie=t.not,ee=f.meta;if(ee)if(!ee(ie,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u,dynamicAnchors:f}))e=e===null?ee.errors:e.concat(ee.errors),r=e.length;else var Dp=ee.evaluated.props,rl=ee.evaluated.items;else if(!se(ie,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u,dynamicAnchors:f}))e=e===null?se.errors:e.concat(se.errors),r=e.length;else{var jl=se.evaluated.props;Dp!==!0&&jl!==void 0&&(jl===!0?Dp=!0:(Dp=Dp||{},Object.assign(Dp,jl)));var sl=se.evaluated.items;rl!==!0&&sl!==void 0&&(rl=sl===!0?!0:rl>sl?rl:sl)}}}return se.errors=e,r===0}se.evaluated={props:{prefixItems:!0,items:!0,contains:!0,additionalProperties:!0,properties:!0,patternProperties:!0,dependentSchemas:!0,propertyNames:!0,if:!0,then:!0,else:!0,allOf:!0,anyOf:!0,oneOf:!0,not:!0},dynamicProps:!1,dynamicItems:!1};var Rd={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}};function ft(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=ft.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let w={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Rd.type},message:"must be object,boolean"};e===null?e=[w]:e.push(w),r++}if(f.meta||(f.meta=ft),t&&typeof t=="object"&&!Array.isArray(t)){if(t.unevaluatedItems!==void 0){let w=t.unevaluatedItems,y=f.meta;if(y)if(!y(w,{instancePath:s+"/unevaluatedItems",parentData:t,parentDataProperty:"unevaluatedItems",rootData:u,dynamicAnchors:f}))e=e===null?y.errors:e.concat(y.errors),r=e.length;else var o=y.evaluated.props,i=y.evaluated.items;else if(!ft(w,{instancePath:s+"/unevaluatedItems",parentData:t,parentDataProperty:"unevaluatedItems",rootData:u,dynamicAnchors:f}))e=e===null?ft.errors:e.concat(ft.errors),r=e.length;else{var n=ft.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var p=ft.evaluated.items;i!==!0&&p!==void 0&&(i=p===!0?!0:i>p?i:p)}}if(t.unevaluatedProperties!==void 0){let w=t.unevaluatedProperties,y=f.meta;if(y)if(!y(w,{instancePath:s+"/unevaluatedProperties",parentData:t,parentDataProperty:"unevaluatedProperties",rootData:u,dynamicAnchors:f}))e=e===null?y.errors:e.concat(y.errors),r=e.length;else var l=y.evaluated.props,c=y.evaluated.items;else if(!ft(w,{instancePath:s+"/unevaluatedProperties",parentData:t,parentDataProperty:"unevaluatedProperties",rootData:u,dynamicAnchors:f}))e=e===null?ft.errors:e.concat(ft.errors),r=e.length;else{var h=ft.evaluated.props;l!==!0&&h!==void 0&&(h===!0?l=!0:(l=l||{},Object.assign(l,h)));var m=ft.evaluated.items;c!==!0&&m!==void 0&&(c=m===!0?!0:c>m?c:m)}}}return ft.errors=e,r===0}ft.evaluated={props:{unevaluatedItems:!0,unevaluatedProperties:!0},dynamicProps:!1,dynamicItems:!1};var Md={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}},Ef={enum:["array","boolean","integer","null","number","object","string"]};var Ud=ol().default;function hs(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=hs.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Md.type},message:"must be object,boolean"};e===null?e=[i]:e.push(i),r++}if(f.meta||(f.meta=hs),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type!==void 0){let i=t.type,n=r,p=!1,l=r;if(!(i==="array"||i==="boolean"||i==="integer"||i==="null"||i==="number"||i==="object"||i==="string")){let h={instancePath:s+"/type",schemaPath:"#/$defs/simpleTypes/enum",keyword:"enum",params:{allowedValues:Ef.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),r++}var o=l===r;p=p||o;let c=r;if(Array.isArray(i)){if(i.length<1){let y={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[y]:e.push(y),r++}let h=i.length;for(let y=0;y1){e:for(;m--;)for(w=m;w--;)if(Ud(i[m],i[w])){let y={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:m,j:w},message:"must NOT have duplicate items (items ## "+w+" and "+m+" are identical)"};e===null?e=[y]:e.push(y),r++;break e}}}else{let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[h]:e.push(h),r++}var o=c===r;if(p=p||o,p)r=n,e!==null&&(n?e.length=n:e=null);else{let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[h]:e.push(h),r++}}if(t.enum!==void 0&&!Array.isArray(t.enum)){let i={instancePath:s+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}if(t.multipleOf!==void 0){let i=t.multipleOf;if(typeof i=="number"){if(i<=0||isNaN(i)){let n={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}if(t.maximum!==void 0&&typeof t.maximum!="number"){let i={instancePath:s+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.exclusiveMaximum!==void 0&&typeof t.exclusiveMaximum!="number"){let i={instancePath:s+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let i={instancePath:s+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.exclusiveMinimum!==void 0&&typeof t.exclusiveMinimum!="number"){let i={instancePath:s+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.maxLength!==void 0){let i=t.maxLength;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxLength",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxLength",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minLength!==void 0){let i=t.minLength;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minLength",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minLength",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.pattern!==void 0&&typeof t.pattern!="string"){let i={instancePath:s+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.maxItems!==void 0){let i=t.maxItems;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxItems",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxItems",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minItems!==void 0){let i=t.minItems;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minItems",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minItems",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.uniqueItems!==void 0&&typeof t.uniqueItems!="boolean"){let i={instancePath:s+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.maxContains!==void 0){let i=t.maxContains;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxContains",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxContains",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minContains!==void 0){let i=t.minContains;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minContains",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minContains",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.maxProperties!==void 0){let i=t.maxProperties;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxProperties",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxProperties",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minProperties!==void 0){let i=t.minProperties;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minProperties",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minProperties",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.required!==void 0){let i=t.required;if(Array.isArray(i)){let n=i.length;for(let c=0;c1){let c={};for(;p--;){let h=i[p];if(typeof h=="string"){if(typeof c[h]=="number"){l=c[h];let m={instancePath:s+"/required",schemaPath:"#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:p,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+p+" are identical)"};e===null?e=[m]:e.push(m),r++;break}c[h]=p}}}}else{let n={instancePath:s+"/required",schemaPath:"#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.dependentRequired!==void 0){let i=t.dependentRequired;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let p=i[n];if(Array.isArray(p)){let l=p.length;for(let m=0;m1){let m={};for(;c--;){let w=p[c];if(typeof w=="string"){if(typeof m[w]=="number"){h=m[w];let y={instancePath:s+"/dependentRequired/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:c,j:h},message:"must NOT have duplicate items (items ## "+h+" and "+c+" are identical)"};e===null?e=[y]:e.push(y),r++;break}m[w]=c}}}}else{let l={instancePath:s+"/dependentRequired/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[l]:e.push(l),r++}}else{let n={instancePath:s+"/dependentRequired",schemaPath:"#/properties/dependentRequired/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}}return hs.errors=e,r===0}hs.evaluated={props:{type:!0,const:!0,enum:!0,multipleOf:!0,maximum:!0,exclusiveMaximum:!0,minimum:!0,exclusiveMinimum:!0,maxLength:!0,minLength:!0,pattern:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxContains:!0,minContains:!0,maxProperties:!0,minProperties:!0,required:!0,dependentRequired:!0},dynamicProps:!1,dynamicItems:!1};var Ld={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}};function gs(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=gs.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Ld.type},message:"must be object,boolean"};e===null?e=[o]:e.push(o),r++}if(f.meta||(f.meta=gs),t&&typeof t=="object"&&!Array.isArray(t)){if(t.title!==void 0&&typeof t.title!="string"){let o={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.description!==void 0&&typeof t.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let o={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.readOnly!==void 0&&typeof t.readOnly!="boolean"){let o={instancePath:s+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.writeOnly!==void 0&&typeof t.writeOnly!="boolean"){let o={instancePath:s+"/writeOnly",schemaPath:"#/properties/writeOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.examples!==void 0&&!Array.isArray(t.examples)){let o={instancePath:s+"/examples",schemaPath:"#/properties/examples/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}}return gs.errors=e,r===0}gs.evaluated={props:{title:!0,description:!0,default:!0,deprecated:!0,readOnly:!0,writeOnly:!0,examples:!0},dynamicProps:!1,dynamicItems:!1};var Fd={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}};function bs(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=bs.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Fd.type},message:"must be object,boolean"};e===null?e=[o]:e.push(o),r++}if(f.meta||(f.meta=bs),t&&typeof t=="object"&&!Array.isArray(t)&&t.format!==void 0&&typeof t.format!="string"){let o={instancePath:s+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}return bs.errors=e,r===0}bs.evaluated={props:{format:!0},dynamicProps:!1,dynamicItems:!1};var Jd={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}};function Jt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Jt.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Jd.type},message:"must be object,boolean"};e===null?e=[l]:e.push(l),r++}if(f.meta||(f.meta=Jt),t&&typeof t=="object"&&!Array.isArray(t)){if(t.contentEncoding!==void 0&&typeof t.contentEncoding!="string"){let l={instancePath:s+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),r++}if(t.contentMediaType!==void 0&&typeof t.contentMediaType!="string"){let l={instancePath:s+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),r++}if(t.contentSchema!==void 0){let l=t.contentSchema,c=f.meta;if(c)if(!c(l,{instancePath:s+"/contentSchema",parentData:t,parentDataProperty:"contentSchema",rootData:u,dynamicAnchors:f}))e=e===null?c.errors:e.concat(c.errors),r=e.length;else var o=c.evaluated.props,i=c.evaluated.items;else if(!Jt(l,{instancePath:s+"/contentSchema",parentData:t,parentDataProperty:"contentSchema",rootData:u,dynamicAnchors:f}))e=e===null?Jt.errors:e.concat(Jt.errors),r=e.length;else{var n=Jt.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var p=Jt.evaluated.items;i!==!0&&p!==void 0&&(i=p===!0?!0:i>p?i:p)}}}return Jt.errors=e,r===0}Jt.evaluated={props:{contentEncoding:!0,contentMediaType:!0,contentSchema:!0},dynamicProps:!1,dynamicItems:!1};function Dt(t,{instancePath:s="",parentData:d,parentDataProperty:b,rootData:u=t,dynamicAnchors:f={}}={}){let e=null,r=0,a=Dt.evaluated;if(a.dynamicProps&&(a.props=void 0),a.dynamicItems&&(a.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let y={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Id.type},message:"must be object,boolean"};e===null?e=[y]:e.push(y),r++}if(f.meta||(f.meta=Dt),Ft(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Ft.errors:e.concat(Ft.errors),r=e.length),se(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?se.errors:e.concat(se.errors),r=e.length),ft(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?ft.errors:e.concat(ft.errors),r=e.length),hs(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?hs.errors:e.concat(hs.errors),r=e.length),gs(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?gs.errors:e.concat(gs.errors),r=e.length),bs(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?bs.errors:e.concat(bs.errors),r=e.length),Jt(t,{instancePath:s,parentData:d,parentDataProperty:b,rootData:u,dynamicAnchors:f})||(e=e===null?Jt.errors:e.concat(Jt.errors),r=e.length),t&&typeof t=="object"&&!Array.isArray(t)){if(t.definitions!==void 0){let y=t.definitions;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=y[$],O=f.meta;if(O)if(!O(g,{instancePath:s+"/definitions/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:y,parentDataProperty:$,rootData:u,dynamicAnchors:f}))e=e===null?O.errors:e.concat(O.errors),r=e.length;else var o=O.evaluated.props,i=O.evaluated.items;else if(!Dt(g,{instancePath:s+"/definitions/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:y,parentDataProperty:$,rootData:u,dynamicAnchors:f}))e=e===null?Dt.errors:e.concat(Dt.errors),r=e.length;else{var n=Dt.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var p=Dt.evaluated.items;i!==!0&&p!==void 0&&(i=p===!0?!0:i>p?i:p)}}else{let $={instancePath:s+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}}if(t.dependencies!==void 0){let y=t.dependencies;if(y&&typeof y=="object"&&!Array.isArray(y))for(let $ in y){let g=y[$],O=r,k=!1,v=r,P=f.meta;if(P)if(!P(g,{instancePath:s+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:y,parentDataProperty:$,rootData:u,dynamicAnchors:f}))e=e===null?P.errors:e.concat(P.errors),r=e.length;else var l=P.evaluated.props,c=P.evaluated.items;else if(!Dt(g,{instancePath:s+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:y,parentDataProperty:$,rootData:u,dynamicAnchors:f}))e=e===null?Dt.errors:e.concat(Dt.errors),r=e.length;else{var h=Dt.evaluated.props;l!==!0&&h!==void 0&&(h===!0?l=!0:(l=l||{},Object.assign(l,h)));var m=Dt.evaluated.items;c!==!0&&m!==void 0&&(c=m===!0?!0:c>m?c:m)}var w=v===r;k=k||w;let j=r;if(Array.isArray(g)){let q=g.length;for(let T=0;T1){let T={};for(;A--;){let z=g[A];if(typeof z=="string"){if(typeof T[z]=="number"){E=T[z];let _={instancePath:s+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"meta/validation#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:A,j:E},message:"must NOT have duplicate items (items ## "+E+" and "+A+" are identical)"};e===null?e=[_]:e.push(_),r++;break}T[z]=A}}}}else{let q={instancePath:s+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"meta/validation#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[q]:e.push(q),r++}var w=j===r;if(k=k||w,w&&c!==!0&&(c=!0),k)r=O,e!==null&&(O?e.length=O:e=null);else{let q={instancePath:s+"/dependencies/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[q]:e.push(q),r++}}else{let $={instancePath:s+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}}if(t.$recursiveAnchor!==void 0){let y=t.$recursiveAnchor;if(typeof y=="string"){if(!Tl.test(y)){let $={instancePath:s+"/$recursiveAnchor",schemaPath:"meta/core#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/$recursiveAnchor",schemaPath:"meta/core#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}if(t.$recursiveRef!==void 0&&typeof t.$recursiveRef!="string"){let y={instancePath:s+"/$recursiveRef",schemaPath:"meta/core#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[y]:e.push(y),r++}}return Dt.errors=e,r===0}Dt.evaluated={props:{definitions:!0,dependencies:!0,$recursiveAnchor:!0,$recursiveRef:!0,contentEncoding:!0,contentMediaType:!0,contentSchema:!0,format:!0,title:!0,description:!0,default:!0,deprecated:!0,readOnly:!0,writeOnly:!0,examples:!0,type:!0,const:!0,enum:!0,multipleOf:!0,maximum:!0,exclusiveMaximum:!0,minimum:!0,exclusiveMinimum:!0,maxLength:!0,minLength:!0,pattern:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxContains:!0,minContains:!0,maxProperties:!0,minProperties:!0,required:!0,dependentRequired:!0,unevaluatedItems:!0,unevaluatedProperties:!0,prefixItems:!0,items:!0,contains:!0,additionalProperties:!0,properties:!0,patternProperties:!0,dependentSchemas:!0,propertyNames:!0,if:!0,then:!0,else:!0,allOf:!0,anyOf:!0,oneOf:!0,not:!0,$id:!0,$schema:!0,$ref:!0,$anchor:!0,$dynamicRef:!0,$dynamicAnchor:!0,$vocabulary:!0,$comment:!0,$defs:!0},dynamicProps:!1,dynamicItems:!1};function Wd(t){return t==="#"?"":t.slice(1)}function _f(t){return/"([^"]+)"/.exec(t)?.[1]}function Kd(t){let s={};return t.keyword==="required"&&(s.missingProperty=_f(t.error)),t.keyword==="additionalProperties"&&(s.additionalProperty=_f(t.error)),{instancePath:Wd(t.instanceLocation),keyword:t.keyword,params:s,message:t.error}}function Bd(t){let s=new Set,d=[];function b(u){if(!(!u||typeof u!="object")){typeof u.$anchor=="string"&&s.add(u.$anchor),typeof u.$dynamicAnchor=="string"&&s.add(u.$dynamicAnchor);for(let f of["$ref","$dynamicRef","$recursiveRef"])typeof u[f]=="string"&&d.push(u[f]);for(let f of Object.values(u))b(f)}}b(t);for(let u of d){if(!u.startsWith("#"))throw new Error(`can't resolve reference ${u}`);if(u==="#"||u==="#recursive")continue;if(!u.startsWith("#/")){if(!s.has(u.slice(1)))throw new Error(`can't resolve reference ${u}`);continue}let f=t;for(let e of u.slice(2).split("/").map(r=>r.replaceAll("~1","/").replaceAll("~0","~"))){if(!f||typeof f!="object"||!Object.hasOwn(f,e))throw new Error(`can't resolve reference ${u}`);f=f[e]}}}function Qd(t,s){Bd(t);let d=new Hd(t,s,!1),b=u=>{let f=d.validate(u);return b.errors=f.valid?null:f.errors.map(Kd),f.valid};return b.errors=null,b}var cl=class{constructor(s={}){this.errors=null}compile(s){let d=qf.get(s?.description);return d||Qd(s,this.constructor.draft)}validateSchema(s){let d=this.constructor.draft==="7"?zf:Nf,b=d(s);return this.errors=d.errors,b}},Zl=class extends cl{static draft="7"},qe=class extends cl{static draft="2020-12"},Me=Zl;function Oe(t){return t}function Il(t){let s=[],d="",b=0;for(;b0;)t[e]==="{"?r++:t[e]==="}"&&r--,e++;if(r>0)throw new Error(`Unclosed expression in template: ${t}`);let a=t.slice(f,e-1),o=Yd(a);s.push(o),b=e}else d+=u,b++}return d&&s.push({type:"literal",value:d}),{template:t,parts:s}}function Yd(t){if(!t.trim())throw new Error("Empty expression");let s=t[0],d=["+","#",".","/",";","?","&"],b,u=t;return d.includes(s)&&(b=s,u=t.slice(1)),{type:"expression",expressions:Gd(u).map(Xd),operator:b}}function Gd(t){let s=[],d="",b=0;for(;b=d.length)return{uri_index:s};let f=d[b];if(f.type==="literal")return t.slice(s).startsWith(f.value)?Sl(t,s+f.value.length,d,b+1,u):null;{let e=d[b+1],a=eh(t,s,e).sort((o,i)=>e&&e.type==="expression"&&!e.operator?i-o:o-i);for(let o of a){let i=t.slice(s,o),n={...u};if(th(i,f,n,t,s)){let l=Sl(t,o,d,b+1,n);if(l)return Object.assign(u,n),l}}return null}}function eh(t,s,d){let b=[];if(d&&d.type==="literal"){let u=s;for(;uu-f)}function th(t,s,d,b,u){if(s.type!=="expression")return!1;switch(s.operator){case"+":return sh(t,s,d);case"#":return rh(t,s,d);case".":return oh(t,s,d);case"/":return nh(t,s,d);case";":return ah(t,s,d);case"?":case"&":return ph(t,s,d);default:return ih(t,s,d,b,u)}}function rh(t,s,d){if(s.type!=="expression")return!1;if(!t.startsWith("#")){for(let u of s.expressions)d[u.name]="";return t===""}let b=t.slice(1);if(s.expressions.length===1){let u=s.expressions[0],f=b;return u.prefix&&f.length>u.prefix&&(f=f.slice(0,u.prefix)),d[u.name]=decodeURIComponent(f),!0}else{let u=b.split(",");for(let f=0;fe.prefix&&(r=r.slice(0,e.prefix)),d[e.name]=decodeURIComponent(r)}return!0}}function sh(t,s,d){if(s.type!=="expression")return!1;if(s.expressions.length===1){let b=s.expressions[0],u=t;return b.prefix&&u.length>b.prefix&&(u=u.slice(0,b.prefix)),d[b.name]=decodeURIComponent(u),!0}else{let b=t.split(",");for(let u=0;uf.prefix&&(e=e.slice(0,f.prefix)),d[f.name]=decodeURIComponent(e)}return!0}}function ih(t,s,d,b,u){if(s.type!=="expression")return!1;if(s.expressions.length===1){let f=s.expressions[0],e=t;return e.includes("/")||e===""&&u+t.length===b.length&&b.endsWith("/")?!1:(f.prefix&&e.length>f.prefix&&(e=e.slice(0,f.prefix)),d[f.name]=decodeURIComponent(e),!0)}else{let f=t.split(",");for(let e=0;er.prefix&&(a=a.slice(0,r.prefix)),d[r.name]=decodeURIComponent(a)}return!0}}function oh(t,s,d){if(s.type!=="expression")return!1;if(t===""){for(let u of s.expressions)d[u.name]="";return!0}let b=t.startsWith(".")?t.slice(1):t;if(s.expressions.length===1){let u=s.expressions[0];if(u.explode){let f=b.split(".");d[u.name]=f.map(e=>decodeURIComponent(e))}else d[u.name]=decodeURIComponent(b);return!0}else{let u=b.split(".");for(let f=0;fe.prefix&&(r=r.slice(0,e.prefix)),d[e.name]=decodeURIComponent(r)}return!0}}function nh(t,s,d){if(s.type!=="expression")return!1;let b=t.startsWith("/")?t.slice(1):t;if(s.expressions.length===1){let u=s.expressions[0];return d[u.name]=decodeURIComponent(b),!0}else{let u=b.split(",");for(let f=0;fe.prefix&&(r=r.slice(0,e.prefix)),d[e.name]=decodeURIComponent(r)}return!0}}function ah(t,s,d){if(s.type!=="expression")return!1;let b=t.split(";").filter(u=>u);for(let u of b){let f=u.indexOf("=");if(f!==-1){let e=u.slice(0,f),r=u.slice(f+1),a=s.expressions.find(o=>o.name===e);a&&(d[a.name]=decodeURIComponent(r))}}return!0}function ph(t,s,d){if(s.type!=="expression")return!1;let b=t.replace(/^[?&]/,"");if(s.expressions.length===1){let u=s.expressions[0];if(u.explode){let f=b.split("&");d[u.name]=f.map(e=>decodeURIComponent(e))}else{let f=b.split("&");for(let e of f){let r=e.indexOf("=");if(r!==-1){let a=e.slice(0,r),o=e.slice(r+1);a===u.name&&(d[u.name]=decodeURIComponent(o))}}}}else{let u=b.split("&");for(let f of u){let e=f.indexOf("=");if(e!==-1){let r=f.slice(0,e),a=f.slice(e+1),o=s.expressions.find(i=>i.name===r);o&&(d[o.name]=decodeURIComponent(a))}}}return!0}var De=class{constructor(){this.templates=[]}add(s){if(typeof s!="string")throw new Error("Template must be a string");if(s!==""&&s.trim()==="")throw new Error("Template cannot be empty");try{let d=Il(s);this.templates.push(d)}catch(d){throw new Error(`Invalid template: ${s} - ${d instanceof Error?d.message:String(d)}`)}}match(s){if(typeof s!="string")throw new Error("URI must be a string");for(let d of this.templates){let b=Tf(s,d);if(b!==null)return{template:d.template,params:b}}return null}clear(){this.templates=[]}all(){return this.templates.map(s=>s.template)}};var Vl=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),oe=new Map(Vl.map((t,s)=>[t,s])),Gr="2025-11-25",Cl="2025-06-18",lh=new Set(["io.modelcontextprotocol/tasks"]),mh=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function yl(t){let s=t==="2020-12"?qe:Me,d=new s({allErrors:!0,strict:!1});return Oe(d),d}function os(t){return[...t].sort((s,d)=>oe.get(s)-oe.get(d))}function ct(t,s,d){return os(s?.protocolVersions??d??t.protocolVersions??[])}function Zf(t,s){let d=new Set(s);return t.filter(b=>d.has(b))}function fh(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let d of Object.values(t.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function Df(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function Rf(t){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(t),externalReferences:s}}function W(t,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:d,path:b}}function uh(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function ch(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let d=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function Sf(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function yh(t,s,d){let b=os(t.protocolVersions??[]),u=b.filter(r=>oe.get(r)0;else return!1;return l?c||d.push(W("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...p,r])):d.push(W("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...p,r])),!0}function e(r,a,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[p,l]of Object.entries(r)){if(!mh.test(p)){d.push(W("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(p)}`,[...n,p]));continue}for(let c of o.filter(h=>oe.get(h)>=oe.get(Cl)))f(p,l,a,c,i,n)||ch(p,c)&&d.push(W("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(p)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,p]))}}for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{let n=ct(t,o,b),p=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...p,"_meta"]),r==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(r!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function dh(t,s,d){let b=new Set;if((t.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(W("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,f]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])f.forEach((e,r)=>{(e.tags??[]).forEach((a,o)=>{b.has(a)||d.push(W("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(a)}`,[u,r,"tags",o]))})})}function hh(t,s,d){let b=t.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([r,a])=>[r,fh(a)]));function e(r,a,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[p,l]of Object.entries(i)){if(!u.has(p)){d.push(W("unknown-security-scheme","error",`${a}[${n}] references unknown security scheme ${JSON.stringify(p)}`,[...o,n,p]));continue}let c=b[p];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(W("duplicate-security-scope","error",`${a}[${n}].${p} contains duplicate scope values`,[...o,n,p])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(W("non-oauth-scope-misuse","error",`${a}[${n}].${p} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,p])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(p)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(W("uncatalogued-oauth-scope","warning",`${a}[${n}].${p} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,p,y]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,a)=>{e(r.security,`transports[${a}].security`,["transports",a,"security"])});for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function gh(t,s,d){let b=os(t.protocolVersions??[]),u=new Set;function f(r,a,o,i){let n=new Set(a);for(let p of r)n.has(p)||d.push(W("protocol-scope-outside-parent","error",`${o} includes protocol version ${p} outside its parent scope`,i))}(t.transports??[]).forEach((r,a)=>{let o=ct(t,r,b);f(o,b,`transports[${a}].protocolVersions`,["transports",a,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of b)u.has(r)||d.push(W("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,a)=>{let o=ct(t,r,b);f(o,b,`capabilities[${a}].protocolVersions`,["capabilities",a,"protocolVersions"])});for(let r=0;r0&&d.push(W("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${a}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,a,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;a.forEach((n,p)=>{let l=n[o],c=ct(t,n,b);f(c,b,`${r}[${p}].protocolVersions`,[r,p,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=ct(t,m,c);f(y,c,`${r}[${p}].elicitations[${w}].protocolVersions`,[r,p,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=Zf(c,m.scope);w.length>0&&d.push(W("primitive-scope-overlap","error",`${r}[${p}] with identifier ${JSON.stringify(l)} overlaps ${r}[${m.index}] for protocol versions ${w.join(", ")}`,[r,p,"protocolVersions"]))}h.push({index:p,scope:c}),i.set(l,h)})}}function bh(t,s,d){let b=os(t.protocolVersions??[]);function u(f,e,r,a){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(W("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...a,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(W("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...a,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let p=`${r}.properties[${JSON.stringify(i)}]`,l=[...a,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(W("elicitation-form-schema-version-mismatch","error",`${p} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(W("elicitation-form-schema-version-mismatch","error",`${p}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(W("elicitation-form-enum-names-mismatch","error",`${p}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(W("elicitation-form-default-outside-enum","error",`${p}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(W("elicitation-form-default-outside-enum","error",`${p}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(W("elicitation-form-invalid-range","error",`${p}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(W("elicitation-form-invalid-range","error",`${p}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(W("elicitation-form-invalid-range","error",`${p}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,a)=>{let o=ct(t,r,b),i=new Set;(r.elicitations??[]).forEach((n,p)=>{let l=`${f}[${a}].elicitations[${p}]`,c=[f,a,"elicitations",p];i.has(n.name)&&d.push(W("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=ct(t,n,o);for(let m of h)oe.get(m){let a=ct(t,e,b);if(e.type==="streamable-http")for(let o of a)oe.get(o)>=oe.get("2025-03-26")||d.push(W("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of a)oe.get(o){let a=ct(t,e,b),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",a),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",a),u(`tools[${r}]`,o,e,"_meta","2025-06-18",a),u(`tools[${r}]`,o,e,"annotations","2025-03-26",a),f(`tools[${r}]`,o,e,"execution","2025-11-25",a),u(`tools[${r}]`,o,e,"icons","2025-11-25",a)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((a,o)=>{let i=ct(t,a,b),n=[e,o];if(u(`${e}[${o}]`,n,a,"title","2025-06-18",i),u(`${e}[${o}]`,n,a,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,a,"icons","2025-11-25",i),e!=="prompts"&&a.annotations?.lastModified!==void 0)for(let p of i)oe.get(p)>=oe.get("2025-06-18")||d.push(W("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${p}`,[...n,"annotations","lastModified"]));e==="prompts"&&(a.arguments??[]).forEach((p,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],p,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let a=ct(t,e,b),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",a),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",a),a.includes("2026-07-28")&&d.push(W("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of a)oe.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of Ph){let i=b[o];Array.isArray(i)?i.forEach((n,p)=>d(n,`${u}.${o}[${p}]`,[...f,o,p],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let a=b.dependencies;if(a&&typeof a=="object"&&!Array.isArray(a))for(let[o,i]of Object.entries(a))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(t,"inputSchema",["inputSchema"],!0,!1),s}function Oh(t,s,d,b,u){let f=vh(t.inputSchema);if(!f.length)return;for(let r of d)r!=="2026-07-28"&&u.push(W("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of f){let a=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(W("invalid-x-mcp-header","error",`${a} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(W("invalid-x-mcp-header","error",`${a} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(W("invalid-x-mcp-header","error",`${a} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(W("duplicate-x-mcp-header","error",`${a} duplicates ${n} case-insensitively`,o)):e.set(i,a)}}function qh(t,s,d,b,u){if(Object.hasOwn(t,"properties")){let f=t.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(W("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${Gr}`,[...d,"properties"]));else for(let[e,r]of Object.entries(f))r&&typeof r=="object"&&!Array.isArray(r)||u.push(W("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${Gr}`,[...d,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(f=>typeof f!="string"))&&u.push(W("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${Gr}`,[...d,"required"]))}function Ah(t,s,d){let b=os(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{let e=ct(t,u,b);for(let r of["inputSchema","outputSchema"]){let a=u[r];if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`tools[${f}].${r}`,i=["tools",f,r],n=e.some(l=>oe.get(l)oe.get(l)>=oe.get(Gr));if(Object.hasOwn(a,"$schema"))for(let l of e)oe.get(l)>=oe.get(Gr)||d.push(W("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${Gr} or later`,[...i,"$schema"]));if(n&&qh(a,o,i,s,d),p){let l=Df(a);if(!l)d.push(W("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(a.$schema)}`,[...i,"$schema"]));else{let c=yl(l);try{if(c.validateSchema(a,!0))c.compile(a);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(W("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=Rf(a);try{if(!m.externalReferences.length)throw h;yl(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(W("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(W("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(r==="outputSchema"&&a.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(W("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}Oh(u,f,e,s,d)})}function If(t,s,d,b,u,f){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(W("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of t.required??[])Object.hasOwn(s,e)||f.push(W("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||f.push(W("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function Cf(t,s,d,b,u,f){let e=Df(t);if(!e)return;let r=Rf(t);if(r.externalReferences.length){let a=[...new Set(r.externalReferences)].sort();f.push(W("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${a.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let a=yl(e).compile(t);if(!a(s)){let o=a.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(W("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function xh(t,s,d){let b=os(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=ct(t,u,b),r=e.filter(o=>oe.get(o)oe.get(o)>=oe.get(Gr));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,p=["tools",f,"examples",o],l=i.result??{},c=[...p,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(W("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(W("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(W("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(W("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&oe.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&oe.get(m){Object.hasOwn(r,"_meta")&&oe.get(e){let n=`${b}.result.contents[${i}]`,p=[...u,"result","contents",i];if(o.uri===s&&(a=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(W("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...p,"mimeType"])),t.size!==void 0)){let l=typeof o.text=="string"?jh.encode(o.text).byteLength:typeof o.blob=="string"&&Vf(o.blob)?zh(o.blob):void 0;l!==void 0&&l!==t.size&&e.push(W("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${t.size}`,p))}typeof o.blob=="string"&&!Vf(o.blob)&&e.push(W("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...p,"blob"]))}),a||e.push(W("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function _h(t,s,d){let b=os(t.protocolVersions??[]);for(let[u,f]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])f.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let a=ct(t,e,b),o;if(u==="resourceTemplates")try{o=new De,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(W("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${u}[${r}].examples[${JSON.stringify(i)}]`,l=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(W("resource-template-example-invalid-expansion","error",`${p}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),Eh(c,a,`${p}.result`,[...l,"result"],s,d),typeof h=="string"&&Nh(e,h,c,p,l,s,d)}})}function Mf(t,s="document"){let d=[];return gh(t,s,d),hh(t,s,d),dh(t,s,d),$h(t,s,d),bh(t,s,d),yh(t,s,d),Ah(t,s,d),xh(t,s,d),_h(t,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}function Uf(t){return yl("2020-12").compile(t)}var Dl="0.8.0-draft.1",Th="v0.8.0-draft.1",Zh="4ceb6042c3fd31703199cd3db869ec5c35c17d2fe9ab7b2f5b96a2a3af0cebe4";var Lf=Uf(Mm);function Sh(t){return t.replaceAll("~1","/").replaceAll("~0","~")}function Ih(t,s){if(!s)return[];let d=[],b=t;for(let u of s.slice(1).split("/")){let f=Sh(u),e=Array.isArray(b)&&/^(?:0|[1-9][0-9]*)$/.test(f)?Number(f):f;d.push(e),b=b?.[e]}return d}function Ch(t,s){let d=Ih(t,s.instancePath);return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d}function Vh(t,s){return t.code.localeCompare(s.code)||t.message.localeCompare(s.message)||JSON.stringify(t.path).localeCompare(JSON.stringify(s.path))}function Dh(t){let s;return Lf(t)?s=Mf(t):(s=(Lf.errors??[]).map(d=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${d.instancePath||"/"} ${d.message??"unknown error"}`,path:Ch(t,d)})),s.sort(Vh)),{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var Hl={};cs(Hl,{schemaSha256:()=>jg,snapshotTag:()=>kg,specification:()=>Jl,supportedProtocolVersions:()=>dl,validate:()=>vg});var Ff={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/0.8.0.json",title:"MCP Description",description:"MCP Description 0.8.0 Community Working Draft 2 (v0.8.0-draft.2; unreleased).",type:"object",required:["mcpdesc","info","protocolVersions"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},provenance:{$ref:"#/$defs/provenanceRegistry"},components:{$ref:"#/$defs/components"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/tool"}},resources:{type:"array",minItems:1,items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",minItems:1,items:{$ref:"#/$defs/prompt"}},tags:{type:"array",minItems:1,items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},provenanceIds:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",minLength:1}},clientCapabilityValue:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},clientCapabilityRequirements:{type:"object",minProperties:1,properties:{roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},elicitation:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}},provenanceProducer:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},version:{type:"string",minLength:1}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},provenanceArtifact:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"uri"},digest:{type:"string",minLength:1}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},provenanceRecord:{type:"object",required:["kind"],properties:{kind:{enum:["curated","observed","generated"]},producer:{$ref:"#/$defs/provenanceProducer"},method:{type:"string",minLength:1},artifact:{$ref:"#/$defs/provenanceArtifact"},recordedAt:{type:"string",format:"date-time"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},provenanceRegistry:{type:"object",required:["records"],properties:{records:{type:"object",minProperties:1,propertyNames:{minLength:1},additionalProperties:{$ref:"#/$defs/provenanceRecord"}},defaultIds:{$ref:"#/$defs/provenanceIds"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},jsonSchemaObject:{type:"object",additionalProperties:!0},referenceObject:{type:"object",required:["$componentRef"],properties:{$componentRef:{type:"string",pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"}},additionalProperties:!1},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icons:{type:"array",minItems:1,items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}]},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}},componentMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"}},components:{type:"object",minProperties:1,properties:{schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},provenanceIds:{$ref:"#/$defs/provenanceIds"},name:{type:"string",minLength:1},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]}]},outputSchema:{$ref:"#/$defs/schemaComponentValue"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},provenanceIds:{$ref:"#/$defs/provenanceIds"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},provenanceIds:{$ref:"#/$defs/provenanceIds"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},provenanceIds:{$ref:"#/$defs/provenanceIds"},name:{type:"string"},arguments:{type:"array",minItems:1,items:{$ref:"#/$defs/promptArgument"}},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},extensionCapabilities:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}}};var dl=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),ne=new Map(dl.map((t,s)=>[t,s])),Xr="2025-11-25",Ml="2025-06-18",Mh=new Set(["io.modelcontextprotocol/tasks"]),Uh=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function Ul(t){let s=t==="2020-12"?qe:Me,d=new s({allErrors:!0,strict:!1});return Oe(d),d}function ns(t){return[...t].sort((s,d)=>ne.get(s)-ne.get(d))}function yt(t,s,d){return ns(s?.protocolVersions??d??t.protocolVersions??[])}function Jf(t,s){let d=new Set(s);return t.filter(b=>d.has(b))}function Lh(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let d of Object.values(t.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function Qf(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function Yf(t){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(t),externalReferences:s}}function K(t,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:d,path:b}}function Fh(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function Jh(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let d=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function Hf(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function Hh(t,s,d){let b=ns(t.protocolVersions??[]),u=b.filter(r=>ne.get(r)0;else return!1;return l?c||d.push(K("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...p,r])):d.push(K("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...p,r])),!0}function e(r,a,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[p,l]of Object.entries(r)){if(!Uh.test(p)){d.push(K("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(p)}`,[...n,p]));continue}for(let c of o.filter(h=>ne.get(h)>=ne.get(Ml)))f(p,l,a,c,i,n)||Jh(p,c)&&d.push(K("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(p)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,p]))}}for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{let n=yt(t,o,b),p=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...p,"_meta"]),r==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(r!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function Wh(t,s,d){let b=new Set;if((t.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(K("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,f]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])f.forEach((e,r)=>{(e.tags??[]).forEach((a,o)=>{b.has(a)||d.push(K("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(a)}`,[u,r,"tags",o]))})})}function Kh(t,s,d){let b=t.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([r,a])=>[r,Lh(a)]));function e(r,a,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[p,l]of Object.entries(i)){if(!u.has(p)){d.push(K("unknown-security-scheme","error",`${a}[${n}] references unknown security scheme ${JSON.stringify(p)}`,[...o,n,p]));continue}let c=b[p];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(K("duplicate-security-scope","error",`${a}[${n}].${p} contains duplicate scope values`,[...o,n,p])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(K("non-oauth-scope-misuse","error",`${a}[${n}].${p} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,p])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(p)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(K("uncatalogued-oauth-scope","warning",`${a}[${n}].${p} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,p,y]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,a)=>{e(r.security,`transports[${a}].security`,["transports",a,"security"])});for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function Bh(t,s,d){let b=ns(t.protocolVersions??[]),u=new Set;function f(r,a,o,i){let n=new Set(a);for(let p of r)n.has(p)||d.push(K("protocol-scope-outside-parent","error",`${o} includes protocol version ${p} outside its parent scope`,i))}(t.transports??[]).forEach((r,a)=>{let o=yt(t,r,b);f(o,b,`transports[${a}].protocolVersions`,["transports",a,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of b)u.has(r)||d.push(K("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,a)=>{let o=yt(t,r,b);f(o,b,`capabilities[${a}].protocolVersions`,["capabilities",a,"protocolVersions"])});for(let r=0;r0&&d.push(K("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${a}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,a,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;a.forEach((n,p)=>{let l=n[o],c=yt(t,n,b);f(c,b,`${r}[${p}].protocolVersions`,[r,p,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=yt(t,m,c);f(y,c,`${r}[${p}].elicitations[${w}].protocolVersions`,[r,p,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=Jf(c,m.scope);w.length>0&&d.push(K("primitive-scope-overlap","error",`${r}[${p}] with identifier ${JSON.stringify(l)} overlaps ${r}[${m.index}] for protocol versions ${w.join(", ")}`,[r,p,"protocolVersions"]))}h.push({index:p,scope:c}),i.set(l,h)})}}function Qh(t,s,d){let b=ns(t.protocolVersions??[]);function u(f,e,r,a){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(K("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...a,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(K("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...a,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let p=`${r}.properties[${JSON.stringify(i)}]`,l=[...a,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(K("elicitation-form-schema-version-mismatch","error",`${p} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(K("elicitation-form-schema-version-mismatch","error",`${p}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(K("elicitation-form-enum-names-mismatch","error",`${p}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(K("elicitation-form-default-outside-enum","error",`${p}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(K("elicitation-form-default-outside-enum","error",`${p}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(K("elicitation-form-invalid-range","error",`${p}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(K("elicitation-form-invalid-range","error",`${p}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(K("elicitation-form-invalid-range","error",`${p}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,a)=>{let o=yt(t,r,b),i=new Set;(r.elicitations??[]).forEach((n,p)=>{let l=`${f}[${a}].elicitations[${p}]`,c=[f,a,"elicitations",p];i.has(n.name)&&d.push(K("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=yt(t,n,o);for(let m of h)ne.get(m){let a=yt(t,e,b);if(e.type==="streamable-http")for(let o of a)ne.get(o)>=ne.get("2025-03-26")||d.push(K("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of a)ne.get(o){let a=yt(t,e,b),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",a),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",a),u(`tools[${r}]`,o,e,"_meta","2025-06-18",a),u(`tools[${r}]`,o,e,"annotations","2025-03-26",a),f(`tools[${r}]`,o,e,"execution","2025-11-25",a),u(`tools[${r}]`,o,e,"icons","2025-11-25",a)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((a,o)=>{let i=yt(t,a,b),n=[e,o];if(u(`${e}[${o}]`,n,a,"title","2025-06-18",i),u(`${e}[${o}]`,n,a,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,a,"icons","2025-11-25",i),e!=="prompts"&&a.annotations?.lastModified!==void 0)for(let p of i)ne.get(p)>=ne.get("2025-06-18")||d.push(K("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${p}`,[...n,"annotations","lastModified"]));e==="prompts"&&(a.arguments??[]).forEach((p,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],p,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let a=yt(t,e,b),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",a),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",a),a.includes("2026-07-28")&&d.push(K("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of a)ne.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of Gh){let i=b[o];Array.isArray(i)?i.forEach((n,p)=>d(n,`${u}.${o}[${p}]`,[...f,o,p],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let a=b.dependencies;if(a&&typeof a=="object"&&!Array.isArray(a))for(let[o,i]of Object.entries(a))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(t,"inputSchema",["inputSchema"],!0,!1),s}function sg(t,s,d,b,u){let f=rg(t.inputSchema);if(!f.length)return;for(let r of d)r!=="2026-07-28"&&u.push(K("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of f){let a=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(K("invalid-x-mcp-header","error",`${a} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(K("invalid-x-mcp-header","error",`${a} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(K("invalid-x-mcp-header","error",`${a} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(K("duplicate-x-mcp-header","error",`${a} duplicates ${n} case-insensitively`,o)):e.set(i,a)}}function ig(t,s,d,b,u){if(Object.hasOwn(t,"properties")){let f=t.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(K("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${Xr}`,[...d,"properties"]));else for(let[e,r]of Object.entries(f))r&&typeof r=="object"&&!Array.isArray(r)||u.push(K("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${Xr}`,[...d,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(f=>typeof f!="string"))&&u.push(K("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${Xr}`,[...d,"required"]))}function og(t,s,d){let b=ns(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{let e=yt(t,u,b);for(let r of["inputSchema","outputSchema"]){let a=u[r];if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`tools[${f}].${r}`,i=["tools",f,r],n=e.some(l=>ne.get(l)ne.get(l)>=ne.get(Xr));if(Object.hasOwn(a,"$schema"))for(let l of e)ne.get(l)>=ne.get(Xr)||d.push(K("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${Xr} or later`,[...i,"$schema"]));if(n&&ig(a,o,i,s,d),p){let l=Qf(a);if(!l)d.push(K("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(a.$schema)}`,[...i,"$schema"]));else{let c=Ul(l);try{if(c.validateSchema(a,!0))c.compile(a);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(K("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=Yf(a);try{if(!m.externalReferences.length)throw h;Ul(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(K("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(K("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(r==="outputSchema"&&a.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(K("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}sg(u,f,e,s,d)})}function Wf(t,s,d,b,u,f){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(K("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of t.required??[])Object.hasOwn(s,e)||f.push(K("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||f.push(K("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function Kf(t,s,d,b,u,f){let e=Qf(t);if(!e)return;let r=Yf(t);if(r.externalReferences.length){let a=[...new Set(r.externalReferences)].sort();f.push(K("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${a.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let a=Ul(e).compile(t);if(!a(s)){let o=a.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(K("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function ng(t,s,d){let b=ns(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=yt(t,u,b),r=e.filter(o=>ne.get(o)ne.get(o)>=ne.get(Xr));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,p=["tools",f,"examples",o],l=i.result??{},c=[...p,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(K("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(K("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(K("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(K("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&ne.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&ne.get(m){Object.hasOwn(r,"_meta")&&ne.get(e){let n=`${b}.result.contents[${i}]`,p=[...u,"result","contents",i];if(o.uri===s&&(a=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(K("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...p,"mimeType"])),t.size!==void 0)){let l=typeof o.text=="string"?tg.encode(o.text).byteLength:typeof o.blob=="string"&&Bf(o.blob)?ag(o.blob):void 0;l!==void 0&&l!==t.size&&e.push(K("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${t.size}`,p))}typeof o.blob=="string"&&!Bf(o.blob)&&e.push(K("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...p,"blob"]))}),a||e.push(K("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function mg(t,s,d){let b=ns(t.protocolVersions??[]);for(let[u,f]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])f.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let a=yt(t,e,b),o;if(u==="resourceTemplates")try{o=new De,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(K("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${u}[${r}].examples[${JSON.stringify(i)}]`,l=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(K("resource-template-example-invalid-expansion","error",`${p}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),pg(c,a,`${p}.result`,[...l,"result"],s,d),typeof h=="string"&&lg(e,h,c,p,l,s,d)}})}function Gf(t,s="document"){let d=[];return Bh(t,s,d),Kh(t,s,d),Wh(t,s,d),Yh(t,s,d),Qh(t,s,d),Hh(t,s,d),og(t,s,d),ng(t,s,d),mg(t,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var eu=new qe({allErrors:!0,strict:!1});Oe(eu);var Xf=eu.compile(Ff),fg=/^[A-Za-z][A-Za-z0-9+._-]*:[^\s]+$/,Fl=["tools","resources","resourceTemplates","prompts"],ug=["schemas","toolExamples","resourceExamples","resourceTemplateExamples"],cg=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),yg=new Set(["io.modelcontextprotocol/tasks"]),dg={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function $s(t,s,d,b){return{code:t,severity:s,message:d,path:b}}function hg(t){if(typeof t!="string"||!t.includes("/"))return!1;let s=t.slice(0,t.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function Rp(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function Ll(t,s,d,b){return{code:t,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function gg(t,s="document"){let d=structuredClone(t),b=[],u=0;function f(e,r,a,o=[]){let i=/^#\/components\/([^/]+)\/([^/]+)$/.exec(e?.$componentRef??"");if(!i)return e;let[,n,p]=i;if(n!==r)return b.push(Ll("wrong-component-reference-namespace",s,`must target #/components/${r}, not #/components/${n}`,a)),e;let l=`${n}/${p}`;if(o.includes(l))return b.push(Ll("component-reference-cycle",s,`forms a cycle through ${[...o,l].join(" -> ")}`,a)),e;let c=t?.components?.[n]?.[p];return c===void 0?(b.push(Ll("missing-component-reference-target",s,`targets missing component ${JSON.stringify(e.$componentRef)}`,a)),e):(u+=1,Rp(c)?f(c,r,a,[...o,l]):structuredClone(c))}for(let e of ug)for(let[r,a]of Object.entries(t?.components?.[e]??{}))Rp(a)&&(d.components[e][r]=f(a,e,["components",e,r],[`${e}/${r}`]));for(let[e,r]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates}))for(let[a,o]of(r??[]).entries()){let i=d[e][a];if(e==="tools")for(let p of["inputSchema","outputSchema"])Rp(o[p])&&(i[p]=f(o[p],"schemas",[e,a,p]));let n=e==="tools"?"toolExamples":e==="resources"?"resourceExamples":"resourceTemplateExamples";for(let[p,l]of Object.entries(o.examples??{}))Rp(l)&&(i.examples[p]=f(l,n,[e,a,"examples",p]))}for(let e of Fl)for(let[r,a]of(t?.[e]??[]).entries())for(let[o,i]of(a.elicitations??[]).entries())Rp(i.requestedSchema)&&(d[e][r].elicitations[o].requestedSchema=f(i.requestedSchema,"schemas",[e,r,"elicitations",o,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:u}}function bg(t,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function tu(t){return Xf(t)?[]:(Xf.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:bg(t,s)}))}function $g(t,s){let d=[],b=t?.provenance?.records??{};for(let[f,e]of Object.entries(b)){let r=e?.artifact?.digest;typeof r=="string"&&!fg.test(r)&&d.push({code:"invalid-provenance-digest",severity:"error",message:`${s}.provenance.records[${JSON.stringify(f)}].artifact.digest must identify a digest algorithm and non-empty value separated by ":"`,path:["provenance","records",f,"artifact","digest"]})}let u=[["provenance","defaultIds",t?.provenance?.defaultIds]];for(let f of Fl)for(let[e,r]of(t?.[f]??[]).entries())u.push([f,e,"provenanceIds",r?.provenanceIds]);for(let f of u){let e=f.at(-1);if(!Array.isArray(e))continue;let r=f.slice(0,-1);for(let[a,o]of e.entries())Object.hasOwn(b,o)||d.push({code:"unknown-provenance-reference",severity:"error",message:`${s}.${r.join(".")}[${a}] references unknown provenance record ${JSON.stringify(o)}`,path:[...r,a]})}return d}function Pg(t){let s=[],d=t.protocolVersions??[];function b(r,a,o,i){s.push($s("client-requirement-version-mismatch","error",`${r} member ${JSON.stringify(i)} is not defined by MCP ${o}`,[...a,i]))}function u(r,a,o,i){return r&&typeof r=="object"&&!Array.isArray(r)?!0:(s.push($s("invalid-client-requirement-value","error",`${a} must be an object for MCP ${i}`,o)),!1)}function f(r,a,o,i,n){if(!u(r,o,i,n))return!1;for(let p of Object.keys(r))a.has(p)||b(o,i,n,p);return!0}function e(r,a,o,i){f(r,new Set(["list","cancel","requests"]),a,o,i);for(let n of["list","cancel"])Object.hasOwn(r,n)&&u(r[n],`${a}.${n}`,[...o,n],i);if(!(!Object.hasOwn(r,"requests")||!u(r.requests,`${a}.requests`,[...o,"requests"],i))){f(r.requests,new Set(["sampling","elicitation"]),`${a}.requests`,[...o,"requests"],i);for(let[n,p]of[["sampling","createMessage"],["elicitation","create"]]){if(!Object.hasOwn(r.requests,n))continue;let l=r.requests[n],c=[...o,"requests",n];f(l,new Set([p]),`${a}.requests.${n}`,c,i)&&Object.hasOwn(l,p)&&u(l[p],`${a}.requests.${n}.${p}`,[...c,p],i)}}}for(let r of Fl)for(let[a,o]of(t[r]??[]).entries()){let i=o.clientRequirements;if(!i||typeof i!="object"||Array.isArray(i))continue;let n=o.protocolVersions??d,p=`${r}[${a}].clientRequirements`,l=[r,a,"clientRequirements"];for(let c of n){let h=dg[c]??new Set;for(let[m,w]of Object.entries(i)){if(m.startsWith("x-"))continue;if(cg.has(m)&&!h.has(m)){s.push($s("client-requirement-version-mismatch","error",`${p}.${m} is not defined by MCP ${c}; split the primitive into disjoint protocol-scoped variants when requirements differ`,[...l,m]));continue}if(!h.has(m))continue;let y=`${p}.${m}`,$=[...l,m];if(m==="roots")f(w,c==="2026-07-28"?new Set:new Set(["listChanged"]),y,$,c),c!=="2026-07-28"&&Object.hasOwn(w,"listChanged")&&typeof w.listChanged!="boolean"&&s.push($s("invalid-client-requirement-value","error",`${y}.listChanged must be a boolean for MCP ${c}`,[...$,"listChanged"]));else if(m==="sampling"&&["2025-11-25","2026-07-28"].includes(c)){f(w,new Set(["context","tools"]),y,$,c);for(let g of["context","tools"])Object.hasOwn(w,g)&&u(w[g],`${y}.${g}`,[...$,g],c);Object.hasOwn(w,"context")&&s.push($s("deprecated-client-requirement","warning",`${y}.context uses deprecated MCP context-inclusion capability semantics in MCP ${c}`,[...$,"context"]))}else if(m==="elicitation"&&["2025-11-25","2026-07-28"].includes(c)){f(w,new Set(["form","url"]),y,$,c);for(let g of["form","url"])Object.hasOwn(w,g)&&u(w[g],`${y}.${g}`,[...$,g],c)}else if(m==="tasks")e(w,y,$,c);else if(m==="extensions")for(let g of Object.keys(w))hg(g)&&!yg.has(g)&&s.push($s("unknown-reserved-extension-identifier","warning",`${y} contains unrecognized extension ${JSON.stringify(g)} under an MCP-reserved prefix; preserve it and review its authority`,[...$,g]));c==="2026-07-28"&&["roots","sampling"].includes(m)&&s.push($s("deprecated-client-requirement","warning",`${y} requires an MCP capability deprecated in MCP ${c}`,$))}}}return s}function wg(t,s="document"){let d=gg(t,s),b=d.diagnostics.length||d.substitutions===0?[]:tu(d.document),u=[...d.diagnostics,...b,...d.diagnostics.length||b.length?[]:Gf(d.document,s),...$g(t,s),...Pg(t)];return(Object.hasOwn(t,"transports")?u:u.filter(e=>e.code!=="transport-coverage-gap")).sort((e,r)=>e.code.localeCompare(r.code)||e.message.localeCompare(r.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(r.path)))}function ru(t){let s=tu(t);return s.length?s:wg(t)}var Jl="0.8.0-draft.2",kg="v0.8.0-draft.2",jg="ab692c1a5a0f7e5f29be1940aa8c64a56d4620be0a19d00cf0a64680b7e517fa";function vg(t){let s=ru(t);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var Yl={};cs(Yl,{schemaSha256:()=>nb,snapshotTag:()=>ob,specification:()=>Ql,supportedProtocolVersions:()=>hl,validate:()=>ab});var su={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/0.8.0.json",title:"MCP Description",description:"MCP Description 0.8.0 Community Working Draft 3 (v0.8.0-draft.3; unreleased).",type:"object",required:["mcpdesc","info","protocolVersions"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},components:{$ref:"#/$defs/components"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/tool"}},resources:{type:"array",minItems:1,items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",minItems:1,items:{$ref:"#/$defs/prompt"}},tags:{type:"array",minItems:1,items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},clientCapabilityValue:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},clientCapabilityRequirements:{type:"object",minProperties:1,properties:{roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},elicitation:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}},jsonSchemaObject:{type:"object",additionalProperties:!0},referenceObject:{type:"object",required:["$componentRef"],properties:{$componentRef:{type:"string",pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples)/[A-Za-z0-9._-]+$"}},additionalProperties:!1},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icons:{type:"array",minItems:1,items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}]},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}},componentMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"}},components:{type:"object",minProperties:1,properties:{schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string",minLength:1},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]}]},outputSchema:{$ref:"#/$defs/schemaComponentValue"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string"},arguments:{type:"array",minItems:1,items:{$ref:"#/$defs/promptArgument"}},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},extensionCapabilities:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}}};var hl=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),ae=new Map(hl.map((t,s)=>[t,s])),es="2025-11-25",Wl="2025-06-18",qg=new Set(["io.modelcontextprotocol/tasks"]),Ag=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function Kl(t){let s=t==="2020-12"?qe:Me,d=new s({allErrors:!0,strict:!1});return Oe(d),d}function as(t){return[...t].sort((s,d)=>ae.get(s)-ae.get(d))}function dt(t,s,d){return as(s?.protocolVersions??d??t.protocolVersions??[])}function iu(t,s){let d=new Set(s);return t.filter(b=>d.has(b))}function xg(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let d of Object.values(t.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function lu(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function mu(t){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(t),externalReferences:s}}function B(t,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:d,path:b}}function zg(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function Eg(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let d=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function ou(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function Ng(t,s,d){let b=as(t.protocolVersions??[]),u=b.filter(r=>ae.get(r)0;else return!1;return l?c||d.push(B("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...p,r])):d.push(B("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...p,r])),!0}function e(r,a,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[p,l]of Object.entries(r)){if(!Ag.test(p)){d.push(B("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(p)}`,[...n,p]));continue}for(let c of o.filter(h=>ae.get(h)>=ae.get(Wl)))f(p,l,a,c,i,n)||Eg(p,c)&&d.push(B("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(p)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,p]))}}for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{let n=dt(t,o,b),p=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...p,"_meta"]),r==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(r!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function _g(t,s,d){let b=new Set;if((t.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(B("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,f]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])f.forEach((e,r)=>{(e.tags??[]).forEach((a,o)=>{b.has(a)||d.push(B("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(a)}`,[u,r,"tags",o]))})})}function Tg(t,s,d){let b=t.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([r,a])=>[r,xg(a)]));function e(r,a,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[p,l]of Object.entries(i)){if(!u.has(p)){d.push(B("unknown-security-scheme","error",`${a}[${n}] references unknown security scheme ${JSON.stringify(p)}`,[...o,n,p]));continue}let c=b[p];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(B("duplicate-security-scope","error",`${a}[${n}].${p} contains duplicate scope values`,[...o,n,p])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(B("non-oauth-scope-misuse","error",`${a}[${n}].${p} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,p])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(p)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(B("uncatalogued-oauth-scope","warning",`${a}[${n}].${p} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,p,y]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,a)=>{e(r.security,`transports[${a}].security`,["transports",a,"security"])});for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function Zg(t,s,d){let b=as(t.protocolVersions??[]),u=new Set;function f(r,a,o,i){let n=new Set(a);for(let p of r)n.has(p)||d.push(B("protocol-scope-outside-parent","error",`${o} includes protocol version ${p} outside its parent scope`,i))}(t.transports??[]).forEach((r,a)=>{let o=dt(t,r,b);f(o,b,`transports[${a}].protocolVersions`,["transports",a,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of b)u.has(r)||d.push(B("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,a)=>{let o=dt(t,r,b);f(o,b,`capabilities[${a}].protocolVersions`,["capabilities",a,"protocolVersions"])});for(let r=0;r0&&d.push(B("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${a}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,a,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;a.forEach((n,p)=>{let l=n[o],c=dt(t,n,b);f(c,b,`${r}[${p}].protocolVersions`,[r,p,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=dt(t,m,c);f(y,c,`${r}[${p}].elicitations[${w}].protocolVersions`,[r,p,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=iu(c,m.scope);w.length>0&&d.push(B("primitive-scope-overlap","error",`${r}[${p}] with identifier ${JSON.stringify(l)} overlaps ${r}[${m.index}] for protocol versions ${w.join(", ")}`,[r,p,"protocolVersions"]))}h.push({index:p,scope:c}),i.set(l,h)})}}function Sg(t,s,d){let b=as(t.protocolVersions??[]);function u(f,e,r,a){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(B("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...a,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(B("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...a,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let p=`${r}.properties[${JSON.stringify(i)}]`,l=[...a,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(B("elicitation-form-schema-version-mismatch","error",`${p} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(B("elicitation-form-schema-version-mismatch","error",`${p}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(B("elicitation-form-enum-names-mismatch","error",`${p}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(B("elicitation-form-default-outside-enum","error",`${p}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(B("elicitation-form-default-outside-enum","error",`${p}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(B("elicitation-form-invalid-range","error",`${p}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(B("elicitation-form-invalid-range","error",`${p}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(B("elicitation-form-invalid-range","error",`${p}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,a)=>{let o=dt(t,r,b),i=new Set;(r.elicitations??[]).forEach((n,p)=>{let l=`${f}[${a}].elicitations[${p}]`,c=[f,a,"elicitations",p];i.has(n.name)&&d.push(B("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=dt(t,n,o);for(let m of h)ae.get(m){let a=dt(t,e,b);if(e.type==="streamable-http")for(let o of a)ae.get(o)>=ae.get("2025-03-26")||d.push(B("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of a)ae.get(o){let a=dt(t,e,b),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",a),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",a),u(`tools[${r}]`,o,e,"_meta","2025-06-18",a),u(`tools[${r}]`,o,e,"annotations","2025-03-26",a),f(`tools[${r}]`,o,e,"execution","2025-11-25",a),u(`tools[${r}]`,o,e,"icons","2025-11-25",a)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((a,o)=>{let i=dt(t,a,b),n=[e,o];if(u(`${e}[${o}]`,n,a,"title","2025-06-18",i),u(`${e}[${o}]`,n,a,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,a,"icons","2025-11-25",i),e!=="prompts"&&a.annotations?.lastModified!==void 0)for(let p of i)ae.get(p)>=ae.get("2025-06-18")||d.push(B("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${p}`,[...n,"annotations","lastModified"]));e==="prompts"&&(a.arguments??[]).forEach((p,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],p,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let a=dt(t,e,b),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",a),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",a),a.includes("2026-07-28")&&d.push(B("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of a)ae.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of Cg){let i=b[o];Array.isArray(i)?i.forEach((n,p)=>d(n,`${u}.${o}[${p}]`,[...f,o,p],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let a=b.dependencies;if(a&&typeof a=="object"&&!Array.isArray(a))for(let[o,i]of Object.entries(a))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(t,"inputSchema",["inputSchema"],!0,!1),s}function Ug(t,s,d,b,u){let f=Mg(t.inputSchema);if(!f.length)return;for(let r of d)r!=="2026-07-28"&&u.push(B("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of f){let a=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(B("invalid-x-mcp-header","error",`${a} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(B("invalid-x-mcp-header","error",`${a} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(B("invalid-x-mcp-header","error",`${a} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(B("duplicate-x-mcp-header","error",`${a} duplicates ${n} case-insensitively`,o)):e.set(i,a)}}function Lg(t,s,d,b,u){if(Object.hasOwn(t,"properties")){let f=t.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(B("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${es}`,[...d,"properties"]));else for(let[e,r]of Object.entries(f))r&&typeof r=="object"&&!Array.isArray(r)||u.push(B("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${es}`,[...d,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(f=>typeof f!="string"))&&u.push(B("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${es}`,[...d,"required"]))}function Fg(t,s,d){let b=as(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{let e=dt(t,u,b);for(let r of["inputSchema","outputSchema"]){let a=u[r];if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`tools[${f}].${r}`,i=["tools",f,r],n=e.some(l=>ae.get(l)ae.get(l)>=ae.get(es));if(Object.hasOwn(a,"$schema"))for(let l of e)ae.get(l)>=ae.get(es)||d.push(B("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${es} or later`,[...i,"$schema"]));if(n&&Lg(a,o,i,s,d),p){let l=lu(a);if(!l)d.push(B("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(a.$schema)}`,[...i,"$schema"]));else{let c=Kl(l);try{if(c.validateSchema(a,!0))c.compile(a);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(B("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=mu(a);try{if(!m.externalReferences.length)throw h;Kl(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(B("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(B("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(r==="outputSchema"&&a.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(B("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}Ug(u,f,e,s,d)})}function nu(t,s,d,b,u,f){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(B("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of t.required??[])Object.hasOwn(s,e)||f.push(B("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||f.push(B("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function au(t,s,d,b,u,f){let e=lu(t);if(!e)return;let r=mu(t);if(r.externalReferences.length){let a=[...new Set(r.externalReferences)].sort();f.push(B("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${a.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let a=Kl(e).compile(t);if(!a(s)){let o=a.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(B("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function Jg(t,s,d){let b=as(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=dt(t,u,b),r=e.filter(o=>ae.get(o)ae.get(o)>=ae.get(es));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,p=["tools",f,"examples",o],l=i.result??{},c=[...p,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(B("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(B("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(B("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(B("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&ae.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&ae.get(m){Object.hasOwn(r,"_meta")&&ae.get(e){let n=`${b}.result.contents[${i}]`,p=[...u,"result","contents",i];if(o.uri===s&&(a=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(B("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...p,"mimeType"])),t.size!==void 0)){let l=typeof o.text=="string"?Rg.encode(o.text).byteLength:typeof o.blob=="string"&&pu(o.blob)?Hg(o.blob):void 0;l!==void 0&&l!==t.size&&e.push(B("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${t.size}`,p))}typeof o.blob=="string"&&!pu(o.blob)&&e.push(B("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...p,"blob"]))}),a||e.push(B("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function Bg(t,s,d){let b=as(t.protocolVersions??[]);for(let[u,f]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])f.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let a=dt(t,e,b),o;if(u==="resourceTemplates")try{o=new De,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(B("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${u}[${r}].examples[${JSON.stringify(i)}]`,l=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(B("resource-template-example-invalid-expansion","error",`${p}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),Wg(c,a,`${p}.result`,[...l,"result"],s,d),typeof h=="string"&&Kg(e,h,c,p,l,s,d)}})}function fu(t,s="document"){let d=[];return Zg(t,s,d),Tg(t,s,d),_g(t,s,d),Ig(t,s,d),Sg(t,s,d),Ng(t,s,d),Fg(t,s,d),Jg(t,s,d),Bg(t,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var cu=new qe({allErrors:!0,strict:!1});Oe(cu);var uu=cu.compile(su),yu=["tools","resources","resourceTemplates","prompts"],Qg=["schemas","toolExamples","resourceExamples","resourceTemplateExamples"],Yg=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),Gg=new Set(["io.modelcontextprotocol/tasks"]),Xg={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function Ps(t,s,d,b){return{code:t,severity:s,message:d,path:b}}function eb(t){if(typeof t!="string"||!t.includes("/"))return!1;let s=t.slice(0,t.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function Mp(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function Bl(t,s,d,b){return{code:t,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function tb(t,s="document"){let d=structuredClone(t),b=[],u=0;function f(e,r,a,o=[]){let i=/^#\/components\/([^/]+)\/([^/]+)$/.exec(e?.$componentRef??"");if(!i)return e;let[,n,p]=i;if(n!==r)return b.push(Bl("wrong-component-reference-namespace",s,`must target #/components/${r}, not #/components/${n}`,a)),e;let l=`${n}/${p}`;if(o.includes(l))return b.push(Bl("component-reference-cycle",s,`forms a cycle through ${[...o,l].join(" -> ")}`,a)),e;let c=t?.components?.[n]?.[p];return c===void 0?(b.push(Bl("missing-component-reference-target",s,`targets missing component ${JSON.stringify(e.$componentRef)}`,a)),e):(u+=1,Mp(c)?f(c,r,a,[...o,l]):structuredClone(c))}for(let e of Qg)for(let[r,a]of Object.entries(t?.components?.[e]??{}))Mp(a)&&(d.components[e][r]=f(a,e,["components",e,r],[`${e}/${r}`]));for(let[e,r]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates}))for(let[a,o]of(r??[]).entries()){let i=d[e][a];if(e==="tools")for(let p of["inputSchema","outputSchema"])Mp(o[p])&&(i[p]=f(o[p],"schemas",[e,a,p]));let n=e==="tools"?"toolExamples":e==="resources"?"resourceExamples":"resourceTemplateExamples";for(let[p,l]of Object.entries(o.examples??{}))Mp(l)&&(i.examples[p]=f(l,n,[e,a,"examples",p]))}for(let e of yu)for(let[r,a]of(t?.[e]??[]).entries())for(let[o,i]of(a.elicitations??[]).entries())Mp(i.requestedSchema)&&(d[e][r].elicitations[o].requestedSchema=f(i.requestedSchema,"schemas",[e,r,"elicitations",o,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:u}}function rb(t,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function du(t){return uu(t)?[]:(uu.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:rb(t,s)}))}function sb(t){let s=[],d=t.protocolVersions??[];function b(r,a,o,i){s.push(Ps("client-requirement-version-mismatch","error",`${r} member ${JSON.stringify(i)} is not defined by MCP ${o}`,[...a,i]))}function u(r,a,o,i){return r&&typeof r=="object"&&!Array.isArray(r)?!0:(s.push(Ps("invalid-client-requirement-value","error",`${a} must be an object for MCP ${i}`,o)),!1)}function f(r,a,o,i,n){if(!u(r,o,i,n))return!1;for(let p of Object.keys(r))a.has(p)||b(o,i,n,p);return!0}function e(r,a,o,i){f(r,new Set(["list","cancel","requests"]),a,o,i);for(let n of["list","cancel"])Object.hasOwn(r,n)&&u(r[n],`${a}.${n}`,[...o,n],i);if(!(!Object.hasOwn(r,"requests")||!u(r.requests,`${a}.requests`,[...o,"requests"],i))){f(r.requests,new Set(["sampling","elicitation"]),`${a}.requests`,[...o,"requests"],i);for(let[n,p]of[["sampling","createMessage"],["elicitation","create"]]){if(!Object.hasOwn(r.requests,n))continue;let l=r.requests[n],c=[...o,"requests",n];f(l,new Set([p]),`${a}.requests.${n}`,c,i)&&Object.hasOwn(l,p)&&u(l[p],`${a}.requests.${n}.${p}`,[...c,p],i)}}}for(let r of yu)for(let[a,o]of(t[r]??[]).entries()){let i=o.clientRequirements;if(!i||typeof i!="object"||Array.isArray(i))continue;let n=o.protocolVersions??d,p=`${r}[${a}].clientRequirements`,l=[r,a,"clientRequirements"];for(let c of n){let h=Xg[c]??new Set;for(let[m,w]of Object.entries(i)){if(m.startsWith("x-"))continue;if(Yg.has(m)&&!h.has(m)){s.push(Ps("client-requirement-version-mismatch","error",`${p}.${m} is not defined by MCP ${c}; split the primitive into disjoint protocol-scoped variants when requirements differ`,[...l,m]));continue}if(!h.has(m))continue;let y=`${p}.${m}`,$=[...l,m];if(m==="roots")f(w,c==="2026-07-28"?new Set:new Set(["listChanged"]),y,$,c),c!=="2026-07-28"&&Object.hasOwn(w,"listChanged")&&typeof w.listChanged!="boolean"&&s.push(Ps("invalid-client-requirement-value","error",`${y}.listChanged must be a boolean for MCP ${c}`,[...$,"listChanged"]));else if(m==="sampling"&&["2025-11-25","2026-07-28"].includes(c)){f(w,new Set(["context","tools"]),y,$,c);for(let g of["context","tools"])Object.hasOwn(w,g)&&u(w[g],`${y}.${g}`,[...$,g],c);Object.hasOwn(w,"context")&&s.push(Ps("deprecated-client-requirement","warning",`${y}.context uses deprecated MCP context-inclusion capability semantics in MCP ${c}`,[...$,"context"]))}else if(m==="elicitation"&&["2025-11-25","2026-07-28"].includes(c)){f(w,new Set(["form","url"]),y,$,c);for(let g of["form","url"])Object.hasOwn(w,g)&&u(w[g],`${y}.${g}`,[...$,g],c)}else if(m==="tasks")e(w,y,$,c);else if(m==="extensions")for(let g of Object.keys(w))eb(g)&&!Gg.has(g)&&s.push(Ps("unknown-reserved-extension-identifier","warning",`${y} contains unrecognized extension ${JSON.stringify(g)} under an MCP-reserved prefix; preserve it and review its authority`,[...$,g]));c==="2026-07-28"&&["roots","sampling"].includes(m)&&s.push(Ps("deprecated-client-requirement","warning",`${y} requires an MCP capability deprecated in MCP ${c}`,$))}}}return s}function ib(t,s="document"){let d=tb(t,s),b=d.diagnostics.length||d.substitutions===0?[]:du(d.document),u=[...d.diagnostics,...b,...d.diagnostics.length||b.length?[]:fu(d.document,s),...sb(t)];return(Object.hasOwn(t,"transports")?u:u.filter(e=>e.code!=="transport-coverage-gap")).sort((e,r)=>e.code.localeCompare(r.code)||e.message.localeCompare(r.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(r.path)))}function hu(t){let s=du(t);return s.length?s:ib(t)}var Ql="0.8.0-draft.3",ob="v0.8.0-draft.3",nb="8823c1f1946360b2a44d00920e2092e5e4acd139a1964befad4eb0bf3ce96002";function ab(t){let s=hu(t);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var nm={};cs(nm,{schemaSha256:()=>Xb,snapshotTag:()=>Gb,specification:()=>om,supportedProtocolVersions:()=>Up,validate:()=>e$});var gu={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json",title:"MCP Description",description:"MCP Description 0.8.0 Community Working Draft 4 (v0.8.0-draft.4; unreleased).",type:"object",required:["mcpdesc","info","protocolVersions"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},components:{$ref:"#/$defs/components"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/tool"}},resources:{type:"array",minItems:1,items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",minItems:1,items:{$ref:"#/$defs/prompt"}},tags:{type:"array",minItems:1,items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},clientCapabilityValue:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},clientCapabilityRequirements:{type:"object",minProperties:1,properties:{roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},elicitation:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}},jsonSchemaObject:{type:"object",additionalProperties:!0},referenceObject:{type:"object",required:["$componentRef"],properties:{$componentRef:{type:"string",pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"}},additionalProperties:!1},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icons:{type:"array",minItems:1,items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}]},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}},elicitationInteractionFormRequest:{type:"object",required:["mode","message","requestedSchema"],properties:{mode:{const:"form"},message:{type:"string",minLength:1},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},additionalProperties:!1},elicitationInteractionUrlRequest:{type:"object",required:["mode","message","url"],properties:{mode:{const:"url"},message:{type:"string",minLength:1},url:{type:"string",format:"uri"}},additionalProperties:!1},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionAcceptedResponse:{type:"object",required:["action"],properties:{action:{const:"accept"},content:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}}},additionalProperties:!1},elicitationInteractionDeclinedResponse:{type:"object",required:["action"],properties:{action:{enum:["decline","cancel"]}},additionalProperties:!1},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},samplingModelHint:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1}},additionalProperties:!1},samplingModelPreferences:{type:"object",properties:{hints:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingModelHint"}},costPriority:{type:"number",minimum:0,maximum:1},speedPriority:{type:"number",minimum:0,maximum:1},intelligencePriority:{type:"number",minimum:0,maximum:1}},additionalProperties:!1},samplingToolChoice:{type:"object",required:["mode"],properties:{mode:{enum:["auto","required","none"]}},additionalProperties:!1},samplingRequestTool:{type:"object",required:["name","inputSchema"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]},annotations:{$ref:"#/$defs/toolAnnotations"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},samplingToolUseContent:{type:"object",required:["type","id","name","input"],properties:{type:{const:"tool_use"},id:{type:"string"},name:{type:"string"},input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}}},additionalProperties:!1},samplingToolResultContent:{type:"object",required:["type","toolUseId","content"],properties:{type:{const:"tool_result"},toolUseId:{type:"string"},content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{type:"array",minItems:1,items:{$ref:"#/$defs/toolResultContent"}}]},isError:{type:"boolean"}},additionalProperties:!1},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{type:"array",minItems:1,items:{$ref:"#/$defs/samplingContentBlock"}}]},samplingMessage:{type:"object",required:["role","content"],properties:{role:{enum:["user","assistant"]},content:{$ref:"#/$defs/samplingMessageContent"}},additionalProperties:!1},samplingCreateMessageRequest:{type:"object",required:["messages","maxTokens"],properties:{messages:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingMessage"}},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},systemPrompt:{type:"string"},includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{type:"integer",minimum:1},temperature:{type:"number"},stopSequences:{type:"array",items:{type:"string"}},metadata:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingRequestTool"}},toolChoice:{$ref:"#/$defs/samplingToolChoice"}},additionalProperties:!1},samplingCreateMessageResult:{type:"object",required:["role","content","model"],properties:{role:{const:"assistant"},content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},stopReason:{type:"string"}},additionalProperties:!1},rootDeclaration:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"uri"},name:{type:"string"}},additionalProperties:!1},rootsListRequest:{type:"object",maxProperties:0,additionalProperties:!1},rootsListResult:{type:"object",required:["roots"],properties:{roots:{type:"array",items:{$ref:"#/$defs/rootDeclaration"}}},additionalProperties:!1},toolInteractionElicitationStep:{type:"object",required:["type","request","response"],properties:{type:{const:"elicitation"},declaration:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionSamplingStep:{type:"object",required:["type","request","response"],properties:{type:{const:"sampling"},request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionRootsStep:{type:"object",required:["type","request","response"],properties:{type:{const:"roots"},request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolInteractionExample:{type:"object",required:["input","steps","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},steps:{type:"array",minItems:1,items:{$ref:"#/$defs/toolInteractionStep"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/toolInteractionExample"}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}},promptMessageExample:{type:"object",required:["role","content"],properties:{role:{type:"string",enum:["user","assistant"]},content:{$ref:"#/$defs/toolResultContent"}},additionalProperties:!1},completedPromptResultExample:{type:"object",required:["messages"],properties:{resultType:{const:"complete"},description:{type:"string"},messages:{type:"array",items:{$ref:"#/$defs/promptMessageExample"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},promptExample:{type:"object",required:["result"],properties:{arguments:{type:"object",additionalProperties:{type:"string"}},result:{$ref:"#/$defs/completedPromptResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}},completionArgument:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionContext:{type:"object",required:["arguments"],properties:{arguments:{type:"object",minProperties:1,additionalProperties:{type:"string"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionResult:{type:"object",required:["values"],properties:{values:{type:"array",maxItems:100,items:{type:"string"}},total:{type:"integer",minimum:0},hasMore:{type:"boolean"}},additionalProperties:!0},completedCompletionResultExample:{type:"object",required:["completion"],properties:{resultType:{const:"complete"},completion:{$ref:"#/$defs/completionResult"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},completionExample:{type:"object",required:["argument","result"],properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/completionExample"}},componentMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"}},components:{type:"object",minProperties:1,properties:{schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string",minLength:1},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]}]},outputSchema:{$ref:"#/$defs/schemaComponentValue"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},completionExamples:{$ref:"#/$defs/completionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string"},arguments:{type:"array",minItems:1,items:{$ref:"#/$defs/promptArgument"}},examples:{$ref:"#/$defs/promptExamples"},completionExamples:{$ref:"#/$defs/completionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},extensionCapabilities:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}}};var Up=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),pe=new Map(Up.map((t,s)=>[t,s])),ts="2025-11-25",Gl="2025-06-18",lb=new Set(["io.modelcontextprotocol/tasks"]),mb=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function Xl(t){let s=t==="2020-12"?qe:Me,d=new s({allErrors:!0,strict:!1});return Oe(d),d}function ps(t){return[...t].sort((s,d)=>pe.get(s)-pe.get(d))}function ht(t,s,d){return ps(s?.protocolVersions??d??t.protocolVersions??[])}function bu(t,s){let d=new Set(s);return t.filter(b=>d.has(b))}function fb(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let d of Object.values(t.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function ju(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function vu(t){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(t),externalReferences:s}}function Q(t,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:d,path:b}}function ub(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function cb(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let d=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function $u(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function yb(t,s,d){let b=ps(t.protocolVersions??[]),u=b.filter(r=>pe.get(r)0;else return!1;return l?c||d.push(Q("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...p,r])):d.push(Q("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...p,r])),!0}function e(r,a,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[p,l]of Object.entries(r)){if(!mb.test(p)){d.push(Q("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(p)}`,[...n,p]));continue}for(let c of o.filter(h=>pe.get(h)>=pe.get(Gl)))f(p,l,a,c,i,n)||cb(p,c)&&d.push(Q("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(p)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,p]))}}for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{let n=ht(t,o,b),p=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...p,"_meta"]),r==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(r!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function db(t,s,d){let b=new Set;if((t.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(Q("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,f]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])f.forEach((e,r)=>{(e.tags??[]).forEach((a,o)=>{b.has(a)||d.push(Q("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(a)}`,[u,r,"tags",o]))})})}function hb(t,s,d){let b=t.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([r,a])=>[r,fb(a)]));function e(r,a,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[p,l]of Object.entries(i)){if(!u.has(p)){d.push(Q("unknown-security-scheme","error",`${a}[${n}] references unknown security scheme ${JSON.stringify(p)}`,[...o,n,p]));continue}let c=b[p];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(Q("duplicate-security-scope","error",`${a}[${n}].${p} contains duplicate scope values`,[...o,n,p])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(Q("non-oauth-scope-misuse","error",`${a}[${n}].${p} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,p])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(p)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(Q("uncatalogued-oauth-scope","warning",`${a}[${n}].${p} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,p,y]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,a)=>{e(r.security,`transports[${a}].security`,["transports",a,"security"])});for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function gb(t,s,d){let b=ps(t.protocolVersions??[]),u=new Set;function f(r,a,o,i){let n=new Set(a);for(let p of r)n.has(p)||d.push(Q("protocol-scope-outside-parent","error",`${o} includes protocol version ${p} outside its parent scope`,i))}(t.transports??[]).forEach((r,a)=>{let o=ht(t,r,b);f(o,b,`transports[${a}].protocolVersions`,["transports",a,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of b)u.has(r)||d.push(Q("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,a)=>{let o=ht(t,r,b);f(o,b,`capabilities[${a}].protocolVersions`,["capabilities",a,"protocolVersions"])});for(let r=0;r0&&d.push(Q("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${a}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,a,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;a.forEach((n,p)=>{let l=n[o],c=ht(t,n,b);f(c,b,`${r}[${p}].protocolVersions`,[r,p,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=ht(t,m,c);f(y,c,`${r}[${p}].elicitations[${w}].protocolVersions`,[r,p,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=bu(c,m.scope);w.length>0&&d.push(Q("primitive-scope-overlap","error",`${r}[${p}] with identifier ${JSON.stringify(l)} overlaps ${r}[${m.index}] for protocol versions ${w.join(", ")}`,[r,p,"protocolVersions"]))}h.push({index:p,scope:c}),i.set(l,h)})}}function bb(t,s,d){let b=ps(t.protocolVersions??[]);function u(f,e,r,a){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(Q("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...a,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(Q("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...a,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let p=`${r}.properties[${JSON.stringify(i)}]`,l=[...a,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(Q("elicitation-form-schema-version-mismatch","error",`${p} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(Q("elicitation-form-schema-version-mismatch","error",`${p}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(Q("elicitation-form-enum-names-mismatch","error",`${p}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(Q("elicitation-form-default-outside-enum","error",`${p}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(Q("elicitation-form-default-outside-enum","error",`${p}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(Q("elicitation-form-invalid-range","error",`${p}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(Q("elicitation-form-invalid-range","error",`${p}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(Q("elicitation-form-invalid-range","error",`${p}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,a)=>{let o=ht(t,r,b),i=new Set;(r.elicitations??[]).forEach((n,p)=>{let l=`${f}[${a}].elicitations[${p}]`,c=[f,a,"elicitations",p];i.has(n.name)&&d.push(Q("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=ht(t,n,o);for(let m of h)pe.get(m){let a=ht(t,e,b);if(e.type==="streamable-http")for(let o of a)pe.get(o)>=pe.get("2025-03-26")||d.push(Q("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of a)pe.get(o){let a=ht(t,e,b),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",a),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",a),u(`tools[${r}]`,o,e,"_meta","2025-06-18",a),u(`tools[${r}]`,o,e,"annotations","2025-03-26",a),f(`tools[${r}]`,o,e,"execution","2025-11-25",a),u(`tools[${r}]`,o,e,"icons","2025-11-25",a)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((a,o)=>{let i=ht(t,a,b),n=[e,o];if(u(`${e}[${o}]`,n,a,"title","2025-06-18",i),u(`${e}[${o}]`,n,a,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,a,"icons","2025-11-25",i),e!=="prompts"&&a.annotations?.lastModified!==void 0)for(let p of i)pe.get(p)>=pe.get("2025-06-18")||d.push(Q("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${p}`,[...n,"annotations","lastModified"]));e==="prompts"&&(a.arguments??[]).forEach((p,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],p,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let a=ht(t,e,b),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",a),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",a),a.includes("2026-07-28")&&d.push(Q("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of a)pe.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of Pb){let i=b[o];Array.isArray(i)?i.forEach((n,p)=>d(n,`${u}.${o}[${p}]`,[...f,o,p],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let a=b.dependencies;if(a&&typeof a=="object"&&!Array.isArray(a))for(let[o,i]of Object.entries(a))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(t,"inputSchema",["inputSchema"],!0,!1),s}function Ob(t,s,d,b,u){let f=vb(t.inputSchema);if(!f.length)return;for(let r of d)r!=="2026-07-28"&&u.push(Q("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of f){let a=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(Q("invalid-x-mcp-header","error",`${a} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(Q("invalid-x-mcp-header","error",`${a} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(Q("invalid-x-mcp-header","error",`${a} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(Q("duplicate-x-mcp-header","error",`${a} duplicates ${n} case-insensitively`,o)):e.set(i,a)}}function qb(t,s,d,b,u){if(Object.hasOwn(t,"properties")){let f=t.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(Q("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${ts}`,[...d,"properties"]));else for(let[e,r]of Object.entries(f))r&&typeof r=="object"&&!Array.isArray(r)||u.push(Q("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${ts}`,[...d,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(f=>typeof f!="string"))&&u.push(Q("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${ts}`,[...d,"required"]))}function Ab(t,s,d){let b=ps(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{let e=ht(t,u,b);for(let r of["inputSchema","outputSchema"]){let a=u[r];if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`tools[${f}].${r}`,i=["tools",f,r],n=e.some(l=>pe.get(l)pe.get(l)>=pe.get(ts));if(Object.hasOwn(a,"$schema"))for(let l of e)pe.get(l)>=pe.get(ts)||d.push(Q("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${ts} or later`,[...i,"$schema"]));if(n&&qb(a,o,i,s,d),p){let l=ju(a);if(!l)d.push(Q("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(a.$schema)}`,[...i,"$schema"]));else{let c=Xl(l);try{if(c.validateSchema(a,!0))c.compile(a);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(Q("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=vu(a);try{if(!m.externalReferences.length)throw h;Xl(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(Q("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(Q("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(r==="outputSchema"&&a.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(Q("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}Ob(u,f,e,s,d)})}function Pu(t,s,d,b,u,f){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(Q("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of t.required??[])Object.hasOwn(s,e)||f.push(Q("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||f.push(Q("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function wu(t,s,d,b,u,f){let e=ju(t);if(!e)return;let r=vu(t);if(r.externalReferences.length){let a=[...new Set(r.externalReferences)].sort();f.push(Q("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${a.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let a=Xl(e).compile(t);if(!a(s)){let o=a.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(Q("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function xb(t,s,d){let b=ps(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=ht(t,u,b),r=e.filter(o=>pe.get(o)pe.get(o)>=pe.get(ts));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,p=["tools",f,"examples",o],l=i.result??{},c=[...p,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(Q("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(Q("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(Q("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(Q("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&pe.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&pe.get(m){Object.hasOwn(r,"_meta")&&pe.get(e){let n=`${b}.result.contents[${i}]`,p=[...u,"result","contents",i];if(o.uri===s&&(a=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(Q("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...p,"mimeType"])),t.size!==void 0)){let l=typeof o.text=="string"?jb.encode(o.text).byteLength:typeof o.blob=="string"&&ku(o.blob)?zb(o.blob):void 0;l!==void 0&&l!==t.size&&e.push(Q("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${t.size}`,p))}typeof o.blob=="string"&&!ku(o.blob)&&e.push(Q("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...p,"blob"]))}),a||e.push(Q("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function _b(t,s,d){let b=ps(t.protocolVersions??[]);for(let[u,f]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])f.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let a=ht(t,e,b),o;if(u==="resourceTemplates")try{o=new De,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(Q("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${u}[${r}].examples[${JSON.stringify(i)}]`,l=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(Q("resource-template-example-invalid-expansion","error",`${p}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),Eb(c,a,`${p}.result`,[...l,"result"],s,d),typeof h=="string"&&Nb(e,h,c,p,l,s,d)}})}function em(t,s="document"){let d=[];return gb(t,s,d),hb(t,s,d),db(t,s,d),$b(t,s,d),bb(t,s,d),yb(t,s,d),Ab(t,s,d),xb(t,s,d),_b(t,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var rm="__interaction_example__",im=new qe({allErrors:!0,strict:!1});Oe(im);var Au=new Me({allErrors:!0,strict:!1});Oe(Au);var Ou=im.compile(gu),xu=["tools","resources","resourceTemplates","prompts"],Tb=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],Zb=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),Sb=new Set(["io.modelcontextprotocol/tasks"]),Ze=new Map(Up.map((t,s)=>[t,s])),Ib={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function ye(t,s,d,b){return{code:t,severity:s,message:d,path:b}}function Cb(t){if(typeof t!="string"||!t.includes("/"))return!1;let s=t.slice(0,t.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function Lp(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function tm(t,s,d,b){return{code:t,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function Vb(t,s="document"){let d=structuredClone(t),b=[],u=0;function f(e,r,a,o=[]){let i=/^#\/components\/([^/]+)\/([^/]+)$/.exec(e?.$componentRef??"");if(!i)return e;let[,n,p]=i;if(n!==r)return b.push(tm("wrong-component-reference-namespace",s,`must target #/components/${r}, not #/components/${n}`,a)),e;let l=`${n}/${p}`;if(o.includes(l))return b.push(tm("component-reference-cycle",s,`forms a cycle through ${[...o,l].join(" -> ")}`,a)),e;let c=t?.components?.[n]?.[p];return c===void 0?(b.push(tm("missing-component-reference-target",s,`targets missing component ${JSON.stringify(e.$componentRef)}`,a)),e):(u+=1,Lp(c)?f(c,r,a,[...o,l]):structuredClone(c))}for(let e of Tb)for(let[r,a]of Object.entries(t?.components?.[e]??{}))Lp(a)&&(d.components[e][r]=f(a,e,["components",e,r],[`${e}/${r}`]));for(let[e,r]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates,prompts:t?.prompts}))for(let[a,o]of(r??[]).entries()){let i=d[e][a];if(e==="tools")for(let p of["inputSchema","outputSchema"])Lp(o[p])&&(i[p]=f(o[p],"schemas",[e,a,p]));let n=e==="tools"?"toolExamples":e==="resources"?"resourceExamples":e==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[p,l]of Object.entries(o.examples??{}))Lp(l)&&(i.examples[p]=f(l,n,[e,a,"examples",p]))}for(let e of xu)for(let[r,a]of(t?.[e]??[]).entries())for(let[o,i]of(a.elicitations??[]).entries())Lp(i.requestedSchema)&&(d[e][r].elicitations[o].requestedSchema=f(i.requestedSchema,"schemas",[e,r,"elicitations",o,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:u}}function Db(t,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function zu(t){return Ou(t)?[]:(Ou.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:Db(t,s)}))}function sm(t){return Array.isArray(t)?t.map(sm):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([s],[d])=>s.localeCompare(d)).map(([s,d])=>[s,sm(d)])):t}function qu(t){return JSON.stringify(sm(t))}function Rb(t,s,d){if(!Array.isArray(t.path))return t;let b=["tools",0,"examples",rm];return b.every((f,e)=>t.path[e]===f)?{...t,message:t.message.replace(`tools[0].examples[${JSON.stringify(rm)}]`,`tools[${s}].interactionExamples[${JSON.stringify(d)}]`),path:["tools",s,"interactionExamples",d,...t.path.slice(b.length)]}:t}function Mb(t,s,d,b,u){let f={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:t.name,inputSchema:structuredClone(t.inputSchema),...t.outputSchema?{outputSchema:structuredClone(t.outputSchema)}:{},examples:{[rm]:{input:structuredClone(b.input),result:structuredClone(b.result)}}}]};return em(f).map(e=>Rb(e,s,d)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function Ub(t,s,d,b,u){try{let f=im.compile(t);if(!f(s)){let e=f.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(ye("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{try{let f=Au.compile(t);if(!f(s)){let e=f.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(ye("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{}}}function Lb(t,s,d,b,u){let f=t.clientRequirements;if(!f||typeof f!="object"||Array.isArray(f))return;function e(r,a){u.push(ye("interaction-example-client-requirements-contradiction","warning",`${d} ${r}`,a))}if(s.type==="roots"){Object.hasOwn(f,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...b,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(f,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...b,"type"]);return}let r=f.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(r,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...b,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(r,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...b,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(f,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...b,"type"]);return}let r=f.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(r,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...b,"request","mode"]),s.request.mode==="form"&&Object.keys(r).length>0&&!Object.hasOwn(r,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...b,"request","mode"])}}function Fb(t){let s=[],d=t.protocolVersions??[];for(let[b,u]of(t.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let f=u.protocolVersions??d;for(let[e,r]of Object.entries(u.interactionExamples)){if(!r||typeof r!="object"||Array.isArray(r))continue;let a=`tools[${b}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",b,"interactionExamples",e];s.push(...Mb(u,b,e,r,f));for(let[i,n]of(r.steps??[]).entries()){let p=`${a}.steps[${i}]`,l=[...o,"steps",i];if(Lb(u,n,p,l,s),n.type==="elicitation"){let c=n.request??{},h=n.response??{},m=typeof n.declaration=="string"?(u.elicitations??[]).find(w=>w.name===n.declaration):void 0;for(let w of f)Ze.get(w)[r.name,r]));for(let[r,a]of Object.entries(u.examples)){if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`prompts[${b}].examples[${JSON.stringify(r)}]`,i=["prompts",b,"examples",r],n=a.result??{},p=[...i,"result"],l=a.arguments;if(l&&typeof l=="object"&&!Array.isArray(l))for(let[c]of Object.entries(l))e.has(c)||s.push(ye("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,h]of e)h.required===!0&&!Object.hasOwn(l??{},c)&&s.push(ye("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(ye("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...p,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(ye("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...p,c]));for(let c of f){let h=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(ye("prompt-example-result-version-mismatch","error",`${h}.resultType must be "complete" for MCP ${c}`,[...p,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(ye("prompt-example-result-version-mismatch","error",`${h}.resultType is not defined for MCP ${c}`,[...p,"resultType"])),Object.hasOwn(n,"_meta")&&Ze.get(c){let y=`${h}.messages[${w}].content`,$=[...p,"messages",w,"content"];Hb(m.content??{},y,$,c,s)})}}}return s}function Kb(t){let s=new De;return s.add(t),new Set(s.templates.flatMap(d=>d.parts).filter(d=>d.type==="expression").flatMap(d=>d.expressions.map(b=>b.name)))}function Bb(t,s,d,b,u){let f=`${s}.result`,e=[...d,"result"];for(let r of["jsonrpc","id","error"])Object.hasOwn(t,r)&&u.push(ye("completion-example-json-rpc-envelope","error",`${f} must not contain JSON-RPC envelope field ${JSON.stringify(r)}`,[...e,r]));for(let r of["task","inputRequests","requestState"])Object.hasOwn(t,r)&&u.push(ye("incomplete-completion-example-result","error",`${f} must not contain non-completed workflow field ${JSON.stringify(r)}`,[...e,r]));b==="2026-07-28"&&t.resultType!=="complete"&&u.push(ye("completion-example-result-version-mismatch","error",`${f}.resultType must be "complete" for MCP ${b}`,[...e,"resultType"])),b!=="2026-07-28"&&Object.hasOwn(t,"resultType")&&u.push(ye("completion-example-result-version-mismatch","error",`${f}.resultType is not defined for MCP ${b}`,[...e,"resultType"])),Object.hasOwn(t,"_meta")&&Ze.get(b)i.name));else try{o=Kb(e.uriTemplate)}catch(i){s.push(ye("resource-template-completion-example-invalid-template","error",`${a}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[b,f,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${a}.completionExamples[${JSON.stringify(i)}]`,l=[b,f,"completionExamples",i],c=n.argument?.name,h=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(ye(b==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",b==="prompts"?`${p}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${p}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...l,"argument","name"])),h&&typeof h=="object"&&!Array.isArray(h))for(let w of Object.keys(h))o&&!o.has(w)&&s.push(ye(b==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",b==="prompts"?`${p}.context.arguments contains undeclared Prompt argument ${JSON.stringify(w)}`:`${p}.context.arguments contains no RFC 6570 variable ${JSON.stringify(w)} from ${JSON.stringify(e.uriTemplate)}`,[...l,"context","arguments",w])),w===c&&s.push(ye("completion-example-duplicate-target-context","error",`${p}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(w)}`,[...l,"context","arguments",w]));let m=n.result??{};for(let w of r){if(Ze.get(w)e.code!=="transport-coverage-gap")).sort((e,r)=>e.code.localeCompare(r.code)||e.message.localeCompare(r.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(r.path)))}function Eu(t){let s=zu(t);return s.length?s:Yb(t)}var om="0.8.0-draft.4",Gb="v0.8.0-draft.4",Xb="93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b";function e$(t){let s=Eu(t);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var hm={};cs(hm,{schemaSha256:()=>J$,snapshotTag:()=>F$,specification:()=>dm,supportedProtocolVersions:()=>Fp,validate:()=>H$});var Nu={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json",title:"MCP Description",description:"MCP Description 0.8.0 Release Candidate 1 (v0.8.0-rc.1; prerelease).",type:"object",required:["mcpdesc","info","protocolVersions"],properties:{$schema:{type:"string"},mcpdesc:{type:"string",const:"0.8.0"},info:{$ref:"#/$defs/info"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},instructions:{type:"string"},transports:{type:"array",minItems:1,items:{$ref:"#/$defs/transport"}},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},security:{$ref:"#/$defs/securityRequirementArray"},components:{$ref:"#/$defs/components"},capabilities:{type:"array",minItems:1,items:{$ref:"#/$defs/capabilities"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/tool"}},resources:{type:"array",minItems:1,items:{$ref:"#/$defs/resource"}},resourceTemplates:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceTemplate"}},prompts:{type:"array",minItems:1,items:{$ref:"#/$defs/prompt"}},tags:{type:"array",minItems:1,items:{$ref:"#/$defs/tag"}}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},additionalProperties:!1,$defs:{supportedProtocolVersion:{type:"string",enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]},protocolVersionScope:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/supportedProtocolVersion"}},jsonValue:{oneOf:[{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},{type:"array",items:{$ref:"#/$defs/jsonValue"}},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},clientCapabilityValue:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},clientCapabilityRequirements:{type:"object",minProperties:1,properties:{roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},elicitation:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:{$ref:"#/$defs/clientCapabilityValue"}},jsonSchemaObject:{type:"object",additionalProperties:!0},referenceObject:{type:"object",required:["$componentRef"],properties:{$componentRef:{type:"string",pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"}},additionalProperties:!1},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},elicitationFormOption:{type:"object",required:["const","title"],properties:{const:{type:"string"},title:{type:"string"}},additionalProperties:!1},elicitationFormProperty:{oneOf:[{type:"object",required:["type"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:0},format:{enum:["email","uri","date","date-time"]},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{enum:["number","integer"]},title:{type:"string"},description:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},default:{type:"number"}},additionalProperties:!1},{type:"object",required:["type"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},default:{type:"boolean"}},additionalProperties:!1},{type:"object",required:["type","enum"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},enum:{type:"array",items:{type:"string"}},enumNames:{type:"array",items:{type:"string"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","oneOf"],properties:{type:{const:"string"},title:{type:"string"},description:{type:"string"},oneOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}},default:{type:"string"}},additionalProperties:!1},{type:"object",required:["type","items"],properties:{type:{const:"array"},title:{type:"string"},description:{type:"string"},minItems:{type:"integer",minimum:0},maxItems:{type:"integer",minimum:0},items:{oneOf:[{type:"object",required:["type","enum"],properties:{type:{const:"string"},enum:{type:"array",items:{type:"string"}}},additionalProperties:!1},{type:"object",required:["anyOf"],properties:{anyOf:{type:"array",items:{$ref:"#/$defs/elicitationFormOption"}}},additionalProperties:!1}]},default:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},elicitationFormSchema:{type:"object",required:["type","properties"],properties:{$schema:{type:"string",format:"uri"},type:{const:"object"},properties:{type:"object",additionalProperties:{$ref:"#/$defs/elicitationFormProperty"}},required:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!1},elicitationDeclaration:{type:"object",required:["name","mode","message"],properties:{name:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},mode:{enum:["form","url"]},message:{type:"string",minLength:1},when:{type:"string",minLength:1},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{type:"string",format:"uri"},onDecline:{type:"string",minLength:1},onCancel:{type:"string",minLength:1},protocolVersions:{$ref:"#/$defs/protocolVersionScope"}},oneOf:[{properties:{mode:{const:"form"}},required:["requestedSchema"],not:{required:["url"]}},{properties:{mode:{const:"url"}},not:{required:["requestedSchema"]}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tag:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icon:{type:"object",required:["src"],properties:{src:{type:"string",format:"uri"},mimeType:{type:"string"},sizes:{type:"array",items:{type:"string"}},theme:{type:"string",enum:["light","dark"]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},icons:{type:"array",minItems:1,items:{$ref:"#/$defs/icon"}},contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},license:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},info:{type:"object",required:["name","version"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},version:{type:"string",minLength:1},id:{type:"string"},icons:{$ref:"#/$defs/icons"},websiteUrl:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{type:"object",additionalProperties:{type:"string"}}},required:["scopes"],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},oauthFlows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}]},securityScheme:{oneOf:[{type:"object",required:["type","scheme"],properties:{type:{const:"http"},scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","name","in"],properties:{type:{const:"apiKey"},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","flows"],properties:{type:{const:"oauth2"},flows:{$ref:"#/$defs/oauthFlows"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","openIdConnectUrl"],properties:{type:{const:"openIdConnect"},openIdConnectUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},securitySchemeMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/securityScheme"}},securityRequirement:{type:"object",propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},securityRequirementArray:{type:"array",items:{$ref:"#/$defs/securityRequirement"}},toolAnnotations:{type:"object",properties:{title:{type:"string"},readOnlyHint:{type:"boolean"},destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"}},additionalProperties:!0},execution:{type:"object",properties:{taskSupport:{type:"string",enum:["forbidden","optional","required"]}},additionalProperties:!1},metaObject:{type:"object",propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},additionalProperties:!0},resourceAnnotations:{type:"object",properties:{audience:{type:"array",items:{type:"string",enum:["user","assistant"]}},priority:{type:"number",minimum:0,maximum:1},lastModified:{type:"string"}},additionalProperties:!0},resourceContents:{oneOf:[{type:"object",required:["uri","text"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},text:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["uri","blob"],properties:{uri:{type:"string",format:"uri"},mimeType:{type:"string"},blob:{type:"string"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},toolResultContent:{oneOf:[{type:"object",required:["type","text"],properties:{type:{const:"text"},text:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","data","mimeType"],properties:{type:{enum:["image","audio"]},data:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","resource"],properties:{type:{const:"resource"},resource:{$ref:"#/$defs/resourceContents"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1},{type:"object",required:["type","uri","name"],properties:{type:{const:"resource_link"},uri:{type:"string",format:"uri"},name:{type:"string"},title:{type:"string"},description:{type:"string"},mimeType:{type:"string"},size:{type:"number"},icons:{$ref:"#/$defs/icons"},annotations:{$ref:"#/$defs/resourceAnnotations"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!1}]},completedToolResultExample:{type:"object",required:["content"],properties:{resultType:{const:"complete"},content:{type:"array",items:{$ref:"#/$defs/toolResultContent"}},structuredContent:{$ref:"#/$defs/jsonValue"},isError:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},toolExample:{type:"object",required:["input","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}},elicitationInteractionFormRequest:{type:"object",required:["mode","message","requestedSchema"],properties:{mode:{const:"form"},message:{type:"string",minLength:1},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},additionalProperties:!1},elicitationInteractionUrlRequest:{type:"object",required:["mode","message","url"],properties:{mode:{const:"url"},message:{type:"string",minLength:1},url:{type:"string",format:"uri"}},additionalProperties:!1},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionAcceptedResponse:{type:"object",required:["action"],properties:{action:{const:"accept"},content:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}}},additionalProperties:!1},elicitationInteractionDeclinedResponse:{type:"object",required:["action"],properties:{action:{enum:["decline","cancel"]}},additionalProperties:!1},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},samplingModelHint:{type:"object",required:["name"],properties:{name:{type:"string",minLength:1}},additionalProperties:!1},samplingModelPreferences:{type:"object",properties:{hints:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingModelHint"}},costPriority:{type:"number",minimum:0,maximum:1},speedPriority:{type:"number",minimum:0,maximum:1},intelligencePriority:{type:"number",minimum:0,maximum:1}},additionalProperties:!1},samplingToolChoice:{type:"object",required:["mode"],properties:{mode:{enum:["auto","required","none"]}},additionalProperties:!1},samplingRequestTool:{type:"object",required:["name","inputSchema"],properties:{name:{type:"string",minLength:1},title:{type:"string"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]},annotations:{$ref:"#/$defs/toolAnnotations"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},samplingToolUseContent:{type:"object",required:["type","id","name","input"],properties:{type:{const:"tool_use"},id:{type:"string"},name:{type:"string"},input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}}},additionalProperties:!1},samplingToolResultContent:{type:"object",required:["type","toolUseId","content"],properties:{type:{const:"tool_result"},toolUseId:{type:"string"},content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{type:"array",minItems:1,items:{$ref:"#/$defs/toolResultContent"}}]},isError:{type:"boolean"}},additionalProperties:!1},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{type:"array",minItems:1,items:{$ref:"#/$defs/samplingContentBlock"}}]},samplingMessage:{type:"object",required:["role","content"],properties:{role:{enum:["user","assistant"]},content:{$ref:"#/$defs/samplingMessageContent"}},additionalProperties:!1},samplingCreateMessageRequest:{type:"object",required:["messages","maxTokens"],properties:{messages:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingMessage"}},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},systemPrompt:{type:"string"},includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{type:"integer",minimum:1},temperature:{type:"number"},stopSequences:{type:"array",items:{type:"string"}},metadata:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},tools:{type:"array",minItems:1,items:{$ref:"#/$defs/samplingRequestTool"}},toolChoice:{$ref:"#/$defs/samplingToolChoice"}},additionalProperties:!1},samplingCreateMessageResult:{type:"object",required:["role","content","model"],properties:{role:{const:"assistant"},content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},stopReason:{type:"string"}},additionalProperties:!1},rootDeclaration:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"uri"},name:{type:"string"}},additionalProperties:!1},rootsListRequest:{type:"object",maxProperties:0,additionalProperties:!1},rootsListResult:{type:"object",required:["roots"],properties:{roots:{type:"array",items:{$ref:"#/$defs/rootDeclaration"}}},additionalProperties:!1},toolInteractionElicitationStep:{type:"object",required:["type","request","response"],properties:{type:{const:"elicitation"},declaration:{type:"string",pattern:"^[A-Za-z0-9._-]+$"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionSamplingStep:{type:"object",required:["type","request","response"],properties:{type:{const:"sampling"},request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionRootsStep:{type:"object",required:["type","request","response"],properties:{type:{const:"roots"},request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolInteractionExample:{type:"object",required:["input","steps","result"],properties:{input:{type:"object",additionalProperties:{$ref:"#/$defs/jsonValue"}},steps:{type:"array",minItems:1,items:{$ref:"#/$defs/toolInteractionStep"}},result:{$ref:"#/$defs/completedToolResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},toolInteractionExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/toolInteractionExample"}},completedReadResourceResultExample:{type:"object",required:["contents"],properties:{resultType:{const:"complete"},ttlMs:{type:"number",minimum:0},cacheScope:{enum:["public","private"]},contents:{type:"array",minItems:1,items:{$ref:"#/$defs/resourceContents"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},resourceExample:{type:"object",required:["result"],properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}},resourceTemplateExample:{type:"object",required:["uri","result"],properties:{uri:{type:"string",format:"uri"},result:{$ref:"#/$defs/completedReadResourceResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplateExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}},promptMessageExample:{type:"object",required:["role","content"],properties:{role:{type:"string",enum:["user","assistant"]},content:{$ref:"#/$defs/toolResultContent"}},additionalProperties:!1},completedPromptResultExample:{type:"object",required:["messages"],properties:{resultType:{const:"complete"},description:{type:"string"},messages:{type:"array",items:{$ref:"#/$defs/promptMessageExample"}},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},promptExample:{type:"object",required:["result"],properties:{arguments:{type:"object",additionalProperties:{type:"string"}},result:{$ref:"#/$defs/completedPromptResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}},completionArgument:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionContext:{type:"object",required:["arguments"],properties:{arguments:{type:"object",minProperties:1,additionalProperties:{type:"string"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionResult:{type:"object",required:["values"],properties:{values:{type:"array",maxItems:100,items:{type:"string"}},total:{type:"integer",minimum:0},hasMore:{type:"boolean"}},additionalProperties:!0},completedCompletionResultExample:{type:"object",required:["completion"],properties:{resultType:{const:"complete"},completion:{$ref:"#/$defs/completionResult"},_meta:{$ref:"#/$defs/metaObject"}},additionalProperties:!0},completionExample:{type:"object",required:["argument","result"],properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},completionExamples:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},additionalProperties:{$ref:"#/$defs/completionExample"}},componentMap:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"}},components:{type:"object",minProperties:1,properties:{schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},promptArgument:{type:"object",required:["name"],properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},required:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},tool:{type:"object",required:["name","inputSchema"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string",minLength:1},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{required:["type"],properties:{type:{const:"object"}}}]}]},outputSchema:{$ref:"#/$defs/schemaComponentValue"},annotations:{$ref:"#/$defs/toolAnnotations"},execution:{$ref:"#/$defs/execution"},examples:{$ref:"#/$defs/toolExamples"},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resource:{type:"object",required:["uri","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uri:{type:"string"},name:{type:"string"},mimeType:{type:"string"},size:{type:"number"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},resourceTemplate:{type:"object",required:["uriTemplate","name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},uriTemplate:{type:"string"},name:{type:"string"},mimeType:{type:"string"},annotations:{$ref:"#/$defs/resourceAnnotations"},examples:{$ref:"#/$defs/resourceTemplateExamples"},completionExamples:{$ref:"#/$defs/completionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},prompt:{type:"object",required:["name"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},title:{type:"string"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},tags:{type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},deprecated:{type:"boolean"},_meta:{$ref:"#/$defs/metaObject"},security:{$ref:"#/$defs/securityRequirementArray"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},name:{type:"string"},arguments:{type:"array",minItems:1,items:{$ref:"#/$defs/promptArgument"}},examples:{$ref:"#/$defs/promptExamples"},completionExamples:{$ref:"#/$defs/completionExamples"},elicitations:{type:"array",minItems:1,items:{$ref:"#/$defs/elicitationDeclaration"}}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},transport:{oneOf:[{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"streamable-http"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","command"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"stdio"},command:{type:"string"},args:{type:"array",items:{type:"string"}},env:{type:"object",additionalProperties:{type:"string"}},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},{type:"object",required:["type","url"],properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},type:{const:"sse"},url:{type:"string",format:"uri"},security:{$ref:"#/$defs/securityRequirementArray"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}]},capabilityTools:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityResources:{type:"object",properties:{subscribe:{type:"boolean"},listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},capabilityPrompts:{type:"object",properties:{listChanged:{type:"boolean"}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1},extensionCapabilities:{type:"object",minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},additionalProperties:{type:"object"}},capabilities:{type:"object",properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},tools:{$ref:"#/$defs/capabilityTools"},resources:{$ref:"#/$defs/capabilityResources"},prompts:{$ref:"#/$defs/capabilityPrompts"},completions:{type:"object",additionalProperties:!0},logging:{type:"object",additionalProperties:!0},tasks:{type:"object",properties:{list:{type:"object",additionalProperties:!0},cancel:{type:"object",additionalProperties:!0},requests:{type:"object",properties:{tools:{type:"object",properties:{call:{type:"object",additionalProperties:!0}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},extensions:{$ref:"#/$defs/extensionCapabilities"},experimental:{type:"object",additionalProperties:!0}},patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},additionalProperties:!1}}};var Fp=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),le=new Map(Fp.map((t,s)=>[t,s])),rs="2025-11-25",am="2025-06-18",r$=new Set(["io.modelcontextprotocol/tasks"]),s$=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function pm(t){let s=t==="2020-12"?qe:Me,d=new s({allErrors:!0,strict:!1});return Oe(d),d}function ls(t){return[...t].sort((s,d)=>le.get(s)-le.get(d))}function gt(t,s,d){return ls(s?.protocolVersions??d??t.protocolVersions??[])}function _u(t,s){let d=new Set(s);return t.filter(b=>d.has(b))}function i$(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let d of Object.values(t.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function Cu(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function Vu(t){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(t),externalReferences:s}}function Y(t,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:d,path:b}}function o$(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function n$(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let d=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function Tu(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function a$(t,s,d){let b=ls(t.protocolVersions??[]),u=b.filter(r=>le.get(r)0;else return!1;return l?c||d.push(Y("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...p,r])):d.push(Y("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...p,r])),!0}function e(r,a,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[p,l]of Object.entries(r)){if(!s$.test(p)){d.push(Y("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(p)}`,[...n,p]));continue}for(let c of o.filter(h=>le.get(h)>=le.get(am)))f(p,l,a,c,i,n)||n$(p,c)&&d.push(Y("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(p)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,p]))}}for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{let n=gt(t,o,b),p=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...p,"_meta"]),r==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(r!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function p$(t,s,d){let b=new Set;if((t.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(Y("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,f]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])f.forEach((e,r)=>{(e.tags??[]).forEach((a,o)=>{b.has(a)||d.push(Y("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(a)}`,[u,r,"tags",o]))})})}function l$(t,s,d){let b=t.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([r,a])=>[r,i$(a)]));function e(r,a,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[p,l]of Object.entries(i)){if(!u.has(p)){d.push(Y("unknown-security-scheme","error",`${a}[${n}] references unknown security scheme ${JSON.stringify(p)}`,[...o,n,p]));continue}let c=b[p];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(Y("duplicate-security-scope","error",`${a}[${n}].${p} contains duplicate scope values`,[...o,n,p])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(Y("non-oauth-scope-misuse","error",`${a}[${n}].${p} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,p])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(p)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(Y("uncatalogued-oauth-scope","warning",`${a}[${n}].${p} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,p,y]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,a)=>{e(r.security,`transports[${a}].security`,["transports",a,"security"])});for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function m$(t,s,d){let b=ls(t.protocolVersions??[]),u=new Set;function f(r,a,o,i){let n=new Set(a);for(let p of r)n.has(p)||d.push(Y("protocol-scope-outside-parent","error",`${o} includes protocol version ${p} outside its parent scope`,i))}(t.transports??[]).forEach((r,a)=>{let o=gt(t,r,b);f(o,b,`transports[${a}].protocolVersions`,["transports",a,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of b)u.has(r)||d.push(Y("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,a)=>{let o=gt(t,r,b);f(o,b,`capabilities[${a}].protocolVersions`,["capabilities",a,"protocolVersions"])});for(let r=0;r0&&d.push(Y("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${a}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,a,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;a.forEach((n,p)=>{let l=n[o],c=gt(t,n,b);f(c,b,`${r}[${p}].protocolVersions`,[r,p,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=gt(t,m,c);f(y,c,`${r}[${p}].elicitations[${w}].protocolVersions`,[r,p,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=_u(c,m.scope);w.length>0&&d.push(Y("primitive-scope-overlap","error",`${r}[${p}] with identifier ${JSON.stringify(l)} overlaps ${r}[${m.index}] for protocol versions ${w.join(", ")}`,[r,p,"protocolVersions"]))}h.push({index:p,scope:c}),i.set(l,h)})}}function f$(t,s,d){let b=ls(t.protocolVersions??[]);function u(f,e,r,a){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(Y("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...a,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(Y("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...a,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let p=`${r}.properties[${JSON.stringify(i)}]`,l=[...a,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(Y("elicitation-form-schema-version-mismatch","error",`${p} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(Y("elicitation-form-schema-version-mismatch","error",`${p}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(Y("elicitation-form-enum-names-mismatch","error",`${p}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(Y("elicitation-form-default-outside-enum","error",`${p}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(Y("elicitation-form-default-outside-enum","error",`${p}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(Y("elicitation-form-invalid-range","error",`${p}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(Y("elicitation-form-invalid-range","error",`${p}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(Y("elicitation-form-invalid-range","error",`${p}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,a)=>{let o=gt(t,r,b),i=new Set;(r.elicitations??[]).forEach((n,p)=>{let l=`${f}[${a}].elicitations[${p}]`,c=[f,a,"elicitations",p];i.has(n.name)&&d.push(Y("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=gt(t,n,o);for(let m of h)le.get(m){let a=gt(t,e,b);if(e.type==="streamable-http")for(let o of a)le.get(o)>=le.get("2025-03-26")||d.push(Y("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of a)le.get(o){let a=gt(t,e,b),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",a),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",a),u(`tools[${r}]`,o,e,"_meta","2025-06-18",a),u(`tools[${r}]`,o,e,"annotations","2025-03-26",a),f(`tools[${r}]`,o,e,"execution","2025-11-25",a),u(`tools[${r}]`,o,e,"icons","2025-11-25",a)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((a,o)=>{let i=gt(t,a,b),n=[e,o];if(u(`${e}[${o}]`,n,a,"title","2025-06-18",i),u(`${e}[${o}]`,n,a,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,a,"icons","2025-11-25",i),e!=="prompts"&&a.annotations?.lastModified!==void 0)for(let p of i)le.get(p)>=le.get("2025-06-18")||d.push(Y("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${p}`,[...n,"annotations","lastModified"]));e==="prompts"&&(a.arguments??[]).forEach((p,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],p,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let a=gt(t,e,b),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",a),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",a),a.includes("2026-07-28")&&d.push(Y("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of a)le.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of c$){let i=b[o];Array.isArray(i)?i.forEach((n,p)=>d(n,`${u}.${o}[${p}]`,[...f,o,p],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let a=b.dependencies;if(a&&typeof a=="object"&&!Array.isArray(a))for(let[o,i]of Object.entries(a))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(t,"inputSchema",["inputSchema"],!0,!1),s}function b$(t,s,d,b,u){let f=g$(t.inputSchema);if(!f.length)return;for(let r of d)r!=="2026-07-28"&&u.push(Y("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of f){let a=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(Y("invalid-x-mcp-header","error",`${a} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(Y("invalid-x-mcp-header","error",`${a} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(Y("invalid-x-mcp-header","error",`${a} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(Y("duplicate-x-mcp-header","error",`${a} duplicates ${n} case-insensitively`,o)):e.set(i,a)}}function $$(t,s,d,b,u){if(Object.hasOwn(t,"properties")){let f=t.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(Y("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${rs}`,[...d,"properties"]));else for(let[e,r]of Object.entries(f))r&&typeof r=="object"&&!Array.isArray(r)||u.push(Y("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${rs}`,[...d,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(f=>typeof f!="string"))&&u.push(Y("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${rs}`,[...d,"required"]))}function P$(t,s,d){let b=ls(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{let e=gt(t,u,b);for(let r of["inputSchema","outputSchema"]){let a=u[r];if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`tools[${f}].${r}`,i=["tools",f,r],n=e.some(l=>le.get(l)le.get(l)>=le.get(rs));if(Object.hasOwn(a,"$schema"))for(let l of e)le.get(l)>=le.get(rs)||d.push(Y("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${rs} or later`,[...i,"$schema"]));if(n&&$$(a,o,i,s,d),p){let l=Cu(a);if(!l)d.push(Y("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(a.$schema)}`,[...i,"$schema"]));else{let c=pm(l);try{if(c.validateSchema(a,!0))c.compile(a);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(Y("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=Vu(a);try{if(!m.externalReferences.length)throw h;pm(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(Y("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(Y("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(r==="outputSchema"&&a.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(Y("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}b$(u,f,e,s,d)})}function Zu(t,s,d,b,u,f){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(Y("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of t.required??[])Object.hasOwn(s,e)||f.push(Y("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||f.push(Y("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function Su(t,s,d,b,u,f){let e=Cu(t);if(!e)return;let r=Vu(t);if(r.externalReferences.length){let a=[...new Set(r.externalReferences)].sort();f.push(Y("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${a.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let a=pm(e).compile(t);if(!a(s)){let o=a.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(Y("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function w$(t,s,d){let b=ls(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=gt(t,u,b),r=e.filter(o=>le.get(o)le.get(o)>=le.get(rs));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,p=["tools",f,"examples",o],l=i.result??{},c=[...p,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(Y("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(Y("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(Y("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(Y("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&le.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&le.get(m){Object.hasOwn(r,"_meta")&&le.get(e){let n=`${b}.result.contents[${i}]`,p=[...u,"result","contents",i];if(o.uri===s&&(a=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(Y("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...p,"mimeType"])),t.size!==void 0)){let l=typeof o.text=="string"?h$.encode(o.text).byteLength:typeof o.blob=="string"&&Iu(o.blob)?k$(o.blob):void 0;l!==void 0&&l!==t.size&&e.push(Y("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${t.size}`,p))}typeof o.blob=="string"&&!Iu(o.blob)&&e.push(Y("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...p,"blob"]))}),a||e.push(Y("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function O$(t,s,d){let b=ls(t.protocolVersions??[]);for(let[u,f]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])f.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let a=gt(t,e,b),o;if(u==="resourceTemplates")try{o=new De,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(Y("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${u}[${r}].examples[${JSON.stringify(i)}]`,l=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(Y("resource-template-example-invalid-expansion","error",`${p}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),j$(c,a,`${p}.result`,[...l,"result"],s,d),typeof h=="string"&&v$(e,h,c,p,l,s,d)}})}function lm(t,s="document"){let d=[];return m$(t,s,d),l$(t,s,d),p$(t,s,d),u$(t,s,d),f$(t,s,d),a$(t,s,d),P$(t,s,d),w$(t,s,d),O$(t,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var fm="__interaction_example__",cm=new qe({allErrors:!0,strict:!1});Oe(cm);var Mu=new Me({allErrors:!0,strict:!1});Oe(Mu);var Du=cm.compile(Nu),Uu=["tools","resources","resourceTemplates","prompts"],q$=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],A$=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),x$=new Set(["io.modelcontextprotocol/tasks"]),Se=new Map(Fp.map((t,s)=>[t,s])),z$={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function de(t,s,d,b){return{code:t,severity:s,message:d,path:b}}function E$(t){if(typeof t!="string"||!t.includes("/"))return!1;let s=t.slice(0,t.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function Jp(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function mm(t,s,d,b){return{code:t,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function ym(t,s="document"){let d=structuredClone(t),b=[],u=[],f=0;function e(a,o,i,n=[]){let p=/^#\/components\/([^/]+)\/([^/]+)$/.exec(a?.$componentRef??"");if(!p)return{value:a};let[,l,c]=p;if(l!==o)return b.push(mm("wrong-component-reference-namespace",s,`must target #/components/${o}, not #/components/${l}`,i)),{value:a};let h=`${l}/${c}`;if(n.includes(h))return b.push(mm("component-reference-cycle",s,`forms a cycle through ${[...n,h].join(" -> ")}`,i)),{value:a};let m=t?.components?.[l]?.[c];return m===void 0?(b.push(mm("missing-component-reference-target",s,`targets missing component ${JSON.stringify(a.$componentRef)}`,i)),{value:a}):(f+=1,Jp(m)?e(m,o,i,[...n,h]):{value:structuredClone(m),targetPath:["components",l,c]})}function r(a,o,i,n=[]){let p=e(a,o,i,n);return p.targetPath&&u.push({referencePath:i,targetPath:p.targetPath}),p.value}for(let a of q$)for(let[o,i]of Object.entries(t?.components?.[a]??{}))Jp(i)&&(d.components[a][o]=r(i,a,["components",a,o],[`${a}/${o}`]));for(let[a,o]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates,prompts:t?.prompts}))for(let[i,n]of(o??[]).entries()){let p=d[a][i];if(a==="tools")for(let c of["inputSchema","outputSchema"])Jp(n[c])&&(p[c]=r(n[c],"schemas",[a,i,c]));let l=a==="tools"?"toolExamples":a==="resources"?"resourceExamples":a==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[c,h]of Object.entries(n.examples??{}))Jp(h)&&(p.examples[c]=r(h,l,[a,i,"examples",c]))}for(let a of Uu)for(let[o,i]of(t?.[a]??[]).entries())for(let[n,p]of(i.elicitations??[]).entries())Jp(p.requestedSchema)&&(d[a][o].elicitations[n].requestedSchema=r(p.requestedSchema,"schemas",[a,o,"elicitations",n,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:f,provenance:u}}function N$(t,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function Lu(t){return Du(t)?[]:(Du.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:N$(t,s)}))}function um(t){return Array.isArray(t)?t.map(um):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([s],[d])=>s.localeCompare(d)).map(([s,d])=>[s,um(d)])):t}function Ru(t){return JSON.stringify(um(t))}function _$(t,s,d){if(!Array.isArray(t.path))return t;let b=["tools",0,"examples",fm];return b.every((f,e)=>t.path[e]===f)?{...t,message:t.message.replace(`tools[0].examples[${JSON.stringify(fm)}]`,`tools[${s}].interactionExamples[${JSON.stringify(d)}]`),path:["tools",s,"interactionExamples",d,...t.path.slice(b.length)]}:t}function T$(t,s,d,b,u){let f={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:t.name,inputSchema:structuredClone(t.inputSchema),...t.outputSchema?{outputSchema:structuredClone(t.outputSchema)}:{},examples:{[fm]:{input:structuredClone(b.input),result:structuredClone(b.result)}}}]};return lm(f).map(e=>_$(e,s,d)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function Z$(t,s,d,b,u){try{let f=cm.compile(t);if(!f(s)){let e=f.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(de("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{try{let f=Mu.compile(t);if(!f(s)){let e=f.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(de("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{}}}function S$(t,s,d,b,u){let f=t.clientRequirements;if(!f||typeof f!="object"||Array.isArray(f))return;function e(r,a){u.push(de("interaction-example-client-requirements-contradiction","warning",`${d} ${r}`,a))}if(s.type==="roots"){Object.hasOwn(f,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...b,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(f,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...b,"type"]);return}let r=f.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(r,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...b,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(r,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...b,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(f,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...b,"type"]);return}let r=f.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(r,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...b,"request","mode"]),s.request.mode==="form"&&Object.keys(r).length>0&&!Object.hasOwn(r,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...b,"request","mode"])}}function I$(t){let s=[],d=t.protocolVersions??[];for(let[b,u]of(t.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let f=u.protocolVersions??d;for(let[e,r]of Object.entries(u.interactionExamples)){if(!r||typeof r!="object"||Array.isArray(r))continue;let a=`tools[${b}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",b,"interactionExamples",e];s.push(...T$(u,b,e,r,f));for(let[i,n]of(r.steps??[]).entries()){let p=`${a}.steps[${i}]`,l=[...o,"steps",i];if(S$(u,n,p,l,s),n.type==="elicitation"){let c=n.request??{},h=n.response??{},m=typeof n.declaration=="string"?(u.elicitations??[]).find(w=>w.name===n.declaration):void 0;for(let w of f)Se.get(w)[r.name,r]));for(let[r,a]of Object.entries(u.examples)){if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`prompts[${b}].examples[${JSON.stringify(r)}]`,i=["prompts",b,"examples",r],n=a.result??{},p=[...i,"result"],l=a.arguments;if(l&&typeof l=="object"&&!Array.isArray(l))for(let[c]of Object.entries(l))e.has(c)||s.push(de("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,h]of e)h.required===!0&&!Object.hasOwn(l??{},c)&&s.push(de("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(de("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...p,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(de("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...p,c]));for(let c of f){let h=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(de("prompt-example-result-version-mismatch","error",`${h}.resultType must be "complete" for MCP ${c}`,[...p,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(de("prompt-example-result-version-mismatch","error",`${h}.resultType is not defined for MCP ${c}`,[...p,"resultType"])),Object.hasOwn(n,"_meta")&&Se.get(c){let y=`${h}.messages[${w}].content`,$=[...p,"messages",w,"content"];V$(m.content??{},y,$,c,s)})}}}return s}function R$(t){let s=new De;return s.add(t),new Set(s.templates.flatMap(d=>d.parts).filter(d=>d.type==="expression").flatMap(d=>d.expressions.map(b=>b.name)))}function M$(t,s,d,b,u){let f=`${s}.result`,e=[...d,"result"];for(let r of["jsonrpc","id","error"])Object.hasOwn(t,r)&&u.push(de("completion-example-json-rpc-envelope","error",`${f} must not contain JSON-RPC envelope field ${JSON.stringify(r)}`,[...e,r]));for(let r of["task","inputRequests","requestState"])Object.hasOwn(t,r)&&u.push(de("incomplete-completion-example-result","error",`${f} must not contain non-completed workflow field ${JSON.stringify(r)}`,[...e,r]));b==="2026-07-28"&&t.resultType!=="complete"&&u.push(de("completion-example-result-version-mismatch","error",`${f}.resultType must be "complete" for MCP ${b}`,[...e,"resultType"])),b!=="2026-07-28"&&Object.hasOwn(t,"resultType")&&u.push(de("completion-example-result-version-mismatch","error",`${f}.resultType is not defined for MCP ${b}`,[...e,"resultType"])),Object.hasOwn(t,"_meta")&&Se.get(b)i.name));else try{o=R$(e.uriTemplate)}catch(i){s.push(de("resource-template-completion-example-invalid-template","error",`${a}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[b,f,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${a}.completionExamples[${JSON.stringify(i)}]`,l=[b,f,"completionExamples",i],c=n.argument?.name,h=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(de(b==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",b==="prompts"?`${p}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${p}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...l,"argument","name"])),h&&typeof h=="object"&&!Array.isArray(h))for(let w of Object.keys(h))o&&!o.has(w)&&s.push(de(b==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",b==="prompts"?`${p}.context.arguments contains undeclared Prompt argument ${JSON.stringify(w)}`:`${p}.context.arguments contains no RFC 6570 variable ${JSON.stringify(w)} from ${JSON.stringify(e.uriTemplate)}`,[...l,"context","arguments",w])),w===c&&s.push(de("completion-example-duplicate-target-context","error",`${p}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(w)}`,[...l,"context","arguments",w]));let m=n.result??{};for(let w of r){if(Se.get(w)e.code!=="transport-coverage-gap")).sort((e,r)=>e.code.localeCompare(r.code)||e.message.localeCompare(r.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(r.path)))}function Fu(t){let s=Lu(t);return s.length?s:L$(t)}var dm="0.8.0-rc.1",F$="v0.8.0-rc.1",J$="936a0f24ade501fcabf3d6498c0440c445daa672a575573a35954cee49430ac4";function H$(t){let s=Fu(t);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var qm={};cs(qm,{schemaSha256:()=>SP,snapshotTag:()=>ZP,specification:()=>Om,supportedProtocolVersions:()=>Hp,validate:()=>IP});var Ju={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json",title:"MCP Description",description:"MCP Description 0.8.0 Release Candidate 2 (v0.8.0-rc.2; prerelease).",type:"object",required:["mcpdesc","info","protocolVersions"],additionalProperties:!1,properties:{$schema:{type:"string"},capabilities:{items:{$ref:"#/$defs/capabilities"},minItems:1,type:"array"},components:{$ref:"#/$defs/components"},info:{$ref:"#/$defs/info"},instructions:{type:"string"},mcpdesc:{const:"0.8.0",type:"string"},prompts:{items:{$ref:"#/$defs/prompt"},minItems:1,type:"array"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resourceTemplates:{items:{$ref:"#/$defs/resourceTemplate"},minItems:1,type:"array"},resources:{items:{$ref:"#/$defs/resource"},minItems:1,type:"array"},security:{$ref:"#/$defs/securityRequirementArray"},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},tags:{items:{$ref:"#/$defs/tag"},minItems:1,type:"array"},tools:{items:{$ref:"#/$defs/tool"},minItems:1,type:"array"},transports:{items:{$ref:"#/$defs/transport"},minItems:1,type:"array"}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},$defs:{capabilities:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"},capabilityPrompts:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},capabilityResources:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"},subscribe:{type:"boolean"}},type:"object"},capabilityTools:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},clientCapabilityRequirements:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{elicitation:{$ref:"#/$defs/clientCapabilityValue"},experimental:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"}},type:"object"},clientCapabilityValue:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},completedCompletionResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},completion:{$ref:"#/$defs/completionResult"},resultType:{const:"complete"}},required:["completion"],type:"object"},completedPromptResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},description:{type:"string"},messages:{items:{$ref:"#/$defs/promptMessageExample"},type:"array"},resultType:{const:"complete"}},required:["messages"],type:"object"},completedReadResourceResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},cacheScope:{enum:["public","private"]},contents:{items:{$ref:"#/$defs/resourceContents"},minItems:1,type:"array"},resultType:{const:"complete"},ttlMs:{minimum:0,type:"number"}},required:["contents"],type:"object"},completedToolResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},content:{items:{$ref:"#/$defs/toolResultContent"},type:"array"},isError:{type:"boolean"},resultType:{const:"complete"},structuredContent:{$ref:"#/$defs/jsonValue"}},required:["content"],type:"object"},completionArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],type:"object"},completionContext:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},minProperties:1,type:"object"}},required:["arguments"],type:"object"},completionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},required:["argument","result"],type:"object"},completionExamples:{additionalProperties:{$ref:"#/$defs/completionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},completionResult:{additionalProperties:!0,properties:{hasMore:{type:"boolean"},total:{minimum:0,type:"integer"},values:{items:{type:"string"},maxItems:100,type:"array"}},required:["values"],type:"object"},componentMap:{minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},components:{additionalProperties:!1,minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]}},type:"object"},contact:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{email:{format:"email",type:"string"},name:{type:"string"},url:{format:"uri",type:"string"}},type:"object"},elicitationDeclaration:{additionalProperties:!1,oneOf:[{not:{required:["url"]},properties:{mode:{const:"form"}},required:["requestedSchema"]},{not:{required:["requestedSchema"]},properties:{mode:{const:"url"}}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{message:{minLength:1,type:"string"},mode:{enum:["form","url"]},name:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},onCancel:{minLength:1,type:"string"},onDecline:{minLength:1,type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{format:"uri",type:"string"},when:{minLength:1,type:"string"}},required:["name","mode","message"],type:"object"},elicitationFormOption:{additionalProperties:!1,properties:{const:{type:"string"},title:{type:"string"}},required:["const","title"],type:"object"},elicitationFormProperty:{oneOf:[{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},format:{enum:["email","uri","date","date-time"]},maxLength:{minimum:0,type:"integer"},minLength:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"string"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"number"},description:{type:"string"},maximum:{type:"number"},minimum:{type:"number"},title:{type:"string"},type:{enum:["number","integer"]}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"boolean"},description:{type:"string"},title:{type:"string"},type:{const:"boolean"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},enum:{items:{type:"string"},type:"array"},enumNames:{items:{type:"string"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},oneOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","oneOf"],type:"object"},{additionalProperties:!1,properties:{default:{items:{type:"string"},type:"array"},description:{type:"string"},items:{oneOf:[{additionalProperties:!1,properties:{enum:{items:{type:"string"},type:"array"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{anyOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"}},required:["anyOf"],type:"object"}]},maxItems:{minimum:0,type:"integer"},minItems:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"array"}},required:["type","items"],type:"object"}]},elicitationFormSchema:{additionalProperties:!1,properties:{$schema:{format:"uri",type:"string"},properties:{additionalProperties:{$ref:"#/$defs/elicitationFormProperty"},type:"object"},required:{items:{type:"string"},type:"array",uniqueItems:!0},type:{const:"object"}},required:["type","properties"],type:"object"},elicitationInteractionAcceptedResponse:{additionalProperties:!1,properties:{action:{const:"accept"},content:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"}},required:["action"],type:"object"},elicitationInteractionDeclinedResponse:{additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"},elicitationInteractionFormRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"form"},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},required:["mode","message","requestedSchema"],type:"object"},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},elicitationInteractionUrlRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"url"},url:{format:"uri",type:"string"}},required:["mode","message","url"],type:"object"},execution:{additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"},extensionCapabilities:{additionalProperties:{type:"object"},minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},type:"object"},icon:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"},icons:{items:{$ref:"#/$defs/icon"},minItems:1,type:"array"},info:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{contact:{$ref:"#/$defs/contact"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},id:{type:"string"},license:{$ref:"#/$defs/license"},name:{minLength:1,type:"string"},title:{type:"string"},version:{minLength:1,type:"string"},websiteUrl:{format:"uri",type:"string"}},required:["name","version"],type:"object"},jsonSchemaObject:{additionalProperties:!0,type:"object"},jsonValue:{oneOf:[{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},{items:{$ref:"#/$defs/jsonValue"},type:"array"},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},license:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},url:{format:"uri",type:"string"}},required:["name"],type:"object"},metaObject:{additionalProperties:!0,propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},type:"object"},oauthFlow:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationUrl:{format:"uri",type:"string"},refreshUrl:{format:"uri",type:"string"},scopes:{additionalProperties:{type:"string"},type:"object"},tokenUrl:{format:"uri",type:"string"}},required:["scopes"],type:"object"},oauthFlows:{additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]}},type:"object"},prompt:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},arguments:{items:{$ref:"#/$defs/promptArgument"},minItems:1,type:"array"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/promptExamples"},icons:{$ref:"#/$defs/icons"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name"],type:"object"},promptArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{type:"string"},required:{type:"boolean"},title:{type:"string"}},required:["name"],type:"object"},promptExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},type:"object"},result:{$ref:"#/$defs/completedPromptResultExample"}},required:["result"],type:"object"},promptExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},promptMessageExample:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},protocolVersionScope:{items:{$ref:"#/$defs/supportedProtocolVersion"},minItems:1,type:"array",uniqueItems:!0},referenceObject:{additionalProperties:!1,properties:{$componentRef:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$",type:"string"}},required:["$componentRef"],type:"object"},resource:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"},resourceAnnotations:{additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"},resourceContents:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},mimeType:{type:"string"},text:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},blob:{type:"string"},mimeType:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","blob"],type:"object"}]},resourceExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},required:["result"],type:"object"},resourceExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},resourceTemplate:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"},resourceTemplateExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"},uri:{format:"uri",type:"string"}},required:["uri","result"],type:"object"},resourceTemplateExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},rootDeclaration:{additionalProperties:!1,properties:{name:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri"],type:"object"},rootsListRequest:{additionalProperties:!1,maxProperties:0,type:"object"},rootsListResult:{additionalProperties:!1,properties:{roots:{items:{$ref:"#/$defs/rootDeclaration"},type:"array"}},required:["roots"],type:"object"},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingCreateMessageRequest:{additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},samplingCreateMessageResult:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},role:{const:"assistant"},stopReason:{type:"string"}},required:["role","content","model"],type:"object"},samplingMessage:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{items:{$ref:"#/$defs/samplingContentBlock"},minItems:1,type:"array"}]},samplingModelHint:{additionalProperties:!1,properties:{name:{minLength:1,type:"string"}},required:["name"],type:"object"},samplingModelPreferences:{additionalProperties:!1,properties:{costPriority:{maximum:1,minimum:0,type:"number"},hints:{items:{$ref:"#/$defs/samplingModelHint"},minItems:1,type:"array"},intelligencePriority:{maximum:1,minimum:0,type:"number"},speedPriority:{maximum:1,minimum:0,type:"number"}},type:"object"},samplingRequestTool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{annotations:{$ref:"#/$defs/toolAnnotations"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]},name:{minLength:1,type:"string"},title:{type:"string"}},required:["name","inputSchema"],type:"object"},samplingToolChoice:{additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},samplingToolResultContent:{additionalProperties:!1,properties:{content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{items:{$ref:"#/$defs/toolResultContent"},minItems:1,type:"array"}]},isError:{type:"boolean"},toolUseId:{type:"string"},type:{const:"tool_result"}},required:["type","toolUseId","content"],type:"object"},samplingToolUseContent:{additionalProperties:!1,properties:{id:{type:"string"},input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},name:{type:"string"},type:{const:"tool_use"}},required:["type","id","name","input"],type:"object"},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},securityRequirement:{additionalProperties:{items:{type:"string"},type:"array",uniqueItems:!0},propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},securityRequirementArray:{items:{$ref:"#/$defs/securityRequirement"},type:"array"},securityScheme:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]},securitySchemeMap:{additionalProperties:{$ref:"#/$defs/securityScheme"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},supportedProtocolVersion:{enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"],type:"string"},tag:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{minLength:1,type:"string"}},required:["name"],type:"object"},tool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"},toolAnnotations:{additionalProperties:!0,properties:{destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"},readOnlyHint:{type:"boolean"},title:{type:"string"}},type:"object"},toolExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"}},required:["input","result"],type:"object"},toolExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionElicitationStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{declaration:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"},type:{const:"elicitation"}},required:["type","request","response"],type:"object"},toolInteractionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"},steps:{items:{$ref:"#/$defs/toolInteractionStep"},minItems:1,type:"array"}},required:["input","steps","result"],type:"object"},toolInteractionExamples:{additionalProperties:{$ref:"#/$defs/toolInteractionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionRootsStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"},type:{const:"roots"}},required:["type","request","response"],type:"object"},toolInteractionSamplingStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"},type:{const:"sampling"}},required:["type","request","response"],type:"object"},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolResultContent:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},transport:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"streamable-http"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{args:{items:{type:"string"},type:"array"},command:{type:"string"},env:{additionalProperties:{type:"string"},type:"object"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"stdio"}},required:["type","command"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"sse"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"}]}}};var Hp=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),me=new Map(Hp.map((t,s)=>[t,s])),ss="2025-11-25",gm="2025-06-18",gl=Object.freeze({effectiveDate:"2026-09-04",source:"https://modelcontextprotocol.io/extensions/overview",officialIdentifiers:Object.freeze(["io.modelcontextprotocol/enterprise-managed-authorization","io.modelcontextprotocol/oauth-client-credentials","io.modelcontextprotocol/tasks","io.modelcontextprotocol/ui"]),experimentalIdentifiers:Object.freeze([])}),K$=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function bl(t){return gl.officialIdentifiers.includes(t)?"official":gl.experimentalIdentifiers.includes(t)?"experimental":"uncatalogued"}function bm(t){let s=t==="2020-12"?qe:Me,d=new s({allErrors:!0,strict:!1});return Oe(d),d}function ms(t){return[...t].sort((s,d)=>me.get(s)-me.get(d))}function bt(t,s,d){return ms(s?.protocolVersions??d??t.protocolVersions??[])}function Hu(t,s){let d=new Set(s);return t.filter(b=>d.has(b))}function B$(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let d of Object.values(t.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function Yu(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function Gu(t){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(t),externalReferences:s}}function G(t,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:d,path:b}}function Q$(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function Y$(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let d=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function Wu(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function G$(t,s,d){let b=ms(t.protocolVersions??[]),u=b.filter(r=>me.get(r)0;else return!1;return l?c||d.push(G("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...p,r])):d.push(G("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...p,r])),!0}function e(r,a,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[p,l]of Object.entries(r)){if(!K$.test(p)){d.push(G("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(p)}`,[...n,p]));continue}for(let c of o.filter(h=>me.get(h)>=me.get(gm)))f(p,l,a,c,i,n)||Y$(p,c)&&d.push(G("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(p)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,p]))}}for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{let n=bt(t,o,b),p=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...p,"_meta"]),r==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(r!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function X$(t,s,d){let b=new Set;if((t.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(G("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,f]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])f.forEach((e,r)=>{(e.tags??[]).forEach((a,o)=>{b.has(a)||d.push(G("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(a)}`,[u,r,"tags",o]))})})}function eP(t,s,d){let b=t.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([r,a])=>[r,B$(a)]));function e(r,a,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[p,l]of Object.entries(i)){if(!u.has(p)){d.push(G("unknown-security-scheme","error",`${a}[${n}] references unknown security scheme ${JSON.stringify(p)}`,[...o,n,p]));continue}let c=b[p];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(G("duplicate-security-scope","error",`${a}[${n}].${p} contains duplicate scope values`,[...o,n,p])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(G("non-oauth-scope-misuse","error",`${a}[${n}].${p} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,p])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(p)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(G("uncatalogued-oauth-scope","warning",`${a}[${n}].${p} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,p,y]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,a)=>{e(r.security,`transports[${a}].security`,["transports",a,"security"])});for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function tP(t,s,d){let b=ms(t.protocolVersions??[]),u=new Set;function f(r,a,o,i){let n=new Set(a);for(let p of r)n.has(p)||d.push(G("protocol-scope-outside-parent","error",`${o} includes protocol version ${p} outside its parent scope`,i))}(t.transports??[]).forEach((r,a)=>{let o=bt(t,r,b);f(o,b,`transports[${a}].protocolVersions`,["transports",a,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of b)u.has(r)||d.push(G("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,a)=>{let o=bt(t,r,b);f(o,b,`capabilities[${a}].protocolVersions`,["capabilities",a,"protocolVersions"])});for(let r=0;r0&&d.push(G("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${a}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,a,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;a.forEach((n,p)=>{let l=n[o],c=bt(t,n,b);f(c,b,`${r}[${p}].protocolVersions`,[r,p,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=bt(t,m,c);f(y,c,`${r}[${p}].elicitations[${w}].protocolVersions`,[r,p,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=Hu(c,m.scope);w.length>0&&d.push(G("primitive-scope-overlap","error",`${r}[${p}] with identifier ${JSON.stringify(l)} overlaps ${r}[${m.index}] for protocol versions ${w.join(", ")}`,[r,p,"protocolVersions"]))}h.push({index:p,scope:c}),i.set(l,h)})}}function rP(t,s,d){let b=ms(t.protocolVersions??[]);function u(f,e,r,a){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(G("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...a,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(G("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...a,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let p=`${r}.properties[${JSON.stringify(i)}]`,l=[...a,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(G("elicitation-form-schema-version-mismatch","error",`${p} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(G("elicitation-form-schema-version-mismatch","error",`${p}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(G("elicitation-form-enum-names-mismatch","error",`${p}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(G("elicitation-form-default-outside-enum","error",`${p}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(G("elicitation-form-default-outside-enum","error",`${p}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(G("elicitation-form-invalid-range","error",`${p}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(G("elicitation-form-invalid-range","error",`${p}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(G("elicitation-form-invalid-range","error",`${p}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,a)=>{let o=bt(t,r,b),i=new Set;(r.elicitations??[]).forEach((n,p)=>{let l=`${f}[${a}].elicitations[${p}]`,c=[f,a,"elicitations",p];i.has(n.name)&&d.push(G("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=bt(t,n,o);for(let m of h)me.get(m){let a=bt(t,e,b);if(e.type==="streamable-http")for(let o of a)me.get(o)>=me.get("2025-03-26")||d.push(G("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of a)me.get(o){let a=bt(t,e,b),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",a),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",a),u(`tools[${r}]`,o,e,"_meta","2025-06-18",a),u(`tools[${r}]`,o,e,"annotations","2025-03-26",a),f(`tools[${r}]`,o,e,"execution","2025-11-25",a),u(`tools[${r}]`,o,e,"icons","2025-11-25",a)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((a,o)=>{let i=bt(t,a,b),n=[e,o];if(u(`${e}[${o}]`,n,a,"title","2025-06-18",i),u(`${e}[${o}]`,n,a,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,a,"icons","2025-11-25",i),e!=="prompts"&&a.annotations?.lastModified!==void 0)for(let p of i)me.get(p)>=me.get("2025-06-18")||d.push(G("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${p}`,[...n,"annotations","lastModified"]));e==="prompts"&&(a.arguments??[]).forEach((p,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],p,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let a=bt(t,e,b),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",a),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",a),a.includes("2026-07-28")&&d.push(G("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of a)me.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of iP){let i=b[o];Array.isArray(i)?i.forEach((n,p)=>d(n,`${u}.${o}[${p}]`,[...f,o,p],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let a=b.dependencies;if(a&&typeof a=="object"&&!Array.isArray(a))for(let[o,i]of Object.entries(a))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(t,"inputSchema",["inputSchema"],!0,!1),s}function lP(t,s,d,b,u){let f=pP(t.inputSchema);if(!f.length)return;for(let r of d)r!=="2026-07-28"&&u.push(G("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of f){let a=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(G("invalid-x-mcp-header","error",`${a} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(G("invalid-x-mcp-header","error",`${a} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(G("invalid-x-mcp-header","error",`${a} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(G("duplicate-x-mcp-header","error",`${a} duplicates ${n} case-insensitively`,o)):e.set(i,a)}}function mP(t,s,d,b,u){if(Object.hasOwn(t,"properties")){let f=t.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(G("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${ss}`,[...d,"properties"]));else for(let[e,r]of Object.entries(f))r&&typeof r=="object"&&!Array.isArray(r)||u.push(G("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${ss}`,[...d,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(f=>typeof f!="string"))&&u.push(G("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${ss}`,[...d,"required"]))}function fP(t,s,d){let b=ms(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{let e=bt(t,u,b);for(let r of["inputSchema","outputSchema"]){let a=u[r];if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`tools[${f}].${r}`,i=["tools",f,r],n=e.some(l=>me.get(l)me.get(l)>=me.get(ss));if(Object.hasOwn(a,"$schema"))for(let l of e)me.get(l)>=me.get(ss)||d.push(G("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${ss} or later`,[...i,"$schema"]));if(n&&mP(a,o,i,s,d),p){let l=Yu(a);if(!l)d.push(G("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(a.$schema)}`,[...i,"$schema"]));else{let c=bm(l);try{if(c.validateSchema(a,!0))c.compile(a);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(G("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=Gu(a);try{if(!m.externalReferences.length)throw h;bm(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(G("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(G("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(r==="outputSchema"&&a.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(G("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}lP(u,f,e,s,d)})}function Ku(t,s,d,b,u,f){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(G("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of t.required??[])Object.hasOwn(s,e)||f.push(G("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||f.push(G("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function Bu(t,s,d,b,u,f){let e=Yu(t);if(!e)return;let r=Gu(t);if(r.externalReferences.length){let a=[...new Set(r.externalReferences)].sort();f.push(G("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${a.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let a=bm(e).compile(t);if(!a(s)){let o=a.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(G("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function uP(t,s,d){let b=ms(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=bt(t,u,b),r=e.filter(o=>me.get(o)me.get(o)>=me.get(ss));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,p=["tools",f,"examples",o],l=i.result??{},c=[...p,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(G("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(G("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(G("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(G("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&me.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&me.get(m){Object.hasOwn(r,"_meta")&&me.get(e){let n=`${b}.result.contents[${i}]`,p=[...u,"result","contents",i];if(o.uri===s&&(a=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(G("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...p,"mimeType"])),t.size!==void 0)){let l=typeof o.text=="string"?aP.encode(o.text).byteLength:typeof o.blob=="string"&&Qu(o.blob)?cP(o.blob):void 0;l!==void 0&&l!==t.size&&e.push(G("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${t.size}`,p))}typeof o.blob=="string"&&!Qu(o.blob)&&e.push(G("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...p,"blob"]))}),a||e.push(G("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function hP(t,s,d){let b=ms(t.protocolVersions??[]);for(let[u,f]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])f.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let a=bt(t,e,b),o;if(u==="resourceTemplates")try{o=new De,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(G("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${u}[${r}].examples[${JSON.stringify(i)}]`,l=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(G("resource-template-example-invalid-expansion","error",`${p}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),yP(c,a,`${p}.result`,[...l,"result"],s,d),typeof h=="string"&&dP(e,h,c,p,l,s,d)}})}function $m(t,s="document"){let d=[];return tP(t,s,d),eP(t,s,d),X$(t,s,d),sP(t,s,d),rP(t,s,d),G$(t,s,d),fP(t,s,d),uP(t,s,d),hP(t,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var wm="__interaction_example__",jm=new qe({allErrors:!0,strict:!1});Oe(jm);var tc=new Me({allErrors:!0,strict:!1});Oe(tc);var Xu=jm.compile(Ju),rc=["tools","resources","resourceTemplates","prompts"],gP=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],bP=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),Ie=new Map(Hp.map((t,s)=>[t,s])),$P={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function fe(t,s,d,b){return{code:t,severity:s,message:d,path:b}}function PP(t){if(typeof t!="string"||!t.includes("/"))return!1;let s=t.slice(0,t.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function Wp(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function Pm(t,s,d,b){return{code:t,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function vm(t,s="document"){let d=structuredClone(t),b=[],u=[],f=0;function e(a,o,i,n=[]){let p=/^#\/components\/([^/]+)\/([^/]+)$/.exec(a?.$componentRef??"");if(!p)return a;let[,l,c]=p;if(l!==o)return b.push(Pm("wrong-component-reference-namespace",s,`must target #/components/${o}, not #/components/${l}`,i)),{value:a};let h=`${l}/${c}`;if(n.includes(h))return b.push(Pm("component-reference-cycle",s,`forms a cycle through ${[...n,h].join(" -> ")}`,i)),{value:a};let m=t?.components?.[l]?.[c];return m===void 0?(b.push(Pm("missing-component-reference-target",s,`targets missing component ${JSON.stringify(a.$componentRef)}`,i)),{value:a}):(f+=1,Wp(m)?e(m,o,i,[...n,h]):{value:structuredClone(m),targetPath:["components",l,c]})}function r(a,o,i,n=[]){let p=e(a,o,i,n);return p.targetPath&&u.push({referencePath:i,targetPath:p.targetPath}),p.value}for(let a of gP)for(let[o,i]of Object.entries(t?.components?.[a]??{}))Wp(i)&&(d.components[a][o]=r(i,a,["components",a,o],[`${a}/${o}`]));for(let[a,o]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates,prompts:t?.prompts}))for(let[i,n]of(o??[]).entries()){let p=d[a][i];if(a==="tools")for(let c of["inputSchema","outputSchema"])Wp(n[c])&&(p[c]=r(n[c],"schemas",[a,i,c]));let l=a==="tools"?"toolExamples":a==="resources"?"resourceExamples":a==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[c,h]of Object.entries(n.examples??{}))Wp(h)&&(p.examples[c]=r(h,l,[a,i,"examples",c]))}for(let a of rc)for(let[o,i]of(t?.[a]??[]).entries())for(let[n,p]of(i.elicitations??[]).entries())Wp(p.requestedSchema)&&(d[a][o].elicitations[n].requestedSchema=r(p.requestedSchema,"schemas",[a,o,"elicitations",n,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:f,provenance:u}}function wP(t,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function sc(t){return Xu(t)?[]:(Xu.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:wP(t,s)}))}function km(t){return Array.isArray(t)?t.map(km):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([s],[d])=>s.localeCompare(d)).map(([s,d])=>[s,km(d)])):t}function ec(t){return JSON.stringify(km(t))}function kP(t,s,d){if(!Array.isArray(t.path))return t;let b=["tools",0,"examples",wm];return b.every((f,e)=>t.path[e]===f)?{...t,message:t.message.replace(`tools[0].examples[${JSON.stringify(wm)}]`,`tools[${s}].interactionExamples[${JSON.stringify(d)}]`),path:["tools",s,"interactionExamples",d,...t.path.slice(b.length)]}:t}function jP(t,s,d,b,u){let f={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:t.name,inputSchema:structuredClone(t.inputSchema),...t.outputSchema?{outputSchema:structuredClone(t.outputSchema)}:{},examples:{[wm]:{input:structuredClone(b.input),result:structuredClone(b.result)}}}]};return $m(f).map(e=>kP(e,s,d)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function vP(t,s,d,b,u){try{let f=jm.compile(t);if(!f(s)){let e=f.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(fe("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{try{let f=tc.compile(t);if(!f(s)){let e=f.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(fe("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{}}}function OP(t,s,d,b,u){let f=t.clientRequirements;if(!f||typeof f!="object"||Array.isArray(f))return;function e(r,a){u.push(fe("interaction-example-client-requirements-contradiction","warning",`${d} ${r}`,a))}if(s.type==="roots"){Object.hasOwn(f,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...b,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(f,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...b,"type"]);return}let r=f.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(r,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...b,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(r,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...b,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(f,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...b,"type"]);return}let r=f.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(r,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...b,"request","mode"]),s.request.mode==="form"&&Object.keys(r).length>0&&!Object.hasOwn(r,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...b,"request","mode"])}}function qP(t){let s=[],d=t.protocolVersions??[];for(let[b,u]of(t.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let f=u.protocolVersions??d;for(let[e,r]of Object.entries(u.interactionExamples)){if(!r||typeof r!="object"||Array.isArray(r))continue;let a=`tools[${b}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",b,"interactionExamples",e];s.push(...jP(u,b,e,r,f));for(let[i,n]of(r.steps??[]).entries()){let p=`${a}.steps[${i}]`,l=[...o,"steps",i];if(OP(u,n,p,l,s),n.type==="elicitation"){let c=n.request??{},h=n.response??{},m=typeof n.declaration=="string"?(u.elicitations??[]).find(w=>w.name===n.declaration):void 0;for(let w of f)Ie.get(w)[r.name,r]));for(let[r,a]of Object.entries(u.examples)){if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`prompts[${b}].examples[${JSON.stringify(r)}]`,i=["prompts",b,"examples",r],n=a.result??{},p=[...i,"result"],l=a.arguments;if(l&&typeof l=="object"&&!Array.isArray(l))for(let[c]of Object.entries(l))e.has(c)||s.push(fe("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,h]of e)h.required===!0&&!Object.hasOwn(l??{},c)&&s.push(fe("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(fe("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...p,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(fe("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...p,c]));for(let c of f){let h=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(fe("prompt-example-result-version-mismatch","error",`${h}.resultType must be "complete" for MCP ${c}`,[...p,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(fe("prompt-example-result-version-mismatch","error",`${h}.resultType is not defined for MCP ${c}`,[...p,"resultType"])),Object.hasOwn(n,"_meta")&&Ie.get(c){let y=`${h}.messages[${w}].content`,$=[...p,"messages",w,"content"];xP(m.content??{},y,$,c,s)})}}}return s}function EP(t){let s=new De;return s.add(t),new Set(s.templates.flatMap(d=>d.parts).filter(d=>d.type==="expression").flatMap(d=>d.expressions.map(b=>b.name)))}function NP(t,s,d,b,u){let f=`${s}.result`,e=[...d,"result"];for(let r of["jsonrpc","id","error"])Object.hasOwn(t,r)&&u.push(fe("completion-example-json-rpc-envelope","error",`${f} must not contain JSON-RPC envelope field ${JSON.stringify(r)}`,[...e,r]));for(let r of["task","inputRequests","requestState"])Object.hasOwn(t,r)&&u.push(fe("incomplete-completion-example-result","error",`${f} must not contain non-completed workflow field ${JSON.stringify(r)}`,[...e,r]));b==="2026-07-28"&&t.resultType!=="complete"&&u.push(fe("completion-example-result-version-mismatch","error",`${f}.resultType must be "complete" for MCP ${b}`,[...e,"resultType"])),b!=="2026-07-28"&&Object.hasOwn(t,"resultType")&&u.push(fe("completion-example-result-version-mismatch","error",`${f}.resultType is not defined for MCP ${b}`,[...e,"resultType"])),Object.hasOwn(t,"_meta")&&Ie.get(b)i.name));else try{o=EP(e.uriTemplate)}catch(i){s.push(fe("resource-template-completion-example-invalid-template","error",`${a}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[b,f,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${a}.completionExamples[${JSON.stringify(i)}]`,l=[b,f,"completionExamples",i],c=n.argument?.name,h=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(fe(b==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",b==="prompts"?`${p}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${p}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...l,"argument","name"])),h&&typeof h=="object"&&!Array.isArray(h))for(let w of Object.keys(h))o&&!o.has(w)&&s.push(fe(b==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",b==="prompts"?`${p}.context.arguments contains undeclared Prompt argument ${JSON.stringify(w)}`:`${p}.context.arguments contains no RFC 6570 variable ${JSON.stringify(w)} from ${JSON.stringify(e.uriTemplate)}`,[...l,"context","arguments",w])),w===c&&s.push(fe("completion-example-duplicate-target-context","error",`${p}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(w)}`,[...l,"context","arguments",w]));let m=n.result??{};for(let w of r){if(Ie.get(w)e.code!=="transport-coverage-gap")).sort((e,r)=>e.code.localeCompare(r.code)||e.message.localeCompare(r.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(r.path)))}function ic(t){let s=sc(t);return s.length?s:TP(t)}var Om="0.8.0-rc.2",ZP="v0.8.0-rc.2",SP="40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8";function IP(t){let s=ic(t);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var Vm={};cs(Vm,{schemaSha256:()=>O0,snapshotTag:()=>v0,specification:()=>Cm,supportedProtocolVersions:()=>Kp,validate:()=>q0});var oc={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json",title:"MCP Description",description:"MCP Description 0.8.0 Release Candidate 3 (v0.8.0-rc.3; prerelease).",type:"object",required:["mcpdesc","info","protocolVersions"],additionalProperties:!1,properties:{$schema:{type:"string"},capabilities:{items:{$ref:"#/$defs/capabilities"},minItems:1,type:"array"},components:{$ref:"#/$defs/components"},info:{$ref:"#/$defs/info"},instructions:{type:"string"},mcpdesc:{const:"0.8.0",type:"string"},prompts:{items:{$ref:"#/$defs/prompt"},minItems:1,type:"array"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resourceTemplates:{items:{$ref:"#/$defs/resourceTemplate"},minItems:1,type:"array"},resources:{items:{$ref:"#/$defs/resource"},minItems:1,type:"array"},security:{$ref:"#/$defs/securityRequirementArray"},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},tags:{items:{$ref:"#/$defs/tag"},minItems:1,type:"array"},tools:{items:{$ref:"#/$defs/tool"},minItems:1,type:"array"},transports:{items:{$ref:"#/$defs/transport"},minItems:1,type:"array"}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},$defs:{capabilities:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"},capabilityPrompts:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},capabilityResources:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"},subscribe:{type:"boolean"}},type:"object"},capabilityTools:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},clientCapabilityRequirements:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{elicitation:{$ref:"#/$defs/clientCapabilityValue"},experimental:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"}},type:"object"},clientCapabilityValue:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},completedCompletionResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},completion:{$ref:"#/$defs/completionResult"},resultType:{const:"complete"}},required:["completion"],type:"object"},completedPromptResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},description:{type:"string"},messages:{items:{$ref:"#/$defs/promptMessageExample"},type:"array"},resultType:{const:"complete"}},required:["messages"],type:"object"},completedReadResourceResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},cacheScope:{enum:["public","private"]},contents:{items:{$ref:"#/$defs/resourceContents"},minItems:1,type:"array"},resultType:{const:"complete"},ttlMs:{minimum:0,type:"number"}},required:["contents"],type:"object"},completedToolResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},content:{items:{$ref:"#/$defs/toolResultContent"},type:"array"},isError:{type:"boolean"},resultType:{const:"complete"},structuredContent:{$ref:"#/$defs/jsonValue"}},required:["content"],type:"object"},completionArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],type:"object"},completionContext:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},minProperties:1,type:"object"}},required:["arguments"],type:"object"},completionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},required:["argument","result"],type:"object"},completionExamples:{additionalProperties:{$ref:"#/$defs/completionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},completionResult:{additionalProperties:!0,properties:{hasMore:{type:"boolean"},total:{minimum:0,type:"integer"},values:{items:{type:"string"},maxItems:100,type:"array"}},required:["values"],type:"object"},componentMap:{minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},components:{additionalProperties:!1,minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]}},type:"object"},contact:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{email:{format:"email",type:"string"},name:{type:"string"},url:{format:"uri",type:"string"}},type:"object"},elicitationDeclaration:{additionalProperties:!1,oneOf:[{not:{required:["url"]},properties:{mode:{const:"form"}},required:["requestedSchema"]},{not:{required:["requestedSchema"]},properties:{mode:{const:"url"}}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{message:{minLength:1,type:"string"},mode:{enum:["form","url"]},name:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},onCancel:{minLength:1,type:"string"},onDecline:{minLength:1,type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{format:"uri",type:"string"},when:{minLength:1,type:"string"}},required:["name","mode","message"],type:"object"},elicitationFormOption:{additionalProperties:!1,properties:{const:{type:"string"},title:{type:"string"}},required:["const","title"],type:"object"},elicitationFormProperty:{oneOf:[{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},format:{enum:["email","uri","date","date-time"]},maxLength:{minimum:0,type:"integer"},minLength:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"string"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"number"},description:{type:"string"},maximum:{type:"number"},minimum:{type:"number"},title:{type:"string"},type:{enum:["number","integer"]}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"boolean"},description:{type:"string"},title:{type:"string"},type:{const:"boolean"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},enum:{items:{type:"string"},type:"array"},enumNames:{items:{type:"string"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},oneOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","oneOf"],type:"object"},{additionalProperties:!1,properties:{default:{items:{type:"string"},type:"array"},description:{type:"string"},items:{oneOf:[{additionalProperties:!1,properties:{enum:{items:{type:"string"},type:"array"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{anyOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"}},required:["anyOf"],type:"object"}]},maxItems:{minimum:0,type:"integer"},minItems:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"array"}},required:["type","items"],type:"object"}]},elicitationFormSchema:{additionalProperties:!1,properties:{$schema:{format:"uri",type:"string"},properties:{additionalProperties:{$ref:"#/$defs/elicitationFormProperty"},type:"object"},required:{items:{type:"string"},type:"array",uniqueItems:!0},type:{const:"object"}},required:["type","properties"],type:"object"},elicitationInteractionAcceptedResponse:{additionalProperties:!1,properties:{action:{const:"accept"},content:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"}},required:["action"],type:"object"},elicitationInteractionDeclinedResponse:{additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"},elicitationInteractionFormRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"form"},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},required:["mode","message","requestedSchema"],type:"object"},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},elicitationInteractionUrlRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"url"},url:{format:"uri",type:"string"}},required:["mode","message","url"],type:"object"},execution:{additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"},extensionCapabilities:{additionalProperties:{type:"object"},minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},type:"object"},icon:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"},icons:{items:{$ref:"#/$defs/icon"},minItems:1,type:"array"},info:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{contact:{$ref:"#/$defs/contact"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},id:{type:"string"},license:{$ref:"#/$defs/license"},name:{minLength:1,type:"string"},title:{type:"string"},version:{minLength:1,type:"string"},websiteUrl:{format:"uri",type:"string"}},required:["name","version"],type:"object"},jsonSchemaObject:{additionalProperties:!0,type:"object"},jsonValue:{oneOf:[{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},{items:{$ref:"#/$defs/jsonValue"},type:"array"},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},license:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},url:{format:"uri",type:"string"}},required:["name"],type:"object"},metaObject:{additionalProperties:!0,propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},type:"object"},oauthFlow:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationUrl:{format:"uri",type:"string"},refreshUrl:{format:"uri",type:"string"},scopes:{additionalProperties:{type:"string"},type:"object"},tokenUrl:{format:"uri",type:"string"}},required:["scopes"],type:"object"},oauthFlows:{additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]}},type:"object"},prompt:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},arguments:{items:{$ref:"#/$defs/promptArgument"},minItems:1,type:"array"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/promptExamples"},icons:{$ref:"#/$defs/icons"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name"],type:"object"},promptArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{type:"string"},required:{type:"boolean"},title:{type:"string"}},required:["name"],type:"object"},promptExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},type:"object"},result:{$ref:"#/$defs/completedPromptResultExample"}},required:["result"],type:"object"},promptExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},promptMessageExample:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},protocolVersionScope:{items:{$ref:"#/$defs/supportedProtocolVersion"},minItems:1,type:"array",uniqueItems:!0},referenceObject:{additionalProperties:!1,properties:{$componentRef:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$",type:"string"}},required:["$componentRef"],type:"object"},resource:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"},resourceAnnotations:{additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"},resourceContents:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},mimeType:{type:"string"},text:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},blob:{type:"string"},mimeType:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","blob"],type:"object"}]},resourceExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},required:["result"],type:"object"},resourceExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},resourceTemplate:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"},resourceTemplateExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"},uri:{format:"uri",type:"string"}},required:["uri","result"],type:"object"},resourceTemplateExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},rootDeclaration:{additionalProperties:!1,properties:{name:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri"],type:"object"},rootsListRequest:{additionalProperties:!1,maxProperties:0,type:"object"},rootsListResult:{additionalProperties:!1,properties:{roots:{items:{$ref:"#/$defs/rootDeclaration"},type:"array"}},required:["roots"],type:"object"},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingCreateMessageRequest:{additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},samplingCreateMessageResult:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},role:{const:"assistant"},stopReason:{type:"string"}},required:["role","content","model"],type:"object"},samplingMessage:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{items:{$ref:"#/$defs/samplingContentBlock"},minItems:1,type:"array"}]},samplingModelHint:{additionalProperties:!1,properties:{name:{minLength:1,type:"string"}},required:["name"],type:"object"},samplingModelPreferences:{additionalProperties:!1,properties:{costPriority:{maximum:1,minimum:0,type:"number"},hints:{items:{$ref:"#/$defs/samplingModelHint"},minItems:1,type:"array"},intelligencePriority:{maximum:1,minimum:0,type:"number"},speedPriority:{maximum:1,minimum:0,type:"number"}},type:"object"},samplingRequestTool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{annotations:{$ref:"#/$defs/toolAnnotations"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]},name:{minLength:1,type:"string"},title:{type:"string"}},required:["name","inputSchema"],type:"object"},samplingToolChoice:{additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},samplingToolResultContent:{additionalProperties:!1,properties:{content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{items:{$ref:"#/$defs/toolResultContent"},minItems:1,type:"array"}]},isError:{type:"boolean"},toolUseId:{type:"string"},type:{const:"tool_result"}},required:["type","toolUseId","content"],type:"object"},samplingToolUseContent:{additionalProperties:!1,properties:{id:{type:"string"},input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},name:{type:"string"},type:{const:"tool_use"}},required:["type","id","name","input"],type:"object"},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},securityRequirement:{additionalProperties:{items:{type:"string"},type:"array",uniqueItems:!0},propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},securityRequirementArray:{items:{$ref:"#/$defs/securityRequirement"},type:"array"},securityScheme:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]},securitySchemeMap:{additionalProperties:{$ref:"#/$defs/securityScheme"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},supportedProtocolVersion:{enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"],type:"string"},tag:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{minLength:1,type:"string"}},required:["name"],type:"object"},tool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"},toolAnnotations:{additionalProperties:!0,properties:{destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"},readOnlyHint:{type:"boolean"},title:{type:"string"}},type:"object"},toolExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"}},required:["input","result"],type:"object"},toolExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionElicitationStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{declaration:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"},type:{const:"elicitation"}},required:["type","request","response"],type:"object"},toolInteractionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"},steps:{items:{$ref:"#/$defs/toolInteractionStep"},minItems:1,type:"array"}},required:["input","steps","result"],type:"object"},toolInteractionExamples:{additionalProperties:{$ref:"#/$defs/toolInteractionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionRootsStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"},type:{const:"roots"}},required:["type","request","response"],type:"object"},toolInteractionSamplingStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"},type:{const:"sampling"}},required:["type","request","response"],type:"object"},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolResultContent:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},transport:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"streamable-http"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{args:{items:{type:"string"},type:"array"},command:{type:"string"},env:{additionalProperties:{type:"string"},type:"object"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"stdio"}},required:["type","command"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"sse"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"}]}}};var Kp=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),ue=new Map(Kp.map((t,s)=>[t,s])),is="2025-11-25",Am="2025-06-18",xm=Object.freeze({effectiveDate:"2026-09-04",source:"https://modelcontextprotocol.io/extensions/overview",officialIdentifiers:Object.freeze(["io.modelcontextprotocol/enterprise-managed-authorization","io.modelcontextprotocol/oauth-client-credentials","io.modelcontextprotocol/tasks","io.modelcontextprotocol/ui"]),experimentalIdentifiers:Object.freeze([])}),VP=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function Em(t){return xm.officialIdentifiers.includes(t)?"official":xm.experimentalIdentifiers.includes(t)?"experimental":"uncatalogued"}function zm(t){let s=t==="2020-12"?qe:Me,d=new s({allErrors:!0,strict:!1});return Oe(d),d}function fs(t){return[...t].sort((s,d)=>ue.get(s)-ue.get(d))}function $t(t,s,d){return fs(s?.protocolVersions??d??t.protocolVersions??[])}function nc(t,s){let d=new Set(s);return t.filter(b=>d.has(b))}function DP(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let d of Object.values(t.flows??{}))for(let b of Object.keys(d?.scopes??{}))s.add(b);return s}function fc(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function uc(t){let s=[];function d(b){if(Array.isArray(b))return b.map(d);if(!b||typeof b!="object")return b;let u={};for(let[f,e]of Object.entries(b)){if(f==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[f]=d(e)}return u}return{schema:d(t),externalReferences:s}}function X(t,s,d,b){if(!Array.isArray(b))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:d,path:b}}function RP(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),d=s.split(".");if(d.length<2)return!1;let b=d[1].toLowerCase();return b==="modelcontextprotocol"||b==="mcp"}function MP(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let d=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?d.slice(0,-1).some(b=>["modelcontextprotocol","mcp"].includes(b.toLowerCase())):d.length>=2&&["modelcontextprotocol","mcp"].includes(d[1].toLowerCase())}function ac(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function UP(t,s,d){let b=fs(t.protocolVersions??[]),u=b.filter(r=>ue.get(r)0;else return!1;return l?c||d.push(X("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...p,r])):d.push(X("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...p,r])),!0}function e(r,a,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[p,l]of Object.entries(r)){if(!VP.test(p)){d.push(X("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(p)}`,[...n,p]));continue}for(let c of o.filter(h=>ue.get(h)>=ue.get(Am)))f(p,l,a,c,i,n)||MP(p,c)&&d.push(X("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(p)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,p]))}}for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{let n=$t(t,o,b),p=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...p,"_meta"]),r==="tools")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.content??[]).forEach((y,$)=>{let g=`${m}.content[${$}]`,O=[...w,"content",$];e(y?._meta,"content",n,`${g}._meta`,[...O,"_meta"]),y?.type==="resource"&&e(y.resource?._meta,"content",n,`${g}.resource._meta`,[...O,"resource","_meta"])})}else if(r!=="prompts")for(let[l,c]of Object.entries(o.examples??{})){let h=c?.result;if(!h||typeof h!="object"||Array.isArray(h))continue;let m=`${r}[${i}].examples[${JSON.stringify(l)}].result`,w=[...p,"examples",l,"result"];e(h._meta,"result",n,`${m}._meta`,[...w,"_meta"]),(h.contents??[]).forEach((y,$)=>{e(y?._meta,"content",n,`${m}.contents[${$}]._meta`,[...w,"contents",$,"_meta"])})}})}function LP(t,s,d){let b=new Set;if((t.tags??[]).forEach((u,f)=>{if(b.has(u.name)){d.push(X("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",f,"name"]));return}b.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,f]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])f.forEach((e,r)=>{(e.tags??[]).forEach((a,o)=>{b.has(a)||d.push(X("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(a)}`,[u,r,"tags",o]))})})}function FP(t,s,d){let b=t.securitySchemes??{},u=new Set(Object.keys(b)),f=new Map(Object.entries(b).map(([r,a])=>[r,DP(a)]));function e(r,a,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[p,l]of Object.entries(i)){if(!u.has(p)){d.push(X("unknown-security-scheme","error",`${a}[${n}] references unknown security scheme ${JSON.stringify(p)}`,[...o,n,p]));continue}let c=b[p];if(!Array.isArray(l))continue;if(l.filter((m,w)=>l.indexOf(m)!==w).length&&d.push(X("duplicate-security-scope","error",`${a}[${n}].${p} contains duplicate scope values`,[...o,n,p])),(c.type==="http"||c.type==="apiKey")&&l.length>0&&d.push(X("non-oauth-scope-misuse","error",`${a}[${n}].${p} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,p])),c.type==="oauth2"||c.type==="openIdConnect"){let m=f.get(p)??new Set;l.forEach((w,y)=>{m.has(w)||d.push(X("uncatalogued-oauth-scope","warning",`${a}[${n}].${p} references scope ${JSON.stringify(w)} that is not present in the declared static scope catalogue`,[...o,n,p,y]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,a)=>{e(r.security,`transports[${a}].security`,["transports",a,"security"])});for(let[r,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function JP(t,s,d){let b=fs(t.protocolVersions??[]),u=new Set;function f(r,a,o,i){let n=new Set(a);for(let p of r)n.has(p)||d.push(X("protocol-scope-outside-parent","error",`${o} includes protocol version ${p} outside its parent scope`,i))}(t.transports??[]).forEach((r,a)=>{let o=$t(t,r,b);f(o,b,`transports[${a}].protocolVersions`,["transports",a,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of b)u.has(r)||d.push(X("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,a)=>{let o=$t(t,r,b);f(o,b,`capabilities[${a}].protocolVersions`,["capabilities",a,"protocolVersions"])});for(let r=0;r0&&d.push(X("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${a}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,a,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;a.forEach((n,p)=>{let l=n[o],c=$t(t,n,b);f(c,b,`${r}[${p}].protocolVersions`,[r,p,"protocolVersions"]),(n.elicitations??[]).forEach((m,w)=>{let y=$t(t,m,c);f(y,c,`${r}[${p}].elicitations[${w}].protocolVersions`,[r,p,"elicitations",w,"protocolVersions"])});let h=i.get(l)??[];for(let m of h){let w=nc(c,m.scope);w.length>0&&d.push(X("primitive-scope-overlap","error",`${r}[${p}] with identifier ${JSON.stringify(l)} overlaps ${r}[${m.index}] for protocol versions ${w.join(", ")}`,[r,p,"protocolVersions"]))}h.push({index:p,scope:c}),i.set(l,h)})}}function HP(t,s,d){let b=fs(t.protocolVersions??[]);function u(f,e,r,a){if(!f||typeof f!="object"||Array.isArray(f))return;e==="2025-06-18"&&Object.hasOwn(f,"$schema")&&d.push(X("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...a,"$schema"]));let o=new Set(Object.keys(f.properties??{}));(f.required??[]).forEach((i,n)=>{o.has(i)||d.push(X("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...a,"required",n]))});for(let[i,n]of Object.entries(f.properties??{})){let p=`${r}.properties[${JSON.stringify(i)}]`,l=[...a,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&d.push(X("elicitation-form-schema-version-mismatch","error",`${p} uses an enum form introduced after MCP ${e}`,l)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&d.push(X("elicitation-form-schema-version-mismatch","error",`${p}.default is not defined for this property type in MCP ${e}`,[...l,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&d.push(X("elicitation-form-enum-names-mismatch","error",`${p}.enumNames must contain one display name for every enum value`,[...l,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(h=>h.const):void 0;if(c&&!c.includes(n.default)&&d.push(X("elicitation-form-default-outside-enum","error",`${p}.default must be one of the declared enum values`,[...l,"default"])),n.type==="array"){let h=n.items?.enum??n.items?.anyOf?.map(m=>m.const);Array.isArray(h)&&n.default.some(m=>!h.includes(m))&&d.push(X("elicitation-form-default-outside-enum","error",`${p}.default contains a value outside the declared enum values`,[...l,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&d.push(X("elicitation-form-invalid-range","error",`${p}.minLength must not exceed maxLength`,[...l,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&d.push(X("elicitation-form-invalid-range","error",`${p}.minimum must not exceed maximum`,[...l,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&d.push(X("elicitation-form-invalid-range","error",`${p}.minItems must not exceed maxItems`,[...l,"minItems"]))}}}for(let[f,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,a)=>{let o=$t(t,r,b),i=new Set;(r.elicitations??[]).forEach((n,p)=>{let l=`${f}[${a}].elicitations[${p}]`,c=[f,a,"elicitations",p];i.has(n.name)&&d.push(X("duplicate-elicitation-name","error",`${l}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let h=$t(t,n,o);for(let m of h)ue.get(m){let a=$t(t,e,b);if(e.type==="streamable-http")for(let o of a)ue.get(o)>=ue.get("2025-03-26")||d.push(X("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of a)ue.get(o){let a=$t(t,e,b),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",a),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",a),u(`tools[${r}]`,o,e,"_meta","2025-06-18",a),u(`tools[${r}]`,o,e,"annotations","2025-03-26",a),f(`tools[${r}]`,o,e,"execution","2025-11-25",a),u(`tools[${r}]`,o,e,"icons","2025-11-25",a)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((a,o)=>{let i=$t(t,a,b),n=[e,o];if(u(`${e}[${o}]`,n,a,"title","2025-06-18",i),u(`${e}[${o}]`,n,a,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,a,"icons","2025-11-25",i),e!=="prompts"&&a.annotations?.lastModified!==void 0)for(let p of i)ue.get(p)>=ue.get("2025-06-18")||d.push(X("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${p}`,[...n,"annotations","lastModified"]));e==="prompts"&&(a.arguments??[]).forEach((p,l)=>{u(`${e}[${o}].arguments[${l}]`,[...n,"arguments",l],p,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let a=$t(t,e,b),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",a),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",a),a.includes("2026-07-28")&&d.push(X("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of a)ue.get(i)d(i,`${u}.${o}[${n}]`,[...f,o,n],!1,!1));for(let o of KP){let i=b[o];Array.isArray(i)?i.forEach((n,p)=>d(n,`${u}.${o}[${p}]`,[...f,o,p],!1,!1)):d(i,`${u}.${o}`,[...f,o],!1,!1)}let a=b.dependencies;if(a&&typeof a=="object"&&!Array.isArray(a))for(let[o,i]of Object.entries(a))Array.isArray(i)||d(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...f,"dependencies",o],!1,!1)}return d(t,"inputSchema",["inputSchema"],!0,!1),s}function XP(t,s,d,b,u){let f=GP(t.inputSchema);if(!f.length)return;for(let r of d)r!=="2026-07-28"&&u.push(X("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of f){let a=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(X("invalid-x-mcp-header","error",`${a} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(X("invalid-x-mcp-header","error",`${a} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(X("invalid-x-mcp-header","error",`${a} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(X("duplicate-x-mcp-header","error",`${a} duplicates ${n} case-insensitively`,o)):e.set(i,a)}}function e0(t,s,d,b,u){if(Object.hasOwn(t,"properties")){let f=t.properties;if(!f||typeof f!="object"||Array.isArray(f))u.push(X("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${is}`,[...d,"properties"]));else for(let[e,r]of Object.entries(f))r&&typeof r=="object"&&!Array.isArray(r)||u.push(X("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${is}`,[...d,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(f=>typeof f!="string"))&&u.push(X("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${is}`,[...d,"required"]))}function t0(t,s,d){let b=fs(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{let e=$t(t,u,b);for(let r of["inputSchema","outputSchema"]){let a=u[r];if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`tools[${f}].${r}`,i=["tools",f,r],n=e.some(l=>ue.get(l)ue.get(l)>=ue.get(is));if(Object.hasOwn(a,"$schema"))for(let l of e)ue.get(l)>=ue.get(is)||d.push(X("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${l}; it requires ${is} or later`,[...i,"$schema"]));if(n&&e0(a,o,i,s,d),p){let l=fc(a);if(!l)d.push(X("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(a.$schema)}`,[...i,"$schema"]));else{let c=zm(l);try{if(c.validateSchema(a,!0))c.compile(a);else{let h=c.errors?.map(m=>`${m.instancePath||"/"} ${m.message}`).join("; ")??"unknown meta-schema error";d.push(X("invalid-tool-schema","error",`${o} is not valid JSON Schema ${l}: ${h}`,i))}}catch(h){let m=uc(a);try{if(!m.externalReferences.length)throw h;zm(l).compile(m.schema);let w=[...new Set(m.externalReferences)].sort();d.push(X("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${w.map(y=>JSON.stringify(y)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(w){d.push(X("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${l}: ${w.message}`,i))}}}}if(r==="outputSchema"&&a.type!=="object")for(let l of e)l!=="2026-07-28"&&d.push(X("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${l}`,[...i,"type"]))}XP(u,f,e,s,d)})}function pc(t,s,d,b,u,f){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){f.push(X("tool-example-schema-mismatch","error",`${d} must be an object`,b));return}for(let e of t.required??[])Object.hasOwn(s,e)||f.push(X("tool-example-schema-mismatch","error",`${d} is missing required property ${JSON.stringify(e)}`,[...b,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||f.push(X("tool-example-schema-mismatch","error",`${d} contains undeclared property ${JSON.stringify(e)}`,[...b,e]))}function lc(t,s,d,b,u,f){let e=fc(t);if(!e)return;let r=uc(t);if(r.externalReferences.length){let a=[...new Set(r.externalReferences)].sort();f.push(X("incomplete-tool-example-validation","warning",`${d} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${a.map(o=>JSON.stringify(o)).join(", ")})`,b));return}try{let a=zm(e).compile(t);if(!a(s)){let o=a.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";f.push(X("tool-example-schema-mismatch","error",`${d} does not validate against its associated Tool schema: ${o}`,b))}}catch{}}function r0(t,s,d){let b=fs(t.protocolVersions??[]);(t.tools??[]).forEach((u,f)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=$t(t,u,b),r=e.filter(o=>ue.get(o)ue.get(o)>=ue.get(is));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${f}].examples[${JSON.stringify(o)}]`,p=["tools",f,"examples",o],l=i.result??{},c=[...p,"result"],h=l.isError!==!0;for(let m of["jsonrpc","id","error"])Object.hasOwn(l,m)&&d.push(X("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(m)}`,[...c,m]));for(let m of["task","inputRequests","requestState"])Object.hasOwn(l,m)&&d.push(X("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(m)}`,[...c,m]));for(let m of e){let w=`${n}.result`;m==="2026-07-28"&&l.resultType!=="complete"&&d.push(X("tool-example-result-version-mismatch","error",`${w}.resultType must be "complete" for MCP ${m}`,[...c,"resultType"])),m!=="2026-07-28"&&Object.hasOwn(l,"resultType")&&d.push(X("tool-example-result-version-mismatch","error",`${w}.resultType is not defined for MCP ${m}`,[...c,"resultType"])),Object.hasOwn(l,"structuredContent")&&ue.get(m){let g=`${w}.content[${$}]`,O=[...c,"content",$];y.type==="audio"&&ue.get(m){Object.hasOwn(r,"_meta")&&ue.get(e){let n=`${b}.result.contents[${i}]`,p=[...u,"result","contents",i];if(o.uri===s&&(a=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(X("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...p,"mimeType"])),t.size!==void 0)){let l=typeof o.text=="string"?YP.encode(o.text).byteLength:typeof o.blob=="string"&&mc(o.blob)?s0(o.blob):void 0;l!==void 0&&l!==t.size&&e.push(X("resource-example-size-mismatch","warning",`${n} contains ${l} raw bytes, which differs from the declared Resource size ${t.size}`,p))}typeof o.blob=="string"&&!mc(o.blob)&&e.push(X("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...p,"blob"]))}),a||e.push(X("resource-example-requested-uri-not-returned","warning",`${b}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function n0(t,s,d){let b=fs(t.protocolVersions??[]);for(let[u,f]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])f.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let a=$t(t,e,b),o;if(u==="resourceTemplates")try{o=new De,o.add(e.uriTemplate)}catch(i){o=void 0,d.push(X("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${u}[${r}].examples[${JSON.stringify(i)}]`,l=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let h=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof h=="string"&&o&&!o.match(h)&&d.push(X("resource-template-example-invalid-expansion","error",`${p}.uri ${JSON.stringify(h)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...l,"uri"])),i0(c,a,`${p}.result`,[...l,"result"],s,d),typeof h=="string"&&o0(e,h,c,p,l,s,d)}})}function Nm(t,s="document"){let d=[];return JP(t,s,d),FP(t,s,d),LP(t,s,d),WP(t,s,d),HP(t,s,d),UP(t,s,d),t0(t,s,d),r0(t,s,d),n0(t,s,d),d.sort((b,u)=>b.code.localeCompare(u.code)||b.message.localeCompare(u.message)||JSON.stringify(b.path).localeCompare(JSON.stringify(u.path))),d}var Tm="__interaction_example__",Sm=new qe({allErrors:!0,strict:!1});Oe(Sm);var dc=new Me({allErrors:!0,strict:!1});Oe(dc);var cc=Sm.compile(oc),hc=["tools","resources","resourceTemplates","prompts"],a0=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],p0=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),Ce=new Map(Kp.map((t,s)=>[t,s])),l0={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function ce(t,s,d,b){return{code:t,severity:s,message:d,path:b}}function m0(t){if(typeof t!="string"||!t.includes("/"))return!1;let s=t.slice(0,t.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function Bp(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function _m(t,s,d,b){return{code:t,severity:"error",message:`${s}.${b.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${d}`,path:b}}function Im(t,s="document"){let d=structuredClone(t),b=[],u=[],f=0;function e(a,o,i,n=[]){let p=/^#\/components\/([^/]+)\/([^/]+)$/.exec(a?.$componentRef??"");if(!p)return a;let[,l,c]=p;if(l!==o)return b.push(_m("wrong-component-reference-namespace",s,`must target #/components/${o}, not #/components/${l}`,i)),{value:a};let h=`${l}/${c}`;if(n.includes(h))return b.push(_m("component-reference-cycle",s,`forms a cycle through ${[...n,h].join(" -> ")}`,i)),{value:a};let m=t?.components?.[l]?.[c];return m===void 0?(b.push(_m("missing-component-reference-target",s,`targets missing component ${JSON.stringify(a.$componentRef)}`,i)),{value:a}):(f+=1,Bp(m)?e(m,o,i,[...n,h]):{value:structuredClone(m),targetPath:["components",l,c]})}function r(a,o,i,n=[]){let p=e(a,o,i,n);return p.targetPath&&u.push({referencePath:i,targetPath:p.targetPath}),p.value}for(let a of a0)for(let[o,i]of Object.entries(t?.components?.[a]??{}))Bp(i)&&(d.components[a][o]=r(i,a,["components",a,o],[`${a}/${o}`]));for(let[a,o]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates,prompts:t?.prompts}))for(let[i,n]of(o??[]).entries()){let p=d[a][i];if(a==="tools")for(let c of["inputSchema","outputSchema"])Bp(n[c])&&(p[c]=r(n[c],"schemas",[a,i,c]));let l=a==="tools"?"toolExamples":a==="resources"?"resourceExamples":a==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[c,h]of Object.entries(n.examples??{}))Bp(h)&&(p.examples[c]=r(h,l,[a,i,"examples",c]))}for(let a of hc)for(let[o,i]of(t?.[a]??[]).entries())for(let[n,p]of(i.elicitations??[]).entries())Bp(p.requestedSchema)&&(d[a][o].elicitations[n].requestedSchema=r(p.requestedSchema,"schemas",[a,o,"elicitations",n,"requestedSchema"]));return{document:d,diagnostics:b,substitutions:f,provenance:u}}function f0(t,s){let d=s.instancePath?s.instancePath.slice(1).split("/").map(b=>b.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?d.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&d.push(s.params.additionalProperty),d.map(b=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(b)?Number(b):b)}function gc(t){return cc(t)?[]:(cc.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:f0(t,s)}))}function Zm(t){return Array.isArray(t)?t.map(Zm):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([s],[d])=>s.localeCompare(d)).map(([s,d])=>[s,Zm(d)])):t}function yc(t){return JSON.stringify(Zm(t))}function u0(t,s,d){if(!Array.isArray(t.path))return t;let b=["tools",0,"examples",Tm];return b.every((f,e)=>t.path[e]===f)?{...t,message:t.message.replace(`tools[0].examples[${JSON.stringify(Tm)}]`,`tools[${s}].interactionExamples[${JSON.stringify(d)}]`),path:["tools",s,"interactionExamples",d,...t.path.slice(b.length)]}:t}function c0(t,s,d,b,u){let f={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:t.name,inputSchema:structuredClone(t.inputSchema),...t.outputSchema?{outputSchema:structuredClone(t.outputSchema)}:{},examples:{[Tm]:{input:structuredClone(b.input),result:structuredClone(b.result)}}}]};return Nm(f).map(e=>u0(e,s,d)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function y0(t,s,d,b,u){try{let f=Sm.compile(t);if(!f(s)){let e=f.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(ce("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{try{let f=dc.compile(t);if(!f(s)){let e=f.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(ce("interaction-example-elicitation-content-schema-mismatch","error",`${d} does not validate against the elicitation request schema: ${e}`,b))}}catch{}}}function d0(t,s,d,b,u){let f=t.clientRequirements;if(!f||typeof f!="object"||Array.isArray(f))return;function e(r,a){u.push(ce("interaction-example-client-requirements-contradiction","warning",`${d} ${r}`,a))}if(s.type==="roots"){Object.hasOwn(f,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...b,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(f,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...b,"type"]);return}let r=f.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(r,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...b,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(r,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...b,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(f,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...b,"type"]);return}let r=f.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(r,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...b,"request","mode"]),s.request.mode==="form"&&Object.keys(r).length>0&&!Object.hasOwn(r,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...b,"request","mode"])}}function h0(t){let s=[],d=t.protocolVersions??[];for(let[b,u]of(t.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let f=u.protocolVersions??d;for(let[e,r]of Object.entries(u.interactionExamples)){if(!r||typeof r!="object"||Array.isArray(r))continue;let a=`tools[${b}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",b,"interactionExamples",e];s.push(...c0(u,b,e,r,f));for(let[i,n]of(r.steps??[]).entries()){let p=`${a}.steps[${i}]`,l=[...o,"steps",i];if(d0(u,n,p,l,s),n.type==="elicitation"){let c=n.request??{},h=n.response??{},m=typeof n.declaration=="string"?(u.elicitations??[]).find(w=>w.name===n.declaration):void 0;for(let w of f)Ce.get(w)[r.name,r]));for(let[r,a]of Object.entries(u.examples)){if(!a||typeof a!="object"||Array.isArray(a))continue;let o=`prompts[${b}].examples[${JSON.stringify(r)}]`,i=["prompts",b,"examples",r],n=a.result??{},p=[...i,"result"],l=a.arguments;if(l&&typeof l=="object"&&!Array.isArray(l))for(let[c]of Object.entries(l))e.has(c)||s.push(ce("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,h]of e)h.required===!0&&!Object.hasOwn(l??{},c)&&s.push(ce("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(ce("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...p,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(ce("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...p,c]));for(let c of f){let h=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(ce("prompt-example-result-version-mismatch","error",`${h}.resultType must be "complete" for MCP ${c}`,[...p,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(ce("prompt-example-result-version-mismatch","error",`${h}.resultType is not defined for MCP ${c}`,[...p,"resultType"])),Object.hasOwn(n,"_meta")&&Ce.get(c){let y=`${h}.messages[${w}].content`,$=[...p,"messages",w,"content"];b0(m.content??{},y,$,c,s)})}}}return s}function P0(t){let s=new De;return s.add(t),new Set(s.templates.flatMap(d=>d.parts).filter(d=>d.type==="expression").flatMap(d=>d.expressions.map(b=>b.name)))}function w0(t,s,d,b,u){let f=`${s}.result`,e=[...d,"result"];for(let r of["jsonrpc","id","error"])Object.hasOwn(t,r)&&u.push(ce("completion-example-json-rpc-envelope","error",`${f} must not contain JSON-RPC envelope field ${JSON.stringify(r)}`,[...e,r]));for(let r of["task","inputRequests","requestState"])Object.hasOwn(t,r)&&u.push(ce("incomplete-completion-example-result","error",`${f} must not contain non-completed workflow field ${JSON.stringify(r)}`,[...e,r]));b==="2026-07-28"&&t.resultType!=="complete"&&u.push(ce("completion-example-result-version-mismatch","error",`${f}.resultType must be "complete" for MCP ${b}`,[...e,"resultType"])),b!=="2026-07-28"&&Object.hasOwn(t,"resultType")&&u.push(ce("completion-example-result-version-mismatch","error",`${f}.resultType is not defined for MCP ${b}`,[...e,"resultType"])),Object.hasOwn(t,"_meta")&&Ce.get(b)i.name));else try{o=P0(e.uriTemplate)}catch(i){s.push(ce("resource-template-completion-example-invalid-template","error",`${a}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[b,f,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let p=`${a}.completionExamples[${JSON.stringify(i)}]`,l=[b,f,"completionExamples",i],c=n.argument?.name,h=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(ce(b==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",b==="prompts"?`${p}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${p}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...l,"argument","name"])),h&&typeof h=="object"&&!Array.isArray(h))for(let w of Object.keys(h))o&&!o.has(w)&&s.push(ce(b==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",b==="prompts"?`${p}.context.arguments contains undeclared Prompt argument ${JSON.stringify(w)}`:`${p}.context.arguments contains no RFC 6570 variable ${JSON.stringify(w)} from ${JSON.stringify(e.uriTemplate)}`,[...l,"context","arguments",w])),w===c&&s.push(ce("completion-example-duplicate-target-context","error",`${p}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(w)}`,[...l,"context","arguments",w]));let m=n.result??{};for(let w of r){if(Ce.get(w)e.code!=="transport-coverage-gap")).sort((e,r)=>e.code.localeCompare(r.code)||e.message.localeCompare(r.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(r.path)))}function bc(t){let s=gc(t);return s.length?s:j0(t)}var Cm="0.8.0-rc.3",v0="v0.8.0-rc.3",O0="a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4";function q0(t){let s=bc(t);return{valid:!s.some(d=>d.severity==="error"),diagnostics:s}}var us=Object.freeze({[Dl]:Rl,[Jl]:Hl,[Ql]:Yl,[om]:nm,[dm]:hm,[Om]:qm,[Cm]:Vm}),$c=Object.freeze({"0.8.0-rc.1":ym,"0.8.0-rc.2":vm,"0.8.0-rc.3":Im}),$l=Object.freeze({"0.8.0-draft.1":"https://mcpdesc.org/schema/0.8.0.json","0.8.0-draft.2":"https://mcpdesc.org/schema/0.8.0.json","0.8.0-draft.3":"https://mcpdesc.org/schema/0.8.0.json","0.8.0-draft.4":"https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json","0.8.0-rc.1":"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json","0.8.0-rc.2":"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json","0.8.0-rc.3":"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json"}),Ck=Object.freeze(Object.keys(us)),Vk=Object.freeze([...new Set(Object.values(us).flatMap(t=>t.supportedProtocolVersions))]),A0=Object.freeze(Object.fromEntries(Object.entries(us).map(([t,s])=>[t,Object.freeze({snapshotTag:s.snapshotTag,schemaUri:$l[t],schemaSha256:s.schemaSha256})]))),Rm=new Map;for(let t of Object.values(us)){let s=$l[t.specification],d=Rm.get(s)??[];d.push(t.specification),Rm.set(s,d)}function Sp(t,s,d=[]){return{code:t,severity:"error",message:s,path:d}}function Dm(t,s=[]){let d=us[t];return{status:"resolved",specification:t,schemaUri:$l[t],provenance:A0[t],diagnostics:s}}function Dk(t,s={}){let d=s?.specification;if(d!==void 0&&(typeof d!="string"||!Object.hasOwn(us,d)))return{status:"unresolved",diagnostics:[Sp("unsupported-specification",`Unsupported MCP Description specification: ${String(d)}`)]};let b=t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$schema")?t.$schema:void 0;if(b===void 0)return d!==void 0?Dm(d):{status:"unresolved",diagnostics:[Sp("missing-snapshot-identity","An exact specification selector or recognized $schema identity is required",["$schema"])]};if(typeof b!="string")return{status:"unresolved",diagnostics:[Sp("invalid-schema-identity","$schema must be a string to resolve an MCP Description specification",["$schema"])]};let u=Rm.get(b)??[];return d!==void 0?$l[d]===b?Dm(d):{status:"unresolved",diagnostics:[Sp("contradictory-snapshot-identity",`$schema ${JSON.stringify(b)} does not identify specification ${JSON.stringify(d)}`,["$schema"])]}:u.length===1?Dm(u[0]):u.length>1?{status:"unresolved",diagnostics:[Sp("ambiguous-schema-identity",`$schema ${JSON.stringify(b)} is shared by ${u.join(", ")} and does not select one immutable snapshot`,["$schema"])]}:{status:"unresolved",diagnostics:[Sp("unknown-schema-identity",`Unknown MCP Description $schema identity: ${JSON.stringify(b)}`,["$schema"])]}}function Rk(t,s){if(!s||typeof s!="object"||Array.isArray(s)||!Object.hasOwn(s,"specification"))throw new TypeError("options.specification is required");if(typeof s.specification!="string"||!Object.hasOwn(us,s.specification))throw new RangeError(`Unsupported MCP Description specification: ${String(s.specification)}`);return us[s.specification].validate(t)}function Mk(t,s){if(!s||typeof s!="object"||Array.isArray(s)||!Object.hasOwn(s,"specification"))throw new TypeError("options.specification is required");if(!Object.hasOwn($c,s.specification))throw new RangeError(`Component reference resolution does not support specification: ${String(s.specification)}`);return $c[s.specification](t)}export{gl as mcpExtensionCatalogue,bl as mcpExtensionMaturity,Mk as resolveMcpDescriptionComponentReferences,Dk as resolveMcpDescriptionSpecification,A0 as specificationProvenance,Vk as supportedProtocolVersions,Ck as supportedSpecifications,Rk as validateMcpDescription}; diff --git a/packages/validator/test/api.test.js b/packages/validator/test/api.test.js index ffe8f3c..91cc66d 100644 --- a/packages/validator/test/api.test.js +++ b/packages/validator/test/api.test.js @@ -19,7 +19,8 @@ const fixtureRoots = { '0.8.0-draft.3': new URL('./snapshots/0.8.0-draft.3/fixtures/', import.meta.url), '0.8.0-draft.4': new URL('./snapshots/0.8.0-draft.4/fixtures/', import.meta.url), '0.8.0-rc.1': new URL('./snapshots/0.8.0-rc.1/fixtures/', import.meta.url), - '0.8.0-rc.2': new URL('./snapshots/0.8.0-rc.2/fixtures/', import.meta.url) + '0.8.0-rc.2': new URL('./snapshots/0.8.0-rc.2/fixtures/', import.meta.url), + '0.8.0-rc.3': new URL('./snapshots/0.8.0-rc.3/fixtures/', import.meta.url) }; function fixture(group, name, specification = '0.8.0-draft.1') { @@ -33,7 +34,7 @@ function validate(document, specification = '0.8.0-draft.1') { test('exports the cumulative validator API', () => { assert.equal(typeof validateMcpDescription, 'function'); assert.equal(typeof resolveMcpDescriptionComponentReferences, 'function'); - assert.deepEqual(supportedSpecifications, ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2']); + assert.deepEqual(supportedSpecifications, ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2', '0.8.0-rc.3']); assert.deepEqual(supportedProtocolVersions, [ '2024-11-05', '2025-03-26', @@ -71,6 +72,11 @@ test('exports the cumulative validator API', () => { snapshotTag: 'v0.8.0-rc.2', schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', schemaSha256: '40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8' + }, + '0.8.0-rc.3': { + snapshotTag: 'v0.8.0-rc.3', + schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json', + schemaSha256: 'a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4' } }); }); @@ -132,23 +138,25 @@ test('keeps pre-standard client requirements strict and malformed extension maps } }); -test('resolves RC.1 component references with terminal provenance', () => { - const document = fixture('expected-valid', 'reusable-components.json', '0.8.0-rc.1'); - const original = structuredClone(document); - const first = resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-rc.1' }); - const second = resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-rc.1' }); +for (const specification of ['0.8.0-rc.1', '0.8.0-rc.2', '0.8.0-rc.3']) { + test(`resolves ${specification} component references with terminal provenance`, () => { + const document = fixture('expected-valid', 'reusable-components.json', specification); + const original = structuredClone(document); + const first = resolveMcpDescriptionComponentReferences(document, { specification }); + const second = resolveMcpDescriptionComponentReferences(document, { specification }); - assert.deepEqual(first, second); - assert.deepEqual(first.document.tools[0].inputSchema, document.components.schemas.Input); - assert.deepEqual(first.provenance.find((record) => record.referencePath.join('.') === 'tools.0.inputSchema'), { - referencePath: ['tools', 0, 'inputSchema'], - targetPath: ['components', 'schemas', 'Input'] + assert.deepEqual(first, second); + assert.deepEqual(first.document.tools[0].inputSchema, document.components.schemas.Input); + assert.deepEqual(first.provenance.find((record) => record.referencePath.join('.') === 'tools.0.inputSchema'), { + referencePath: ['tools', 0, 'inputSchema'], + targetPath: ['components', 'schemas', 'Input'] + }); + assert.ok(first.substitutions > first.provenance.length); + assert.deepEqual(document, original); }); - assert.ok(first.substitutions > first.provenance.length); - assert.deepEqual(document, original); -}); +} -test('restricts public component resolution to RC.1', () => { +test('rejects component resolution for unsupported selectors', () => { const document = fixture('expected-valid', 'reusable-components.json', '0.8.0-draft.4'); assert.throws( () => resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-draft.4' }), @@ -278,6 +286,7 @@ test('exports immutable support and provenance data', () => { assert.ok(Object.isFrozen(specificationProvenance['0.8.0-draft.4'])); assert.ok(Object.isFrozen(specificationProvenance['0.8.0-rc.1'])); assert.ok(Object.isFrozen(specificationProvenance['0.8.0-rc.2'])); + assert.ok(Object.isFrozen(specificationProvenance['0.8.0-rc.3'])); assert.throws(() => supportedSpecifications.push('0.8.0')); assert.throws(() => supportedProtocolVersions.pop()); assert.throws(() => { diff --git a/packages/validator/test/fixtures.test.js b/packages/validator/test/fixtures.test.js index ecb78ab..2c691fb 100644 --- a/packages/validator/test/fixtures.test.js +++ b/packages/validator/test/fixtures.test.js @@ -20,7 +20,7 @@ function parseFixture(filename) { return filename.endsWith('.json') ? JSON.parse(source) : YAML.parse(source); } -for (const specification of ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2']) { +for (const specification of ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2', '0.8.0-rc.3']) { const fixtureRoot = fileURLToPath(new URL(`./snapshots/${specification}/fixtures/`, import.meta.url)); for (const [group, expected] of [ ['expected-valid', 'valid'], diff --git a/packages/validator/test/import-snapshot.test.js b/packages/validator/test/import-snapshot.test.js index 6720091..f40d46e 100644 --- a/packages/validator/test/import-snapshot.test.js +++ b/packages/validator/test/import-snapshot.test.js @@ -61,6 +61,23 @@ test('validates a complete snapshot bundle without writing it', () => { } }); +test('accepts a complete bundle without source repository metadata', () => { + const root = createBundle(); + try { + const manifestPath = path.join(root, 'manifest.json'); + const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8')); + delete manifest.source; + fs.writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`); + + const output = execFileSync(process.execPath, [script, '--check', root], { + encoding: 'utf8', + }); + assert.match(output, /Validated 9\.9\.9-draft\.1/); + } finally { + fs.rmSync(root, { force: true, recursive: true }); + } +}); + test('rejects a snapshot bundle whose bytes do not match its manifest', () => { const root = createBundle(); try { diff --git a/packages/validator/test/snapshot.test.js b/packages/validator/test/snapshot.test.js index 8915098..a7d77b8 100644 --- a/packages/validator/test/snapshot.test.js +++ b/packages/validator/test/snapshot.test.js @@ -81,4 +81,17 @@ test('preserves the immutable Release Candidate 2 schema digest and metadata', ( schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', schemaSha256: rc2SchemaSha256 }); +}); + +test('preserves the immutable Release Candidate 3 schema digest and metadata', () => { + const embedded = fs.readFileSync(new URL('../src/snapshots/0.8.0-rc.3/schema.json', import.meta.url)); + const rc3SchemaSha256 = 'a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4'; + const digest = createHash('sha256').update(embedded).digest('hex'); + + assert.equal(digest, rc3SchemaSha256); + assert.deepEqual(specificationProvenance['0.8.0-rc.3'], { + snapshotTag: 'v0.8.0-rc.3', + schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json', + schemaSha256: rc3SchemaSha256 + }); }); \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/README.md b/packages/validator/test/snapshots/0.8.0-rc.3/README.md new file mode 100644 index 0000000..f690eb4 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/README.md @@ -0,0 +1,3 @@ +# Validator fixture snapshot: 0.8.0-rc.3 + +The `fixtures/` tree is frozen for the immutable `0.8.0-rc.3` validator selector. diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/closed-protocol-enum.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/closed-protocol-enum.json new file mode 100644 index 0000000..c75a39e --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/closed-protocol-enum.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "future-version", + "version": "1.0.0" + }, + "protocolVersions": [ + "2027-01-01" + ], + "transports": [ + { + "type": "stdio", + "command": "future-version" + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-contextual-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-contextual-examples.json new file mode 100644 index 0000000..3ad4955 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-contextual-examples.json @@ -0,0 +1,64 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-examples", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "components": { + "schemas": { + "Input": { + "type": "object", + "properties": { "query": { "type": "string" } }, + "required": ["query"] + }, + "Output": { + "type": "object", + "properties": { "count": { "type": "integer" } }, + "required": ["count"] + } + }, + "toolExamples": { + "bad-input": { + "input": { "query": 42 }, + "result": { + "resultType": "complete", + "content": [], + "structuredContent": { "count": "one" } + } + } + }, + "resourceTemplateExamples": { + "bad-uri": { + "uri": "data://other/1", + "result": { + "resultType": "complete", + "ttlMs": 1, + "cacheScope": "private", + "contents": [{ "uri": "data://other/1", "text": "wrong" }] + } + } + }, + "promptExamples": { + "bad-arguments": { + "arguments": { "rogue": "oops" }, + "result": { + "resultType": "complete", + "messages": [{ "role": "user", "content": { "type": "text", "text": "Hello." } }] + } + } + } + }, + "tools": [{ + "name": "search", + "inputSchema": { "$componentRef": "#/components/schemas/Input" }, + "outputSchema": { "$componentRef": "#/components/schemas/Output" }, + "examples": { "bad": { "$componentRef": "#/components/toolExamples/bad-input" } } + }], + "resourceTemplates": [{ + "uriTemplate": "data://items/{id}", + "name": "item", + "examples": { "bad": { "$componentRef": "#/components/resourceTemplateExamples/bad-uri" } } + }], + "prompts": [{ + "name": "greeting", + "examples": { "bad": { "$componentRef": "#/components/promptExamples/bad-arguments" } } + }] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-contextual-schemas.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-contextual-schemas.json new file mode 100644 index 0000000..8bc818a --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-contextual-schemas.json @@ -0,0 +1,29 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-context", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "components": { + "schemas": { + "NonObjectInput": { "type": "string" }, + "NestedForm": { + "type": "object", + "properties": { + "profile": { + "type": "object", + "properties": { "name": { "type": "string" } } + } + } + } + } + }, + "tools": [{ + "name": "invalid", + "inputSchema": { "$componentRef": "#/components/schemas/NonObjectInput" }, + "elicitations": [{ + "name": "profile", + "mode": "form", + "message": "Provide a profile", + "requestedSchema": { "$componentRef": "#/components/schemas/NestedForm" } + }] + }] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-extension-boundaries.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-extension-boundaries.json new file mode 100644 index 0000000..65ecfe5 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-extension-boundaries.json @@ -0,0 +1,10 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-extensions", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "components": { + "toolExamples": { + "x-map-extension": true + } + } +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-protocol-scope.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-protocol-scope.json new file mode 100644 index 0000000..852c765 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-protocol-scope.json @@ -0,0 +1,31 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-protocol-scope", "version": "1.0.0" }, + "protocolVersions": ["2025-11-25", "2026-07-28"], + "components": { + "resourceExamples": { + "current": { + "result": { + "resultType": "complete", + "ttlMs": 60, + "cacheScope": "private", + "contents": [{ "uri": "data://status", "text": "ready" }] + } + } + } + }, + "resources": [ + { + "protocolVersions": ["2025-11-25"], + "uri": "data://status", + "name": "status", + "examples": { "current": { "$componentRef": "#/components/resourceExamples/current" } } + }, + { + "protocolVersions": ["2026-07-28"], + "uri": "data://status", + "name": "status", + "examples": { "current": { "$componentRef": "#/components/resourceExamples/current" } } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-reference-resolution.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-reference-resolution.json new file mode 100644 index 0000000..9c980ff --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/component-reference-resolution.json @@ -0,0 +1,21 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-resolution", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "components": { + "schemas": { + "CycleA": { "$componentRef": "#/components/schemas/CycleB" }, + "CycleB": { "$componentRef": "#/components/schemas/CycleA" } + }, + "toolExamples": { + "sample": { + "input": {}, + "result": { "resultType": "complete", "content": [] } + } + } + }, + "tools": [ + { "name": "missing", "inputSchema": { "$componentRef": "#/components/schemas/Missing" } }, + { "name": "wrong", "inputSchema": { "$componentRef": "#/components/toolExamples/sample" } } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/components-empty-and-reference-shapes.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/components-empty-and-reference-shapes.json new file mode 100644 index 0000000..a6083d7 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/components-empty-and-reference-shapes.json @@ -0,0 +1,15 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-shapes", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "components": { + "schemas": {} + }, + "tools": [{ + "name": "search", + "inputSchema": { + "$componentRef": "https://example.com/components.json#/schemas/Input", + "x-forbidden-sibling": true + } + }] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-mcp-header.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-mcp-header.json new file mode 100644 index 0000000..8cccf2b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-mcp-header.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "duplicate-mcp-header", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "duplicate-mcp-header" + } + ], + "tools": [ + { + "name": "duplicate_headers", + "inputSchema": { + "type": "object", + "properties": { + "region": { + "type": "string", + "x-mcp-header": "X-Region" + }, + "fallbackRegion": { + "type": "string", + "x-mcp-header": "x-region" + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-security-scope.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-security-scope.json new file mode 100644 index 0000000..6d4f16a --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-security-scope.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "duplicate-security-scope", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "duplicate-security-scope" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "tokenUrl": "https://auth.example.com/token", + "scopes": { + "records:read": "Read records" + } + } + } + } + }, + "security": [ + { + "oauth": [ + "records:read", + "records:read" + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-tag-reference.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-tag-reference.json new file mode 100644 index 0000000..f3a630b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/duplicate-tag-reference.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "bad-tags", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18" + ], + "transports": [ + { + "type": "stdio", + "command": "bad-tags" + } + ], + "tags": [ + { + "name": "reference" + } + ], + "tools": [ + { + "name": "search", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "tags": [ + "unknown" + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-branch-mixing.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-branch-mixing.json new file mode 100644 index 0000000..53b36e0 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-branch-mixing.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-elicitation-branch", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-elicitation-branch" + } + ], + "resources": [ + { + "uri": "example:///account", + "name": "account", + "elicitations": [ + { + "name": "mixed", + "mode": "form", + "message": "Supply account details.", + "url": "not a valid URI", + "requestedSchema": { + "type": "object", + "properties": {} + } + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-form-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-form-semantics.json new file mode 100644 index 0000000..d1abad0 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-form-semantics.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-elicitation-form", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-elicitation-form" + } + ], + "prompts": [ + { + "name": "prepare_release", + "elicitations": [ + { + "name": "release_channel", + "mode": "form", + "message": "Choose a release channel.", + "requestedSchema": { + "type": "object", + "properties": { + "channel": { + "type": "string", + "enum": [ + "stable", + "preview" + ], + "enumNames": [ + "Stable" + ], + "default": "nightly" + } + }, + "required": [ + "missing" + ] + } + }, + { + "name": "release_channel", + "mode": "form", + "message": "Choose it again.", + "requestedSchema": { + "type": "object", + "properties": {} + } + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-scope-outside-parent.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-scope-outside-parent.json new file mode 100644 index 0000000..0be03f5 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-scope-outside-parent.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-elicitation-scope", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-elicitation-scope" + } + ], + "resourceTemplates": [ + { + "uriTemplate": "example:///items/{id}", + "name": "item", + "protocolVersions": [ + "2025-11-25" + ], + "elicitations": [ + { + "name": "authorize", + "mode": "url", + "message": "Authorize item access.", + "protocolVersions": [ + "2026-07-28" + ] + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-version-mismatch.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-version-mismatch.json new file mode 100644 index 0000000..3840c3c --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/elicitation-version-mismatch.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-elicitation-version", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-elicitation-version" + } + ], + "tools": [ + { + "name": "authorize", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "elicitations": [ + { + "name": "authorize", + "mode": "url", + "message": "Authorize access.", + "url": "https://auth.example.com/authorize" + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-client-capability-requirements.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-client-capability-requirements.json new file mode 100644 index 0000000..2922117 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-client-capability-requirements.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "empty-client-capability-requirements", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "prompts": [ + { + "name": "empty_requirement", + "clientRequirements": {} + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-ordinary-nested-collections.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-ordinary-nested-collections.json new file mode 100644 index 0000000..e18aecb --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-ordinary-nested-collections.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "empty-nested-collections", + "version": "1.0.0", + "icons": [] + }, + "protocolVersions": [ + "2026-07-28" + ], + "capabilities": [ + { + "extensions": {} + } + ], + "tools": [ + { + "name": "empty_tool_collections", + "inputSchema": { + "type": "object" + }, + "icons": [], + "tags": [], + "elicitations": [] + } + ], + "prompts": [ + { + "name": "empty_prompt_collections", + "arguments": [] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-ordinary-root-collections.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-ordinary-root-collections.json new file mode 100644 index 0000000..feb182e --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-ordinary-root-collections.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "empty-ordinary-collections", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [], + "securitySchemes": {}, + "capabilities": [], + "tools": [], + "resources": [], + "resourceTemplates": [], + "prompts": [], + "tags": [] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-tag-catalog-reference.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-tag-catalog-reference.json new file mode 100644 index 0000000..b781430 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/empty-tag-catalog-reference.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "empty-tag-catalog", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "empty-tag-catalog" + } + ], + "tools": [ + { + "name": "categorized", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "tags": [ + "missing" + ] + } + ], + "tags": [] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-completion-example-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-completion-example-semantics.json new file mode 100644 index 0000000..a2d273a --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-completion-example-semantics.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-completion-example-semantics", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05", + "2025-03-26", + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-completion-example-semantics" + } + ], + "prompts": [ + { + "protocolVersions": [ + "2024-11-05" + ], + "name": "legacy_prompt", + "arguments": [ + { + "name": "topic" + } + ], + "completionExamples": { + "unsupported-version": { + "argument": { + "name": "topic", + "value": "ch" + }, + "result": { + "completion": { + "values": [ + "chess" + ] + } + } + } + } + }, + { + "protocolVersions": [ + "2025-03-26" + ], + "name": "team_lead", + "arguments": [ + { + "name": "department", + "required": true + }, + { + "name": "name", + "required": true + } + ], + "completionExamples": { + "context-too-early": { + "argument": { + "name": "name", + "value": "a" + }, + "context": { + "arguments": { + "department": "engineering" + } + }, + "result": { + "completion": { + "values": [ + "Ada" + ] + }, + "_meta": { + "captured": true + } + } + } + } + }, + { + "protocolVersions": [ + "2025-11-25" + ], + "name": "team_lead", + "arguments": [ + { + "name": "department", + "required": true + }, + { + "name": "name", + "required": true + } + ], + "completionExamples": { + "bad-membership": { + "argument": { + "name": "nickname", + "value": "a" + }, + "context": { + "arguments": { + "nickname": "Ada", + "region": "emea" + } + }, + "result": { + "resultType": "complete", + "completion": { + "values": [ + "Ada" + ] + }, + "jsonrpc": "2.0" + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "name": "team_lead", + "arguments": [ + { + "name": "department", + "required": true + }, + { + "name": "name", + "required": true + } + ], + "completionExamples": { + "missing-result-type": { + "argument": { + "name": "name", + "value": "a" + }, + "result": { + "completion": { + "values": [ + "Ada" + ], + "hasMore": false + } + } + } + } + } + ], + "resourceTemplates": [ + { + "protocolVersions": [ + "2026-07-28" + ], + "uriTemplate": "repo://{owner/{repository}/issues/{issue}", + "name": "broken_template", + "completionExamples": { + "bad-template": { + "argument": { + "name": "issue", + "value": "12" + }, + "result": { + "resultType": "complete", + "completion": { + "values": [ + "120" + ] + } + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "uriTemplate": "repo://{owner}/{repository}/issues/{issue}", + "name": "repository_issue", + "completionExamples": { + "bad-variables": { + "argument": { + "name": "ticket", + "value": "12" + }, + "context": { + "arguments": { + "issue": "12", + "workspace": "docs" + } + }, + "result": { + "resultType": "complete", + "completion": { + "values": [ + "120" + ] + }, + "requestState": "input-required" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-mcp-header-placement.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-mcp-header-placement.json new file mode 100644 index 0000000..832558e --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-mcp-header-placement.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-mcp-header-placement", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-mcp-header-placement" + } + ], + "tools": [ + { + "name": "nested_composition_header", + "inputSchema": { + "type": "object", + "allOf": [ + { + "properties": { + "region": { + "type": "string", + "x-mcp-header": "Region" + } + } + } + ] + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-mcp-header-value.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-mcp-header-value.json new file mode 100644 index 0000000..fc859ea --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-mcp-header-value.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-mcp-header-value", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-mcp-header-value" + } + ], + "tools": [ + { + "name": "invalid_header", + "inputSchema": { + "type": "object", + "properties": { + "region": { + "type": "number", + "x-mcp-header": "Invalid Header" + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-prompt-example-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-prompt-example-semantics.json new file mode 100644 index 0000000..ea11958 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-prompt-example-semantics.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { "name": "invalid-prompt-example-semantics", "version": "1.0.0" }, + "protocolVersions": ["2025-03-26", "2025-11-25", "2026-07-28"], + "prompts": [ + { + "name": "city_briefing", + "protocolVersions": ["2026-07-28"], + "arguments": [ + { "name": "city", "required": true }, + { "name": "audience" } + ], + "examples": { + "unknown-and-missing": { + "arguments": { + "audience": "engineering", + "rogue": "oops" + }, + "result": { + "messages": [ + { + "role": "user", + "content": { "type": "text", "text": "Summarize Paris." } + } + ] + } + } + } + }, + { + "name": "legacy-result-type", + "protocolVersions": ["2025-11-25"], + "examples": { + "bad-version": { + "result": { + "resultType": "complete", + "messages": [ + { + "role": "assistant", + "content": { "type": "text", "text": "Hello." } + } + ] + } + } + } + }, + { + "name": "json-rpc-envelope", + "protocolVersions": ["2026-07-28"], + "examples": { + "bad-envelope": { + "result": { + "jsonrpc": "2.0", + "id": 1, + "resultType": "complete", + "messages": [] + } + } + } + }, + { + "name": "incomplete-workflow", + "protocolVersions": ["2026-07-28"], + "examples": { + "task-state": { + "result": { + "resultType": "complete", + "messages": [], + "task": { "taskId": "task-example" } + } + } + } + }, + { + "name": "legacy-content-shape", + "protocolVersions": ["2025-03-26"], + "examples": { + "resource-link-too-new": { + "result": { + "messages": [ + { + "role": "assistant", + "content": { + "type": "resource_link", + "uri": "briefing://example", + "name": "Example" + } + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-resource-annotations.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-resource-annotations.json new file mode 100644 index 0000000..e25e3f3 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-resource-annotations.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-resource-annotations", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-resource-annotations" + } + ], + "resources": [ + { + "uri": "test://resource", + "name": "resource", + "annotations": { + "lastModified": "2026-08-24T10:00:00Z" + } + } + ], + "resourceTemplates": [ + { + "uriTemplate": "test://resource/{id}", + "name": "resource_by_id", + "annotations": { + "audience": [ + "operator" + ], + "priority": 2 + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-security-scheme-name.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-security-scheme-name.json new file mode 100644 index 0000000..acb35ed --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-security-scheme-name.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-security-name", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-security-name" + } + ], + "securitySchemes": { + "invalid name": { + "type": "http", + "scheme": "bearer" + } + } +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-tool-example-result-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-tool-example-result-semantics.json new file mode 100644 index 0000000..175da79 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-tool-example-result-semantics.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { "name": "invalid-tool-example-results", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "transports": [{ "type": "stdio", "command": "fixture" }], + "tools": [ + { + "name": "missing_structured_success", + "inputSchema": { "type": "object" }, + "outputSchema": { "type": "object" }, + "examples": { + "missing": { + "input": {}, + "result": { + "resultType": "complete", + "content": [{ "type": "text", "text": "Missing structured value" }] + } + } + } + }, + { + "name": "structured_error", + "inputSchema": { "type": "object" }, + "examples": { + "business-error": { + "input": {}, + "result": { + "resultType": "complete", + "content": [{ "type": "text", "text": "Rejected" }], + "structuredContent": { "code": "rejected" }, + "isError": true + } + } + } + }, + { + "name": "json_rpc_envelope", + "inputSchema": { "type": "object" }, + "examples": { + "enveloped": { + "input": {}, + "result": { + "jsonrpc": "2.0", + "id": 1, + "resultType": "complete", + "content": [] + } + } + } + }, + { + "name": "incomplete_workflow", + "inputSchema": { "type": "object" }, + "examples": { + "task-result": { + "input": {}, + "result": { + "resultType": "complete", + "content": [], + "task": { "taskId": "task-example" } + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-tool-interaction-example-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-tool-interaction-example-semantics.json new file mode 100644 index 0000000..b10d04b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/invalid-tool-interaction-example-semantics.json @@ -0,0 +1,140 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-tool-interaction-example-semantics", + "version": "1.0.0" + }, + "protocolVersions": ["2025-06-18"], + "tools": [ + { + "name": "prepare_release", + "inputSchema": { + "type": "object", + "properties": { + "version": { "type": "string" } + }, + "required": ["version"], + "additionalProperties": false + }, + "outputSchema": { + "type": "object", + "properties": { + "status": { "type": "string" } + }, + "required": ["status"], + "additionalProperties": false + }, + "elicitations": [ + { + "name": "confirm", + "mode": "form", + "message": "Approve this release?", + "requestedSchema": { + "type": "object", + "properties": { + "approved": { "type": "boolean" } + }, + "required": ["approved"] + } + } + ], + "interactionExamples": { + "broken": { + "input": { + "version": "2.0.0" + }, + "steps": [ + { + "type": "elicitation", + "declaration": "missing", + "request": { + "mode": "url", + "message": "Authorize publication.", + "url": "https://mcp.example.com/release/connect" + }, + "response": { + "action": "accept", + "content": { + "approved": true + } + } + }, + { + "type": "elicitation", + "declaration": "confirm", + "request": { + "mode": "form", + "message": "Approve this release?", + "requestedSchema": { + "type": "object", + "properties": { + "approved": { "type": "string" } + }, + "required": ["approved"] + } + }, + "response": { + "action": "accept", + "content": { + "approved": true + } + } + }, + { + "type": "sampling", + "request": { + "messages": [ + { + "role": "user", + "content": { + "type": "text", + "text": "Summarize the release plan." + } + } + ], + "tools": [ + { + "name": "diff_summary", + "inputSchema": { + "type": "object" + } + } + ], + "maxTokens": 120 + }, + "response": { + "role": "assistant", + "content": { + "type": "text", + "text": "Check the changelog first." + }, + "model": "claude-3-sonnet-20240229", + "stopReason": "endTurn" + } + }, + { + "type": "roots", + "request": {}, + "response": { + "roots": [ + { + "uri": "https://example.com/not-a-file-root" + } + ] + } + } + ], + "result": { + "content": [ + { + "type": "text", + "text": "Release preparation completed." + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-completion-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-completion-examples.json new file mode 100644 index 0000000..093b433 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-completion-examples.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-completion-examples", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "prompts": [ + { + "name": "team_lead", + "completionExamples": {} + } + ], + "resourceTemplates": [ + { + "uriTemplate": "repo://{owner}/{repository}/issues/{issue}", + "name": "repository_issue", + "completionExamples": { + "bad": { + "argument": { + "name": "issue" + }, + "context": {}, + "result": { + "completion": { + "values": [ + 12 + ] + } + }, + "$componentRef": "#/components/completionExamples/bad" + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-extension-identifier.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-extension-identifier.json new file mode 100644 index 0000000..757633f --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-extension-identifier.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-extension-identifier", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "malformed-extension-identifier" + } + ], + "capabilities": [ + { + "extensions": { + "missing-prefix": {} + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-pre-dialect-tool-schema-shape.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-pre-dialect-tool-schema-shape.json new file mode 100644 index 0000000..af89d5d --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-pre-dialect-tool-schema-shape.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-pre-dialect-tool-schema-shape", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05" + ], + "transports": [ + { + "type": "stdio", + "command": "malformed-pre-dialect-tool-schema-shape" + } + ], + "tools": [ + { + "name": "malformed_legacy_schema", + "inputSchema": { + "type": "object", + "required": "value" + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-prompt-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-prompt-examples.json new file mode 100644 index 0000000..6601222 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-prompt-examples.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { "name": "malformed-prompt-examples", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "prompts": [ + { + "name": "empty_map", + "examples": {} + }, + { + "name": "invalid_name", + "examples": { + "contains spaces": { + "result": { + "resultType": "complete", + "messages": [] + } + } + } + }, + { + "name": "bad_arguments_shape", + "examples": { + "array": { + "arguments": [], + "result": { + "resultType": "complete", + "messages": [] + } + } + } + }, + { + "name": "missing_result", + "examples": { + "missing": { "arguments": {} } + } + }, + { + "name": "non_string_argument", + "examples": { + "number": { + "arguments": { "count": 1 }, + "result": { + "resultType": "complete", + "messages": [] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-resource-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-resource-examples.json new file mode 100644 index 0000000..d7f2803 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-resource-examples.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-resource-examples", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "malformed-resource-examples" + } + ], + "resources": [ + { + "uri": "test://empty", + "name": "empty", + "examples": {} + }, + { + "uri": "test://missing-result", + "name": "missing_result", + "examples": { + "invalid name": {} + } + }, + { + "uri": "test://ambiguous-content", + "name": "ambiguous_content", + "examples": { + "both-text-and-blob": { + "result": { + "resultType": "complete", + "contents": [ + { + "uri": "test://ambiguous-content", + "text": "text", + "blob": "dGV4dA==" + } + ] + } + } + } + } + ], + "resourceTemplates": [ + { + "uriTemplate": "test://items/{id}", + "name": "item", + "examples": { + "missing-uri": { + "result": { + "resultType": "complete", + "contents": [] + } + } + } + }, + { + "uriTemplate": "test://items/{id", + "name": "malformed_template", + "examples": { + "concrete": { + "uri": "test://items/123", + "result": { + "resultType": "complete", + "contents": [ + { + "uri": "test://items/123", + "text": "item" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-resource-template-example.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-resource-template-example.json new file mode 100644 index 0000000..a9b5695 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-resource-template-example.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-resource-template-example", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "malformed-resource-template-example" + } + ], + "resourceTemplates": [ + { + "uriTemplate": "test://items/{id", + "name": "malformed_template", + "examples": { + "concrete": { + "uri": "test://items/123", + "result": { + "resultType": "complete", + "contents": [ + { + "uri": "test://items/123", + "text": "item" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-examples.json new file mode 100644 index 0000000..e086064 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-examples.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { "name": "malformed-tool-examples", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "transports": [{ "type": "stdio", "command": "fixture" }], + "tools": [ + { + "name": "empty_map", + "inputSchema": { "type": "object" }, + "examples": {} + }, + { + "name": "invalid_name", + "inputSchema": { "type": "object" }, + "examples": { + "contains spaces": { + "input": {}, + "result": { "resultType": "complete", "content": [] } + } + } + }, + { + "name": "missing_input", + "inputSchema": { "type": "object" }, + "examples": { + "missing": { + "result": { "resultType": "complete", "content": [] } + } + } + }, + { + "name": "non_object_input", + "inputSchema": { "type": "object" }, + "examples": { + "array": { + "input": [], + "result": { "resultType": "complete", "content": [] } + } + } + }, + { + "name": "missing_result", + "inputSchema": { "type": "object" }, + "examples": { + "missing": { "input": {} } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-interaction-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-interaction-examples.json new file mode 100644 index 0000000..e06854f --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-interaction-examples.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-tool-interaction-examples", + "version": "1.0.0" + }, + "protocolVersions": ["2025-11-25"], + "tools": [ + { + "name": "prepare_release", + "inputSchema": { + "type": "object" + }, + "interactionExamples": { + "broken": { + "input": [], + "steps": [], + "result": { + "content": [] + }, + "description": "not allowed" + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-schema.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-schema.json new file mode 100644 index 0000000..ab03a5b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/malformed-tool-schema.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-tool-schema", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "malformed-tool-schema" + } + ], + "tools": [ + { + "name": "malformed_schema", + "inputSchema": { + "type": "object", + "required": "query" + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/meta-invalid-key.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/meta-invalid-key.json new file mode 100644 index 0000000..21fa669 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/meta-invalid-key.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { "name": "meta-invalid-key", "version": "1.0.0" }, + "protocolVersions": ["2025-11-25"], + "transports": [{ "type": "stdio", "command": "meta-invalid-key" }], + "tools": [ + { + "name": "invalid", + "inputSchema": { "type": "object" }, + "_meta": { + "bad key": true + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/meta-reserved-key-misuse.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/meta-reserved-key-misuse.json new file mode 100644 index 0000000..e991eb2 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/meta-reserved-key-misuse.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { "name": "meta-reserved-key-misuse", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "transports": [{ "type": "stdio", "command": "meta-reserved-key-misuse" }], + "tools": [ + { + "name": "invalid-context", + "inputSchema": { "type": "object" }, + "_meta": { + "progressToken": "request-only" + }, + "examples": { + "invalid-server-info": { + "input": {}, + "result": { + "resultType": "complete", + "content": [{ "type": "text", "text": "invalid" }], + "_meta": { + "io.modelcontextprotocol/serverInfo": "not-an-implementation" + } + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/missing-tool-input-schema.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/missing-tool-input-schema.json new file mode 100644 index 0000000..6fb4e96 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/missing-tool-input-schema.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "missing-tool-schema", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "missing-tool-schema" + } + ], + "tools": [ + { + "name": "missing_schema" + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/non-oauth-scopes.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/non-oauth-scopes.json new file mode 100644 index 0000000..8bac361 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/non-oauth-scopes.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "scope-misuse", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://scope-misuse.example.com/mcp" + } + ], + "securitySchemes": { + "bearer": { + "type": "http", + "scheme": "bearer" + } + }, + "security": [ + { + "bearer": [ + "admin" + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/non-object-output-schema-before-2026.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/non-object-output-schema-before-2026.json new file mode 100644 index 0000000..9e42ee4 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/non-object-output-schema-before-2026.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "non-object-output-before-2026", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "non-object-output-before-2026" + } + ], + "tools": [ + { + "name": "array_output", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "outputSchema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/oauth-flow-missing-required-url.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/oauth-flow-missing-required-url.json new file mode 100644 index 0000000..d524263 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/oauth-flow-missing-required-url.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "oauth-flow-missing-required-url", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "oauth-flow-missing-required-url" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "scopes": {} + } + } + } + } +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-cannot-weaken-core.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-cannot-weaken-core.json new file mode 100644 index 0000000..b74ab97 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-cannot-weaken-core.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-extension-cannot-weaken-core", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "tools": [ + { + "name": "search", + "x-example-relaxed-validation": { + "inputSchemaOptional": true + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-capability-map.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-capability-map.json new file mode 100644 index 0000000..b20ab04 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-capability-map.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-extension-in-capability-map", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "capabilities": [ + { + "extensions": { + "x-example-policy": { + "enabled": true + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-domain-map.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-domain-map.json new file mode 100644 index 0000000..ad0a12a --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-domain-map.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-extension-in-domain-map", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "securitySchemes": { + "x-example-policy": { + "owner": "identity" + } + } +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-native-content.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-native-content.json new file mode 100644 index 0000000..ecfeefa --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-native-content.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-extension-in-native-content", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "tools": [ + { + "name": "search", + "inputSchema": { + "type": "object" + }, + "examples": { + "default": { + "input": {}, + "result": { + "resultType": "complete", + "content": [ + { + "type": "text", + "text": "Example", + "x-example-style": "brief" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-security-requirement.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-security-requirement.json new file mode 100644 index 0000000..cb16323 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-extension-in-security-requirement.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-extension-in-security-requirement", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "security": [ + { + "x-example-policy": { + "owner": "identity" + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-unknown-property.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-unknown-property.json new file mode 100644 index 0000000..268fbd0 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/object-level-unknown-property.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-unknown-property", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "tools": [ + { + "name": "search", + "inputSchema": { + "type": "object" + }, + "acmeRisk": "high" + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/overlapping-capabilities.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/overlapping-capabilities.json new file mode 100644 index 0000000..46ba878 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/overlapping-capabilities.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "overlap-caps", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "overlap-caps" + } + ], + "capabilities": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "tools": { + "listChanged": true + } + }, + { + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "resources": { + "subscribe": true + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/overlapping-tool-scope.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/overlapping-tool-scope.json new file mode 100644 index 0000000..2eb7341 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/overlapping-tool-scope.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "dup-tool", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "dup-tool" + } + ], + "tools": [ + { + "name": "run_job", + "inputSchema": { + "type": "object", + "additionalProperties": false + } + }, + { + "name": "run_job", + "protocolVersions": [ + "2026-07-28" + ], + "inputSchema": { + "type": "object", + "additionalProperties": false + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/resource-example-cache-fields.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/resource-example-cache-fields.json new file mode 100644 index 0000000..92e06f1 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/resource-example-cache-fields.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-resource-example-cache-fields", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-resource-example-cache-fields" + } + ], + "resources": [ + { + "protocolVersions": [ + "2026-07-28" + ], + "uri": "example:///missing-cache-fields", + "name": "missing_cache_fields", + "examples": { + "missing": { + "result": { + "resultType": "complete", + "contents": [ + { + "uri": "example:///missing-cache-fields", + "text": "missing required cache hints" + } + ] + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "uri": "example:///invalid-cache-fields", + "name": "invalid_cache_fields", + "examples": { + "invalid": { + "result": { + "resultType": "complete", + "ttlMs": -1, + "cacheScope": "shared", + "contents": [ + { + "uri": "example:///invalid-cache-fields", + "text": "invalid cache hints" + } + ] + } + } + } + }, + { + "protocolVersions": [ + "2025-11-25" + ], + "uri": "example:///premature-cache-fields", + "name": "premature_cache_fields", + "examples": { + "premature": { + "result": { + "ttlMs": 60000, + "cacheScope": "private", + "contents": [ + { + "uri": "example:///premature-cache-fields", + "text": "fields are not defined by this revision" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/resource-example-result-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/resource-example-result-semantics.json new file mode 100644 index 0000000..ec1db3e --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/resource-example-result-semantics.json @@ -0,0 +1,89 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-resource-example-semantics", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05", + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-resource-example-semantics" + } + ], + "resources": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "uri": "asset:///invalid.bin", + "name": "invalid_binary", + "examples": { + "invalid-result": { + "result": { + "resultType": "complete", + "jsonrpc": "2.0", + "task": {}, + "contents": [ + { + "uri": "asset:///invalid.bin", + "blob": "not base64" + } + ] + } + } + } + }, + { + "protocolVersions": [ + "2024-11-05" + ], + "uri": "test://legacy", + "name": "legacy", + "examples": { + "unsupported-metadata": { + "result": { + "contents": [ + { + "uri": "test://legacy", + "text": "legacy", + "_meta": { + "unsupported": true + } + } + ], + "_meta": { + "unsupported": true + } + } + } + } + } + ], + "resourceTemplates": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "uriTemplate": "chess://games/{game_id}", + "name": "game", + "examples": { + "not-an-expansion": { + "uri": "chess://players/example-1234", + "result": { + "contents": [ + { + "uri": "chess://players/example-1234", + "text": "wrong route" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-execution.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-execution.json new file mode 100644 index 0000000..f065b2f --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-execution.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-execution-revision", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-execution-revision" + } + ], + "tools": [ + { + "name": "run_job", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "execution": { + "taskSupport": "optional" + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-mcp-header.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-mcp-header.json new file mode 100644 index 0000000..a422345 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-mcp-header.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "revision-inapplicable-mcp-header", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "revision-inapplicable-mcp-header" + } + ], + "tools": [ + { + "name": "early_header", + "inputSchema": { + "type": "object", + "properties": { + "region": { + "type": "string", + "x-mcp-header": "Region" + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-streamable-http.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-streamable-http.json new file mode 100644 index 0000000..707ce7c --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-streamable-http.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "revision-inapplicable-streamable-http", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://example.com/mcp" + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-tool-schema-dialect.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-tool-schema-dialect.json new file mode 100644 index 0000000..d70b62b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-inapplicable-tool-schema-dialect.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "revision-inapplicable-tool-schema-dialect", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18" + ], + "transports": [ + { + "type": "stdio", + "command": "revision-inapplicable-tool-schema-dialect" + } + ], + "tools": [ + { + "name": "early_dialect_declaration", + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "additionalProperties": false + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-incompatible-client-capability-requirements.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-incompatible-client-capability-requirements.json new file mode 100644 index 0000000..985bd51 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-incompatible-client-capability-requirements.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "revision-incompatible-client-capability-requirements", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "tools": [ + { + "name": "unsplit_task_requirement", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "clientRequirements": { + "tasks": { + "list": {} + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-incompatible-tool-example.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-incompatible-tool-example.json new file mode 100644 index 0000000..8a6d9ef --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/revision-incompatible-tool-example.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { "name": "revision-incompatible-tool-example", "version": "1.0.0" }, + "protocolVersions": ["2025-03-26"], + "transports": [{ "type": "stdio", "command": "fixture" }], + "tools": [ + { + "name": "old_tool", + "inputSchema": { "type": "object" }, + "examples": { + "future-result": { + "input": {}, + "result": { + "resultType": "complete", + "content": [ + { + "type": "resource_link", + "uri": "resource://example/item", + "name": "Future resource link" + } + ], + "structuredContent": { "future": true } + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/root-version-without-transport.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/root-version-without-transport.json new file mode 100644 index 0000000..24a263c --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/root-version-without-transport.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "coverage-gap", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "coverage-gap", + "protocolVersions": [ + "2025-11-25" + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/scoped-version-not-in-root.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/scoped-version-not-in-root.json new file mode 100644 index 0000000..4fbe66c --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/scoped-version-not-in-root.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "bad-scope", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "bad-scope", + "protocolVersions": [ + "2026-07-28" + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/tool-example-schema-mismatches.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/tool-example-schema-mismatches.json new file mode 100644 index 0000000..5dda44f --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/tool-example-schema-mismatches.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { "name": "tool-example-schema-mismatches", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "transports": [{ "type": "stdio", "command": "fixture" }], + "tools": [ + { + "name": "mismatched_values", + "inputSchema": { + "type": "object", + "properties": { "count": { "type": "integer" } }, + "required": ["count"] + }, + "outputSchema": { + "type": "object", + "properties": { "total": { "type": "integer" } }, + "required": ["total"] + }, + "examples": { + "wrong-types": { + "input": { "count": "one" }, + "result": { + "resultType": "complete", + "content": [{ "type": "text", "text": "one" }], + "structuredContent": { "total": "one" } + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/unknown-security-reference.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/unknown-security-reference.json new file mode 100644 index 0000000..3c81a7d --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/unknown-security-reference.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "bad-security", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://bad-security.example.com/mcp" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "tokenUrl": "https://auth.example.com/token", + "scopes": { + "issues:read": "Read issues" + } + } + } + } + }, + "security": [ + { + "missing": [] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/unresolved-local-tool-ref.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/unresolved-local-tool-ref.json new file mode 100644 index 0000000..c643f7a --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-invalid/unresolved-local-tool-ref.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "unresolved-local-tool-ref", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "unresolved-local-tool-ref" + } + ], + "tools": [ + { + "name": "missing_local_definition", + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "identifier": { + "$ref": "#/$defs/identifier" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/client-capability-requirements.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/client-capability-requirements.json new file mode 100644 index 0000000..3efefd6 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/client-capability-requirements.json @@ -0,0 +1,109 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "client-capability-requirements", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18", + "2025-11-25", + "2026-07-28" + ], + "capabilities": [ + { + "protocolVersions": [ + "2026-07-28" + ], + "extensions": { + "io.modelcontextprotocol/ui": {} + } + } + ], + "tools": [ + { + "name": "rebuild", + "protocolVersions": [ + "2025-11-25" + ], + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "clientRequirements": { + "tasks": { + "requests": { + "sampling": { + "createMessage": {} + } + } + } + } + }, + { + "name": "rebuild", + "protocolVersions": [ + "2026-07-28" + ], + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "clientRequirements": { + "extensions": { + "io.modelcontextprotocol/tasks": {}, + "io.modelcontextprotocol/ui": { + "mimeTypes": [ + "text/html;profile=mcp-app" + ] + } + } + } + } + ], + "resources": [ + { + "uri": "workspace://current", + "name": "current_workspace", + "protocolVersions": [ + "2025-06-18" + ], + "clientRequirements": { + "roots": { + "listChanged": true + } + } + } + ], + "resourceTemplates": [ + { + "uriTemplate": "workspace://{path}", + "name": "workspace_file", + "protocolVersions": [ + "2026-07-28" + ], + "clientRequirements": { + "elicitation": { + "form": {} + } + } + } + ], + "prompts": [ + { + "name": "review_with_model", + "protocolVersions": [ + "2025-11-25" + ], + "clientRequirements": { + "sampling": { + "tools": {} + }, + "experimental": { + "com.example/review": {} + }, + "futureCapability": {} + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/distinct-tool-and-resource-annotations.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/distinct-tool-and-resource-annotations.json new file mode 100644 index 0000000..3010e8b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/distinct-tool-and-resource-annotations.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "annotation-types", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "annotation-types" + } + ], + "tools": [ + { + "name": "inspect", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "annotations": { + "title": "Inspect", + "readOnlyHint": true, + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": false, + "futureToolHint": "preserved" + } + } + ], + "resources": [ + { + "uri": "test://resource", + "name": "resource", + "annotations": { + "audience": [ + "user", + "assistant" + ], + "priority": 0.8, + "lastModified": "2026-08-24T10:00:00Z", + "futureResourceHint": "preserved" + } + } + ], + "resourceTemplates": [ + { + "uriTemplate": "test://resource/{id}", + "name": "resource_by_id", + "annotations": { + "audience": [ + "assistant" + ], + "priority": 0.5 + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/elicitation-declarations.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/elicitation-declarations.json new file mode 100644 index 0000000..6f731ae --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/elicitation-declarations.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "elicitation-example", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18", + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "elicitation-example" + } + ], + "tools": [ + { + "name": "assign_issue", + "inputSchema": { + "type": "object", + "properties": { + "issue": { + "type": "integer" + } + }, + "required": [ + "issue" + ], + "additionalProperties": false + }, + "elicitations": [ + { + "name": "choose_assignee", + "mode": "form", + "message": "Who should own this issue?", + "requestedSchema": { + "type": "object", + "properties": { + "assignee": { + "type": "string", + "title": "Assignee", + "minLength": 1 + } + }, + "required": [ + "assignee" + ] + } + }, + { + "name": "authorize_tracker", + "mode": "url", + "message": "Authorize access to the issue tracker.", + "when": "The current authorization grant is insufficient.", + "url": "https://auth.example.com/authorize", + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ] + }, + { + "name": "choose_labels", + "mode": "form", + "message": "Choose labels for this issue.", + "requestedSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "labels": { + "type": "array", + "title": "Labels", + "items": { + "type": "string", + "enum": [ + "bug", + "feature" + ] + }, + "default": [ + "bug" + ] + } + } + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ] + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/integrated-draft2-features.yaml b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/integrated-draft2-features.yaml new file mode 100644 index 0000000..91a1247 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/integrated-draft2-features.yaml @@ -0,0 +1,56 @@ +$schema: https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json +mcpdesc: 0.8.0 +info: + name: integrated-draft2-features + version: 1.0.0 + x-example-owner: platform +protocolVersions: [2026-07-28] +securitySchemes: + api-key: + type: apiKey + in: header + name: X-API-Key + x-example-rotation: managed +security: + - api-key: [] +components: + schemas: + Input: + type: object + properties: + query: + type: string + required: [query] + additionalProperties: false + Unused: + type: object + x-named-schema: + type: object + toolExamples: + basic: + input: + query: mcp + result: + resultType: complete + content: + - type: text + text: One result + x-example-source: documentation + x-example-registry: shared +tools: + - name: search + inputSchema: + $componentRef: "#/components/schemas/Input" + examples: + basic: + $componentRef: "#/components/toolExamples/basic" + clientRequirements: + elicitation: + form: {} + security: [] + x-example-stability: stable + - name: status + inputSchema: + type: object + additionalProperties: false +x-example-document: integrated \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/meta-literal-values.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/meta-literal-values.json new file mode 100644 index 0000000..7b65b38 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/meta-literal-values.json @@ -0,0 +1,102 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "meta-literal-values", + "version": "1.0.0" + }, + "protocolVersions": ["2026-07-28"], + "transports": [ + { + "type": "stdio", + "command": "meta-literal-values" + } + ], + "tools": [ + { + "name": "status", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "_meta": { + "com.example/status": "stable", + "display_hint": "compact" + }, + "examples": { + "complete": { + "input": {}, + "result": { + "resultType": "complete", + "content": [ + { + "type": "text", + "text": "Ready", + "_meta": { + "com.example/render-mode": "badge" + } + } + ], + "_meta": { + "io.modelcontextprotocol/serverInfo": { + "name": "example-server", + "version": "1.0.0" + }, + "traceparent": "00-00000000000000000000000000000001-0000000000000001-01" + } + } + } + } + } + ], + "resources": [ + { + "uri": "example:///status", + "name": "status", + "_meta": { + "com.example/classification": "public" + }, + "examples": { + "current": { + "result": { + "resultType": "complete", + "ttlMs": 0, + "cacheScope": "private", + "contents": [ + { + "uri": "example:///status", + "text": "Ready", + "_meta": { + "captured_at": "redacted" + } + } + ], + "_meta": { + "io.modelcontextprotocol/serverInfo": { + "name": "example-server", + "version": "1.0.0" + } + } + } + } + } + } + ], + "resourceTemplates": [ + { + "uriTemplate": "example:///items/{id}", + "name": "item", + "_meta": { + "com.example/stability": "experimental" + } + } + ], + "prompts": [ + { + "name": "summarize", + "_meta": { + "com.example/category": "summary" + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/minimal-zero-primitives.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/minimal-zero-primitives.json new file mode 100644 index 0000000..3e5377b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/minimal-zero-primitives.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "empty-server", + "version": "0.1.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "instructions": "This server is under construction. Connection details and primitives are not declared." +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-completion-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-completion-examples.json new file mode 100644 index 0000000..4844e2e --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-completion-examples.json @@ -0,0 +1,172 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "completion-example-catalogue", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "completion-example-catalogue" + } + ], + "capabilities": [ + { + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "completions": {} + } + ], + "resourceTemplates": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "uriTemplate": "repo://{owner}/{repository}/issues/{issue}", + "name": "repository_issue", + "completionExamples": { + "issue-prefix": { + "argument": { + "name": "issue", + "value": "12" + }, + "result": { + "completion": { + "values": [ + "120", + "121", + "129" + ], + "hasMore": true, + "total": 14 + } + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "uriTemplate": "repo://{owner}/{repository}/issues/{issue}", + "name": "repository_issue", + "completionExamples": { + "issue-prefix": { + "argument": { + "name": "issue", + "value": "12" + }, + "context": { + "arguments": { + "owner": "example", + "repository": "widgets" + } + }, + "result": { + "resultType": "complete", + "completion": { + "values": [ + "120", + "121", + "129" + ], + "hasMore": true, + "total": 14 + }, + "_meta": { + "captured": "inspector" + } + } + } + } + } + ], + "prompts": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "name": "team_lead", + "arguments": [ + { + "name": "department", + "required": true + }, + { + "name": "name", + "required": true + } + ], + "completionExamples": { + "engineering-a": { + "argument": { + "name": "name", + "value": "a" + }, + "context": { + "arguments": { + "department": "engineering" + } + }, + "result": { + "completion": { + "values": [ + "Ada", + "Alan" + ], + "total": 2, + "hasMore": false + } + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "name": "team_lead", + "arguments": [ + { + "name": "department", + "required": true + }, + { + "name": "name", + "required": true + } + ], + "completionExamples": { + "engineering-a": { + "argument": { + "name": "name", + "value": "a" + }, + "context": { + "arguments": { + "department": "engineering" + } + }, + "result": { + "resultType": "complete", + "completion": { + "values": [ + "Ada", + "Alan" + ], + "total": 2, + "hasMore": false + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-prompt-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-prompt-examples.json new file mode 100644 index 0000000..2cba0b0 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-prompt-examples.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "prompt-example-fixture", + "version": "1.0.0" + }, + "protocolVersions": ["2025-11-25", "2026-07-28"], + "components": { + "promptExamples": { + "default-greeting": { + "arguments": {}, + "result": { + "resultType": "complete", + "messages": [ + { + "role": "assistant", + "content": { "type": "text", "text": "Hello." } + } + ] + } + } + } + }, + "prompts": [ + { + "name": "greeting", + "protocolVersions": ["2026-07-28"], + "examples": { + "default": { + "$componentRef": "#/components/promptExamples/default-greeting" + } + } + }, + { + "name": "greeting", + "protocolVersions": ["2025-11-25"], + "examples": { + "default": { + "result": { + "messages": [ + { + "role": "assistant", + "content": { "type": "text", "text": "Hello." } + } + ] + } + } + } + }, + { + "name": "city_briefing", + "protocolVersions": ["2026-07-28"], + "arguments": [ + { "name": "city", "required": true }, + { "name": "audience" } + ], + "examples": { + "paris-engineering": { + "arguments": { + "city": "Paris", + "audience": "engineering" + }, + "result": { + "resultType": "complete", + "description": "Engineering briefing for Paris", + "messages": [ + { + "role": "user", + "content": { + "type": "text", + "text": "Summarize current engineering considerations for Paris." + } + }, + { + "role": "assistant", + "content": { + "type": "resource_link", + "uri": "briefing://paris/engineering", + "name": "Paris engineering briefing", + "mimeType": "text/markdown" + } + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-resource-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-resource-examples.json new file mode 100644 index 0000000..20d9206 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-resource-examples.json @@ -0,0 +1,140 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "resource-example-catalogue", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "resource-example-catalogue" + } + ], + "resources": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "uri": "file:///project/src/", + "name": "source_directory", + "mimeType": "inode/directory", + "examples": { + "two-files": { + "result": { + "contents": [ + { + "uri": "file:///project/src/", + "mimeType": "inode/directory", + "text": "main.rs\nlib.rs\n" + }, + { + "uri": "file:///project/src/main.rs", + "mimeType": "text/x-rust", + "text": "fn main() {}\n", + "_meta": { + "captured": true + } + }, + { + "uri": "file:///project/src/lib.rs", + "mimeType": "text/x-rust", + "text": "pub fn answer() -> u8 { 42 }\n" + } + ], + "_meta": { + "snapshot": "example" + } + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "uri": "file:///project/src/", + "name": "source_directory", + "mimeType": "inode/directory", + "examples": { + "two-files": { + "result": { + "resultType": "complete", + "ttlMs": 60000, + "cacheScope": "private", + "contents": [ + { + "uri": "file:///project/src/", + "mimeType": "inode/directory", + "text": "main.rs\nlib.rs\n" + }, + { + "uri": "file:///project/src/main.rs", + "mimeType": "text/x-rust", + "text": "fn main() {}\n" + }, + { + "uri": "file:///project/src/lib.rs", + "mimeType": "text/x-rust", + "text": "pub fn answer() -> u8 { 42 }\n" + } + ] + } + } + } + }, + { + "uri": "asset:///pixel.bin", + "name": "pixel", + "mimeType": "application/octet-stream", + "size": 3, + "examples": { + "three-bytes": { + "result": { + "contents": [ + { + "uri": "asset:///pixel.bin", + "mimeType": "application/octet-stream", + "blob": "AAEC" + } + ] + } + } + }, + "protocolVersions": [ + "2025-11-25" + ] + } + ], + "resourceTemplates": [ + { + "protocolVersions": [ + "2026-07-28" + ], + "uriTemplate": "chess://games/{game_id}", + "name": "game_detail", + "mimeType": "application/json", + "examples": { + "sample-game": { + "uri": "chess://games/example-1234", + "result": { + "resultType": "complete", + "ttlMs": 300000, + "cacheScope": "public", + "contents": [ + { + "uri": "chess://games/example-1234", + "mimeType": "application/json", + "text": "{\"id\":\"example-1234\",\"result\":\"1-0\"}" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-tool-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-tool-examples.json new file mode 100644 index 0000000..2ab14e3 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-tool-examples.json @@ -0,0 +1,105 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "tool-example-fixture", + "version": "1.0.0" + }, + "protocolVersions": ["2026-07-28"], + "transports": [ + { + "type": "stdio", + "command": "tool-example-fixture" + } + ], + "tools": [ + { + "name": "weather", + "inputSchema": { + "type": "object", + "properties": { + "city": { "type": "string" } + }, + "required": ["city"], + "additionalProperties": false + }, + "outputSchema": { + "type": "object", + "properties": { + "temperature": { "type": "number" } + }, + "required": ["temperature"], + "additionalProperties": false + }, + "examples": { + "paris.complete": { + "input": { "city": "Paris" }, + "result": { + "resultType": "complete", + "content": [ + { "type": "text", "text": "Paris: 21.5 C" }, + { "type": "image", "data": "aW1hZ2U=", "mimeType": "image/png" }, + { "type": "audio", "data": "YXVkaW8=", "mimeType": "audio/wav" }, + { + "type": "resource", + "resource": { + "uri": "weather://paris/report", + "mimeType": "text/plain", + "text": "Clear" + } + }, + { + "type": "resource_link", + "uri": "weather://paris/map", + "name": "Paris map", + "mimeType": "image/png" + } + ], + "structuredContent": { "temperature": 21.5 }, + "isError": false + } + } + } + }, + { + "name": "current_time", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "examples": { + "utc": { + "input": {}, + "result": { + "resultType": "complete", + "content": [ + { "type": "text", "text": "2026-08-24T12:00:00Z" } + ] + } + } + } + }, + { + "name": "quota_limited_search", + "inputSchema": { + "type": "object", + "properties": { + "query": { "type": "string" } + }, + "required": ["query"] + }, + "examples": { + "tool-rate-limit": { + "input": { "query": "example" }, + "result": { + "resultType": "complete", + "content": [ + { "type": "text", "text": "Tool quota exhausted; retry later." } + ], + "isError": true + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-tool-interaction-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-tool-interaction-examples.json new file mode 100644 index 0000000..5816b9a --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/named-tool-interaction-examples.json @@ -0,0 +1,258 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "tool-interaction-examples", + "version": "1.0.0" + }, + "protocolVersions": ["2025-11-25", "2026-07-28"], + "tools": [ + { + "protocolVersions": ["2025-11-25"], + "name": "prepare_release", + "inputSchema": { + "type": "object", + "properties": { + "version": { "type": "string" } + }, + "required": ["version"], + "additionalProperties": false + }, + "outputSchema": { + "type": "object", + "properties": { + "status": { "type": "string" } + }, + "required": ["status"], + "additionalProperties": false + }, + "elicitations": [ + { + "name": "confirm", + "mode": "form", + "message": "Approve this release?", + "requestedSchema": { + "type": "object", + "properties": { + "approved": { "type": "boolean" } + }, + "required": ["approved"] + } + } + ], + "interactionExamples": { + "approved-release": { + "input": { + "version": "2.0.0" + }, + "steps": [ + { + "type": "roots", + "request": {}, + "response": { + "roots": [ + { + "uri": "file:///workspace/example", + "name": "Example workspace" + } + ] + } + }, + { + "type": "sampling", + "request": { + "messages": [ + { + "role": "user", + "content": { + "type": "text", + "text": "Summarize the release plan." + } + } + ], + "tools": [ + { + "name": "diff_summary", + "description": "Summarize pending release changes.", + "inputSchema": { + "type": "object", + "properties": { + "branch": { "type": "string" } + }, + "required": ["branch"] + } + } + ], + "toolChoice": { + "mode": "auto" + }, + "maxTokens": 180 + }, + "response": { + "role": "assistant", + "content": { + "type": "text", + "text": "Run smoke tests and confirm the changelog before publishing version 2.0.0." + }, + "model": "claude-3-sonnet-20240229", + "stopReason": "endTurn" + } + }, + { + "type": "elicitation", + "declaration": "confirm", + "request": { + "mode": "form", + "message": "Approve this release?", + "requestedSchema": { + "type": "object", + "properties": { + "approved": { "type": "boolean" } + }, + "required": ["approved"] + } + }, + "response": { + "action": "accept", + "content": { + "approved": true + } + } + } + ], + "result": { + "content": [ + { + "type": "text", + "text": "Release preparation completed." + } + ], + "structuredContent": { + "status": "prepared" + } + } + } + } + }, + { + "protocolVersions": ["2026-07-28"], + "name": "prepare_release", + "inputSchema": { + "type": "object", + "properties": { + "version": { "type": "string" } + }, + "required": ["version"], + "additionalProperties": false + }, + "outputSchema": { + "type": "object", + "properties": { + "status": { "type": "string" } + }, + "required": ["status"], + "additionalProperties": false + }, + "elicitations": [ + { + "name": "authorize", + "mode": "url", + "message": "Authorize publication.", + "url": "https://mcp.example.com/release/connect" + } + ], + "interactionExamples": { + "authorized-release": { + "input": { + "version": "2.0.0" + }, + "steps": [ + { + "type": "roots", + "request": {}, + "response": { + "roots": [ + { + "uri": "file:///workspace/example", + "name": "Example workspace" + } + ] + } + }, + { + "type": "sampling", + "request": { + "messages": [ + { + "role": "user", + "content": { + "type": "text", + "text": "Check whether the release note wording is ready to publish." + } + } + ], + "includeContext": "thisServer", + "tools": [ + { + "name": "inspect_notes", + "description": "Inspect the draft release notes.", + "inputSchema": { + "type": "object", + "properties": { + "version": { "type": "string" } + }, + "required": ["version"] + } + } + ], + "toolChoice": { + "mode": "required" + }, + "maxTokens": 220 + }, + "response": { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "call_notes_1", + "name": "inspect_notes", + "input": { + "version": "2.0.0" + } + } + ], + "model": "claude-3-sonnet-20240229", + "stopReason": "toolUse" + } + }, + { + "type": "elicitation", + "declaration": "authorize", + "request": { + "mode": "url", + "message": "Authorize publication.", + "url": "https://mcp.example.com/release/connect" + }, + "response": { + "action": "accept" + } + } + ], + "result": { + "resultType": "complete", + "content": [ + { + "type": "text", + "text": "Release preparation completed." + } + ], + "structuredContent": { + "status": "prepared" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/object-level-specification-extensions.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/object-level-specification-extensions.json new file mode 100644 index 0000000..6b05cc6 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/object-level-specification-extensions.json @@ -0,0 +1,203 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-specification-extensions", + "version": "1.0.0", + "icons": [ + { + "src": "https://example.com/icon.png", + "x-example-display": "compact" + } + ], + "contact": { + "name": "Platform Team", + "x-example-directory-id": 42 + }, + "license": { + "name": "Apache-2.0", + "x-example-reviewed": true + }, + "x-example-owner": { + "team": "platform", + "protocolVersions": [ + "extension-private-version" + ] + } + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "extension-server", + "x-example-runtime": "local" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://example.com/authorize", + "tokenUrl": "https://example.com/token", + "scopes": { + "tools:read": "Use read-only tools" + }, + "x-example-token-profile": null + }, + "x-example-flow-policy": [ + "interactive" + ] + }, + "x-example-security-owner": "identity" + } + }, + "capabilities": [ + { + "tools": { + "listChanged": true, + "x-example-refresh-budget": 5 + }, + "resources": { + "subscribe": true, + "x-example-subscription-tier": "standard" + }, + "prompts": { + "listChanged": false, + "x-example-curated": true + }, + "x-example-capability-source": "curated" + } + ], + "tools": [ + { + "name": "search", + "protocolVersions": [ + "2025-11-25" + ], + "inputSchema": { + "type": "object", + "properties": { + "query": { + "type": "string" + } + }, + "required": [ + "query" + ] + }, + "examples": { + "default": { + "input": { + "query": "example" + }, + "result": { + "content": [ + { + "type": "text", + "text": "Example result" + } + ] + }, + "x-example-confidence": 0.9 + } + }, + "elicitations": [ + { + "name": "confirm_search", + "mode": "form", + "message": "Continue?", + "requestedSchema": { + "type": "object", + "properties": { + "continue": { + "type": "boolean" + } + } + }, + "x-example-review-class": "routine" + } + ], + "x-example-lifecycle": { + "status": "legacy" + } + }, + { + "name": "search", + "protocolVersions": [ + "2026-07-28" + ], + "inputSchema": { + "type": "object", + "properties": { + "query": { + "type": "string" + } + }, + "required": [ + "query" + ] + }, + "x-example-lifecycle": { + "status": "current" + } + } + ], + "resources": [ + { + "protocolVersions": [ + "2026-07-28" + ], + "uri": "test://resource", + "name": "resource", + "examples": { + "current": { + "result": { + "resultType": "complete", + "ttlMs": 60, + "cacheScope": "private", + "contents": [ + { + "uri": "test://resource", + "text": "Example resource" + } + ] + }, + "x-example-origin": "curated" + } + }, + "x-example-owner": "docs" + } + ], + "resourceTemplates": [ + { + "uriTemplate": "test://resource/{id}", + "name": "resource-template", + "x-example-owner": "docs" + } + ], + "prompts": [ + { + "name": "summarize", + "arguments": [ + { + "name": "style", + "x-example-default-source": "profile" + } + ], + "x-example-owner": "prompts" + } + ], + "tags": [ + { + "name": "search", + "x-example-color": "blue" + } + ], + "x-example-document-profile": { + "name": "governed" + } +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/protocol-coverage-and-tool-schemas.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/protocol-coverage-and-tool-schemas.json new file mode 100644 index 0000000..eb32722 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/protocol-coverage-and-tool-schemas.json @@ -0,0 +1,173 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "schema-laboratory", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "schema-laboratory" + }, + { + "type": "streamable-http", + "url": "https://schema-laboratory.example.com/mcp", + "protocolVersions": [ + "2026-07-28" + ] + } + ], + "capabilities": [ + { + "tools": { + "listChanged": true + } + } + ], + "tools": [ + { + "name": "closed_no_parameters", + "inputSchema": { + "type": "object", + "additionalProperties": false + } + }, + { + "name": "open_unspecified_parameters", + "inputSchema": { + "type": "object" + } + }, + { + "name": "declared_parameters", + "inputSchema": { + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "query" + ], + "additionalProperties": false + } + }, + { + "name": "full_2020_12_schema", + "protocolVersions": [ + "2026-07-28" + ], + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "$defs": { + "target": { + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer" + } + }, + "required": [ + "id" + ], + "additionalProperties": false + } + ] + } + }, + "properties": { + "mode": { + "type": "string", + "enum": [ + "lookup", + "search" + ] + }, + "region": { + "type": "string", + "x-mcp-header": "Region" + }, + "target": { + "$ref": "#/$defs/target" + }, + "limit": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ] + } + }, + "allOf": [ + { + "if": { + "properties": { + "mode": { + "const": "lookup" + } + }, + "required": [ + "mode" + ] + }, + "then": { + "required": [ + "target" + ] + }, + "else": { + "required": [ + "region" + ] + } + } + ], + "required": [ + "mode" + ], + "additionalProperties": false + }, + "outputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "type": "object", + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ], + "additionalProperties": false + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/protocol-scoped-primitives.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/protocol-scoped-primitives.json new file mode 100644 index 0000000..fbdb596 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/protocol-scoped-primitives.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "jobs", + "version": "2.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "jobs" + } + ], + "tools": [ + { + "name": "run_job", + "protocolVersions": [ + "2025-11-25" + ], + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "execution": { + "taskSupport": "optional" + }, + "tags": [ + "queued" + ] + }, + { + "name": "run_job", + "protocolVersions": [ + "2026-07-28" + ], + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "tags": [ + "stateless" + ] + } + ], + "tags": [ + { + "name": "queued", + "description": "Operations using the 2025 task model." + }, + { + "name": "stateless", + "description": "Operations using the 2026 stateless model." + }, + { + "name": "reserved", + "description": "A document-wide category not used in either projected view." + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/reusable-components.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/reusable-components.json new file mode 100644 index 0000000..5cc4f21 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/reusable-components.json @@ -0,0 +1,100 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "reusable-components", + "version": "1.0.0" + }, + "protocolVersions": ["2026-07-28"], + "components": { + "schemas": { + "Input": { + "type": "object", + "properties": { "query": { "type": "string" } }, + "required": ["query"], + "additionalProperties": false + }, + "InputAlias": { + "$componentRef": "#/components/schemas/Input" + }, + "Output": { + "type": "object", + "properties": { "count": { "type": "integer" } }, + "required": ["count"] + }, + "Form": { + "type": "object", + "properties": { "approval": { "type": "boolean" } }, + "required": ["approval"] + } + }, + "toolExamples": { + "basic": { + "input": { "query": "mcp" }, + "result": { + "resultType": "complete", + "content": [{ "type": "text", "text": "One result" }], + "structuredContent": { "count": 1 } + }, + "x-example-source": "documentation" + } + }, + "resourceExamples": { + "current": { + "result": { + "resultType": "complete", + "ttlMs": 60, + "cacheScope": "private", + "contents": [{ "uri": "data://status", "text": "ready" }] + } + } + }, + "resourceTemplateExamples": { + "item": { + "uri": "data://items/1", + "result": { + "resultType": "complete", + "ttlMs": 60, + "cacheScope": "public", + "contents": [{ "uri": "data://items/1", "text": "item 1" }] + } + } + }, + "promptExamples": { + "default": { + "arguments": {}, + "result": { + "resultType": "complete", + "messages": [{ "role": "assistant", "content": { "type": "text", "text": "Hello." } }] + } + } + }, + "x-example-owner": "documentation" + }, + "tools": [{ + "name": "search", + "inputSchema": { "$componentRef": "#/components/schemas/InputAlias" }, + "outputSchema": { "$componentRef": "#/components/schemas/Output" }, + "examples": { "basic": { "$componentRef": "#/components/toolExamples/basic" } }, + "elicitations": [{ + "name": "approve", + "mode": "form", + "message": "Approve this search?", + "requestedSchema": { "$componentRef": "#/components/schemas/Form" } + }] + }], + "resources": [{ + "uri": "data://status", + "name": "status", + "examples": { "current": { "$componentRef": "#/components/resourceExamples/current" } } + }], + "resourceTemplates": [{ + "uriTemplate": "data://items/{id}", + "name": "item", + "examples": { "item": { "$componentRef": "#/components/resourceTemplateExamples/item" } } + }], + "prompts": [{ + "name": "greeting", + "examples": { "default": { "$componentRef": "#/components/promptExamples/default" } } + }] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/security-composition-and-inheritance.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/security-composition-and-inheritance.json new file mode 100644 index 0000000..f0cece2 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/security-composition-and-inheritance.json @@ -0,0 +1,112 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "security-composition", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://security-composition.example.com/mcp", + "security": [ + { + "oauth": [ + "records:read" + ], + "api-key": [] + } + ] + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "tokenUrl": "https://auth.example.com/token", + "scopes": { + "records:read": "Read records", + "records:write": "Modify records" + } + } + } + }, + "api-key": { + "type": "apiKey", + "in": "header", + "name": "X-API-Key" + }, + "oidc": { + "type": "openIdConnect", + "openIdConnectUrl": "https://id.example.com/.well-known/openid-configuration" + } + }, + "security": [ + {}, + { + "oauth": [ + "records:read" + ] + } + ], + "tools": [ + { + "name": "inherited_transport_requirement", + "inputSchema": { + "type": "object", + "additionalProperties": false + } + }, + { + "name": "combined_primitive_override", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [ + { + "oauth": [ + "records:write" + ], + "api-key": [] + } + ] + }, + { + "name": "cleared_requirement", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [] + }, + { + "name": "anonymous_only", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [ + {} + ] + }, + { + "name": "anonymous_or_openid", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [ + {}, + { + "oidc": [] + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/security-root-and-override.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/security-root-and-override.json new file mode 100644 index 0000000..f11e0d9 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/security-root-and-override.json @@ -0,0 +1,135 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "issue-manager", + "version": "2.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "instructions": "Search before modifying issues.", + "transports": [ + { + "type": "streamable-http", + "url": "https://issues.example.com/mcp" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "tokenUrl": "https://auth.example.com/token", + "scopes": { + "issues:read": "Read issues", + "issues:write": "Modify issues" + } + } + } + }, + "api-key": { + "type": "apiKey", + "in": "header", + "name": "X-API-Key" + } + }, + "security": [ + { + "oauth": [ + "issues:read" + ] + }, + { + "api-key": [] + } + ], + "capabilities": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "tools": { + "listChanged": true + }, + "resources": { + "listChanged": true, + "subscribe": true + }, + "tasks": { + "requests": { + "tools": { + "call": {} + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "tools": { + "listChanged": true + }, + "resources": { + "listChanged": true, + "subscribe": true + }, + "extensions": { + "io.modelcontextprotocol/tasks": {} + } + } + ], + "tools": [ + { + "name": "get_issue", + "inputSchema": { + "type": "object", + "properties": { + "number": { + "type": "integer" + } + }, + "required": [ + "number" + ], + "additionalProperties": false + } + }, + { + "name": "update_issue", + "inputSchema": { + "type": "object", + "properties": { + "number": { + "type": "integer" + }, + "title": { + "type": "string" + } + }, + "required": [ + "number" + ], + "additionalProperties": false + }, + "security": [ + { + "oauth": [ + "issues:write" + ] + } + ] + }, + { + "name": "health", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/tagged-surface.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/tagged-surface.json new file mode 100644 index 0000000..4b96660 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/tagged-surface.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "catalog", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://catalog.example.com/mcp" + } + ], + "tags": [ + { + "name": "reference", + "description": "Reference material" + }, + { + "name": "search", + "description": "Search operations" + } + ], + "tools": [ + { + "name": "search_docs", + "inputSchema": { + "type": "object", + "properties": { + "query": { + "type": "string" + } + }, + "required": [ + "query" + ], + "additionalProperties": false + }, + "tags": [ + "search" + ] + } + ], + "resources": [ + { + "uri": "docs://home", + "name": "home", + "tags": [ + "reference" + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/unknown-extension-identifier.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/unknown-extension-identifier.json new file mode 100644 index 0000000..a195d4e --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/unknown-extension-identifier.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "unknown-extension-identifier", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "unknown-extension-identifier" + } + ], + "capabilities": [ + { + "extensions": { + "com.example/custom-feature": { + "enabled": true + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/deprecated-client-capability-requirements.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/deprecated-client-capability-requirements.json new file mode 100644 index 0000000..09d041d --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/deprecated-client-capability-requirements.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "deprecated-client-capability-requirements", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "resources": [ + { + "uri": "workspace://current", + "name": "current_workspace", + "clientRequirements": { + "roots": {} + } + } + ], + "prompts": [ + { + "name": "legacy_sampling", + "clientRequirements": { + "sampling": { + "context": {} + }, + "extensions": { + "io.modelcontextprotocol/future-capability": {} + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/legacy-completion-examples.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/legacy-completion-examples.json new file mode 100644 index 0000000..fa0f048 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/legacy-completion-examples.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "legacy-completion-examples", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-03-26" + ], + "transports": [ + { + "type": "stdio", + "command": "legacy-completion-examples" + } + ], + "capabilities": [ + { + "completions": {} + } + ], + "resourceTemplates": [ + { + "uriTemplate": "repo://{owner}/{repository}/issues/{issue}", + "name": "repository_issue", + "completionExamples": { + "issue-prefix": { + "argument": { + "name": "issue", + "value": "12" + }, + "result": { + "completion": { + "values": [ + "120", + "121", + "129" + ], + "hasMore": true, + "total": 14 + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/legacy-sse-modern-revision.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/legacy-sse-modern-revision.json new file mode 100644 index 0000000..06a5183 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/legacy-sse-modern-revision.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "legacy-sse-modern-revision", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-03-26" + ], + "transports": [ + { + "type": "sse", + "url": "https://example.com/sse" + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/logging-deprecated-2026.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/logging-deprecated-2026.json new file mode 100644 index 0000000..642a375 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/logging-deprecated-2026.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "logging-warning", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://logging-warning.example.com/mcp" + } + ], + "capabilities": [ + { + "logging": {} + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-dialect-tool-example.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-dialect-tool-example.json new file mode 100644 index 0000000..c1d4d4d --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-dialect-tool-example.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "pre-dialect-example", + "version": "1.0.0" + }, + "protocolVersions": ["2024-11-05"], + "transports": [ + { + "type": "stdio", + "command": "pre-dialect-example" + } + ], + "tools": [ + { + "name": "greet", + "inputSchema": { + "type": "object", + "properties": { + "name": { "type": "string" } + }, + "required": ["name"], + "additionalProperties": false + }, + "examples": { + "friendly": { + "input": { "name": "Example User" }, + "result": { + "content": [ + { "type": "text", "text": "Hello, Example User." } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-dialect-tool-schema-shape.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-dialect-tool-schema-shape.json new file mode 100644 index 0000000..06b9773 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-dialect-tool-schema-shape.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "pre-dialect-tool-schema-shape", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05" + ], + "transports": [ + { + "type": "stdio", + "command": "pre-dialect-tool-schema-shape" + } + ], + "tools": [ + { + "name": "legacy_numeric_input", + "inputSchema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "exclusiveMinimum": true + } + }, + "required": [ + "value" + ] + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-standard-extension-capabilities.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-standard-extension-capabilities.json new file mode 100644 index 0000000..2407969 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/pre-standard-extension-capabilities.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "pre-standard-extension-capabilities", + "version": "3.4.6" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://mcp.example.com" + } + ], + "capabilities": [ + { + "extensions": { + "io.modelcontextprotocol/ui": {} + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/resource-example-consistency.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/resource-example-consistency.json new file mode 100644 index 0000000..390233b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/resource-example-consistency.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "resource-example-consistency-warnings", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "resource-example-consistency-warnings" + } + ], + "resources": [ + { + "uri": "collection:///items", + "name": "items", + "mimeType": "application/json", + "size": 100, + "examples": { + "collection-snapshot": { + "result": { + "contents": [ + { + "uri": "collection:///items/one", + "mimeType": "application/vnd.example.item+json", + "text": "{\"id\":1}" + } + ] + } + } + } + }, + { + "uri": "test://single", + "name": "single", + "mimeType": "application/json", + "size": 100, + "examples": { + "different-observation": { + "result": { + "contents": [ + { + "uri": "test://single", + "mimeType": "text/plain", + "text": "short" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/tool-interaction-client-requirements-contradictions.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/tool-interaction-client-requirements-contradictions.json new file mode 100644 index 0000000..45b6dd8 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/tool-interaction-client-requirements-contradictions.json @@ -0,0 +1,124 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "tool-interaction-client-requirements-contradictions", + "version": "1.0.0" + }, + "protocolVersions": ["2026-07-28"], + "tools": [ + { + "name": "prepare_release", + "inputSchema": { + "type": "object", + "properties": { + "version": { "type": "string" } + }, + "required": ["version"], + "additionalProperties": false + }, + "outputSchema": { + "type": "object", + "properties": { + "status": { "type": "string" } + }, + "required": ["status"], + "additionalProperties": false + }, + "clientRequirements": { + "elicitation": { + "form": {} + }, + "sampling": {} + }, + "elicitations": [ + { + "name": "authorize", + "mode": "url", + "message": "Authorize publication.", + "url": "https://mcp.example.com/release/connect" + } + ], + "interactionExamples": { + "contradictory": { + "input": { + "version": "2.0.0" + }, + "steps": [ + { + "type": "roots", + "request": {}, + "response": { + "roots": [ + { + "uri": "file:///workspace/example" + } + ] + } + }, + { + "type": "sampling", + "request": { + "messages": [ + { + "role": "user", + "content": { + "type": "text", + "text": "Inspect the release notes." + } + } + ], + "includeContext": "thisServer", + "tools": [ + { + "name": "inspect_notes", + "inputSchema": { + "type": "object" + } + } + ], + "toolChoice": { + "mode": "required" + }, + "maxTokens": 160 + }, + "response": { + "role": "assistant", + "content": { + "type": "text", + "text": "The release note summary is ready." + }, + "model": "claude-3-sonnet-20240229", + "stopReason": "endTurn" + } + }, + { + "type": "elicitation", + "declaration": "authorize", + "request": { + "mode": "url", + "message": "Authorize publication.", + "url": "https://mcp.example.com/release/connect" + }, + "response": { + "action": "accept" + } + } + ], + "result": { + "resultType": "complete", + "content": [ + { + "type": "text", + "text": "Release preparation completed." + } + ], + "structuredContent": { + "status": "prepared" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/uncatalogued-oauth-scope.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/uncatalogued-oauth-scope.json new file mode 100644 index 0000000..42e056b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/uncatalogued-oauth-scope.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "scope-warning", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://scope-warning.example.com/mcp" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "tokenUrl": "https://auth.example.com/token", + "scopes": { + "issues:read": "Read issues" + } + } + } + } + }, + "tools": [ + { + "name": "admin_report", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [ + { + "oauth": [ + "issues:admin" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/uncatalogued-openid-scope.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/uncatalogued-openid-scope.json new file mode 100644 index 0000000..eb8e679 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/uncatalogued-openid-scope.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "openid-scope-warning", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://openid-scope-warning.example.com/mcp" + } + ], + "securitySchemes": { + "oidc": { + "type": "openIdConnect", + "openIdConnectUrl": "https://id.example.com/.well-known/openid-configuration" + } + }, + "security": [ + { + "oidc": [ + "profile:read" + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unknown-reserved-extension-identifier.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unknown-reserved-extension-identifier.json new file mode 100644 index 0000000..b2520e8 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unknown-reserved-extension-identifier.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "unknown-reserved-extension-identifier", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "unknown-reserved-extension-identifier" + } + ], + "capabilities": [ + { + "extensions": { + "io.modelcontextprotocol/future-capability": { + "enabled": true + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unknown-reserved-meta-key.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unknown-reserved-meta-key.json new file mode 100644 index 0000000..3fd66a5 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unknown-reserved-meta-key.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { "name": "unknown-reserved-meta-key", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "transports": [{ "type": "stdio", "command": "unknown-reserved-meta-key" }], + "prompts": [ + { + "name": "future-metadata", + "_meta": { + "io.modelcontextprotocol/future-key": { + "preserved": true + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unresolved-external-tool-example-ref.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unresolved-external-tool-example-ref.json new file mode 100644 index 0000000..8f07c4c --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unresolved-external-tool-example-ref.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "external-example-ref", + "version": "1.0.0" + }, + "protocolVersions": ["2026-07-28"], + "transports": [ + { + "type": "stdio", + "command": "external-example-ref" + } + ], + "tools": [ + { + "name": "lookup", + "inputSchema": { + "type": "object", + "properties": { + "identifier": { "$ref": "https://schemas.example.invalid/identifier.json" } + }, + "required": ["identifier"] + }, + "examples": { + "external-identifier": { + "input": { "identifier": "example-123" }, + "result": { + "resultType": "complete", + "content": [ + { "type": "text", "text": "Found example-123." } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unresolved-external-tool-ref.json b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unresolved-external-tool-ref.json new file mode 100644 index 0000000..48c0ff2 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unresolved-external-tool-ref.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json", + "mcpdesc": "0.8.0", + "info": { + "name": "unresolved-external-tool-ref", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "unresolved-external-tool-ref" + } + ], + "tools": [ + { + "name": "lookup", + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "identifier": { + "$ref": "https://schemas.example.com/common.json#/$defs/identifier" + } + }, + "required": [ + "identifier" + ], + "additionalProperties": false + } + } + ] +} diff --git a/packages/validator/test/standalone.test.js b/packages/validator/test/standalone.test.js index 4215d29..dbcfd86 100644 --- a/packages/validator/test/standalone.test.js +++ b/packages/validator/test/standalone.test.js @@ -49,7 +49,7 @@ test('standalone bundle contains no dynamic code generation', () => { assert.doesNotMatch(source, /\beval\s*\(|\bnew\s+Function\b/); }); -for (const specification of ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2']) { +for (const specification of ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2', '0.8.0-rc.3']) { const fixtureRoot = fileURLToPath(new URL(`./snapshots/${specification}/fixtures/`, import.meta.url)); test(`standalone ${specification} matches standard fixture outcomes`, () => { for (const filename of fixtureFiles(fixtureRoot)) { diff --git a/packages/validator/test/types/api.test.ts b/packages/validator/test/types/api.test.ts index 22fe84c..53d8af4 100644 --- a/packages/validator/test/types/api.test.ts +++ b/packages/validator/test/types/api.test.ts @@ -21,12 +21,15 @@ const result: McpDescriptionValidationResult = validateMcpDescription(document, const componentResolution = resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-rc.1' }); +resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-rc.2' }); +resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-rc.3' }); const referencePath: readonly (string | number)[] | undefined = componentResolution.provenance[0]?.referencePath; validateMcpDescription(document, { specification: '0.8.0-draft.2' }); validateMcpDescription(document, { specification: '0.8.0-draft.3' }); validateMcpDescription(document, { specification: '0.8.0-draft.4' }); validateMcpDescription(document, { specification: '0.8.0-rc.1' }); validateMcpDescription(document, { specification: '0.8.0-rc.2' }); +validateMcpDescription(document, { specification: '0.8.0-rc.3' }); const standaloneResult: McpDescriptionValidationResult = validateStandalone(document, { specification: '0.8.0-rc.1' }); @@ -41,6 +44,7 @@ const draft3: '0.8.0-draft.3' = supportedSpecifications[2]; const draft4: '0.8.0-draft.4' = supportedSpecifications[3]; const rc1: '0.8.0-rc.1' = supportedSpecifications[4]; const rc2: '0.8.0-rc.2' = supportedSpecifications[5]; +const rc3: '0.8.0-rc.3' = supportedSpecifications[6]; const catalogueDate: '2026-09-04' = mcpExtensionCatalogue.effectiveDate; const extensionMaturity: 'official' | 'experimental' | 'uncatalogued' = mcpExtensionMaturity('io.modelcontextprotocol/ui'); const protocolVersion: string = supportedProtocolVersions[0]; @@ -67,6 +71,7 @@ void draft4Tag; void draft4SchemaUri; void rc1SchemaUri; void rc2; +void rc3; void catalogueDate; void extensionMaturity; void browserResult; @@ -83,5 +88,5 @@ validateMcpDescription(document, { specification: '0.8.0-draft.5' }); supportedSpecifications.push('0.8.0-draft.1'); // @ts-expect-error Provenance is only available for supported selectors. specificationProvenance['0.8.0-draft.5']; -// @ts-expect-error Component resolution is intentionally RC.1-only. +// @ts-expect-error Draft 4 component resolution is not supported. resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-draft.4' }); \ No newline at end of file