diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a4f170b..d6081f8 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -39,6 +39,9 @@ - Treat core snapshot support as operation-specific. Adding a selector requires an explicit disposition for every selector-sensitive public operation and an updated exhaustive support-contract test. +- Treat active snapshot retention as an explicit lifecycle decision. Retired + selectors leave current registries, declarations, bundles, and tarballs while + their immutable source and fixtures remain in Git and older package releases. ## Documentation Delineation diff --git a/.github/skills/release-assessment/SKILL.md b/.github/skills/release-assessment/SKILL.md index 9064235..8ea6d7a 100644 --- a/.github/skills/release-assessment/SKILL.md +++ b/.github/skills/release-assessment/SKILL.md @@ -11,7 +11,8 @@ license: Apache-2.0 ## Workflow -1. Read `AGENTS.md`, `CHANGELOG.md`, `ROADMAP.md`, and `RELEASING.md`. +1. Read `AGENTS.md`, `CHANGELOG.md`, both package changelogs, `ROADMAP.md`, and + `RELEASING.md`. 2. Fetch tags and the current main branch without changing the worktree: ```bash diff --git a/.github/skills/validator-snapshot-intake/SKILL.md b/.github/skills/validator-snapshot-intake/SKILL.md index 9da6d24..ba1f53f 100644 --- a/.github/skills/validator-snapshot-intake/SKILL.md +++ b/.github/skills/validator-snapshot-intake/SKILL.md @@ -61,6 +61,9 @@ informational. ## Boundaries - Snapshot approval does not authorize npm publication. +- Treat the source bundle and its `manifest.json` as disposable intake inputs. + Do not copy or retain them under `packages/validator/`; imported runtime and + fixture bytes are protected by `snapshot-integrity.json`. - Do not require a sibling specification checkout in routine tests or CI. - Do not overwrite, alias, or silently retarget an existing selector. - Record AI assistance in the pull request. diff --git a/AGENTS.md b/AGENTS.md index f8b3fc2..fc7ac2a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,14 +8,15 @@ validation without creating a second source of normative specification text. ## Starting a work session - Work from this repository, not from a consumer or specification repository. -- Read `README.md`, `CHANGELOG.md`, and `ROADMAP.md` before selecting work. +- Read `README.md`, `CHANGELOG.md`, the relevant package changelog, and + `ROADMAP.md` before selecting work. - Inspect the current branch and worktree before editing; do not assume roadmap items have been approved or started. - Confirm the next milestone with the maintainer when it requires publication, a new public operation, a cross-repository integration, or a package-boundary decision. -- Keep `CHANGELOG.md` and `ROADMAP.md` synchronized with delivered behavior and - approved sequencing. +- Keep the relevant package changelog and `ROADMAP.md` synchronized with + delivered behavior and approved sequencing. ## Ownership boundaries @@ -42,6 +43,10 @@ validation without creating a second source of normative specification text. 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. +- Runtime and package support is an explicit lifecycle decision. Retiring a + selector removes it from registries, declarations, generated bundles, and + package contents without deleting or modifying its historical source and + fixtures; consumers can pin the older immutable package release. - A maintainer may approve an additive tooling-metadata correction to a published snapshot implementation only when its schema, conformance results, diagnostics, and frozen fixtures remain unchanged. Record each exception in diff --git a/CHANGELOG.md b/CHANGELOG.md index ab18292..d87b243 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,190 +1,10 @@ -# Changelog +# Changelogs -All notable changes to this repository are documented here. +The packages in this repository are versioned and released independently. See +the changelog for the package you consume: -## [0.9.0] - 2026-09-07 +- [`@mcpdesc/core`](packages/core/CHANGELOG.md) +- [`@mcpdesc/validator`](packages/validator/CHANGELOG.md) -### 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 - -### Added - -- `migrateMcpDescription07ToRc2`, an exact-target migration from - caller-validated MCP Description 0.7.0 documents with RC.2 result validation - and conversion reports. - -### Fixed - -- npm publishing workflows use OIDC trusted publishing without token-oriented - registry configuration, and validator tags no longer trigger the core publish - workflow. - -## [0.8.0] - 2026-09-04 - -### Added - -- Immutable MCP Description `0.8.0-rc.2` validator and core selector support, - with pinned extension catalogue metadata and manifest-verified provenance. -- `mergeEffectiveProtocolViews` and semantic-equivalence support for validated - protocol views, including pre-standard extension-map round trips. - -### Changed - -- RC.2 Effective Protocol View projection preserves structurally valid server - extension maps for pre-2026 revisions. Validator handling is compatibly - relaxed from an error to `extensions-not-supported-by-version` warnings; - client requirements remain strict and earlier selectors remain immutable. - -## [0.7.0] - 2026-09-03 - -### Added - -- `resolveMcpDescriptionComponentReferences` in the root and CSP-safe - `@mcpdesc/core/components` entry points for validated RC.1 component - resolution, with deterministic authored-to-terminal provenance and typed - component references and registries. - -### Changed - -- Core now pins `@mcpdesc/validator` `0.8.0` and reaches the snapshot-owned - resolver only through its CSP-safe standalone entry. - -## [0.6.1] - 2026-09-02 - -### Changed - -- Core now pins `@mcpdesc/validator` `0.7.1`, whose package documentation and - npm homepage identify the validator's purpose and package directory more - clearly. - -## [0.6.0] - 2026-09-02 - -### Added - -- `@mcpdesc/validator` as an independently versioned workspace package, - preserving its immutable snapshots, frozen fixtures, public APIs, and - strict-CSP browser contracts from `0.6.0`. - -### Changed - -- Core development now consumes the repository-owned validator `0.7.0` workspace - package through the existing standalone entry. - -## [0.5.0] - 2026-09-02 - -### Added - -- Optional RC.1 migration protocol defaults with snapshot validation and a - stable `migration-default-protocol-version` warning when applied. -- Deterministic, JSON-compatible conversion reports for successful, warned, and - failed migrations, plus pretty-printed report serialization. - -## [0.4.0] - 2026-09-01 - -### Added - -- Immutable MCP Description `0.8.0-rc.1` constants and provenance metadata. -- `migrateMcpDescription07ToRc1`, a dedicated migration that emits and validates - the exact RC.1 schema snapshot. - -### Changed - -- Effective Protocol View projection and declaration selection now accept exact - Draft 4 or RC.1 selectors while preserving all published Draft 4 behavior. - -## [0.3.0] - 2026-09-01 - -### Added - -- CSP-safe `@mcpdesc/core/documents` and `@mcpdesc/core/selection` subpath - exports, with browser checks that keep document parsing validator-free. - -### Changed - -- Validator-backed operations now use `@mcpdesc/validator/standalone` 0.5.0 to - avoid runtime code generation under strict browser CSP. - -## [0.2.0] - 2026-08-31 - -### Added - -- `parseMcpDescriptionSource` and `serializeMcpDescription`, browser-safe pure - operations for source-aware JSON/YAML parsing and deterministic output without - host I/O. -- JSON-compatible YAML enforcement for finite numbers, string mapping keys, - plain values, and acyclic structures. -- Strict JSON enforcement for unique object keys and finite numbers. -- `selectMcpDescriptionDeclarations`, a pure Draft 4 operation for selecting - tools, resources, resource templates, and prompts by their normative - identities while retaining scoped variants and omitting empty collections. -- Source/result validation, structured diagnostics, immutability tests, browser - bundling, tarball checks, and isolated-consumer coverage for declaration - selection. -- `migrateMcpDescription07ToDraft4`, a pure migration for caller-validated 0.7.0 - documents with deterministic inline-security extraction, empty collection - normalization, generated-name diagnostics, and Draft 4 result validation. -- A maintainer-controlled release procedure covering tarball review, version and - tag consistency, first-publication bootstrap, trusted npm publishing, - provenance, and post-publication verification. -- A tag-triggered GitHub Actions workflow that runs the full validation suite - and publishes `@mcpdesc/core` with npm provenance support. - -### Changed - -- Contribution guidance now uses lockfile-exact installation and links to the - release procedure. -- The `Validate` workflow is enabled as a required check for `main`. -- Future npm releases use GitHub Actions trusted publishing without a stored npm - token. - -## [0.1.0] - 2026-08-31 - -Initial experimental package baseline, published manually to npm after local -tarball verification. The corresponding Git tag has not yet been created. - -### Added - -- `@mcpdesc/core`, a TypeScript ESM package for Node.js 22 or later and browser - bundlers. -- `projectEffectiveProtocolView`, a pure operation that projects an MCP - Description `0.8.0-draft.4` document to one declared MCP protocol revision. -- Projection across transports, capabilities, tools, resources, resource - templates, prompts, and nested elicitation declarations while preserving - document-wide content and reusable components. -- Validator-backed source and result validation with structured, phase-aware, - deduplicated diagnostics. -- Immutable Draft 4 snapshot metadata sourced from `@mcpdesc/validator@0.4.0`, - including the schema URI, snapshot tag, schema digest, and supported protocol - revisions. -- Focused tests for scope inheritance, omission, nested projection, - immutability, idempotence, diagnostics, and snapshot provenance. -- Type checking, formatting, browser bundling, exact package-content checks, and - isolated tarball consumer verification in the local and CI validation - workflow. -- Apache-2.0 licensing, provenance, contribution guidance, and repository - instructions for coding assistants. - -[Unreleased]: https://github.com/mcpdesc/core/compare/v0.8.1...HEAD -[0.8.1]: https://github.com/mcpdesc/core/compare/v0.8.0...v0.8.1 -[0.8.0]: https://github.com/mcpdesc/core/compare/v0.7.0...v0.8.0 -[0.7.0]: https://github.com/mcpdesc/core/compare/v0.6.1...v0.7.0 -[0.6.1]: https://github.com/mcpdesc/core/compare/v0.6.0...v0.6.1 -[0.6.0]: https://github.com/mcpdesc/core/compare/v0.5.0...v0.6.0 -[0.5.0]: https://github.com/mcpdesc/core/compare/v0.4.0...v0.5.0 -[0.4.0]: https://github.com/mcpdesc/core/compare/v0.3.0...v0.4.0 -[0.3.0]: https://github.com/mcpdesc/core/compare/v0.2.0...v0.3.0 -[0.2.0]: https://github.com/mcpdesc/core/compare/v0.1.0...v0.2.0 -[0.1.0]: https://github.com/mcpdesc/core/releases/tag/v0.1.0 +Repository-only maintenance that does not affect a published package is tracked +in Git history and pull requests rather than a shared release changelog. diff --git a/README.md b/README.md index a2e94d6..59a65ad 100644 --- a/README.md +++ b/README.md @@ -10,18 +10,18 @@ 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, 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. +MCP Description 0.7.0 values to exact RC.2 or RC.3 snapshots with stable +conversion reports, projects and merges Effective Protocol Views, and selects +declaration subsets by normative identity. RC.2 is deprecated but remains +operational during migration to RC.3. 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, schema identities, and MCP protocol revisions are separate version axes. -See [CHANGELOG.md](CHANGELOG.md) for delivered behavior and +See the [package changelog index](CHANGELOG.md) for delivered behavior and [ROADMAP.md](ROADMAP.md) for the staged next steps and deferred decisions. See [RELEASING.md](RELEASING.md) for the maintainer-controlled release process. diff --git a/RELEASING.md b/RELEASING.md index 28596e7..313c2a9 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -19,8 +19,9 @@ the guarded `release:check` and `release:tag` scripts below. equivalent SSH URL for that repository. - Confirm that the package version is unused on npm and matches its intended Git tag: `v` for core or `validator-v` for validator. -- Record user-visible changes in `CHANGELOG.md` and keep `ROADMAP.md` aligned - with the work actually delivered. +- Record user-visible changes in `packages/core/CHANGELOG.md` or + `packages/validator/CHANGELOG.md` and keep `ROADMAP.md` aligned with the work + actually delivered. ## Prepare and inspect @@ -100,6 +101,6 @@ npm audit signatures ``` Confirm the npm provenance links to the expected GitHub repository, workflow, -tag, and commit. Create the corresponding GitHub release from the changelog, -then update `CHANGELOG.md` and `ROADMAP.md` if the published outcome differs -from the release preparation. +tag, and commit. Create the corresponding GitHub release from the package +changelog, then update that changelog and `ROADMAP.md` if the published outcome +differs from the release preparation. diff --git a/ROADMAP.md b/ROADMAP.md index cd82a61..aed243e 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -43,6 +43,8 @@ repository. - [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. +- [x] Narrow current runtime and package support to RC.2 and RC.3, deprecate + RC.2, and retain retired snapshot artifacts as repository history. - Add normalization or comparison operations only where multiple consumers demonstrate the same requirement. @@ -54,10 +56,10 @@ normative schema applies. - Adopt shared operations in the editor and Inspector where they replace duplicated semantic logic. -- Add support for later immutable MCP Description snapshots without silently - changing behavior for existing selectors. Record every selector-sensitive - operation as supported or intentionally unsupported and keep the exhaustive - support-contract test synchronized with that decision. +- Add later immutable MCP Description snapshots through an explicit active + support decision. Record every selector-sensitive operation as supported or + intentionally unsupported, retire selectors from current packages when their + transition window closes, and keep the exhaustive support contract current. - Revisit package boundaries as concrete parser, serialization, or capture requirements emerge; keep file and network access out of `@mcpdesc/core`. diff --git a/package-lock.json b/package-lock.json index 51fa26c..f3f8704 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2200,10 +2200,10 @@ }, "packages/core": { "name": "@mcpdesc/core", - "version": "0.9.0", + "version": "0.9.1", "license": "Apache-2.0", "dependencies": { - "@mcpdesc/validator": "0.10.0", + "@mcpdesc/validator": "0.10.1", "jsonc-parser": "3.3.1", "yaml": "2.9.0" }, @@ -2213,7 +2213,7 @@ }, "packages/validator": { "name": "@mcpdesc/validator", - "version": "0.10.0", + "version": "0.10.1", "license": "Apache-2.0", "dependencies": { "@cfworker/json-schema": "^4.1.1", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md new file mode 100644 index 0000000..6256b84 --- /dev/null +++ b/packages/core/CHANGELOG.md @@ -0,0 +1,203 @@ +# Changelog + +All notable changes to `@mcpdesc/core` are documented in this file. + +## [Unreleased] + +## [0.9.1] - 2026-09-07 + +### Changed + +- Narrowed core runtime support to RC.2 and RC.3, deprecated RC.2, and removed + Draft 4 and RC.1 from the current API. +- Moved core release history into the package and included it in published + tarballs. + +## [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 + +### Added + +- `migrateMcpDescription07ToRc2`, an exact-target migration from + caller-validated MCP Description 0.7.0 documents with RC.2 result validation + and conversion reports. + +### Fixed + +- npm publishing workflows use OIDC trusted publishing without token-oriented + registry configuration, and validator tags no longer trigger the core publish + workflow. + +## [0.8.0] - 2026-09-04 + +### Added + +- Immutable MCP Description `0.8.0-rc.2` validator and core selector support, + with pinned extension catalogue metadata and manifest-verified provenance. +- `mergeEffectiveProtocolViews` and semantic-equivalence support for validated + protocol views, including pre-standard extension-map round trips. + +### Changed + +- RC.2 Effective Protocol View projection preserves structurally valid server + extension maps for pre-2026 revisions. Validator handling is compatibly + relaxed from an error to `extensions-not-supported-by-version` warnings; + client requirements remain strict and earlier selectors remain immutable. + +## [0.7.0] - 2026-09-03 + +### Added + +- `resolveMcpDescriptionComponentReferences` in the root and CSP-safe + `@mcpdesc/core/components` entry points for validated RC.1 component + resolution, with deterministic authored-to-terminal provenance and typed + component references and registries. + +### Changed + +- Core now pins `@mcpdesc/validator` `0.8.0` and reaches the snapshot-owned + resolver only through its CSP-safe standalone entry. + +## [0.6.1] - 2026-09-02 + +### Changed + +- Core now pins `@mcpdesc/validator` `0.7.1`, whose package documentation and + npm homepage identify the validator's purpose and package directory more + clearly. + +## [0.6.0] - 2026-09-02 + +### Added + +- `@mcpdesc/validator` as an independently versioned workspace package, + preserving its immutable snapshots, frozen fixtures, public APIs, and + strict-CSP browser contracts from `0.6.0`. + +### Changed + +- Core development now consumes the repository-owned validator `0.7.0` workspace + package through the existing standalone entry. + +## [0.5.0] - 2026-09-02 + +### Added + +- Optional RC.1 migration protocol defaults with snapshot validation and a + stable `migration-default-protocol-version` warning when applied. +- Deterministic, JSON-compatible conversion reports for successful, warned, and + failed migrations, plus pretty-printed report serialization. + +## [0.4.0] - 2026-09-01 + +### Added + +- Immutable MCP Description `0.8.0-rc.1` constants and provenance metadata. +- `migrateMcpDescription07ToRc1`, a dedicated migration that emits and validates + the exact RC.1 schema snapshot. + +### Changed + +- Effective Protocol View projection and declaration selection now accept exact + Draft 4 or RC.1 selectors while preserving all published Draft 4 behavior. + +## [0.3.0] - 2026-09-01 + +### Added + +- CSP-safe `@mcpdesc/core/documents` and `@mcpdesc/core/selection` subpath + exports, with browser checks that keep document parsing validator-free. + +### Changed + +- Validator-backed operations now use `@mcpdesc/validator/standalone` 0.5.0 to + avoid runtime code generation under strict browser CSP. + +## [0.2.0] - 2026-08-31 + +### Added + +- `parseMcpDescriptionSource` and `serializeMcpDescription`, browser-safe pure + operations for source-aware JSON/YAML parsing and deterministic output without + host I/O. +- JSON-compatible YAML enforcement for finite numbers, string mapping keys, + plain values, and acyclic structures. +- Strict JSON enforcement for unique object keys and finite numbers. +- `selectMcpDescriptionDeclarations`, a pure Draft 4 operation for selecting + tools, resources, resource templates, and prompts by their normative + identities while retaining scoped variants and omitting empty collections. +- Source/result validation, structured diagnostics, immutability tests, browser + bundling, tarball checks, and isolated-consumer coverage for declaration + selection. +- `migrateMcpDescription07ToDraft4`, a pure migration for caller-validated 0.7.0 + documents with deterministic inline-security extraction, empty collection + normalization, generated-name diagnostics, and Draft 4 result validation. +- A maintainer-controlled release procedure covering tarball review, version and + tag consistency, first-publication bootstrap, trusted npm publishing, + provenance, and post-publication verification. +- A tag-triggered GitHub Actions workflow that runs the full validation suite + and publishes `@mcpdesc/core` with npm provenance support. + +### Changed + +- Contribution guidance now uses lockfile-exact installation and links to the + release procedure. +- The `Validate` workflow is enabled as a required check for `main`. +- Future npm releases use GitHub Actions trusted publishing without a stored npm + token. + +## [0.1.0] - 2026-08-31 + +Initial experimental package baseline, published manually to npm after local +tarball verification. The corresponding Git tag has not yet been created. + +### Added + +- `@mcpdesc/core`, a TypeScript ESM package for Node.js 22 or later and browser + bundlers. +- `projectEffectiveProtocolView`, a pure operation that projects an MCP + Description `0.8.0-draft.4` document to one declared MCP protocol revision. +- Projection across transports, capabilities, tools, resources, resource + templates, prompts, and nested elicitation declarations while preserving + document-wide content and reusable components. +- Validator-backed source and result validation with structured, phase-aware, + deduplicated diagnostics. +- Immutable Draft 4 snapshot metadata sourced from `@mcpdesc/validator@0.4.0`, + including the schema URI, snapshot tag, schema digest, and supported protocol + revisions. +- Focused tests for scope inheritance, omission, nested projection, + immutability, idempotence, diagnostics, and snapshot provenance. +- Type checking, formatting, browser bundling, exact package-content checks, and + isolated tarball consumer verification in the local and CI validation + workflow. +- Apache-2.0 licensing, provenance, contribution guidance, and repository + instructions for coding assistants. + +[Unreleased]: https://github.com/mcpdesc/core/compare/v0.9.1...HEAD +[0.9.1]: https://github.com/mcpdesc/core/compare/v0.9.0...v0.9.1 +[0.9.0]: https://github.com/mcpdesc/core/compare/v0.8.1...v0.9.0 +[0.8.1]: https://github.com/mcpdesc/core/compare/v0.8.0...v0.8.1 +[0.8.0]: https://github.com/mcpdesc/core/compare/v0.7.0...v0.8.0 +[0.7.0]: https://github.com/mcpdesc/core/compare/v0.6.1...v0.7.0 +[0.6.1]: https://github.com/mcpdesc/core/compare/v0.6.0...v0.6.1 +[0.6.0]: https://github.com/mcpdesc/core/compare/v0.5.0...v0.6.0 +[0.5.0]: https://github.com/mcpdesc/core/compare/v0.4.0...v0.5.0 +[0.4.0]: https://github.com/mcpdesc/core/compare/v0.3.0...v0.4.0 +[0.3.0]: https://github.com/mcpdesc/core/compare/v0.2.0...v0.3.0 +[0.2.0]: https://github.com/mcpdesc/core/compare/v0.1.0...v0.2.0 +[0.1.0]: https://github.com/mcpdesc/core/releases/tag/v0.1.0 diff --git a/packages/core/README.md b/packages/core/README.md index b1c6601..3ce1924 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -6,6 +6,8 @@ Description documents. The package API remains experimental and may change while MCP Description 0.8 remains pre-1.0. +See [CHANGELOG.md](CHANGELOG.md) for package release history. + ```ts import { migrateMcpDescription07ToRc2, @@ -41,7 +43,7 @@ const merged = mergeEffectiveProtocolViews(protocolViews, { }); const subset = selectMcpDescriptionDeclarations(document, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.3', selections: { tools: ['search'], resources: ['docs://index'], @@ -55,7 +57,7 @@ const migrated = migrateMcpDescription07ToRc2(validatedLegacyDocument, { }); const resolved = resolveMcpDescriptionComponentReferences(document, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.3', }); if (resolved.ok) { @@ -65,36 +67,38 @@ if (resolved.ok) { console.log(serializeMcpDescriptionMigrationReport(migrated.report)); ``` -Semantic operations require an exact immutable selector and support -`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 | +Semantic operations require an exact immutable selector and support `0.8.0-rc.2` +and `0.8.0-rc.3`. RC.2 remains operational but is deprecated; new integrations +should select RC.3. The operations 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. + +| Operation | RC.2 | RC.3 | +| ---------------------------------- | --------------------- | --------- | +| Effective Protocol View projection | Supported, deprecated | Supported | +| Effective Protocol View merge | Supported, deprecated | Supported | +| Declaration selection | Supported, deprecated | Supported | +| Migration from 0.7.0 | Supported, deprecated | Supported | +| Component reference resolution | Supported, deprecated | 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` | + +Consumers that still require Draft 4 or RC.1 can pin an older immutable core and +validator release. Those runtime snapshots are retained in Git for integrity +history but are not part of the current package API or tarballs. 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 +Component reference resolution supports 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`; @@ -106,13 +110,13 @@ 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, 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 +author review. 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 @@ -131,5 +135,5 @@ validator entry. Component resolution is available from The repository verifies the exact tarball contents, installs that tarball into an isolated temporary consumer, imports the public package entry points, and -executes an RC.1 projection. Run all checks with `npm run check` from the -repository root. +executes an active-selector projection. Run all checks with `npm run check` from +the repository root. diff --git a/packages/core/package.json b/packages/core/package.json index 2ef2719..b8fc400 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@mcpdesc/core", - "version": "0.9.0", + "version": "0.9.1", "description": "Pure semantic operations for MCP Description documents", "type": "module", "license": "Apache-2.0", @@ -32,6 +32,7 @@ }, "files": [ "dist", + "CHANGELOG.md", "LICENSE", "MODIFICATIONS.md", "ORIGIN.md", @@ -50,7 +51,7 @@ "typecheck": "tsc --build --pretty false" }, "dependencies": { - "@mcpdesc/validator": "0.10.0", + "@mcpdesc/validator": "0.10.1", "jsonc-parser": "3.3.1", "yaml": "2.9.0" } diff --git a/packages/core/scripts/check-browser-bundle.mjs b/packages/core/scripts/check-browser-bundle.mjs index d25f229..221bb7d 100644 --- a/packages/core/scripts/check-browser-bundle.mjs +++ b/packages/core/scripts/check-browser-bundle.mjs @@ -7,8 +7,8 @@ const entries = [ path: '../src/index.ts', allowsValidator: true, requiredExports: [ - 'migrateMcpDescription07ToRc1', 'migrateMcpDescription07ToRc2', + 'migrateMcpDescription07ToRc3', 'serializeMcpDescriptionMigrationReport', ], }, @@ -111,7 +111,7 @@ try { const fixture = JSON.parse( readFileSync( new URL( - '../../validator/test/snapshots/0.8.0-rc.1/fixtures/expected-valid/reusable-components.json', + '../../validator/test/snapshots/0.8.0-rc.2/fixtures/expected-valid/reusable-components.json', import.meta.url, ), 'utf8', @@ -121,7 +121,7 @@ try { root.resolveMcpDescriptionComponentReferences, components.resolveMcpDescriptionComponentReferences, ]) { - const result = operation(fixture, { specification: '0.8.0-rc.1' }); + const result = operation(fixture, { specification: '0.8.0-rc.2' }); if (!result.ok || result.provenance.length === 0) { throw new Error('Component resolution failed under strict CSP'); } diff --git a/packages/core/scripts/check-consumer.mjs b/packages/core/scripts/check-consumer.mjs index 03d2974..cead9be 100644 --- a/packages/core/scripts/check-consumer.mjs +++ b/packages/core/scripts/check-consumer.mjs @@ -58,14 +58,11 @@ try { ` import assert from 'node:assert/strict'; import { - RC_1_SCHEMA_URI, RC_2_SCHEMA_URI, RC_3_SCHEMA_URI, - migrateMcpDescription07ToRc1, migrateMcpDescription07ToRc2, migrateMcpDescription07ToRc3, projectEffectiveProtocolView, - rc1Snapshot, rc2Snapshot, rc3Snapshot, resolveMcpDescriptionComponentReferences, @@ -80,7 +77,7 @@ try { import { validateMcpDescription } from '@mcpdesc/validator/browser'; const source = { - $schema: RC_1_SCHEMA_URI, + $schema: RC_2_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'consumer-smoke', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -104,7 +101,7 @@ try { assert.deepEqual(parsed.value, source); const result = projectEffectiveProtocolView(source, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', protocolVersion: '2026-07-28', }); @@ -113,13 +110,13 @@ try { assert.deepEqual(result.value.tools.map((tool) => tool.name), ['current']); const selection = selectMcpDescriptionDeclarations(source, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', selections: { tools: ['legacy'] }, }); assert.equal(selection.ok, true); assert.deepEqual(selection.value.tools.map((tool) => tool.name), ['legacy']); - const migration = migrateMcpDescription07ToRc1({ + const migration = migrateMcpDescription07ToRc2({ mcpdesc: '0.7.0', info: { name: 'legacy-consumer-smoke', @@ -129,19 +126,19 @@ try { transports: [{ type: 'stdio', command: 'server' }], tools: [{ name: 'legacy', inputSchema: { type: 'object' } }], }, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', sourceValidated: true, }); assert.equal(migration.ok, true); assert.deepEqual(migration.value.protocolVersions, ['2025-11-25']); assert.equal(migration.report.status, 'success'); - const defaultedMigration = migrateMcpDescription07ToRc1({ + const defaultedMigration = migrateMcpDescription07ToRc2({ mcpdesc: '0.7.0', info: { name: 'defaulted-consumer-smoke', version: '1.0.0' }, transports: [{ type: 'stdio', command: 'server' }], }, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', defaultProtocolVersion: '2026-07-28', sourceValidated: true, }); @@ -158,9 +155,9 @@ try { defaultedMigration.report, ); assert.equal(validateMcpDescription(defaultedMigration.value, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', }).valid, true); - assert.equal(rc1Snapshot.specification, '0.8.0-rc.1'); + assert.equal(rc2Snapshot.specification, '0.8.0-rc.2'); const rc2Migration = migrateMcpDescription07ToRc2({ mcpdesc: '0.7.0', @@ -221,7 +218,6 @@ try { ); 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], ]) { @@ -266,11 +262,9 @@ try { type McpDescComponentRegistries, } from '@mcpdesc/core/components'; import { - migrateMcpDescription07ToRc1, migrateMcpDescription07ToRc2, migrateMcpDescription07ToRc3, serializeMcpDescriptionMigrationReport, - type MigrateMcpDescription07ToRc1Options, type MigrateMcpDescription07ToRc2Options, type MigrateMcpDescription07ToRc3Options, } from '@mcpdesc/core'; @@ -278,17 +272,17 @@ try { const parsed = parseMcpDescriptionSource('{"mcpdesc":"0.8.0"}'); if (parsed.ok) { selectMcpDescriptionDeclarations(parsed.value, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', selections: { tools: ['search'] }, }); } - const migrationOptions: MigrateMcpDescription07ToRc1Options = { - specification: '0.8.0-rc.1', + const migrationOptions: MigrateMcpDescription07ToRc2Options = { + specification: '0.8.0-rc.2', defaultProtocolVersion: '2026-07-28', sourceValidated: true, }; - const migration = migrateMcpDescription07ToRc1( + const migration = migrateMcpDescription07ToRc2( { mcpdesc: '0.7.0', info: { name: 'typed', version: '1.0.0' } }, migrationOptions, ); @@ -331,7 +325,7 @@ try { }; resolveMcpDescriptionComponentReferences( { mcpdesc: '0.8.0', info: {}, protocolVersions: [], components }, - { specification: '0.8.0-rc.1' }, + { specification: '0.8.0-rc.2' }, ); resolveMcpDescriptionComponentReferences( { mcpdesc: '0.8.0', info: {}, protocolVersions: [], components }, diff --git a/packages/core/scripts/check-package.mjs b/packages/core/scripts/check-package.mjs index 781977d..c3bff31 100644 --- a/packages/core/scripts/check-package.mjs +++ b/packages/core/scripts/check-package.mjs @@ -1,6 +1,20 @@ import { execFileSync } from 'node:child_process'; +import fs from 'node:fs'; import process from 'node:process'; +const packageJson = JSON.parse( + fs.readFileSync(new URL('../package.json', import.meta.url), 'utf8'), +); +const changelog = fs.readFileSync( + new URL('../CHANGELOG.md', import.meta.url), + 'utf8', +); +if (!changelog.includes(`## [${packageJson.version}] - `)) { + throw new Error( + `CHANGELOG.md has no dated ${packageJson.version} release section`, + ); +} + const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; const output = execFileSync( npm, @@ -14,6 +28,7 @@ const [pack] = JSON.parse(output); const actual = pack.files.map((file) => file.path).sort(); const expected = [ + 'CHANGELOG.md', 'LICENSE', 'MODIFICATIONS.md', 'NOTICE', diff --git a/packages/core/src/components.ts b/packages/core/src/components.ts index 8f5d298..d3c4c3c 100644 --- a/packages/core/src/components.ts +++ b/packages/core/src/components.ts @@ -5,11 +5,7 @@ import { } from '@mcpdesc/validator/standalone'; import type { CoreDiagnostic, McpDescriptionDocument } from './model.js'; -import { - RC_1_SPECIFICATION, - RC_2_SPECIFICATION, - RC_3_SPECIFICATION, -} from './snapshot.js'; +import { RC_2_SPECIFICATION, RC_3_SPECIFICATION } from './snapshot.js'; export type { McpDescComponentNamespace, @@ -23,14 +19,10 @@ export type { } from './model.js'; export interface ResolveMcpDescriptionComponentReferencesOptions { - readonly specification: - | typeof RC_1_SPECIFICATION - | typeof RC_2_SPECIFICATION - | typeof RC_3_SPECIFICATION; + readonly specification: typeof RC_2_SPECIFICATION | typeof RC_3_SPECIFICATION; } const componentReferenceSpecifications = new Set([ - RC_1_SPECIFICATION, RC_2_SPECIFICATION, RC_3_SPECIFICATION, ]); diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 5039426..2648098 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -23,8 +23,6 @@ export { type ResolveMcpDescriptionComponentReferencesResult, } from './components.js'; export { - migrateMcpDescription07ToDraft4, - migrateMcpDescription07ToRc1, migrateMcpDescription07ToRc2, migrateMcpDescription07ToRc3, serializeMcpDescriptionMigrationReport, @@ -32,8 +30,6 @@ export { type McpDescriptionMigrationDefault, type McpDescriptionMigrationReport, type McpDescriptionMigrationResult, - type MigrateMcpDescription07Options, - type MigrateMcpDescription07ToRc1Options, type MigrateMcpDescription07ToRc2Options, type MigrateMcpDescription07ToRc3Options, } from './migration.js'; @@ -62,16 +58,11 @@ export { type SelectMcpDescriptionDeclarationsOptions, } from './selection.js'; export { - DRAFT_4_SCHEMA_URI, - DRAFT_4_SPECIFICATION, - RC_1_SCHEMA_URI, - RC_1_SPECIFICATION, RC_2_SCHEMA_URI, RC_2_SPECIFICATION, RC_3_SCHEMA_URI, RC_3_SPECIFICATION, - draft4Snapshot, - rc1Snapshot, + deprecatedCoreSpecifications, rc2Snapshot, rc3Snapshot, type SupportedCoreSpecification, diff --git a/packages/core/src/migration.ts b/packages/core/src/migration.ts index b974ace..d731b0a 100644 --- a/packages/core/src/migration.ts +++ b/packages/core/src/migration.ts @@ -11,16 +11,10 @@ import type { McpDescriptionDocument, } from './model.js'; import { - DRAFT_4_SCHEMA_URI, - DRAFT_4_SPECIFICATION, - RC_1_SCHEMA_URI, - RC_1_SPECIFICATION, RC_2_SCHEMA_URI, RC_2_SPECIFICATION, RC_3_SCHEMA_URI, RC_3_SPECIFICATION, - draft4Snapshot, - rc1Snapshot, rc2Snapshot, rc3Snapshot, type SupportedCoreSpecification, @@ -42,19 +36,6 @@ const declarationCollections = [ 'prompts', ] as const; -export interface MigrateMcpDescription07Options { - readonly specification: typeof DRAFT_4_SPECIFICATION; - readonly protocolVersion?: SupportedProtocolVersion; - readonly sourceValidated: true; -} - -export interface MigrateMcpDescription07ToRc1Options { - readonly specification: typeof RC_1_SPECIFICATION; - readonly defaultProtocolVersion?: SupportedProtocolVersion; - readonly protocolVersion?: SupportedProtocolVersion; - readonly sourceValidated: true; -} - export interface MigrateMcpDescription07ToRc2Options { readonly specification: typeof RC_2_SPECIFICATION; readonly defaultProtocolVersion?: SupportedProtocolVersion; @@ -70,10 +51,7 @@ export interface MigrateMcpDescription07ToRc3Options { } type SupportedMigrationOptions = - | MigrateMcpDescription07Options - | MigrateMcpDescription07ToRc1Options - | MigrateMcpDescription07ToRc2Options - | MigrateMcpDescription07ToRc3Options; + MigrateMcpDescription07ToRc2Options | MigrateMcpDescription07ToRc3Options; export interface McpDescriptionMigrationDefault { readonly code: 'migration-default-protocol-version'; @@ -344,11 +322,7 @@ function migrateMcpDescription07( source: unknown, options: SupportedMigrationOptions, targetSpecification: SupportedCoreSpecification, - targetSchemaUri: - | typeof DRAFT_4_SCHEMA_URI - | typeof RC_1_SCHEMA_URI - | typeof RC_2_SCHEMA_URI - | typeof RC_3_SCHEMA_URI, + targetSchemaUri: typeof RC_2_SCHEMA_URI | typeof RC_3_SCHEMA_URI, targetProtocolVersions: readonly SupportedProtocolVersion[], ): McpDescriptionMigrationResult { if (options.specification !== targetSpecification) { @@ -398,13 +372,7 @@ function migrateMcpDescription07( ), ]); } - const defaultProtocolVersion = - (targetSpecification === RC_1_SPECIFICATION || - targetSpecification === RC_2_SPECIFICATION || - targetSpecification === RC_3_SPECIFICATION) && - 'defaultProtocolVersion' in options - ? options.defaultProtocolVersion - : undefined; + const defaultProtocolVersion = options.defaultProtocolVersion; const selectedDefault = options.protocolVersion === undefined && declaredVersion === undefined && @@ -527,32 +495,6 @@ export function serializeMcpDescriptionMigrationReport( return `${JSON.stringify(report, null, 2)}\n`; } -export function migrateMcpDescription07ToDraft4( - source: unknown, - options: MigrateMcpDescription07Options, -): McpDescriptionMigrationResult { - return migrateMcpDescription07( - source, - options, - DRAFT_4_SPECIFICATION, - DRAFT_4_SCHEMA_URI, - draft4Snapshot.protocolVersions, - ); -} - -export function migrateMcpDescription07ToRc1( - source: unknown, - options: MigrateMcpDescription07ToRc1Options, -): McpDescriptionMigrationResult { - return migrateMcpDescription07( - source, - options, - RC_1_SPECIFICATION, - RC_1_SCHEMA_URI, - rc1Snapshot.protocolVersions, - ); -} - export function migrateMcpDescription07ToRc2( source: unknown, options: MigrateMcpDescription07ToRc2Options, diff --git a/packages/core/src/snapshot.ts b/packages/core/src/snapshot.ts index ba2d9ec..5fb2fab 100644 --- a/packages/core/src/snapshot.ts +++ b/packages/core/src/snapshot.ts @@ -3,12 +3,6 @@ import { supportedProtocolVersions, } from '@mcpdesc/validator/standalone'; -export const DRAFT_4_SPECIFICATION = '0.8.0-draft.4' as const; -export const DRAFT_4_SCHEMA_URI = - 'https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json' as const; -export const RC_1_SPECIFICATION = '0.8.0-rc.1' as const; -export const RC_1_SCHEMA_URI = - 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json' as const; 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; @@ -17,32 +11,15 @@ 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_3_SPECIFICATION; + typeof RC_2_SPECIFICATION | typeof RC_3_SPECIFICATION; + +export const deprecatedCoreSpecifications = Object.freeze([ + RC_2_SPECIFICATION, +] as const); -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, - schemaUri: DRAFT_4_SCHEMA_URI, - snapshotTag: draft4Provenance.snapshotTag, - schemaSha256: draft4Provenance.schemaSha256, - protocolVersions: supportedProtocolVersions, -}); - -export const rc1Snapshot = Object.freeze({ - specification: RC_1_SPECIFICATION, - schemaUri: RC_1_SCHEMA_URI, - snapshotTag: rc1Provenance.snapshotTag, - schemaSha256: rc1Provenance.schemaSha256, - protocolVersions: supportedProtocolVersions, -}); - export const rc2Snapshot = Object.freeze({ specification: RC_2_SPECIFICATION, schemaUri: RC_2_SCHEMA_URI, @@ -63,9 +40,6 @@ export function isSupportedCoreSpecification( specification: string, ): specification is SupportedCoreSpecification { return ( - specification === DRAFT_4_SPECIFICATION || - specification === RC_1_SPECIFICATION || - specification === RC_2_SPECIFICATION || - specification === RC_3_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 a363e59..63b5df1 100644 --- a/packages/core/test/components.test.ts +++ b/packages/core/test/components.test.ts @@ -11,7 +11,7 @@ import { const reusableComponents = JSON.parse( readFileSync( new URL( - '../../validator/test/snapshots/0.8.0-rc.1/fixtures/expected-valid/reusable-components.json', + '../../validator/test/snapshots/0.8.0-rc.2/fixtures/expected-valid/reusable-components.json', import.meta.url, ), 'utf8', @@ -41,7 +41,7 @@ const laterReusableComponents = { function resolve(document: unknown) { return resolveMcpDescriptionComponentReferences(document, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', }); } @@ -150,7 +150,7 @@ describe('resolveMcpDescriptionComponentReferences', () => { it('is a cloning no-op without components', () => { const document = { - $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json', + $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', mcpdesc: '0.8.0', info: { name: 'no-components', version: '1.0.0' }, protocolVersions: ['2026-07-28'], @@ -167,7 +167,7 @@ describe('resolveMcpDescriptionComponentReferences', () => { it('composes with Effective Protocol View projection in either order', () => { const document = { - $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json', + $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', mcpdesc: '0.8.0', info: { name: 'composition', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -194,12 +194,12 @@ describe('resolveMcpDescriptionComponentReferences', () => { ); if (!resolvedFirst.ok) return; const thenProjected = projectEffectiveProtocolView(resolvedFirst.value, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', protocolVersion: '2026-07-28', }); const projectedFirst = projectEffectiveProtocolView(document, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', protocolVersion: '2026-07-28', }); expect(projectedFirst.ok).toBe(true); @@ -333,7 +333,7 @@ describe('resolveMcpDescriptionComponentReferences', () => { reusableComponents, { specification: '0.8.0-draft.4', - } as unknown as { specification: '0.8.0-rc.1' }, + } as unknown as { specification: '0.8.0-rc.2' }, ); expect(result).toEqual({ diff --git a/packages/core/test/migration.test.ts b/packages/core/test/migration.test.ts index 94f2e1e..e9897b9 100644 --- a/packages/core/test/migration.test.ts +++ b/packages/core/test/migration.test.ts @@ -1,16 +1,12 @@ import { describe, expect, it } from 'vitest'; import { - DRAFT_4_SCHEMA_URI, - RC_1_SCHEMA_URI, RC_2_SCHEMA_URI, RC_3_SCHEMA_URI, - migrateMcpDescription07ToDraft4, - migrateMcpDescription07ToRc1, migrateMcpDescription07ToRc2, migrateMcpDescription07ToRc3, serializeMcpDescriptionMigrationReport, - type MigrateMcpDescription07ToRc1Options, + type MigrateMcpDescription07ToRc2Options, } from '../src/index.js'; const source = { @@ -45,109 +41,20 @@ const source = { 'x-example': { retained: true }, }; -describe('migrateMcpDescription07ToDraft4', () => { - it('migrates protocol scope, capabilities, empty arrays, and inline security', () => { - const original = structuredClone(source); - const result = migrateMcpDescription07ToDraft4(source, { - specification: '0.8.0-draft.4', - sourceValidated: true, - }); - - expect(result.ok).toBe(true); - if (!result.ok) return; - - expect(result.value).toMatchObject({ - $schema: DRAFT_4_SCHEMA_URI, - mcpdesc: '0.8.0', - protocolVersions: ['2025-11-25'], - capabilities: [{ tools: { listChanged: true } }], - 'x-example': { retained: true }, - }); - expect(result.value.info).not.toHaveProperty('protocolVersion'); - expect(result.value.resources).toBeUndefined(); - expect(result.value.resourceTemplates).toBeUndefined(); - expect(result.value.prompts).toBeUndefined(); - expect(result.value.tags).toBeUndefined(); - expect(result.value.tools?.[0]).not.toHaveProperty('icons'); - expect(result.value.tools?.[0]).not.toHaveProperty('tags'); - - const schemeNames = Object.keys(result.value.securitySchemes ?? {}); - expect(schemeNames).toHaveLength(1); - expect(result.value.security).toEqual([{ [schemeNames[0]]: [] }]); - expect(result.value.transports?.[0]).toHaveProperty('security', [ - { [schemeNames[0]]: [] }, - ]); - expect(result.diagnostics).toContainEqual( - expect.objectContaining({ - code: 'migration-generated-security-name', - severity: 'warning', - }), - ); - expect(result.diagnostics).toContainEqual( - expect.objectContaining({ - code: 'migration-deduplicated-security-scheme', - severity: 'warning', - }), - ); - expect(source).toEqual(original); - }); - - it('requires authoritative protocol input when v0.7 omits it', () => { - const { protocolVersion: _, ...info } = source.info; - const withoutProtocol = { ...source, info }; - const missing = migrateMcpDescription07ToDraft4(withoutProtocol, { - specification: '0.8.0-draft.4', - sourceValidated: true, - }); - expect(missing.ok).toBe(false); - expect(missing.diagnostics).toContainEqual( - expect.objectContaining({ code: 'migration-protocol-version-required' }), - ); - - const supplied = migrateMcpDescription07ToDraft4(withoutProtocol, { - specification: '0.8.0-draft.4', - protocolVersion: '2025-11-25', - sourceValidated: true, - }); - expect(supplied.ok).toBe(true); - }); - - it('returns Draft 4 result diagnostics instead of inventing required fields', () => { - const invalidTarget = { - ...source, - security: undefined, - transports: [{ type: 'stdio', command: 'server' }], - tools: [{ name: 'missing_input_schema' }], - }; - const result = migrateMcpDescription07ToDraft4(invalidTarget, { - specification: '0.8.0-draft.4', - sourceValidated: true, - }); - - expect(result.ok).toBe(false); - expect(result.diagnostics).toContainEqual( - expect.objectContaining({ - code: 'schema-validation', - phase: 'result', - }), - ); - }); -}); - -describe('migrateMcpDescription07ToRc1', () => { - it('uses a source protocol version and validates the exact RC.1 snapshot', () => { - const result = migrateMcpDescription07ToRc1(source, { - specification: '0.8.0-rc.1', +describe('migrateMcpDescription07ToRc2', () => { + it('uses a source protocol version and validates the exact RC.2 snapshot', () => { + const result = migrateMcpDescription07ToRc2(source, { + specification: '0.8.0-rc.2', sourceValidated: true, }); expect(result.ok).toBe(true); if (!result.ok) return; - expect(result.value.$schema).toBe(RC_1_SCHEMA_URI); + expect(result.value.$schema).toBe(RC_2_SCHEMA_URI); expect(result.value.mcpdesc).toBe('0.8.0'); expect(result.value.protocolVersions).toEqual(['2025-11-25']); expect(result.report.sourceSpecification).toBe('0.7.0'); - expect(result.report.targetSpecification).toBe('0.8.0-rc.1'); + expect(result.report.targetSpecification).toBe('0.8.0-rc.2'); expect(result.report.defaultsApplied).toEqual([]); }); @@ -155,14 +62,14 @@ describe('migrateMcpDescription07ToRc1', () => { const { protocolVersion: _, ...info } = source.info; const withoutProtocol = { ...source, info }; const options = { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', defaultProtocolVersion: '2026-07-28', sourceValidated: true, } as const; const originalSource = structuredClone(withoutProtocol); const originalOptions = structuredClone(options); - const result = migrateMcpDescription07ToRc1(withoutProtocol, options); + const result = migrateMcpDescription07ToRc2(withoutProtocol, options); expect(result.ok).toBe(true); if (!result.ok) return; @@ -195,9 +102,9 @@ describe('migrateMcpDescription07ToRc1', () => { it('returns the existing required error when no protocol version is available', () => { const { protocolVersion: _, ...info } = source.info; - const result = migrateMcpDescription07ToRc1( + const result = migrateMcpDescription07ToRc2( { ...source, info }, - { specification: '0.8.0-rc.1', sourceValidated: true }, + { specification: '0.8.0-rc.2', sourceValidated: true }, ); expect(result.ok).toBe(false); @@ -210,8 +117,8 @@ describe('migrateMcpDescription07ToRc1', () => { }); it('prefers the source over a conflicting default but preserves explicit override conflicts', () => { - const defaultResult = migrateMcpDescription07ToRc1(source, { - specification: '0.8.0-rc.1', + const defaultResult = migrateMcpDescription07ToRc2(source, { + specification: '0.8.0-rc.2', defaultProtocolVersion: '2026-07-28', sourceValidated: true, }); @@ -226,8 +133,8 @@ describe('migrateMcpDescription07ToRc1', () => { ); } - const conflict = migrateMcpDescription07ToRc1(source, { - specification: '0.8.0-rc.1', + const conflict = migrateMcpDescription07ToRc2(source, { + specification: '0.8.0-rc.2', protocolVersion: '2026-07-28', sourceValidated: true, }); @@ -242,11 +149,11 @@ describe('migrateMcpDescription07ToRc1', () => { it('rejects unsupported defaults at the runtime boundary', () => { const { protocolVersion: _, ...info } = source.info; const options = { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', defaultProtocolVersion: '2099-01-01', sourceValidated: true, - } as unknown as MigrateMcpDescription07ToRc1Options; - const result = migrateMcpDescription07ToRc1({ ...source, info }, options); + } as unknown as MigrateMcpDescription07ToRc2Options; + const result = migrateMcpDescription07ToRc2({ ...source, info }, options); expect(result.ok).toBe(false); expect(result.diagnostics).toContainEqual( @@ -259,8 +166,8 @@ describe('migrateMcpDescription07ToRc1', () => { }); it('reports generated names, deduplication, and result-validation failures', () => { - const converted = migrateMcpDescription07ToRc1(source, { - specification: '0.8.0-rc.1', + const converted = migrateMcpDescription07ToRc2(source, { + specification: '0.8.0-rc.2', sourceValidated: true, }); expect(converted.report.status).toBe('success-with-warnings'); @@ -281,8 +188,8 @@ describe('migrateMcpDescription07ToRc1', () => { transports: [{ type: 'stdio', command: 'server' }], tools: [{ name: 'missing_input_schema' }], }; - const failed = migrateMcpDescription07ToRc1(invalidTarget, { - specification: '0.8.0-rc.1', + const failed = migrateMcpDescription07ToRc2(invalidTarget, { + specification: '0.8.0-rc.2', sourceValidated: true, }); expect(failed.ok).toBe(false); @@ -305,12 +212,12 @@ describe('migrateMcpDescription07ToRc1', () => { }, transports: [{ type: 'stdio', command: 'server' }], }; - const first = migrateMcpDescription07ToRc1(minimalSource, { - specification: '0.8.0-rc.1', + const first = migrateMcpDescription07ToRc2(minimalSource, { + specification: '0.8.0-rc.2', sourceValidated: true, }); - const second = migrateMcpDescription07ToRc1(minimalSource, { - specification: '0.8.0-rc.1', + const second = migrateMcpDescription07ToRc2(minimalSource, { + specification: '0.8.0-rc.2', sourceValidated: true, }); @@ -326,45 +233,6 @@ describe('migrateMcpDescription07ToRc1', () => { }); }); -describe('migrateMcpDescription07ToRc2', () => { - it('uses a source protocol version and validates the exact RC.2 snapshot', () => { - const result = migrateMcpDescription07ToRc2(source, { - specification: '0.8.0-rc.2', - sourceValidated: true, - }); - - expect(result.ok).toBe(true); - if (!result.ok) return; - expect(result.value.$schema).toBe(RC_2_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.2'); - }); - - it('supports caller-provided protocol defaults', () => { - const { protocolVersion: _, ...info } = source.info; - const result = migrateMcpDescription07ToRc2( - { ...source, info }, - { - specification: '0.8.0-rc.2', - defaultProtocolVersion: '2026-07-28', - sourceValidated: true, - }, - ); - - expect(result.ok).toBe(true); - if (!result.ok) return; - expect(result.value.protocolVersions).toEqual(['2026-07-28']); - expect(result.report.defaultsApplied).toEqual([ - { - code: 'migration-default-protocol-version', - path: ['info', 'protocolVersion'], - protocolVersion: '2026-07-28', - }, - ]); - }); -}); - describe('migrateMcpDescription07ToRc3', () => { it('uses a source protocol version and validates the exact RC.3 snapshot', () => { const result = migrateMcpDescription07ToRc3(source, { diff --git a/packages/core/test/projection.test.ts b/packages/core/test/projection.test.ts index 59cd83f..a0e3553 100644 --- a/packages/core/test/projection.test.ts +++ b/packages/core/test/projection.test.ts @@ -1,19 +1,15 @@ import { describe, expect, it } from 'vitest'; 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 = { - $schema: DRAFT_4_SCHEMA_URI, + $schema: RC_2_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'projection-test', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -67,7 +63,7 @@ describe('projectEffectiveProtocolView', () => { it('projects scoped declarations without mutating the source', () => { const original = structuredClone(source); const result = projectEffectiveProtocolView(source, { - specification: '0.8.0-draft.4', + specification: '0.8.0-rc.2', protocolVersion: '2026-07-28', }); @@ -101,7 +97,7 @@ describe('projectEffectiveProtocolView', () => { it('rejects a target absent from the root protocol scope', () => { const result = projectEffectiveProtocolView(source, { - specification: '0.8.0-draft.4', + specification: '0.8.0-rc.2', protocolVersion: '2025-06-18', }); @@ -119,7 +115,7 @@ describe('projectEffectiveProtocolView', () => { const result = projectEffectiveProtocolView( { ...source, tools: [{ name: 'invalid' }] }, { - specification: '0.8.0-draft.4', + specification: '0.8.0-rc.2', protocolVersion: '2026-07-28', }, ); @@ -133,37 +129,6 @@ describe('projectEffectiveProtocolView', () => { ); }); - it('publishes immutable Draft 4 snapshot metadata from the validator', () => { - expect(draft4Snapshot).toMatchObject({ - specification: '0.8.0-draft.4', - schemaUri: DRAFT_4_SCHEMA_URI, - snapshotTag: 'v0.8.0-draft.4', - schemaSha256: - '93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b', - }); - expect(Object.isFrozen(draft4Snapshot)).toBe(true); - }); - - it('projects and publishes immutable RC.1 snapshot metadata', () => { - const result = projectEffectiveProtocolView( - { ...source, $schema: RC_1_SCHEMA_URI }, - { - specification: '0.8.0-rc.1', - protocolVersion: '2026-07-28', - }, - ); - - expect(result.ok).toBe(true); - expect(rc1Snapshot).toMatchObject({ - specification: '0.8.0-rc.1', - schemaUri: RC_1_SCHEMA_URI, - snapshotTag: 'v0.8.0-rc.1', - schemaSha256: - '936a0f24ade501fcabf3d6498c0440c445daa672a575573a35954cee49430ac4', - }); - expect(Object.isFrozen(rc1Snapshot)).toBe(true); - }); - it('preserves pre-standard extension maps in RC.2 protocol views', () => { const extensions = { 'io.modelcontextprotocol/ui': { @@ -211,7 +176,7 @@ describe('projectEffectiveProtocolView', () => { it('projects every scoped root collection and preserves unscoped semantics', () => { const comprehensive = { - $schema: DRAFT_4_SCHEMA_URI, + $schema: RC_2_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'comprehensive', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -277,7 +242,7 @@ describe('projectEffectiveProtocolView', () => { }; const result = projectEffectiveProtocolView(comprehensive, { - specification: '0.8.0-draft.4', + specification: '0.8.0-rc.2', protocolVersion: '2026-07-28', }); @@ -309,14 +274,14 @@ describe('projectEffectiveProtocolView', () => { it('is idempotent for an already projected view', () => { const first = projectEffectiveProtocolView(source, { - specification: '0.8.0-draft.4', + specification: '0.8.0-rc.2', protocolVersion: '2026-07-28', }); expect(first.ok).toBe(true); if (!first.ok) return; const second = projectEffectiveProtocolView(first.value, { - specification: '0.8.0-draft.4', + specification: '0.8.0-rc.2', protocolVersion: '2026-07-28', }); expect(second).toEqual(first); @@ -324,14 +289,14 @@ describe('projectEffectiveProtocolView', () => { it('does not duplicate a warning emitted for both source and result', () => { const warningSource = { - $schema: DRAFT_4_SCHEMA_URI, + $schema: RC_2_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'warning', version: '1.0.0' }, protocolVersions: ['2026-07-28'], capabilities: [{ logging: {} }], }; const result = projectEffectiveProtocolView(warningSource, { - specification: '0.8.0-draft.4', + specification: '0.8.0-rc.2', protocolVersion: '2026-07-28', }); diff --git a/packages/core/test/selection.test.ts b/packages/core/test/selection.test.ts index 6b63e68..c8a7730 100644 --- a/packages/core/test/selection.test.ts +++ b/packages/core/test/selection.test.ts @@ -1,14 +1,12 @@ import { describe, expect, it } from 'vitest'; import { - DRAFT_4_SCHEMA_URI, - RC_1_SCHEMA_URI, RC_2_SCHEMA_URI, selectMcpDescriptionDeclarations, } from '../src/index.js'; const source = { - $schema: DRAFT_4_SCHEMA_URI, + $schema: RC_2_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'selection-test', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -45,7 +43,7 @@ describe('selectMcpDescriptionDeclarations', () => { it('selects by normative identity and preserves every scoped variant', () => { const original = structuredClone(source); const result = selectMcpDescriptionDeclarations(source, { - specification: '0.8.0-draft.4', + specification: '0.8.0-rc.2', selections: { tools: ['shared'], resources: ['test://selected'], @@ -73,7 +71,7 @@ describe('selectMcpDescriptionDeclarations', () => { it('omits unselected and empty declaration collections', () => { const result = selectMcpDescriptionDeclarations(source, { - specification: '0.8.0-draft.4', + specification: '0.8.0-rc.2', selections: { tools: [] }, }); @@ -89,7 +87,7 @@ describe('selectMcpDescriptionDeclarations', () => { const result = selectMcpDescriptionDeclarations( { ...source, tools: [{ name: 'invalid' }] }, { - specification: '0.8.0-draft.4', + specification: '0.8.0-rc.2', selections: { tools: ['invalid'] }, }, ); @@ -103,11 +101,11 @@ describe('selectMcpDescriptionDeclarations', () => { ); }); - it('selects declarations from an RC.1 document', () => { + it('selects declarations from an RC.2 document', () => { const result = selectMcpDescriptionDeclarations( - { ...source, $schema: RC_1_SCHEMA_URI }, + { ...source, $schema: RC_2_SCHEMA_URI }, { - specification: '0.8.0-rc.1', + specification: '0.8.0-rc.2', selections: { tools: ['other'] }, }, ); diff --git a/packages/core/test/specification-support.test.ts b/packages/core/test/specification-support.test.ts index 9838c59..a52407b 100644 --- a/packages/core/test/specification-support.test.ts +++ b/packages/core/test/specification-support.test.ts @@ -1,13 +1,10 @@ import { describe, expect, it } from 'vitest'; import { - DRAFT_4_SCHEMA_URI, - RC_1_SCHEMA_URI, RC_2_SCHEMA_URI, RC_3_SCHEMA_URI, + deprecatedCoreSpecifications, mergeEffectiveProtocolViews, - migrateMcpDescription07ToDraft4, - migrateMcpDescription07ToRc1, migrateMcpDescription07ToRc2, migrateMcpDescription07ToRc3, projectEffectiveProtocolView, @@ -23,23 +20,9 @@ type SelectorSensitiveOperation = | 'migrationFrom07' | 'projection' | 'selection'; -type SupportDisposition = 'supported' | 'unsupported-pending-contract'; +type SupportDisposition = 'supported'; const supportBySpecification = { - '0.8.0-draft.4': { - componentResolution: 'unsupported-pending-contract', - merge: 'supported', - migrationFrom07: 'supported', - projection: 'supported', - selection: 'supported', - }, - '0.8.0-rc.1': { - componentResolution: 'supported', - merge: 'supported', - migrationFrom07: 'supported', - projection: 'supported', - selection: 'supported', - }, '0.8.0-rc.2': { componentResolution: 'supported', merge: 'supported', @@ -60,23 +43,11 @@ const supportBySpecification = { >; 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 = { - '0.8.0-draft.4': (source: unknown) => - migrateMcpDescription07ToDraft4(source, { - specification: '0.8.0-draft.4', - sourceValidated: true, - }), - '0.8.0-rc.1': (source: unknown) => - migrateMcpDescription07ToRc1(source, { - specification: '0.8.0-rc.1', - sourceValidated: true, - }), '0.8.0-rc.2': (source: unknown) => migrateMcpDescription07ToRc2(source, { specification: '0.8.0-rc.2', @@ -104,6 +75,11 @@ const legacyDocument = { }; describe('selector-sensitive operation support', () => { + it('marks RC.2 as deprecated while keeping it operational', () => { + expect(deprecatedCoreSpecifications).toEqual(['0.8.0-rc.2']); + expect(Object.isFrozen(deprecatedCoreSpecifications)).toBe(true); + }); + for (const specification of Object.keys( supportBySpecification, ) as SupportedCoreSpecification[]) { @@ -139,22 +115,7 @@ describe('selector-sensitive operation support', () => { const resolution = resolveMcpDescriptionComponentReferences(document, { specification, } as ResolveMcpDescriptionComponentReferencesOptions); - if ( - supportBySpecification[specification].componentResolution === - 'supported' - ) { - expect(resolution.ok).toBe(true); - } else { - expect(resolution).toEqual({ - ok: false, - diagnostics: [ - expect.objectContaining({ - code: 'unsupported-specification', - phase: 'operation', - }), - ], - }); - } + expect(resolution.ok).toBe(true); }); } }); diff --git a/packages/validator/AGENTS.md b/packages/validator/AGENTS.md index 683b03a..5a9fc48 100644 --- a/packages/validator/AGENTS.md +++ b/packages/validator/AGENTS.md @@ -29,6 +29,10 @@ schemas remain in `mcpdesc/mcpdesc-specification`. - Add later snapshots as siblings and update the registry, declarations, package README, changelog, package-content check, and browser build selector list together. +- Retire a selector only through an explicit support decision. Remove it from + current registries, declarations, bundles, and package contents while keeping + its immutable source and fixtures in Git; direct consumers to the older + package release that contains it. - Do not infer an exact selector from an unqualified format version. ## Validation diff --git a/packages/validator/CHANGELOG.md b/packages/validator/CHANGELOG.md index ff71ce3..c8c8e63 100644 --- a/packages/validator/CHANGELOG.md +++ b/packages/validator/CHANGELOG.md @@ -6,6 +6,18 @@ 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.1] - 2026-09-07 + +### Changed + +- Narrowed active runtime support to RC.2 and RC.3 and marked RC.2 deprecated. +- Excluded retired runtime snapshots from generated bundles and package + contents while retaining their source and frozen fixtures in Git. +- Removed the retained snapshot-intake manifest; intake bundles are disposable + inputs and imported bytes remain protected by the snapshot integrity manifest. + ## [0.10.0] - 2026-09-07 ### Added @@ -127,7 +139,9 @@ Dates for published releases are the UTC publication dates recorded by npm. - Added synchronous structural and semantic validation for parsed JavaScript values with deterministic diagnostics and exact selector dispatch. - Added ESM browser support, TypeScript declarations, embedded schema provenance, frozen fixtures, and package-content checks. -[Unreleased]: https://github.com/mcpdesc/core/compare/validator-v0.9.0...HEAD +[Unreleased]: https://github.com/mcpdesc/core/compare/validator-v0.10.1...HEAD +[0.10.1]: https://github.com/mcpdesc/core/compare/validator-v0.10.0...validator-v0.10.1 +[0.10.0]: https://github.com/mcpdesc/core/compare/validator-v0.9.0...validator-v0.10.0 [0.9.0]: https://github.com/mcpdesc/core/compare/validator-v0.8.0...validator-v0.9.0 [0.8.0]: https://github.com/mcpdesc/core/compare/validator-v0.7.1...validator-v0.8.0 [0.7.1]: https://github.com/mcpdesc/core/compare/validator-v0.7.0...validator-v0.7.1 diff --git a/packages/validator/README.md b/packages/validator/README.md index c0ffb40..f9ce99d 100644 --- a/packages/validator/README.md +++ b/packages/validator/README.md @@ -44,20 +44,17 @@ a later draft is published. ## Supported snapshots -The current workspace supports these immutable selectors, newest first: +The package supports these immutable selectors, newest first: | Selector | First validator release | Embedded schema SHA-256 | |---|---|---| | `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` | +| `0.8.0-rc.2` (deprecated) | `0.9.0` | `40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8` | The validator package embeds the schema and executable behavior for each -selector. npm integrity and trusted-publishing provenance identify released +selector. RC.2 remains available for migration compatibility; new integrations +should select RC.3. Earlier selectors remain available by pinning an older +immutable validator release. npm integrity and trusted-publishing provenance identify released package bytes; specification repository tags and commits are informational. ## Usage @@ -100,17 +97,10 @@ if (resolution.status === 'resolved') { Resolution is pure and performs no network retrieval. It does not validate the document and never infers a draft snapshot from `mcpdesc: "0.8.0"` alone. -Draft 4's format-qualified schema URI resolves uniquely. Drafts 1 through 3 -share the legacy `https://mcpdesc.org/schema/0.8.0.json` URI, so that URI is -ambiguous unless the caller supplies a consistent exact selector: +Retired schema identities are reported as unknown by current releases. Pin an +older package release to resolve or validate a retired selector. -```js -const resolution = resolveMcpDescriptionSpecification(parsedDocument, { - specification: '0.8.0-draft.3' -}); -``` - -Unresolved results distinguish missing, invalid, unknown, ambiguous, and +Unresolved results distinguish missing, invalid, unknown, and contradictory identity, as well as unsupported caller selectors. A supplied selector can resolve a document with no `$schema`; when `$schema` is present it must match the selected snapshot's recorded schema URI. @@ -137,7 +127,7 @@ 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`, `0.8.0-rc.2`, and `0.8.0-rc.3`; the protocol-version export is the deduplicated union supported by those snapshots. +The package exports frozen `supportedSpecifications`, `deprecatedSpecifications`, `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 active selector set is `0.8.0-rc.2` and `0.8.0-rc.3`; `deprecatedSpecifications` contains RC.2. The protocol-version export is the deduplicated union supported by active snapshots. RC.2 and RC.3 also export the frozen `mcpExtensionCatalogue` and `mcpExtensionMaturity` classifier. The catalogue pins its authoritative source, @@ -147,7 +137,7 @@ 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, RC.2, and RC.3 component resolvers report authored and terminal target +The 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. @@ -164,7 +154,7 @@ exact specification repository tag or commit and then: 3. Add the exact selector to the runtime registry and update support metadata, TypeScript declarations, tests, the package changelog, and expected package contents. Unqualified versions, aliases, ranges, and not-yet-published selectors remain unsupported. 4. Run the package and repository validation suites. The schema digest, immutable metadata, fixture behavior, browser bundle, declarations, and tarball contents must all pass. -The test snapshots are repository-only development assets and are excluded from the npm tarball. Runtime snapshot implementations and embedded schemas do ship so installed packages remain self-contained. +The test snapshots are repository-only development assets and are excluded from the npm tarball. Historical runtime sources remain in Git for integrity history. Only active runtime snapshot implementations and embedded schemas ship, so installed packages remain self-contained without accumulating retired selectors. Specification approval and imported supporting code do not authorize package publication. During release review, a maintainer explicitly decides the @@ -187,4 +177,4 @@ npm run test:browser --workspace @mcpdesc/validator npm run test:package --workspace @mcpdesc/validator ``` -The package test runs each immutable snapshot against its own frozen valid, invalid, and warning fixture corpus. YAML source fixtures are decoded by the test harness before validation; the public API continues to accept parsed JavaScript values only. The other checks compile the declarations, bundle the public browser entry with esbuild and Vite, reject runtime AJV compiler inputs and dynamic code generation in those bundles, and inspect `npm pack --dry-run --json` against the intended tarball contents and declared export targets. +The package test runs each active snapshot against its own frozen valid, invalid, and warning fixture corpus and verifies historical artifact integrity separately. YAML source fixtures are decoded by the test harness before validation; the public API continues to accept parsed JavaScript values only. The other checks compile the declarations, bundle the public browser entry with esbuild and Vite, reject runtime AJV compiler inputs and dynamic code generation in those bundles, and inspect `npm pack --dry-run --json` against the intended tarball contents and declared export targets. diff --git a/packages/validator/index.d.ts b/packages/validator/index.d.ts index 8deb811..0b10fd2 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' | '0.8.0-rc.3'; +export type McpDescriptionSpecification = '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' | '0.8.0-rc.2' | '0.8.0-rc.3'; + readonly specification: '0.8.0-rc.2' | '0.8.0-rc.3'; } export type McpExtensionMaturity = 'official' | 'experimental' | 'uncatalogued'; @@ -56,31 +56,6 @@ export interface McpExtensionCatalogue { } export interface SpecificationProvenance { - readonly '0.8.0-draft.1': { - readonly snapshotTag: 'v0.8.0-draft.1'; - readonly schemaUri: 'https://mcpdesc.org/schema/0.8.0.json'; - readonly schemaSha256: '4ceb6042c3fd31703199cd3db869ec5c35c17d2fe9ab7b2f5b96a2a3af0cebe4'; - }; - readonly '0.8.0-draft.2': { - readonly snapshotTag: 'v0.8.0-draft.2'; - readonly schemaUri: 'https://mcpdesc.org/schema/0.8.0.json'; - readonly schemaSha256: 'ab692c1a5a0f7e5f29be1940aa8c64a56d4620be0a19d00cf0a64680b7e517fa'; - }; - readonly '0.8.0-draft.3': { - readonly snapshotTag: 'v0.8.0-draft.3'; - readonly schemaUri: 'https://mcpdesc.org/schema/0.8.0.json'; - readonly schemaSha256: '8823c1f1946360b2a44d00920e2092e5e4acd139a1964befad4eb0bf3ce96002'; - }; - readonly '0.8.0-draft.4': { - readonly snapshotTag: 'v0.8.0-draft.4'; - readonly schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json'; - readonly schemaSha256: '93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b'; - }; - readonly '0.8.0-rc.1': { - readonly snapshotTag: 'v0.8.0-rc.1'; - readonly schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json'; - readonly schemaSha256: '936a0f24ade501fcabf3d6498c0440c445daa672a575573a35954cee49430ac4'; - }; readonly '0.8.0-rc.2': { readonly snapshotTag: 'v0.8.0-rc.2'; readonly schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json'; @@ -114,7 +89,8 @@ 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', '0.8.0-rc.3']; +export declare const supportedSpecifications: readonly ['0.8.0-rc.2', '0.8.0-rc.3']; +export declare const deprecatedSpecifications: readonly ['0.8.0-rc.2']; export declare const supportedProtocolVersions: readonly [ '2024-11-05', diff --git a/packages/validator/package.json b/packages/validator/package.json index d6c103e..716f746 100644 --- a/packages/validator/package.json +++ b/packages/validator/package.json @@ -1,6 +1,6 @@ { "name": "@mcpdesc/validator", - "version": "0.10.0", + "version": "0.10.1", "description": "Structural and semantic validation for MCP Description snapshots", "type": "module", "types": "./index.d.ts", @@ -31,7 +31,8 @@ }, "files": [ "src/index.js", - "src/snapshots", + "src/snapshots/0.8.0-rc.2", + "src/snapshots/0.8.0-rc.3", "standalone.js", "index.d.ts", "CHANGELOG.md", diff --git a/packages/validator/scripts/build-standalone.mjs b/packages/validator/scripts/build-standalone.mjs index 9e17f42..639aab7 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', '0.8.0-rc.3']; +const selectors = ['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 2c5de00..1a13473 100644 --- a/packages/validator/scripts/check-browser-bundle.mjs +++ b/packages/validator/scripts/check-browser-bundle.mjs @@ -80,11 +80,16 @@ 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', '0.8.0-rc.3']) { +for (const selector of ['0.8.0-rc.2', '0.8.0-rc.3']) { if (!standalone.includes(selector)) { throw new Error(`Standalone bundle is missing runtime snapshot ${selector}`); } } +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']) { + if (standalone.includes(selector)) { + throw new Error(`Standalone bundle contains retired runtime snapshot ${selector}`); + } +} const viteBundleSize = viteChunks.reduce((size, chunk) => size + Buffer.byteLength(chunk.code), 0); console.log(`Browser bundles passed (esbuild browser ${result.outputFiles[0].contents.byteLength} bytes, esbuild standalone ${standaloneBundleSize} bytes, Vite browser ${viteBundleSize} bytes, generated standalone ${Buffer.byteLength(standalone)} bytes).`); \ No newline at end of file diff --git a/packages/validator/scripts/check-package.mjs b/packages/validator/scripts/check-package.mjs index b50d036..12ef953 100644 --- a/packages/validator/scripts/check-package.mjs +++ b/packages/validator/scripts/check-package.mjs @@ -42,25 +42,6 @@ const expected = [ 'package.json', 'standalone.js', 'src/index.js', - 'src/snapshots/0.8.0-draft.1/index.js', - 'src/snapshots/0.8.0-draft.1/schema.json', - 'src/snapshots/0.8.0-draft.1/semantic.js', - 'src/snapshots/0.8.0-draft.2/base.js', - 'src/snapshots/0.8.0-draft.2/index.js', - 'src/snapshots/0.8.0-draft.2/schema.json', - 'src/snapshots/0.8.0-draft.2/semantic.js', - 'src/snapshots/0.8.0-draft.3/base.js', - 'src/snapshots/0.8.0-draft.3/index.js', - 'src/snapshots/0.8.0-draft.3/schema.json', - 'src/snapshots/0.8.0-draft.3/semantic.js', - 'src/snapshots/0.8.0-draft.4/base.js', - 'src/snapshots/0.8.0-draft.4/index.js', - 'src/snapshots/0.8.0-draft.4/schema.json', - 'src/snapshots/0.8.0-draft.4/semantic.js', - 'src/snapshots/0.8.0-rc.1/base.js', - 'src/snapshots/0.8.0-rc.1/index.js', - 'src/snapshots/0.8.0-rc.1/schema.json', - 'src/snapshots/0.8.0-rc.1/semantic.js', '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', diff --git a/packages/validator/snapshot-imports/0.8.0-rc.2.json b/packages/validator/snapshot-imports/0.8.0-rc.2.json deleted file mode 100644 index 6064093..0000000 --- a/packages/validator/snapshot-imports/0.8.0-rc.2.json +++ /dev/null @@ -1,411 +0,0 @@ -{ - "formatVersion": 1, - "selector": "0.8.0-rc.2", - "snapshotTag": "v0.8.0-rc.2", - "source": { - "repository": "https://github.com/mcpdesc/mcpdesc-specification", - "commit": "bf7cea505ed8ea829920504d182e28c9452d0b9e" - }, - "files": [ - { - "path": "fixtures/expected-invalid/closed-protocol-enum.json", - "sha256": "a8d0fa408ff2a92ba7c6eba36f33444132b7bba26277e3c82d4921c002340e5c" - }, - { - "path": "fixtures/expected-invalid/component-contextual-examples.json", - "sha256": "5e02f403d8d4c88c001975412e413c4281bb2ff08dc99baed642840741cf0128" - }, - { - "path": "fixtures/expected-invalid/component-contextual-schemas.json", - "sha256": "13852d3292b00ee26109aecefad21448f3f95b71c889d773360d501ee4091b30" - }, - { - "path": "fixtures/expected-invalid/component-extension-boundaries.json", - "sha256": "797025e39c00502affd6b5c651603a9e3d94b663cba788eb53c4755fb63d98f3" - }, - { - "path": "fixtures/expected-invalid/component-protocol-scope.json", - "sha256": "0c666a200e3b3b3a630a8ed6cbd56a60ac698533df07003ec696267d91020ade" - }, - { - "path": "fixtures/expected-invalid/component-reference-resolution.json", - "sha256": "92817c8a36b14e38b8d875ce2e094fb338baa36cd0ef8cd088909f85d29f7d96" - }, - { - "path": "fixtures/expected-invalid/components-empty-and-reference-shapes.json", - "sha256": "8d905979442c3055c4d00cbb1fc9398143d8d1be72e3338df3f1a76a03a1bafc" - }, - { - "path": "fixtures/expected-invalid/duplicate-mcp-header.json", - "sha256": "386b61647ffb4cf642d78cbd8cb9a86ef8300e341db8ebe8f5d8580f6602040c" - }, - { - "path": "fixtures/expected-invalid/duplicate-security-scope.json", - "sha256": "5602d092e070bb917d0b8834bcd3a9a4e8bd9b12569c85816026d663f9b4bffb" - }, - { - "path": "fixtures/expected-invalid/duplicate-tag-reference.json", - "sha256": "473788d2963f5bebc80b91b336f7bf74c7049c3893c2d3c35d8d7c5cff94f294" - }, - { - "path": "fixtures/expected-invalid/elicitation-branch-mixing.json", - "sha256": "0cbd9b0d5bdbbdb65b3cf007e1ca83c450234fdf7c23a634a6f0b07c532e09a2" - }, - { - "path": "fixtures/expected-invalid/elicitation-form-semantics.json", - "sha256": "60c3575e9d7840922ff08bb46b8ec75158d557d2cdd651c159c6f8ed2b04c57b" - }, - { - "path": "fixtures/expected-invalid/elicitation-scope-outside-parent.json", - "sha256": "5637807fa10249dde4080e4dc1e27590cf7686820097e22d395c98cdb42c8cc0" - }, - { - "path": "fixtures/expected-invalid/elicitation-version-mismatch.json", - "sha256": "717e553b6cd72e4b5c8e8ba17b4038bf51961633526c9765d2cf75ea8ecdeccf" - }, - { - "path": "fixtures/expected-invalid/empty-client-capability-requirements.json", - "sha256": "30500bd63a373120fb94b38c711185ab57f61757340edc2cfa7901c5d523fe8d" - }, - { - "path": "fixtures/expected-invalid/empty-ordinary-nested-collections.json", - "sha256": "5868ef14538c1b8f17628c6340966b54505bd74e3ededa8f9e5a360977c361db" - }, - { - "path": "fixtures/expected-invalid/empty-ordinary-root-collections.json", - "sha256": "07a10c9cec14d83d2de72a9f1dbcd267796b44a38bb1dd3b4b11ad23170f3f8a" - }, - { - "path": "fixtures/expected-invalid/empty-tag-catalog-reference.json", - "sha256": "7743adadd30afe05c4a53472c119cd5e3780c567e80029e408ee38234ceb5723" - }, - { - "path": "fixtures/expected-invalid/invalid-completion-example-semantics.json", - "sha256": "e51c25e2c87204d40618f233e10bd667919d5c07cdc3dd49d7b58cda2dda6446" - }, - { - "path": "fixtures/expected-invalid/invalid-mcp-header-placement.json", - "sha256": "a728ba298c9b5c3ac32a7294111a6d61e469d69382b40c3a73f01441542b9cdd" - }, - { - "path": "fixtures/expected-invalid/invalid-mcp-header-value.json", - "sha256": "08d69531bbcfafaac7e5cc8f8cbb1a7d307a6fbb55da9304b12fb73d63537173" - }, - { - "path": "fixtures/expected-invalid/invalid-prompt-example-semantics.json", - "sha256": "90428fc4eece8771a5e89df50a9d3b651948ee673f8c92ed47ab461842b51008" - }, - { - "path": "fixtures/expected-invalid/invalid-resource-annotations.json", - "sha256": "289bf1c6223904de655c728d1f2a53e41f59f201353b3df33a32bb804c25632a" - }, - { - "path": "fixtures/expected-invalid/invalid-security-scheme-name.json", - "sha256": "24f87f824a4a957ec2fdd112e9421331a5e465aa23a9832494edd1efb84c534b" - }, - { - "path": "fixtures/expected-invalid/invalid-tool-example-result-semantics.json", - "sha256": "23b55900bdd39aa69798c6f9989196addc108c0232139afd989509ce04238752" - }, - { - "path": "fixtures/expected-invalid/invalid-tool-interaction-example-semantics.json", - "sha256": "f56bfac49ca02fcfdedb5a4112e420af2508d8a2a1463b0deb82cb1558f965a3" - }, - { - "path": "fixtures/expected-invalid/malformed-completion-examples.json", - "sha256": "5c8e932026f3de6813009e18f2c790683baeb2338d8d2abd0380739c52107382" - }, - { - "path": "fixtures/expected-invalid/malformed-extension-identifier.json", - "sha256": "64fbcbd83a80cf4df017b90759b8e9999797419398e6aa05b5f7b65ed750da04" - }, - { - "path": "fixtures/expected-invalid/malformed-pre-dialect-tool-schema-shape.json", - "sha256": "39bcc3a64c026c53d9185958ebe1da3b7e7fbb493fcc3d2706970720ac13947a" - }, - { - "path": "fixtures/expected-invalid/malformed-prompt-examples.json", - "sha256": "90470a94ee65cdfe6532d3709a5654f8ed3ed4d67c81fb676b5bf23d8f80ba59" - }, - { - "path": "fixtures/expected-invalid/malformed-resource-examples.json", - "sha256": "05a510e1802aec40382bce74aa0b1e1ec06b5992b99a7e9cd826a92838d0e163" - }, - { - "path": "fixtures/expected-invalid/malformed-resource-template-example.json", - "sha256": "97ae3352dc4adf52207c3803bcb58f837234cdc1f1af6e11ee7103d63cca0231" - }, - { - "path": "fixtures/expected-invalid/malformed-tool-examples.json", - "sha256": "26f01d91696d1ec372eb04725533fab73d33f841c9b1e0cd54cca92df1ea2918" - }, - { - "path": "fixtures/expected-invalid/malformed-tool-interaction-examples.json", - "sha256": "a93836e9772cbde6bcae64eae5a01847fe019a7cd0e15e5afeba2f6da30e1c8b" - }, - { - "path": "fixtures/expected-invalid/malformed-tool-schema.json", - "sha256": "a4f9a5b8948039fdeb946e2c5c99933728b1cda8cf5c1b3ace69efe1f07a5adb" - }, - { - "path": "fixtures/expected-invalid/meta-invalid-key.json", - "sha256": "634dc9d65feea2be03253456f8071fcc3eddc8d99d4864d94c3de106a1da7b6b" - }, - { - "path": "fixtures/expected-invalid/meta-reserved-key-misuse.json", - "sha256": "298e345b10d46efdfe3843f8e1f971bb73ec570f90c5829237a3e35a7f15ddf2" - }, - { - "path": "fixtures/expected-invalid/missing-tool-input-schema.json", - "sha256": "d9574004c2a68cc5462413b217846399bedac6d6980d7eaab833d66c94b658b3" - }, - { - "path": "fixtures/expected-invalid/non-oauth-scopes.json", - "sha256": "b5aee8de39da62ef203a59b6dc3099f80beb54fcf53c8505edee4224e7d2a95c" - }, - { - "path": "fixtures/expected-invalid/non-object-output-schema-before-2026.json", - "sha256": "00840d205cda9b97bb92ad0fb9337b1a95741033a2d48b3f3ce0e116f139d595" - }, - { - "path": "fixtures/expected-invalid/oauth-flow-missing-required-url.json", - "sha256": "82fec07601b919a48dc99653893d3efa7938aee968c6f422d2c332be876a1ebb" - }, - { - "path": "fixtures/expected-invalid/object-level-extension-cannot-weaken-core.json", - "sha256": "ff44eff94a34e4e58fa02dee0d07b59294bcc121b40c9c15f72d1488348519e6" - }, - { - "path": "fixtures/expected-invalid/object-level-extension-in-capability-map.json", - "sha256": "4290fc21e3f1ade576b9eafc445dfaef53d5fe85b93537cfd43be0051b79e3b2" - }, - { - "path": "fixtures/expected-invalid/object-level-extension-in-domain-map.json", - "sha256": "6ce2cf2f4c861e2f96a4e3ffcfe041ebcfa9a1b0e7d9bd42ba7a1eaf6ec07dd0" - }, - { - "path": "fixtures/expected-invalid/object-level-extension-in-native-content.json", - "sha256": "3f5ad334a6ed90da7f010e2e74a7957d69ba23dc7425092ba955311e63f79d10" - }, - { - "path": "fixtures/expected-invalid/object-level-extension-in-security-requirement.json", - "sha256": "a5dda9878d75ee2629a8f09b08290c7ffbf1b80b06e9ee2d62ccd4e8998ccaf6" - }, - { - "path": "fixtures/expected-invalid/object-level-unknown-property.json", - "sha256": "0b89bb81e3ef74fce85b891215395e85f4f7257b77800fd085c6bdf3fad09d6e" - }, - { - "path": "fixtures/expected-invalid/overlapping-capabilities.json", - "sha256": "293f1d6d233cf5fed5cfcc5d586129c5a2ab40c9c5fc987463ec7030b55c2e8e" - }, - { - "path": "fixtures/expected-invalid/overlapping-tool-scope.json", - "sha256": "8bf2868128637883732b54b350ce76590b3a25dc18f32560f2073a2931181626" - }, - { - "path": "fixtures/expected-invalid/resource-example-cache-fields.json", - "sha256": "483452195098391e57b922a9bfd15fb875b81d88e7fb21fa356954b72e736c98" - }, - { - "path": "fixtures/expected-invalid/resource-example-result-semantics.json", - "sha256": "25ce539b80d29bcb506846d3661887f94addfe0f4e22912bc80495a7513b35dc" - }, - { - "path": "fixtures/expected-invalid/revision-inapplicable-execution.json", - "sha256": "a5e29abd743053211fe1cbf03200ad447f88b07a32d1136f7c82e531b1b49577" - }, - { - "path": "fixtures/expected-invalid/revision-inapplicable-mcp-header.json", - "sha256": "81b0c186c71c1c3561164d55ade47c33e2af11223ff2c20f9e32c3910ec93860" - }, - { - "path": "fixtures/expected-invalid/revision-inapplicable-streamable-http.json", - "sha256": "2ee8faf564cf6eb77fdf551a8e13a0bc812e165affb65c1b434409e96871a3de" - }, - { - "path": "fixtures/expected-invalid/revision-inapplicable-tool-schema-dialect.json", - "sha256": "877ed880bd0019359d4c27da96437bc7bb21508bb597960f282d9b7e86e28625" - }, - { - "path": "fixtures/expected-invalid/revision-incompatible-client-capability-requirements.json", - "sha256": "1cea3827d541897183f006c66f785d752612427d76252b82cc77168af1045381" - }, - { - "path": "fixtures/expected-invalid/revision-incompatible-tool-example.json", - "sha256": "24bd1941a6a98df6b3702817782c884ebd62eb56ca5941bd25fd3d87392c9a56" - }, - { - "path": "fixtures/expected-invalid/root-version-without-transport.json", - "sha256": "f18d5b3ff0c5ee1e54908c99d98aa271392eca42665de44dfab59ec646b84ab8" - }, - { - "path": "fixtures/expected-invalid/scoped-version-not-in-root.json", - "sha256": "c9a02ad0c57cf80d6bce29b8f3b4599b8d7c5e82722953c4a84431ee1fd8c529" - }, - { - "path": "fixtures/expected-invalid/tool-example-schema-mismatches.json", - "sha256": "70ff2bf1bf6673768dfeda8d2dbea355690aa687209a6df7815c8541a46e16dc" - }, - { - "path": "fixtures/expected-invalid/unknown-security-reference.json", - "sha256": "75498e40727d886ec9c8f5b23d834853ae50b0bae320996f8a985e78f2edb4d6" - }, - { - "path": "fixtures/expected-invalid/unresolved-local-tool-ref.json", - "sha256": "d205e40001e64925d53d30509e98a022e19404fc8d2eaeb13ce34ae9c6bea8f5" - }, - { - "path": "fixtures/expected-valid/client-capability-requirements.json", - "sha256": "7eec05c170973066eef26d62f448206d36dadcf90073a17fbaf24a8dbcb55b6a" - }, - { - "path": "fixtures/expected-valid/distinct-tool-and-resource-annotations.json", - "sha256": "3b972ff22e9e518fb18262a358bcf1c2ebc3ceda882514a5c79502f396926c22" - }, - { - "path": "fixtures/expected-valid/elicitation-declarations.json", - "sha256": "5991bb977849fa5783e4f7f3ea5508c1b5bd4da269de50d8d2f0d684535ddacb" - }, - { - "path": "fixtures/expected-valid/integrated-draft2-features.yaml", - "sha256": "2f523db811c9fbf8116a5c840c28c2dcda6c7932fb516d23afb05391ee06e87d" - }, - { - "path": "fixtures/expected-valid/meta-literal-values.json", - "sha256": "f61931559af44f55085d33a9807ed6eba7f5ec24ded0211c5398e06f61f9c3bb" - }, - { - "path": "fixtures/expected-valid/minimal-zero-primitives.json", - "sha256": "6ad4d1e358aac6afe7db1089b3e4d9615248f21f13eb66751823c3fea961e1c2" - }, - { - "path": "fixtures/expected-valid/named-completion-examples.json", - "sha256": "1c690c27155a4b6e307c5778bddf26d345775eae23f102504d0581d03ade5547" - }, - { - "path": "fixtures/expected-valid/named-prompt-examples.json", - "sha256": "3295cf121375ffccf2f368fbfcf94829d650b31e0404f052659399f0c71be2b6" - }, - { - "path": "fixtures/expected-valid/named-resource-examples.json", - "sha256": "8f22b9295610f8c37f349ac69420fb9389e22a071f71876468e75576ebe385e5" - }, - { - "path": "fixtures/expected-valid/named-tool-examples.json", - "sha256": "f1065f2a93119d9195aadc348471c805d3398546047b5b95d539c0769d2fdda4" - }, - { - "path": "fixtures/expected-valid/named-tool-interaction-examples.json", - "sha256": "edd3f4c8e81faf5a703f9a3f20c5a4e2ebf50e9b0470bc49eecc4bc2f895842b" - }, - { - "path": "fixtures/expected-valid/object-level-specification-extensions.json", - "sha256": "e7e32272ed6d01a03ec4bc5298ac681d1949aa75278dd3cc356e0798c0c046af" - }, - { - "path": "fixtures/expected-valid/protocol-coverage-and-tool-schemas.json", - "sha256": "63e26c8f015f651dbccaac5e71b35f814f7312a5ab31e5c4250edae8131a5274" - }, - { - "path": "fixtures/expected-valid/protocol-scoped-primitives.json", - "sha256": "37c53dd0601729a0b67adf9bd37efeeebd54bb2e404b4cc496af701323dd2bcc" - }, - { - "path": "fixtures/expected-valid/reusable-components.json", - "sha256": "521f0462c4cd5327ab66323637cecb3735ce0eec7197b64853419d19c248f9f7" - }, - { - "path": "fixtures/expected-valid/security-composition-and-inheritance.json", - "sha256": "6dfdfa20db3095fc2394bf5f0de5faf3ca055ff7c8dadeef17c6ecd2fef6a9d3" - }, - { - "path": "fixtures/expected-valid/security-root-and-override.json", - "sha256": "98694144ed290e29a1afed166ce1f6c2dfc908ba2dbbcd85a901fcbea1f339e0" - }, - { - "path": "fixtures/expected-valid/tagged-surface.json", - "sha256": "092c7721d86068e096fde093a1c3734accd8bf61f4273d69e5e22ebcae0c0e39" - }, - { - "path": "fixtures/expected-valid/unknown-extension-identifier.json", - "sha256": "de88eed9bddd6ec85c429cf95d6e9b6f734d1b036580c9102f44ddc6b5f3fa86" - }, - { - "path": "fixtures/expected-warning/deprecated-client-capability-requirements.json", - "sha256": "968aaf73cbcb72359a1a70e29111bb2a37a70a3467c2df4f88b640265e933101" - }, - { - "path": "fixtures/expected-warning/legacy-completion-examples.json", - "sha256": "7e4a2a8df02762fa77bee8e5b70a76d30e6d96cb52d3f25a657f3eaa7ebb3595" - }, - { - "path": "fixtures/expected-warning/legacy-sse-modern-revision.json", - "sha256": "3474dc28265fda3d942b7ef77eb2bc0a894be3383013753d53b740afc32fe68c" - }, - { - "path": "fixtures/expected-warning/logging-deprecated-2026.json", - "sha256": "e18f7438e111250bbbbff4de5bb38eeb1e022bfe2e1967389ea3e87b8627601a" - }, - { - "path": "fixtures/expected-warning/pre-dialect-tool-example.json", - "sha256": "a39a8635102dbd1b6c45d9db9edf2aaf7fbe1dcaa5b069c786c0486e45d412d8" - }, - { - "path": "fixtures/expected-warning/pre-dialect-tool-schema-shape.json", - "sha256": "86371da9e84ddf12b81e3b60a6c9af1b0f7eab426aed45f675155ed191276edb" - }, - { - "path": "fixtures/expected-warning/pre-standard-extension-capabilities.json", - "sha256": "5eb1925d1e67d1ee288d0534795e13c0d88c00797ba0e0d501aecf6cca9217e4" - }, - { - "path": "fixtures/expected-warning/resource-example-consistency.json", - "sha256": "529225cc2dec8ec849b4125d2d753c4887eb1e1e0aac81dd43416684dee4c052" - }, - { - "path": "fixtures/expected-warning/tool-interaction-client-requirements-contradictions.json", - "sha256": "3b11f0ea99ca574d032d9051b972bc7cf538fde1cb5673e2931034a76d7541e5" - }, - { - "path": "fixtures/expected-warning/uncatalogued-oauth-scope.json", - "sha256": "256e7c4ab734904f25b39a4477b68001043c217f497f088c098103c85d525b3b" - }, - { - "path": "fixtures/expected-warning/uncatalogued-openid-scope.json", - "sha256": "e770df2fc1161ce50f9bab3405a159f235470551af57e022f85d33d7b0da713f" - }, - { - "path": "fixtures/expected-warning/unknown-reserved-extension-identifier.json", - "sha256": "20d9bb605d7af554bba02d5a06e9d466a7b18a7e15486150c29b54e585465c50" - }, - { - "path": "fixtures/expected-warning/unknown-reserved-meta-key.json", - "sha256": "b10179303e11e06f959bc577e02bd1adc4dab4edc2329e0e7729321b3b97b254" - }, - { - "path": "fixtures/expected-warning/unresolved-external-tool-example-ref.json", - "sha256": "b26a3d18596f45cd60b489d97f59ed4c20ae1be7071853260e187fbaf747c735" - }, - { - "path": "fixtures/expected-warning/unresolved-external-tool-ref.json", - "sha256": "5f7a8faefa703d8974c3a2b311885104755620d0531fada988029c24252928a5" - }, - { - "path": "runtime/base.js", - "sha256": "2c7b062583ee2d94a00a8a9b6bcd382f8f54749673be571c9ee8f7c87874822f" - }, - { - "path": "runtime/index.js", - "sha256": "be93adab07f4b165696fc0fec013ee9086a944f2189b9a8f594f0b304c64eeef" - }, - { - "path": "runtime/schema.json", - "sha256": "40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8" - }, - { - "path": "runtime/semantic.js", - "sha256": "7fa66976fa3a47b66e70378f8e2a4e00c2f846bd3713166cce2abb0dc1865a1c" - } - ] -} diff --git a/packages/validator/src/index.js b/packages/validator/src/index.js index 8314249..b63f00e 100644 --- a/packages/validator/src/index.js +++ b/packages/validator/src/index.js @@ -1,11 +1,5 @@ -import * as draft1 from './snapshots/0.8.0-draft.1/index.js'; -import * as draft2 from './snapshots/0.8.0-draft.2/index.js'; -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 { @@ -16,32 +10,22 @@ import { export { mcpExtensionCatalogue, mcpExtensionMaturity }; const snapshots = Object.freeze({ - [draft1.specification]: draft1, - [draft2.specification]: draft2, - [draft3.specification]: draft3, - [draft4.specification]: draft4, - [rc1.specification]: rc1, [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({ - '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' }); export const supportedSpecifications = Object.freeze(Object.keys(snapshots)); +export const deprecatedSpecifications = Object.freeze(['0.8.0-rc.2']); export const supportedProtocolVersions = Object.freeze([ ...new Set(Object.values(snapshots).flatMap((snapshot) => snapshot.supportedProtocolVersions)) ]); diff --git a/packages/validator/standalone.js b/packages/validator/standalone.js index a568488..f2b8dd8 100644 --- a/packages/validator/standalone.js +++ b/packages/validator/standalone.js @@ -1 +1 @@ -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}; +var Ao=Object.defineProperty;var Os=(t,s)=>()=>(s||t((s={exports:{}}).exports,s),s.exports),Pi=(t,s)=>{for(var y in s)Ao(t,y,{get:s[y],enumerable:!0})};var wi=Os((Ip,vi)=>{"use strict";vi.exports=function t(s,y){if(s===y)return!0;if(s&&y&&typeof s=="object"&&typeof y=="object"){if(s.constructor!==y.constructor)return!1;var g,u,a;if(Array.isArray(s)){if(g=s.length,g!=y.length)return!1;for(u=g;u--!==0;)if(!t(s[u],y[u]))return!1;return!0}if(s.constructor===RegExp)return s.source===y.source&&s.flags===y.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===y.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===y.toString();if(a=Object.keys(s),g=a.length,g!==Object.keys(y).length)return!1;for(u=g;u--!==0;)if(!Object.prototype.hasOwnProperty.call(y,a[u]))return!1;for(u=g;u--!==0;){var e=a[u];if(!t(s[e],y[e]))return!1}return!0}return s!==s&&y!==y}});var qs=Os(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});var ji=wi();ji.code='require("ajv/dist/runtime/equal").default';Zs.default=ji});var Ni=Os(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.formatNames=Re.fastFormats=Re.fullFormats=void 0;function Se(t,s){return{validate:t,compare:s}}Re.fullFormats={date:Se(xi,Us),time:Se(Vs(!0),Ls),"date-time":Se(ki(!0),Ei),"iso-time":Se(Vs(),Ai),"iso-date-time":Se(ki(),zi),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:To,"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:Mo,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:So,int32:{type:"number",validate:Zo},int64:{type:"number",validate:Co},float:{type:"number",validate:qi},double:{type:"number",validate:qi},password:!0,binary:!0};Re.fastFormats={...Re.fullFormats,date:Se(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Us),time:Se(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ls),"date-time":Se(/^\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,Ei),"iso-time":Se(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Ai),"iso-date-time":Se(/^\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,zi),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};Re.formatNames=Object.keys(Re.fullFormats);function Eo(t){return t%4===0&&(t%100!==0||t%400===0)}var zo=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,No=[0,31,28,31,30,31,30,31,31,30,31,30,31];function xi(t){let s=zo.exec(t);if(!s)return!1;let y=+s[1],g=+s[2],u=+s[3];return g>=1&&g<=12&&u>=1&&u<=(g===2&&Eo(y)?29:No[g])}function Us(t,s){if(t&&s)return t>s?1:t23||i>59||t&&!r)return!1;if(u<=23&&a<=59&&e<60)return!0;let n=a-i*p,l=u-o*p-(n<0?1:0);return(l===23||l===-1)&&(n===59||n===-1)&&e<61}}function Ls(t,s){if(!(t&&s))return;let y=new Date("2020-01-01T"+t).valueOf(),g=new Date("2020-01-01T"+s).valueOf();if(y&&g)return y-g}function Ai(t,s){if(!(t&&s))return;let y=Cs.exec(t),g=Cs.exec(s);if(y&&g)return t=y[1]+y[2]+y[3],s=g[1]+g[2]+g[3],t>s?1:t=Ro}function Co(t){return Number.isInteger(t)}function qi(){return!0}var Vo=/[^\\]\\Z/;function Mo(t){if(Vo.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Ii=Os(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});function _i(t){let s=t.length,y=0,g=0,u;for(;g=55296&&u<=56319&&gCa,snapshotTag:()=>Za,specification:()=>ii,supportedProtocolVersions:()=>cs,validate:()=>Va});import{Validator as Tn}from"@cfworker/json-schema";var Uo=xs,Lo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"urn:mcpdesc:standalone:0.8.0-rc.2",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"}]}}},fe=Object.prototype.hasOwnProperty,E=new RegExp("^x-","u"),Fo={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"};var Es=new RegExp("^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$","u");var ht={validate:z};function z(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=z.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t))for(let b in t)ht.validate(t[b],{instancePath:s+"/"+b.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:b,rootData:u,dynamicAnchors:a})||(e=e===null?ht.validate.errors:e.concat(ht.validate.errors),r=e.length);else{let b={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[b]:e.push(b),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(Array.isArray(t)){let b=t.length;for(let h=0;h1){e:for(;i--;)for(n=i;n--;)if(Ui(t[i],t[n])){let l={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=[l]:e.push(l),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 Y.errors=e,r===0}Y.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function vt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=vt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||o==="subscribe"||E.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)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(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 vt.errors=e,r===0}vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function wt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=wt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||E.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)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(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 wt.errors=e,r===0}wt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function jt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=jt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let i in t)if(!(fe.call(Fo.properties,i)||E.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 l=r;if(typeof n=="string"&&!Es.test(n)){let m={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=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}for(let n in i){let l=i[n];if(!(l&&typeof l=="object"&&!Array.isArray(l))){let m={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=[m]:e.push(m),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&&(Pt(t.prompts,{instancePath:s+"/prompts",parentData:t,parentDataProperty:"prompts",rootData:u,dynamicAnchors:a})||(e=e===null?Pt.errors:e.concat(Pt.errors),r=e.length)),t.protocolVersions!==void 0&&(Y(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Y.errors:e.concat(Y.errors),r=e.length)),t.resources!==void 0&&(vt(t.resources,{instancePath:s+"/resources",parentData:t,parentDataProperty:"resources",rootData:u,dynamicAnchors:a})||(e=e===null?vt.errors:e.concat(vt.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 l={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),r++}if(i.cancel!==void 0){let n=i.cancel;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/cancel",schemaPath:"#/properties/tasks/properties/cancel/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.list!==void 0){let n=i.list;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/list",schemaPath:"#/properties/tasks/properties/list/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.requests!==void 0){let n=i.requests;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let l in n)if(l!=="tools"){let m={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[m]:e.push(m),r++}if(n.tools!==void 0){let l=n.tools;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let m in l)if(m!=="call"){let c={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),r++}if(l.call!==void 0){let m=l.call;if(!(m&&typeof m=="object"&&!Array.isArray(m))){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 m={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=[m]:e.push(m),r++}}}else{let l={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),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&&(wt(t.tools,{instancePath:s+"/tools",parentData:t,parentDataProperty:"tools",rootData:u,dynamicAnchors:a})||(e=e===null?wt.errors:e.concat(wt.errors),r=e.length));for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(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 jt.errors=e,r===0}jt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var X=new RegExp("^[A-Za-z0-9._-]+$","u"),ae=new RegExp("^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$","u");var ee=new RegExp("^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$","u"),Ho={additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},Ti={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"}]},bt={additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"};var B=Ni().fullFormats.uri;function Me(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Me.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.text===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="mimeType"||h==="text"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){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:P};e===null?e=[q]:e.push(q),r++}var m=$===r;if(!m){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.text!==void 0&&typeof t.text!="string"){let h={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.blob===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="blob"||h==="mimeType"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){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:P};e===null?e=[q]:e.push(q),r++}var f=$===r;if(!f){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.blob!==void 0&&typeof t.blob!="string"){let h={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=d===r;if(b&&i?(i=!1,n=[n,1]):b&&(i=!0,n=1,c!==!0&&(c=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return Me.errors=e,p.props=c,r===0}Me.evaluated={dynamicProps:!0,dynamicItems:!1};var Wo={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 kt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=kt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.text!==void 0&&typeof t.text!="string"){let $={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="text"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.data===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[$]:e.push($),r++}if(t.mimeType===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="_meta"||$==="annotations"||$==="data"||$==="mimeType"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t._meta!==void 0){let $=t._meta;if($&&typeof $=="object"&&!Array.isArray($))for(let q in $){let w=r;if(typeof q=="string"&&!ee.test(q)){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:q};e===null?e=[j]:e.push(j),r++}var f=w===r;if(!f){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:q},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.annotations!==void 0){let $=t.annotations;if($&&typeof $=="object"&&!Array.isArray($)){if($.audience!==void 0){let q=$.audience;if(Array.isArray(q)){let w=q.length;for(let j=0;j1||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.data!==void 0&&typeof t.data!="string"){let $={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/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 $={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let $=t.type;if(!($==="image"||$==="audio")){let q={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Ti.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[q]:e.push(q),r++}}}else{let $={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=d===r;if(b&&i)i=!1,n=[n,1];else{b&&(i=!0,n=1,c!==!0&&(c=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.resource===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="_meta"||w==="annotations"||w==="resource"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t._meta!==void 0){let w=t._meta;if(w&&typeof w=="object"&&!Array.isArray(w))for(let j in w){let v=r;if(typeof j=="string"&&!ee.test(j)){let k={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=[k]:e.push(k),r++}var h=v===r;if(!h){let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[k]:e.push(k),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 w=t.annotations;if(w&&typeof w=="object"&&!Array.isArray(w)){if(w.audience!==void 0){let j=w.audience;if(Array.isArray(j)){let v=j.length;for(let k=0;k1||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[v]:e.push(v),r++}if(j<0||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),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.resource!==void 0&&(Me(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:a})||(e=e===null?Me.errors:e.concat(Me.errors),r=e.length)),t.type!==void 0&&t.type!=="resource"){let w={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[w]:e.push(w),r++}var b=$===r;if(b&&i)i=!1,n=[n,2];else{b&&(i=!0,n=2,c!==!0&&(c=!0));let w=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[v]:e.push(v),r++}if(t.uri===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[v]:e.push(v),r++}if(t.name===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!fe.call(Ti.oneOf[3].properties,v)){let k={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t._meta!==void 0){let v=t._meta;if(v&&typeof v=="object"&&!Array.isArray(v))for(let k in v){let O=r;if(typeof k=="string"&&!ee.test(k)){let x={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:k};e===null?e=[x]:e.push(x),r++}var P=O===r;if(!P){let x={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:k},message:"property name must be valid"};e===null?e=[x]:e.push(x),r++}}else{let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.annotations!==void 0){let v=t.annotations;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.audience!==void 0){let k=v.audience;if(Array.isArray(k)){let O=k.length;for(let x=0;x1||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[O]:e.push(O),r++}if(k<0||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[O]:e.push(O),r++}}}else{let k={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.description!==void 0&&typeof t.description!="string"){let v={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.icons!==void 0&&(me(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:a})||(e=e===null?me.errors:e.concat(me.errors),r=e.length)),t.mimeType!==void 0&&typeof t.mimeType!="string"){let v={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.name!==void 0&&typeof t.name!="string"){let v={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.size!==void 0&&typeof t.size!="number"){let v={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),r++}if(t.title!==void 0&&typeof t.title!="string"){let v={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource_link"){let v={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}if(t.uri!==void 0){let v=t.uri;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}}else{let v={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}var b=w===r;b&&i?(i=!1,n=[n,3]):b&&(i=!0,n=3,c!==!0&&(c=!0))}}if(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 ye.errors=e,p.props=c,r===0}ye.evaluated={dynamicProps:!0,dynamicItems:!1};function Ot(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ot.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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&&(ye(t.content,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?ye.errors:e.concat(ye.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:Ho.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 Ot.errors=e,r===0}Ot.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function qt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=qt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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 l=r;if(typeof n=="string"&&!ee.test(n)){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:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),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 l=0;l=",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 Le.errors=e,r===0}Le.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Fe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Fe.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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&&(Le(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Le.errors:e.concat(Le.errors),r=e.length));for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(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 Fe.errors=e,r===0}Fe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Je(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Je.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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&&(Le(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Le.errors:e.concat(Le.errors),r=e.length)),t.uri!==void 0){let o=t.uri;if(typeof o=="string"){if(!B(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)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(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 Je.errors=e,r===0}Je.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function he(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=he.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.$componentRef===void 0){let P={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(P!=="$componentRef"){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.$componentRef!==void 0){let P=t.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={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=[$]:e.push($),r++}}else{let $={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var h=l===r;if(h){i=!0,n=0;var m=!0}let c=r;if(!(t&&typeof t=="object"&&!Array.isArray(t))){let P={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}let d=r,f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.$componentRef===void 0&&(P="$componentRef")){let $={};e===null?e=[$]:e.push($),r++}}var b=f===r;if(b){let P={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=d,e!==null&&(d?e.length=d:e=null);var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,m!==!0&&(m=!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++}return he.errors=e,p.props=m,r===0}he.evaluated={dynamicProps:!0,dynamicItems:!1};function He(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=He.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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 l=r;if(typeof n=="string"&&!ee.test(n)){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:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),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 l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}if(i.values!==void 0){let n=i.values;if(Array.isArray(n)){if(n.length>100){let m={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=[m]:e.push(m),r++}let l=n.length;for(let m=0;m=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.minLength!==void 0){let h=t.minLength;if(!(typeof h=="number"&&!(h%1)&&!isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[P]:e.push(P),r++}if(typeof h=="number"&&(h<0||isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/0/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0&&t.type!=="string"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="default"||h==="description"||h==="maximum"||h==="minimum"||h==="title"||h==="type")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.default!==void 0&&typeof t.default!="number"){let h={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let h={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let h={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0){let h=t.type;if(!(h==="number"||h==="integer")){let P={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Ri.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="default"||$==="description"||$==="title"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let $={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[$]:e.push($),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.title!==void 0&&typeof t.title!="string"){let $={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="boolean"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.enum===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="default"||w==="description"||w==="enum"||w==="enumNames"||w==="title"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.default!==void 0&&typeof t.default!="string"){let w={instancePath:s+"/default",schemaPath:"#/oneOf/3/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.description!==void 0&&typeof t.description!="string"){let w={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.enum!==void 0){let w=t.enum;if(Array.isArray(w)){let j=w.length;for(let v=0;v=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.minItems!==void 0){let O=t.minItems;if(!(typeof O=="number"&&!(O%1)&&!isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[x]:e.push(x),r++}if(typeof O=="number"&&(O<0||isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.title!==void 0&&typeof t.title!="string"){let O={instancePath:s+"/title",schemaPath:"#/oneOf/5/properties/title/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!=="array"){let O={instancePath:s+"/type",schemaPath:"#/oneOf/5/properties/type/const",keyword:"const",params:{allowedValue:"array"},message:"must be equal to constant"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}var d=v===r;d&&i?(i=!1,n=[n,5]):d&&(i=!0,n=5,m!==!0&&(m=!0))}}}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return Rt.errors=e,p.props=m,r===0}Rt.evaluated={dynamicProps:!0,dynamicItems:!1};function Ke(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ke.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(!B(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)Rt(o[i],{instancePath:s+"/properties/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?Rt.errors:e.concat(Rt.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 m=0;m1){let m={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof m[c]=="number"){l=m[c];let d={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+n+" are identical)"};e===null?e=[d]:e.push(d),r++;break}m[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 Ke.errors=e,r===0}Ke.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ke(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ke.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r,m=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.url===void 0&&(v="url")){let k={};e===null?e=[k]:e.push(k),r++}}var d=c===r;if(d){let v={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=m,e!==null&&(m?e.length=m:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let v={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[v]:e.push(v),r++}if(t.mode!==void 0&&t.mode!=="form"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}}var q=l===r;if(q){i=!0,n=0;var f={};f.mode=!0}let b=r,h=r,P=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.requestedSchema===void 0&&(v="requestedSchema")){let k={};e===null?e=[k]:e.push(k),r++}}var $=P===r;if($){let v={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=h,e!==null&&(h?e.length=h:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}var q=b===r;if(q&&i?(i=!1,n=[n,1]):q&&(i=!0,n=1,f!==!0&&(f=f||{},f.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let v={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[v]:e.push(v),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}if(t.mode===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[v]:e.push(v),r++}if(t.message===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!(fe.call(Si.properties,v)||E.test(v))){let k={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t.message!==void 0){let v=t.message;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.mode!==void 0){let v=t.mode;if(!(v==="form"||v==="url")){let k={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:Si.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[k]:e.push(k),r++}}if(t.name!==void 0){let v=t.name;if(typeof v=="string"){if(!X.test(v)){let k={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=[k]:e.push(k),r++}}else{let k={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onCancel!==void 0){let v=t.onCancel;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onDecline!==void 0){let v=t.onDecline;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.protocolVersions!==void 0&&(Y(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Y.errors:e.concat(Y.errors),r=e.length)),t.requestedSchema!==void 0){let v=t.requestedSchema,k=r,O=!1,x=null,I=r;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.$componentRef===void 0){let A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[A]:e.push(A),r++}for(let A in v)if(A!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:A},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),r++}if(v.$componentRef!==void 0){let A=v.$componentRef;if(typeof A=="string"){if(!ae.test(A)){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 A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[A]:e.push(A),r++}var j=I===r;if(j){O=!0,x=0;var w=!0}let Z=r;Ke(v,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?Ke.errors:e.concat(Ke.errors),r=e.length);var j=Z===r;if(j&&O?(O=!1,x=[x,1]):j&&(O=!0,x=1,w!==!0&&(w=!0)),O)r=k,e!==null&&(k?e.length=k:e=null);else{let A={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:x},message:"must match exactly one schema in oneOf"};e===null?e=[A]:e.push(A),r++}}if(t.url!==void 0){let v=t.url;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.when!==void 0){let v=t.when;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}for(let v in t)E.test(v)&&(z(t[v],{instancePath:s+"/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:v,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let v={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}return ke.errors=e,r===0}ke.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Dt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Dt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Ue(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Ue.errors:e.concat(Ue.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}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 Dt.errors=e,r===0}Dt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function te(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=te.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let h={};for(;f--;){let P=c[f];if(typeof P=="string"){if(typeof h[P]=="number"){b=h[P];let $={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:f,j:b},message:"must NOT have duplicate items (items ## "+b+" and "+f+" are identical)"};e===null?e=[$]:e.push($),r++;break}h[P]=f}}}}else{let d={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[d]:e.push(d),r++}}}else{let m={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),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 Zt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Zt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(!(fe.call(Yo.properties,i)||E.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 l=r;if(typeof n=="string"&&!ee.test(n)){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:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),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 l={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}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)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(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 Zt.errors=e,r===0}Zt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Qo={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 Ct(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ct.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Je(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Je.errors:e.concat(Je.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}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 Ct.errors=e,r===0}Ct.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Vt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Vt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(!(fe.call(Qo.properties,i)||E.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 l=r;if(typeof n=="string"&&!ee.test(n)){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:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),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 l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),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&&(je(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?je.errors:e.concat(je.errors),r=e.length)),t.completionExamples!==void 0&&(Be(t.completionExamples,{instancePath:s+"/completionExamples",parentData:t,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:a})||(e=e===null?Be.errors:e.concat(Be.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 l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}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)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(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 Vt.errors=e,r===0}Vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Go={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 Mt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Mt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Fe(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Fe.errors:e.concat(Fe.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}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 Mt.errors=e,r===0}Mt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ut(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ut.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(!(fe.call(Go.properties,i)||E.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 l=r;if(typeof n=="string"&&!ee.test(n)){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:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),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 l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),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&&(je(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?je.errors:e.concat(je.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 l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}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)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(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 Ut.errors=e,r===0}Ut.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Xo={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 ve(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ve.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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(!B(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(!B(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(!B(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)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(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 ve.errors=e,r===0}ve.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Lt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Lt.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.implicit===void 0){let f={instancePath:s,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty:"implicit"},message:"must have required property 'implicit'"};e===null?e=[f]:e.push(f),r++}var d=n===r;i=i||d;let l=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.password===void 0){let f={instancePath:s,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty:"password"},message:"must have required property 'password'"};e===null?e=[f]:e.push(f),r++}var d=l===r;i=i||d;let m=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.clientCredentials===void 0){let f={instancePath:s,schemaPath:"#/anyOf/2/required",keyword:"required",params:{missingProperty:"clientCredentials"},message:"must have required property 'clientCredentials'"};e===null?e=[f]:e.push(f),r++}var d=m===r;i=i||d;let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.authorizationCode===void 0){let f={instancePath:s,schemaPath:"#/anyOf/3/required",keyword:"required",params:{missingProperty:"authorizationCode"},message:"must have required property 'authorizationCode'"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(i=i||d,i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[f]:e.push(f),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){for(let f in t)if(!(f==="authorizationCode"||f==="clientCredentials"||f==="implicit"||f==="password"||E.test(f))){let b={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.authorizationCode!==void 0){let f=t.authorizationCode;if(ve(f,{instancePath:s+"/authorizationCode",parentData:t,parentDataProperty:"authorizationCode",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)){if(f.authorizationUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}if(f.tokenUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}}if(t.clientCredentials!==void 0){let f=t.clientCredentials;if(ve(f,{instancePath:s+"/clientCredentials",parentData:t,parentDataProperty:"clientCredentials",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/clientCredentials",schemaPath:"#/properties/clientCredentials/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.implicit!==void 0){let f=t.implicit;if(ve(f,{instancePath:s+"/implicit",parentData:t,parentDataProperty:"implicit",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.authorizationUrl===void 0){let b={instancePath:s+"/implicit",schemaPath:"#/properties/implicit/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.password!==void 0){let f=t.password;if(ve(f,{instancePath:s+"/password",parentData:t,parentDataProperty:"password",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/password",schemaPath:"#/properties/password/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}return Lt.errors=e,r===0}Lt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ft(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ft.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.scheme===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"scheme"},message:"must have required property 'scheme'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="bearerFormat"||f==="description"||f==="scheme"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.bearerFormat!==void 0&&typeof t.bearerFormat!="string"){let f={instancePath:s+"/bearerFormat",schemaPath:"#/oneOf/0/properties/bearerFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.scheme!==void 0&&typeof t.scheme!="string"){let f={instancePath:s+"/scheme",schemaPath:"#/oneOf/0/properties/scheme/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.name===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[f]:e.push(f),r++}if(t.in===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"in"},message:"must have required property 'in'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="description"||f==="in"||f==="name"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.in!==void 0){let f=t.in;if(typeof f!="string"){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}if(!(f==="header"||f==="query"||f==="cookie")){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/enum",keyword:"enum",params:{allowedValues:Xo.oneOf[1].properties.in.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}if(t.name!==void 0&&typeof t.name!="string"){let f={instancePath:s+"/name",schemaPath:"#/oneOf/1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="apiKey"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"apiKey"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}if(t.flows===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"flows"},message:"must have required property 'flows'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="description"||h==="flows"||h==="type"||E.test(h))){let P={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.flows!==void 0&&(Lt(t.flows,{instancePath:s+"/flows",parentData:t,parentDataProperty:"flows",rootData:u,dynamicAnchors:a})||(e=e===null?Lt.errors:e.concat(Lt.errors),r=e.length)),t.type!==void 0&&t.type!=="oauth2"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"oauth2"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}for(let h in t)E.test(h)&&(z(t[h],{instancePath:s+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:h,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let h={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=f===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"openIdConnectUrl"},message:"must have required property 'openIdConnectUrl'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="description"||$==="openIdConnectUrl"||$==="type"||E.test($))){let q={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl!==void 0){let $=t.openIdConnectUrl;if(typeof $=="string"){if(!B($)){let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/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!=="openIdConnect"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"openIdConnect"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}for(let $ in t)E.test($)&&(z(t[$],{instancePath:s+"/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:$,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let $={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;d&&i?(i=!1,n=[n,3]):d&&(i=!0,n=3,m!==!0&&(m=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Ft.errors=e,p.props=m,r===0}Ft.evaluated={dynamicProps:!0,dynamicItems:!1};function Jt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Jt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"&&!X.test(i)){let l={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=[l]:e.push(l),r++}var o=n===r;if(!o){let l={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}for(let i in t)Ft(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?Ft.errors:e.concat(Ft.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 Jt.errors=e,r===0}Jt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ht(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ht.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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(oe(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)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(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 Ht.errors=e,r===0}Ht.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var en={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 tn={additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"};function Wt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Wt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;We(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?We.errors:e.concat(We.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}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 Wt.errors=e,r===0}Wt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Bt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Bt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(oe(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&&(Ke(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?Ke.errors:e.concat(Ke.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 Bt.errors=e,r===0}Bt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Kt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Kt.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Bt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Bt.errors:e.concat(Bt.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[f]:e.push(f),r++}if(t.message===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="message"||f==="mode"||f==="url")){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.message!==void 0){let f=t.message;if(typeof f=="string"){if(oe(f)<1){let b={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=[b]:e.push(b),r++}}else{let b={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}if(t.mode!==void 0&&t.mode!=="url"){let f={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Kt.errors=e,p.props=m,r===0}Kt.evaluated={dynamicProps:!0,dynamicItems:!1};var rn={additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"};function Yt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Yt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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:a})||(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 Yt.errors=e,r===0}Yt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Qt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Qt.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Yt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Yt.errors:e.concat(Yt.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(f!=="action"){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.action!==void 0){let f=t.action;if(!(f==="decline"||f==="cancel")){let b={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:rn.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Qt.errors=e,p.props=m,r===0}Qt.evaluated={dynamicProps:!0,dynamicItems:!1};function Gt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Gt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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(!X.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&&(Kt(t.request,{instancePath:s+"/request",parentData:t,parentDataProperty:"request",rootData:u,dynamicAnchors:a})||(e=e===null?Kt.errors:e.concat(Kt.errors),r=e.length)),t.response!==void 0&&(Qt(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?Qt.errors:e.concat(Qt.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)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(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 Gt.errors=e,r===0}Gt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Di={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"},sn={additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},on={additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"};function Xt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Xt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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)z(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(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.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 Xt.errors=e,r===0}Xt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function er(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=er.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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,l=!1,m=null,c=r;ye(i,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?ye.errors:e.concat(ye.errors),r=e.length);var o=c===r;o&&(l=!0,m=0);let d=r;if(Array.isArray(i)){if(i.length<1){let b={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=[b]:e.push(b),r++}let f=i.length;for(let b=0;b1||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 rr.errors=e,r===0}rr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function sr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=sr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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(!he(i,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:a}))e=e===null?he.errors:e.concat(he.errors),r=e.length;else var o=he.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(oe(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)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(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 sr.errors=e,r===0}sr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ir(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ir.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(!fe.call(Di.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:Di.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&&(ar(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?ar.errors:e.concat(ar.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)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(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 pr.errors=e,r===0}pr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function lr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=lr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Gt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Gt.errors:e.concat(Gt.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;nr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?nr.errors:e.concat(nr.errors),r=e.length);var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;pr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?pr.errors:e.concat(pr.errors),r=e.length);var d=f===r;d&&i?(i=!1,n=[n,2]):d&&(i=!0,n=2,m!==!0&&(m=!0))}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return lr.errors=e,p.props=m,r===0}lr.evaluated={dynamicProps:!0,dynamicItems:!1};function mr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=mr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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:a})||(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.result!==void 0&&(He(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?He.errors:e.concat(He.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 b={};for(;d--;){let h=m[d];if(typeof h=="string"){if(typeof b[h]=="number"){f=b[h];let P={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:d,j:f},message:"must NOT have duplicate items (items ## "+f+" and "+d+" are identical)"};e===null?e=[P]:e.push(P),r++;break}b[h]=d}}}}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 m={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}for(let m in t)E.test(m)&&(z(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.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 fr.errors=e,r===0}fr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function cr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=cr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="protocolVersions"||f==="security"||f==="type"||f==="url"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.protocolVersions!==void 0&&(Y(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Y.errors:e.concat(Y.errors),r=e.length)),t.security!==void 0&&(te(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:a})||(e=e===null?te.errors:e.concat(te.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.command===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="args"||f==="command"||f==="env"||f==="protocolVersions"||f==="security"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.args!==void 0){let f=t.args;if(Array.isArray(f)){let b=f.length;for(let h=0;h1){e:for(;i--;)for(n=i;n--;)if(Ui(t[i],t[n])){let l={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=[l]:e.push(l),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 Q.errors=e,r===0}Q.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function dr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=dr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||o==="subscribe"||E.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)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 dr.errors=e,r===0}dr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function hr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=hr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||E.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)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 gr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=gr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let i in t)if(!(fe.call(pn.properties,i)||E.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 l=r;if(typeof n=="string"&&!Es.test(n)){let m={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=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}for(let n in i){let l=i[n];if(!(l&&typeof l=="object"&&!Array.isArray(l))){let m={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=[m]:e.push(m),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&&(yr(t.prompts,{instancePath:s+"/prompts",parentData:t,parentDataProperty:"prompts",rootData:u,dynamicAnchors:a})||(e=e===null?yr.errors:e.concat(yr.errors),r=e.length)),t.protocolVersions!==void 0&&(Q(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Q.errors:e.concat(Q.errors),r=e.length)),t.resources!==void 0&&(dr(t.resources,{instancePath:s+"/resources",parentData:t,parentDataProperty:"resources",rootData:u,dynamicAnchors:a})||(e=e===null?dr.errors:e.concat(dr.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 l={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),r++}if(i.cancel!==void 0){let n=i.cancel;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/cancel",schemaPath:"#/properties/tasks/properties/cancel/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.list!==void 0){let n=i.list;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/list",schemaPath:"#/properties/tasks/properties/list/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.requests!==void 0){let n=i.requests;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let l in n)if(l!=="tools"){let m={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[m]:e.push(m),r++}if(n.tools!==void 0){let l=n.tools;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let m in l)if(m!=="call"){let c={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),r++}if(l.call!==void 0){let m=l.call;if(!(m&&typeof m=="object"&&!Array.isArray(m))){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 m={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=[m]:e.push(m),r++}}}else{let l={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),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&&(hr(t.tools,{instancePath:s+"/tools",parentData:t,parentDataProperty:"tools",rootData:u,dynamicAnchors:a})||(e=e===null?hr.errors:e.concat(hr.errors),r=e.length));for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 gr.errors=e,r===0}gr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var mn={additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},Zi={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"}]},$t={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 Qe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Qe.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.text===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="mimeType"||h==="text"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){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:P};e===null?e=[q]:e.push(q),r++}var m=$===r;if(!m){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.text!==void 0&&typeof t.text!="string"){let h={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.blob===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="blob"||h==="mimeType"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){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:P};e===null?e=[q]:e.push(q),r++}var f=$===r;if(!f){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.blob!==void 0&&typeof t.blob!="string"){let h={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=d===r;if(b&&i?(i=!1,n=[n,1]):b&&(i=!0,n=1,c!==!0&&(c=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return Qe.errors=e,p.props=c,r===0}Qe.evaluated={dynamicProps:!0,dynamicItems:!1};var un={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 br(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=br.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.text!==void 0&&typeof t.text!="string"){let $={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="text"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.data===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[$]:e.push($),r++}if(t.mimeType===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="_meta"||$==="annotations"||$==="data"||$==="mimeType"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t._meta!==void 0){let $=t._meta;if($&&typeof $=="object"&&!Array.isArray($))for(let q in $){let w=r;if(typeof q=="string"&&!ee.test(q)){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:q};e===null?e=[j]:e.push(j),r++}var f=w===r;if(!f){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:q},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.annotations!==void 0){let $=t.annotations;if($&&typeof $=="object"&&!Array.isArray($)){if($.audience!==void 0){let q=$.audience;if(Array.isArray(q)){let w=q.length;for(let j=0;j1||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.data!==void 0&&typeof t.data!="string"){let $={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/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 $={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let $=t.type;if(!($==="image"||$==="audio")){let q={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Zi.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[q]:e.push(q),r++}}}else{let $={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=d===r;if(b&&i)i=!1,n=[n,1];else{b&&(i=!0,n=1,c!==!0&&(c=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.resource===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="_meta"||w==="annotations"||w==="resource"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t._meta!==void 0){let w=t._meta;if(w&&typeof w=="object"&&!Array.isArray(w))for(let j in w){let v=r;if(typeof j=="string"&&!ee.test(j)){let k={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=[k]:e.push(k),r++}var h=v===r;if(!h){let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[k]:e.push(k),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 w=t.annotations;if(w&&typeof w=="object"&&!Array.isArray(w)){if(w.audience!==void 0){let j=w.audience;if(Array.isArray(j)){let v=j.length;for(let k=0;k1||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[v]:e.push(v),r++}if(j<0||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),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.resource!==void 0&&(Qe(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:a})||(e=e===null?Qe.errors:e.concat(Qe.errors),r=e.length)),t.type!==void 0&&t.type!=="resource"){let w={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[w]:e.push(w),r++}var b=$===r;if(b&&i)i=!1,n=[n,2];else{b&&(i=!0,n=2,c!==!0&&(c=!0));let w=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[v]:e.push(v),r++}if(t.uri===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[v]:e.push(v),r++}if(t.name===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!fe.call(Zi.oneOf[3].properties,v)){let k={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t._meta!==void 0){let v=t._meta;if(v&&typeof v=="object"&&!Array.isArray(v))for(let k in v){let O=r;if(typeof k=="string"&&!ee.test(k)){let x={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:k};e===null?e=[x]:e.push(x),r++}var P=O===r;if(!P){let x={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:k},message:"property name must be valid"};e===null?e=[x]:e.push(x),r++}}else{let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.annotations!==void 0){let v=t.annotations;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.audience!==void 0){let k=v.audience;if(Array.isArray(k)){let O=k.length;for(let x=0;x1||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[O]:e.push(O),r++}if(k<0||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[O]:e.push(O),r++}}}else{let k={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.description!==void 0&&typeof t.description!="string"){let v={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.icons!==void 0&&(ue(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:a})||(e=e===null?ue.errors:e.concat(ue.errors),r=e.length)),t.mimeType!==void 0&&typeof t.mimeType!="string"){let v={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.name!==void 0&&typeof t.name!="string"){let v={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.size!==void 0&&typeof t.size!="number"){let v={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),r++}if(t.title!==void 0&&typeof t.title!="string"){let v={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource_link"){let v={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}if(t.uri!==void 0){let v=t.uri;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}}else{let v={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}var b=w===r;b&&i?(i=!1,n=[n,3]):b&&(i=!0,n=3,c!==!0&&(c=!0))}}if(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 de.errors=e,p.props=c,r===0}de.evaluated={dynamicProps:!0,dynamicItems:!1};function $r(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=$r.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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&&(de(t.content,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?de.errors:e.concat(de.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:mn.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 $r.errors=e,r===0}$r.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Pr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Pr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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 l=r;if(typeof n=="string"&&!ee.test(n)){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:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),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 l=0;l=",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 Xe.errors=e,r===0}Xe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function et(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=et.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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&&(Xe(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Xe.errors:e.concat(Xe.errors),r=e.length));for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 et.errors=e,r===0}et.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function tt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=tt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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&&(Xe(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Xe.errors:e.concat(Xe.errors),r=e.length)),t.uri!==void 0){let o=t.uri;if(typeof o=="string"){if(!B(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)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 tt.errors=e,r===0}tt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ge(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ge.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.$componentRef===void 0){let P={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(P!=="$componentRef"){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.$componentRef!==void 0){let P=t.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={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=[$]:e.push($),r++}}else{let $={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var h=l===r;if(h){i=!0,n=0;var m=!0}let c=r;if(!(t&&typeof t=="object"&&!Array.isArray(t))){let P={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}let d=r,f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.$componentRef===void 0&&(P="$componentRef")){let $={};e===null?e=[$]:e.push($),r++}}var b=f===r;if(b){let P={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=d,e!==null&&(d?e.length=d:e=null);var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,m!==!0&&(m=!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++}return ge.errors=e,p.props=m,r===0}ge.evaluated={dynamicProps:!0,dynamicItems:!1};function rt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=rt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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 l=r;if(typeof n=="string"&&!ee.test(n)){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:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),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 l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}if(i.values!==void 0){let n=i.values;if(Array.isArray(n)){if(n.length>100){let m={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=[m]:e.push(m),r++}let l=n.length;for(let m=0;m=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.minLength!==void 0){let h=t.minLength;if(!(typeof h=="number"&&!(h%1)&&!isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[P]:e.push(P),r++}if(typeof h=="number"&&(h<0||isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/0/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0&&t.type!=="string"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="default"||h==="description"||h==="maximum"||h==="minimum"||h==="title"||h==="type")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.default!==void 0&&typeof t.default!="number"){let h={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let h={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let h={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0){let h=t.type;if(!(h==="number"||h==="integer")){let P={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Vi.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="default"||$==="description"||$==="title"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let $={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[$]:e.push($),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.title!==void 0&&typeof t.title!="string"){let $={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="boolean"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.enum===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="default"||w==="description"||w==="enum"||w==="enumNames"||w==="title"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.default!==void 0&&typeof t.default!="string"){let w={instancePath:s+"/default",schemaPath:"#/oneOf/3/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.description!==void 0&&typeof t.description!="string"){let w={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.enum!==void 0){let w=t.enum;if(Array.isArray(w)){let j=w.length;for(let v=0;v=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.minItems!==void 0){let O=t.minItems;if(!(typeof O=="number"&&!(O%1)&&!isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[x]:e.push(x),r++}if(typeof O=="number"&&(O<0||isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.title!==void 0&&typeof t.title!="string"){let O={instancePath:s+"/title",schemaPath:"#/oneOf/5/properties/title/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!=="array"){let O={instancePath:s+"/type",schemaPath:"#/oneOf/5/properties/type/const",keyword:"const",params:{allowedValue:"array"},message:"must be equal to constant"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}var d=v===r;d&&i?(i=!1,n=[n,5]):d&&(i=!0,n=5,m!==!0&&(m=!0))}}}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return zr.errors=e,p.props=m,r===0}zr.evaluated={dynamicProps:!0,dynamicItems:!1};function ot(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ot.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(!B(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)zr(o[i],{instancePath:s+"/properties/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?zr.errors:e.concat(zr.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 m=0;m1){let m={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof m[c]=="number"){l=m[c];let d={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+n+" are identical)"};e===null?e=[d]:e.push(d),r++;break}m[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 ot.errors=e,r===0}ot.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function qe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=qe.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r,m=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.url===void 0&&(v="url")){let k={};e===null?e=[k]:e.push(k),r++}}var d=c===r;if(d){let v={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=m,e!==null&&(m?e.length=m:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let v={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[v]:e.push(v),r++}if(t.mode!==void 0&&t.mode!=="form"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}}var q=l===r;if(q){i=!0,n=0;var f={};f.mode=!0}let b=r,h=r,P=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.requestedSchema===void 0&&(v="requestedSchema")){let k={};e===null?e=[k]:e.push(k),r++}}var $=P===r;if($){let v={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=h,e!==null&&(h?e.length=h:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}var q=b===r;if(q&&i?(i=!1,n=[n,1]):q&&(i=!0,n=1,f!==!0&&(f=f||{},f.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let v={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[v]:e.push(v),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}if(t.mode===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[v]:e.push(v),r++}if(t.message===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!(fe.call(Ci.properties,v)||E.test(v))){let k={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t.message!==void 0){let v=t.message;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.mode!==void 0){let v=t.mode;if(!(v==="form"||v==="url")){let k={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:Ci.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[k]:e.push(k),r++}}if(t.name!==void 0){let v=t.name;if(typeof v=="string"){if(!X.test(v)){let k={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=[k]:e.push(k),r++}}else{let k={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onCancel!==void 0){let v=t.onCancel;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onDecline!==void 0){let v=t.onDecline;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.protocolVersions!==void 0&&(Q(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Q.errors:e.concat(Q.errors),r=e.length)),t.requestedSchema!==void 0){let v=t.requestedSchema,k=r,O=!1,x=null,I=r;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.$componentRef===void 0){let A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[A]:e.push(A),r++}for(let A in v)if(A!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:A},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),r++}if(v.$componentRef!==void 0){let A=v.$componentRef;if(typeof A=="string"){if(!ae.test(A)){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 A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[A]:e.push(A),r++}var j=I===r;if(j){O=!0,x=0;var w=!0}let Z=r;ot(v,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?ot.errors:e.concat(ot.errors),r=e.length);var j=Z===r;if(j&&O?(O=!1,x=[x,1]):j&&(O=!0,x=1,w!==!0&&(w=!0)),O)r=k,e!==null&&(k?e.length=k:e=null);else{let A={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:x},message:"must match exactly one schema in oneOf"};e===null?e=[A]:e.push(A),r++}}if(t.url!==void 0){let v=t.url;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.when!==void 0){let v=t.when;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}for(let v in t)E.test(v)&&(N(t[v],{instancePath:s+"/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:v,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let v={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}return qe.errors=e,r===0}qe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Nr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Nr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Ge(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Ge.errors:e.concat(Ge.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}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 Nr.errors=e,r===0}Nr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function re(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=re.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let h={};for(;f--;){let P=c[f];if(typeof P=="string"){if(typeof h[P]=="number"){b=h[P];let $={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:f,j:b},message:"must NOT have duplicate items (items ## "+b+" and "+f+" are identical)"};e===null?e=[$]:e.push($),r++;break}h[P]=f}}}}else{let d={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[d]:e.push(d),r++}}}else{let m={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),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 re.errors=e,r===0}re.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function _r(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=_r.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(!(fe.call(yn.properties,i)||E.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 l=r;if(typeof n=="string"&&!ee.test(n)){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:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),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 l={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}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)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 _r.errors=e,r===0}_r.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var dn={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 Ir(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ir.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;tt(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?tt.errors:e.concat(tt.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}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 Ir.errors=e,r===0}Ir.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Tr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Tr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(!(fe.call(dn.properties,i)||E.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 l=r;if(typeof n=="string"&&!ee.test(n)){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:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),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 l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),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&&(Oe(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?Oe.errors:e.concat(Oe.errors),r=e.length)),t.completionExamples!==void 0&&(it(t.completionExamples,{instancePath:s+"/completionExamples",parentData:t,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:a})||(e=e===null?it.errors:e.concat(it.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 l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}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)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 Tr.errors=e,r===0}Tr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var hn={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 Sr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Sr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;et(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?et.errors:e.concat(et.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}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 Sr.errors=e,r===0}Sr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Rr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Rr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(!(fe.call(hn.properties,i)||E.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 l=r;if(typeof n=="string"&&!ee.test(n)){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:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),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 l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),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&&(Oe(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?Oe.errors:e.concat(Oe.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 l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}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)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 Rr.errors=e,r===0}Rr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var gn={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 we(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=we.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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(!B(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(!B(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(!B(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)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 we.errors=e,r===0}we.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Dr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Dr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.implicit===void 0){let f={instancePath:s,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty:"implicit"},message:"must have required property 'implicit'"};e===null?e=[f]:e.push(f),r++}var d=n===r;i=i||d;let l=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.password===void 0){let f={instancePath:s,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty:"password"},message:"must have required property 'password'"};e===null?e=[f]:e.push(f),r++}var d=l===r;i=i||d;let m=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.clientCredentials===void 0){let f={instancePath:s,schemaPath:"#/anyOf/2/required",keyword:"required",params:{missingProperty:"clientCredentials"},message:"must have required property 'clientCredentials'"};e===null?e=[f]:e.push(f),r++}var d=m===r;i=i||d;let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.authorizationCode===void 0){let f={instancePath:s,schemaPath:"#/anyOf/3/required",keyword:"required",params:{missingProperty:"authorizationCode"},message:"must have required property 'authorizationCode'"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(i=i||d,i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[f]:e.push(f),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){for(let f in t)if(!(f==="authorizationCode"||f==="clientCredentials"||f==="implicit"||f==="password"||E.test(f))){let b={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.authorizationCode!==void 0){let f=t.authorizationCode;if(we(f,{instancePath:s+"/authorizationCode",parentData:t,parentDataProperty:"authorizationCode",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)){if(f.authorizationUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}if(f.tokenUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}}if(t.clientCredentials!==void 0){let f=t.clientCredentials;if(we(f,{instancePath:s+"/clientCredentials",parentData:t,parentDataProperty:"clientCredentials",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/clientCredentials",schemaPath:"#/properties/clientCredentials/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.implicit!==void 0){let f=t.implicit;if(we(f,{instancePath:s+"/implicit",parentData:t,parentDataProperty:"implicit",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.authorizationUrl===void 0){let b={instancePath:s+"/implicit",schemaPath:"#/properties/implicit/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.password!==void 0){let f=t.password;if(we(f,{instancePath:s+"/password",parentData:t,parentDataProperty:"password",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/password",schemaPath:"#/properties/password/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}return Dr.errors=e,r===0}Dr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Zr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Zr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.scheme===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"scheme"},message:"must have required property 'scheme'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="bearerFormat"||f==="description"||f==="scheme"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.bearerFormat!==void 0&&typeof t.bearerFormat!="string"){let f={instancePath:s+"/bearerFormat",schemaPath:"#/oneOf/0/properties/bearerFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.scheme!==void 0&&typeof t.scheme!="string"){let f={instancePath:s+"/scheme",schemaPath:"#/oneOf/0/properties/scheme/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.name===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[f]:e.push(f),r++}if(t.in===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"in"},message:"must have required property 'in'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="description"||f==="in"||f==="name"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.in!==void 0){let f=t.in;if(typeof f!="string"){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}if(!(f==="header"||f==="query"||f==="cookie")){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/enum",keyword:"enum",params:{allowedValues:gn.oneOf[1].properties.in.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}if(t.name!==void 0&&typeof t.name!="string"){let f={instancePath:s+"/name",schemaPath:"#/oneOf/1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="apiKey"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"apiKey"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}if(t.flows===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"flows"},message:"must have required property 'flows'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="description"||h==="flows"||h==="type"||E.test(h))){let P={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.flows!==void 0&&(Dr(t.flows,{instancePath:s+"/flows",parentData:t,parentDataProperty:"flows",rootData:u,dynamicAnchors:a})||(e=e===null?Dr.errors:e.concat(Dr.errors),r=e.length)),t.type!==void 0&&t.type!=="oauth2"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"oauth2"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}for(let h in t)E.test(h)&&(N(t[h],{instancePath:s+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:h,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let h={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=f===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"openIdConnectUrl"},message:"must have required property 'openIdConnectUrl'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="description"||$==="openIdConnectUrl"||$==="type"||E.test($))){let q={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl!==void 0){let $=t.openIdConnectUrl;if(typeof $=="string"){if(!B($)){let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/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!=="openIdConnect"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"openIdConnect"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}for(let $ in t)E.test($)&&(N(t[$],{instancePath:s+"/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:$,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let $={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;d&&i?(i=!1,n=[n,3]):d&&(i=!0,n=3,m!==!0&&(m=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Zr.errors=e,p.props=m,r===0}Zr.evaluated={dynamicProps:!0,dynamicItems:!1};function Cr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Cr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"&&!X.test(i)){let l={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=[l]:e.push(l),r++}var o=n===r;if(!o){let l={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}for(let i in t)Zr(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?Zr.errors:e.concat(Zr.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 Cr.errors=e,r===0}Cr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Vr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Vr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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(oe(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)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 Vr.errors=e,r===0}Vr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var bn={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 $n={additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"};function Mr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Mr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.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=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;st(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?st.errors:e.concat(st.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}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 Mr.errors=e,r===0}Mr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ur(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ur.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(oe(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&&(ot(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?ot.errors:e.concat(ot.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 Ur.errors=e,r===0}Ur.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Lr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Lr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Ur(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Ur.errors:e.concat(Ur.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[f]:e.push(f),r++}if(t.message===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="message"||f==="mode"||f==="url")){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.message!==void 0){let f=t.message;if(typeof f=="string"){if(oe(f)<1){let b={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=[b]:e.push(b),r++}}else{let b={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}if(t.mode!==void 0&&t.mode!=="url"){let f={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Lr.errors=e,p.props=m,r===0}Lr.evaluated={dynamicProps:!0,dynamicItems:!1};var Pn={additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"};function Fr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Fr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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)N(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 Fr.errors=e,r===0}Fr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Jr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Jr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Fr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Fr.errors:e.concat(Fr.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(f!=="action"){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.action!==void 0){let f=t.action;if(!(f==="decline"||f==="cancel")){let b={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:Pn.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Jr.errors=e,p.props=m,r===0}Jr.evaluated={dynamicProps:!0,dynamicItems:!1};function Hr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Hr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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(!X.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&&(Lr(t.request,{instancePath:s+"/request",parentData:t,parentDataProperty:"request",rootData:u,dynamicAnchors:a})||(e=e===null?Lr.errors:e.concat(Lr.errors),r=e.length)),t.response!==void 0&&(Jr(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?Jr.errors:e.concat(Jr.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)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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};var Mi={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"},vn={additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},wn={additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"};function Wr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Wr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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)N(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 Wr.errors=e,r===0}Wr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Br(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Br.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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,l=!1,m=null,c=r;de(i,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?de.errors:e.concat(de.errors),r=e.length);var o=c===r;o&&(l=!0,m=0);let d=r;if(Array.isArray(i)){if(i.length<1){let b={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=[b]:e.push(b),r++}let f=i.length;for(let b=0;b1||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 Yr.errors=e,r===0}Yr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Qr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Qr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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(!ge(i,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:a}))e=e===null?ge.errors:e.concat(ge.errors),r=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),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(oe(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)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 Qr.errors=e,r===0}Qr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Gr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Gr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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(!fe.call(Mi.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:Mi.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&&(ts(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?ts.errors:e.concat(ts.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)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 rs.errors=e,r===0}rs.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ss(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ss.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Hr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Hr.errors:e.concat(Hr.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;es(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?es.errors:e.concat(es.errors),r=e.length);var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;rs(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?rs.errors:e.concat(rs.errors),r=e.length);var d=f===r;d&&i?(i=!1,n=[n,2]):d&&(i=!0,n=2,m!==!0&&(m=!0))}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return ss.errors=e,p.props=m,r===0}ss.evaluated={dynamicProps:!0,dynamicItems:!1};function is(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=is.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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"||E.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)N(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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&&(rt(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?rt.errors:e.concat(rt.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 b={};for(;d--;){let h=m[d];if(typeof h=="string"){if(typeof b[h]=="number"){f=b[h];let P={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:d,j:f},message:"must NOT have duplicate items (items ## "+f+" and "+d+" are identical)"};e===null?e=[P]:e.push(P),r++;break}b[h]=d}}}}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 m={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}for(let m in t)E.test(m)&&(N(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.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 ns.errors=e,r===0}ns.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function as(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=as.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="protocolVersions"||f==="security"||f==="type"||f==="url"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.protocolVersions!==void 0&&(Q(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Q.errors:e.concat(Q.errors),r=e.length)),t.security!==void 0&&(re(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:a})||(e=e===null?re.errors:e.concat(re.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.command===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="args"||f==="command"||f==="env"||f==="protocolVersions"||f==="security"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.args!==void 0){let f=t.args;if(Array.isArray(f)){let b=f.length;for(let h=0;h=",limit:0},message:"must be >= 0"};a===null?a=[r]:a.push(r),e++}return Ce.errors=a,e===0}var Js={validate:J};function Ae(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t}={}){let a=null,e=0;if(Array.isArray(t)){if(t.length<1){let p={instancePath:s,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};a===null?a=[p]:a.push(p),e++}let r=t.length;for(let p=0;p",limit:0},message:"must be > 0"};a===null?a=[l]:a.push(l),e++}}else{let l={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[l]:a.push(l),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"};a===null?a=[n]:a.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"};a===null?a=[n]:a.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"};a===null?a=[n]:a.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"};a===null?a=[n]:a.push(n),e++}if(t.maxLength!==void 0){let n=t.maxLength;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let l={instancePath:s+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};a===null?a=[l]:a.push(l),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let l={instancePath:s+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};a===null?a=[l]:a.push(l),e++}}if(t.minLength!==void 0&&(Ce(t.minLength,{instancePath:s+"/minLength",parentData:t,parentDataProperty:"minLength",rootData:u})||(a=a===null?Ce.errors:a.concat(Ce.errors),e=a.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"};a===null?a=[n]:a.push(n),e++}if(t.additionalItems!==void 0&&(J(t.additionalItems,{instancePath:s+"/additionalItems",parentData:t,parentDataProperty:"additionalItems",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.items!==void 0){let n=t.items,l=e,m=!1,c=e;J(n,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);var r=c===e;if(m=m||r,!m){let d=e;Ae(n,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length);var r=d===e;m=m||r}if(m)e=l,a!==null&&(l?a.length=l:a=null);else{let d={instancePath:s+"/items",schemaPath:"#/properties/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};a===null?a=[d]:a.push(d),e++}}if(t.maxItems!==void 0){let n=t.maxItems;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let l={instancePath:s+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};a===null?a=[l]:a.push(l),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let l={instancePath:s+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};a===null?a=[l]:a.push(l),e++}}if(t.minItems!==void 0&&(Ce(t.minItems,{instancePath:s+"/minItems",parentData:t,parentDataProperty:"minItems",rootData:u})||(a=a===null?Ce.errors:a.concat(Ce.errors),e=a.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"};a===null?a=[n]:a.push(n),e++}if(t.contains!==void 0&&(J(t.contains,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.maxProperties!==void 0){let n=t.maxProperties;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let l={instancePath:s+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};a===null?a=[l]:a.push(l),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let l={instancePath:s+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};a===null?a=[l]:a.push(l),e++}}if(t.minProperties!==void 0&&(Ce(t.minProperties,{instancePath:s+"/minProperties",parentData:t,parentDataProperty:"minProperties",rootData:u})||(a=a===null?Ce.errors:a.concat(Ce.errors),e=a.length)),t.required!==void 0){let n=t.required;if(Array.isArray(n)){let l=n.length;for(let d=0;d1){let d={};for(;m--;){let f=n[m];if(typeof f=="string"){if(typeof d[f]=="number"){c=d[f];let b={instancePath:s+"/required",schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:m,j:c},message:"must NOT have duplicate items (items ## "+c+" and "+m+" are identical)"};a===null?a=[b]:a.push(b),e++;break}d[f]=m}}}}else{let l={instancePath:s+"/required",schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[l]:a.push(l),e++}}if(t.additionalProperties!==void 0&&(J(t.additionalProperties,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.definitions!==void 0){let n=t.definitions;if(n&&typeof n=="object"&&!Array.isArray(n))for(let l in n)J(n[l],{instancePath:s+"/definitions/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);else{let l={instancePath:s+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.properties!==void 0){let n=t.properties;if(n&&typeof n=="object"&&!Array.isArray(n))for(let l in n)J(n[l],{instancePath:s+"/properties/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);else{let l={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.patternProperties!==void 0){let n=t.patternProperties;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let l in n){var p=e===e;if(!p){let c={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};a===null?a=[c]:a.push(c),e++}}for(let l in n)J(n[l],{instancePath:s+"/patternProperties/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)}else{let l={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.dependencies!==void 0){let n=t.dependencies;if(n&&typeof n=="object"&&!Array.isArray(n))for(let l in n){let m=n[l],c=e,d=!1,f=e;J(m,{instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);var o=f===e;if(d=d||o,!d){let b=e;if(Array.isArray(m)){let P=m.length;for(let w=0;w1){let w={};for(;$--;){let j=m[$];if(typeof j=="string"){if(typeof w[j]=="number"){q=w[j];let v={instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:$,j:q},message:"must NOT have duplicate items (items ## "+q+" and "+$+" are identical)"};a===null?a=[v]:a.push(v),e++;break}w[j]=$}}}}else{let P={instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[P]:a.push(P),e++}var o=b===e;d=d||o}if(d)e=c,a!==null&&(c?a.length=c:a=null);else{let b={instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};a===null?a=[b]:a.push(b),e++}}else{let l={instancePath:s+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.propertyNames!==void 0&&(J(t.propertyNames,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.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"};a===null?a=[c]:a.push(c),e++}let l=n.length,m;if(l>1){e:for(;l--;)for(m=l;m--;)if(Hi(n[l],n[m])){let c={instancePath:s+"/enum",schemaPath:"#/properties/enum/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};a===null?a=[c]:a.push(c),e++;break e}}}else{let l={instancePath:s+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[l]:a.push(l),e++}}if(t.type!==void 0){let n=t.type,l=e,m=!1,c=e;if(!(n==="array"||n==="boolean"||n==="integer"||n==="null"||n==="number"||n==="object"||n==="string")){let d={instancePath:s+"/type",schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:Ji.enum},message:"must be equal to one of the allowed values"};a===null?a=[d]:a.push(d),e++}var i=c===e;if(m=m||i,!m){let d=e;if(Array.isArray(n)){if(n.length<1){let $={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};a===null?a=[$]:a.push($),e++}let b=n.length;for(let $=0;$1){e:for(;h--;)for(P=h;P--;)if(Hi(n[h],n[P])){let $={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:h,j:P},message:"must NOT have duplicate items (items ## "+P+" and "+h+" are identical)"};a===null?a=[$]:a.push($),e++;break e}}}else{let b={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[b]:a.push(b),e++}var i=d===e;m=m||i}if(m)e=l,a!==null&&(l?a.length=l:a=null);else{let d={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};a===null?a=[d]:a.push(d),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"};a===null?a=[n]:a.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"};a===null?a=[n]:a.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"};a===null?a=[n]:a.push(n),e++}t.if!==void 0&&(J(t.if,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.then!==void 0&&(J(t.then,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.else!==void 0&&(J(t.else,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.allOf!==void 0&&(Ae(t.allOf,{instancePath:s+"/allOf",parentData:t,parentDataProperty:"allOf",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length)),t.anyOf!==void 0&&(Ae(t.anyOf,{instancePath:s+"/anyOf",parentData:t,parentDataProperty:"anyOf",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length)),t.oneOf!==void 0&&(Ae(t.oneOf,{instancePath:s+"/oneOf",parentData:t,parentDataProperty:"oneOf",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length)),t.not!==void 0&&(J(t.not,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length))}return J.errors=a,e===0}var Ki=xe,kn={$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 On={$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 qn=new RegExp("^[^#]*#?$","u"),Hs=new RegExp("^[A-Za-z_][-A-Za-z0-9._]*$","u");function Ee(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ee.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let c={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:On.type},message:"must be object,boolean"};e===null?e=[c]:e.push(c),r++}if(a.meta||(a.meta=Ee),t&&typeof t=="object"&&!Array.isArray(t)){if(t.$id!==void 0){let c=t.$id;if(typeof c!="string"){let d={instancePath:s+"/$id",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[d]:e.push(d),r++}if(typeof c=="string"&&!qn.test(c)){let d={instancePath:s+"/$id",schemaPath:"#/properties/%24id/pattern",keyword:"pattern",params:{pattern:"^[^#]*#?$"},message:'must match pattern "^[^#]*#?$"'};e===null?e=[d]:e.push(d),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(!Hs.test(c)){let d={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=[d]:e.push(d),r++}}else{let d={instancePath:s+"/$anchor",schemaPath:"#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[d]:e.push(d),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(!Hs.test(c)){let d={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=[d]:e.push(d),r++}}else{let d={instancePath:s+"/$dynamicAnchor",schemaPath:"#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[d]:e.push(d),r++}}if(t.$vocabulary!==void 0){let c=t.$vocabulary;if(c&&typeof c=="object"&&!Array.isArray(c)){for(let d in c){let f=r;if(typeof d!="string"){let b={instancePath:s+"/$vocabulary",schemaPath:"#/$defs/uriString/type",keyword:"type",params:{type:"string"},message:"must be string",propertyName:d};e===null?e=[b]:e.push(b),r++}var o=f===r;if(!o){let b={instancePath:s+"/$vocabulary",schemaPath:"#/properties/%24vocabulary/propertyNames",keyword:"propertyNames",params:{propertyName:d},message:"property name must be valid"};e===null?e=[b]:e.push(b),r++}}for(let d in c)if(typeof c[d]!="boolean"){let f={instancePath:s+"/$vocabulary/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24vocabulary/additionalProperties/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[f]:e.push(f),r++}}else{let d={instancePath:s+"/$vocabulary",schemaPath:"#/properties/%24vocabulary/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[d]:e.push(d),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 d in c){let f=c[d],b=a.meta;if(b)if(!b(f,{instancePath:s+"/$defs/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:c,parentDataProperty:d,rootData:u,dynamicAnchors:a}))e=e===null?b.errors:e.concat(b.errors),r=e.length;else var i=b.evaluated.props,n=b.evaluated.items;else if(!Ee(f,{instancePath:s+"/$defs/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:c,parentDataProperty:d,rootData:u,dynamicAnchors:a}))e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length;else{var l=Ee.evaluated.props;i!==!0&&l!==void 0&&(l===!0?i=!0:(i=i||{},Object.assign(i,l)));var m=Ee.evaluated.items;n!==!0&&m!==void 0&&(n=m===!0?!0:n>m?n:m)}}else{let d={instancePath:s+"/$defs",schemaPath:"#/properties/%24defs/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[d]:e.push(d),r++}}}return Ee.errors=e,r===0}Ee.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 xn={$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 ce(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ce.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.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 m=t.length;for(let c=0;cl?i:l)}}}else{let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[m]:e.push(m),r++}return ce.errors=e,r===0}ce.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function C(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=C.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let V={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:xn.type},message:"must be object,boolean"};e===null?e=[V]:e.push(V),r++}if(a.meta||(a.meta=C),t&&typeof t=="object"&&!Array.isArray(t)){if(t.prefixItems!==void 0&&(ce(t.prefixItems,{instancePath:s+"/prefixItems",parentData:t,parentDataProperty:"prefixItems",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.items!==void 0){let V=t.items,R=a.meta;if(R)if(!R(V,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var o=R.evaluated.props,i=R.evaluated.items;else if(!C(V,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var n=C.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=C.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}if(t.contains!==void 0){let V=t.contains,R=a.meta;if(R)if(!R(V,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var m=R.evaluated.props,c=R.evaluated.items;else if(!C(V,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var d=C.evaluated.props;m!==!0&&d!==void 0&&(d===!0?m=!0:(m=m||{},Object.assign(m,d)));var f=C.evaluated.items;c!==!0&&f!==void 0&&(c=f===!0?!0:c>f?c:f)}}if(t.additionalProperties!==void 0){let V=t.additionalProperties,R=a.meta;if(R)if(!R(V,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var b=R.evaluated.props,h=R.evaluated.items;else if(!C(V,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var P=C.evaluated.props;b!==!0&&P!==void 0&&(P===!0?b=!0:(b=b||{},Object.assign(b,P)));var $=C.evaluated.items;h!==!0&&$!==void 0&&(h=$===!0?!0:h>$?h:$)}}if(t.properties!==void 0){let V=t.properties;if(V&&typeof V=="object"&&!Array.isArray(V))for(let R in V){let Ve=V[R],ne=a.meta;if(ne)if(!ne(Ve,{instancePath:s+"/properties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?ne.errors:e.concat(ne.errors),r=e.length;else var q=ne.evaluated.props,w=ne.evaluated.items;else if(!C(Ve,{instancePath:s+"/properties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var j=C.evaluated.props;q!==!0&&j!==void 0&&(j===!0?q=!0:(q=q||{},Object.assign(q,j)));var v=C.evaluated.items;w!==!0&&v!==void 0&&(w=v===!0?!0:w>v?w:v)}}else{let R={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[R]:e.push(R),r++}}if(t.patternProperties!==void 0){let V=t.patternProperties;if(V&&typeof V=="object"&&!Array.isArray(V)){for(let R in V){var k=r===r;if(!k){let ne={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:R},message:"property name must be valid"};e===null?e=[ne]:e.push(ne),r++}}for(let R in V){let Ve=V[R],ne=a.meta;if(ne)if(!ne(Ve,{instancePath:s+"/patternProperties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?ne.errors:e.concat(ne.errors),r=e.length;else var O=ne.evaluated.props,x=ne.evaluated.items;else if(!C(Ve,{instancePath:s+"/patternProperties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var I=C.evaluated.props;O!==!0&&I!==void 0&&(I===!0?O=!0:(O=O||{},Object.assign(O,I)));var Z=C.evaluated.items;x!==!0&&Z!==void 0&&(x=Z===!0?!0:x>Z?x:Z)}}}else{let R={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[R]:e.push(R),r++}}if(t.dependentSchemas!==void 0){let V=t.dependentSchemas;if(V&&typeof V=="object"&&!Array.isArray(V))for(let R in V){let Ve=V[R],ne=a.meta;if(ne)if(!ne(Ve,{instancePath:s+"/dependentSchemas/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?ne.errors:e.concat(ne.errors),r=e.length;else var A=ne.evaluated.props,_=ne.evaluated.items;else if(!C(Ve,{instancePath:s+"/dependentSchemas/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var D=C.evaluated.props;A!==!0&&D!==void 0&&(D===!0?A=!0:(A=A||{},Object.assign(A,D)));var W=C.evaluated.items;_!==!0&&W!==void 0&&(_=W===!0?!0:_>W?_:W)}}else{let R={instancePath:s+"/dependentSchemas",schemaPath:"#/properties/dependentSchemas/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[R]:e.push(R),r++}}if(t.propertyNames!==void 0){let V=t.propertyNames,R=a.meta;if(R)if(!R(V,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var K=R.evaluated.props,G=R.evaluated.items;else if(!C(V,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var H=C.evaluated.props;K!==!0&&H!==void 0&&(H===!0?K=!0:(K=K||{},Object.assign(K,H)));var Te=C.evaluated.items;G!==!0&&Te!==void 0&&(G=Te===!0?!0:G>Te?G:Te)}}if(t.if!==void 0){let V=t.if,R=a.meta;if(R)if(!R(V,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var ls=R.evaluated.props,gs=R.evaluated.items;else if(!C(V,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Ts=C.evaluated.props;ls!==!0&&Ts!==void 0&&(Ts===!0?ls=!0:(ls=ls||{},Object.assign(ls,Ts)));var bs=C.evaluated.items;gs!==!0&&bs!==void 0&&(gs=bs===!0?!0:gs>bs?gs:bs)}}if(t.then!==void 0){let V=t.then,R=a.meta;if(R)if(!R(V,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var ms=R.evaluated.props,$s=R.evaluated.items;else if(!C(V,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Ss=C.evaluated.props;ms!==!0&&Ss!==void 0&&(Ss===!0?ms=!0:(ms=ms||{},Object.assign(ms,Ss)));var Ps=C.evaluated.items;$s!==!0&&Ps!==void 0&&($s=Ps===!0?!0:$s>Ps?$s:Ps)}}if(t.else!==void 0){let V=t.else,R=a.meta;if(R)if(!R(V,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var us=R.evaluated.props,vs=R.evaluated.items;else if(!C(V,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Rs=C.evaluated.props;us!==!0&&Rs!==void 0&&(Rs===!0?us=!0:(us=us||{},Object.assign(us,Rs)));var ws=C.evaluated.items;vs!==!0&&ws!==void 0&&(vs=ws===!0?!0:vs>ws?vs:ws)}}if(t.allOf!==void 0&&(ce(t.allOf,{instancePath:s+"/allOf",parentData:t,parentDataProperty:"allOf",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.anyOf!==void 0&&(ce(t.anyOf,{instancePath:s+"/anyOf",parentData:t,parentDataProperty:"anyOf",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.oneOf!==void 0&&(ce(t.oneOf,{instancePath:s+"/oneOf",parentData:t,parentDataProperty:"oneOf",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.not!==void 0){let V=t.not,R=a.meta;if(R)if(!R(V,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var fs=R.evaluated.props,js=R.evaluated.items;else if(!C(V,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Ds=C.evaluated.props;fs!==!0&&Ds!==void 0&&(Ds===!0?fs=!0:(fs=fs||{},Object.assign(fs,Ds)));var ks=C.evaluated.items;js!==!0&&ks!==void 0&&(js=ks===!0?!0:js>ks?js:ks)}}}return C.errors=e,r===0}C.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 An={$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 be(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=be.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let b={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:An.type},message:"must be object,boolean"};e===null?e=[b]:e.push(b),r++}if(a.meta||(a.meta=be),t&&typeof t=="object"&&!Array.isArray(t)){if(t.unevaluatedItems!==void 0){let b=t.unevaluatedItems,h=a.meta;if(h)if(!h(b,{instancePath:s+"/unevaluatedItems",parentData:t,parentDataProperty:"unevaluatedItems",rootData:u,dynamicAnchors:a}))e=e===null?h.errors:e.concat(h.errors),r=e.length;else var o=h.evaluated.props,i=h.evaluated.items;else if(!be(b,{instancePath:s+"/unevaluatedItems",parentData:t,parentDataProperty:"unevaluatedItems",rootData:u,dynamicAnchors:a}))e=e===null?be.errors:e.concat(be.errors),r=e.length;else{var n=be.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=be.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}if(t.unevaluatedProperties!==void 0){let b=t.unevaluatedProperties,h=a.meta;if(h)if(!h(b,{instancePath:s+"/unevaluatedProperties",parentData:t,parentDataProperty:"unevaluatedProperties",rootData:u,dynamicAnchors:a}))e=e===null?h.errors:e.concat(h.errors),r=e.length;else var m=h.evaluated.props,c=h.evaluated.items;else if(!be(b,{instancePath:s+"/unevaluatedProperties",parentData:t,parentDataProperty:"unevaluatedProperties",rootData:u,dynamicAnchors:a}))e=e===null?be.errors:e.concat(be.errors),r=e.length;else{var d=be.evaluated.props;m!==!0&&d!==void 0&&(d===!0?m=!0:(m=m||{},Object.assign(m,d)));var f=be.evaluated.items;c!==!0&&f!==void 0&&(c=f===!0?!0:c>f?c:f)}}}return be.errors=e,r===0}be.evaluated={props:{unevaluatedItems:!0,unevaluatedProperties:!0},dynamicProps:!1,dynamicItems:!1};var En={$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:[]}}},Bi={enum:["array","boolean","integer","null","number","object","string"]};var zn=qs().default;function ct(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ct.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:En.type},message:"must be object,boolean"};e===null?e=[i]:e.push(i),r++}if(a.meta||(a.meta=ct),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type!==void 0){let i=t.type,n=r,l=!1,m=r;if(!(i==="array"||i==="boolean"||i==="integer"||i==="null"||i==="number"||i==="object"||i==="string")){let d={instancePath:s+"/type",schemaPath:"#/$defs/simpleTypes/enum",keyword:"enum",params:{allowedValues:Bi.enum},message:"must be equal to one of the allowed values"};e===null?e=[d]:e.push(d),r++}var o=m===r;l=l||o;let c=r;if(Array.isArray(i)){if(i.length<1){let h={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=[h]:e.push(h),r++}let d=i.length;for(let h=0;h1){e:for(;f--;)for(b=f;b--;)if(zn(i[f],i[b])){let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:f,j:b},message:"must NOT have duplicate items (items ## "+b+" and "+f+" are identical)"};e===null?e=[h]:e.push(h),r++;break e}}}else{let d={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[d]:e.push(d),r++}var o=c===r;if(l=l||o,l)r=n,e!==null&&(n?e.length=n:e=null);else{let d={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[d]:e.push(d),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(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/required",schemaPath:"#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}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 l=i[n];if(Array.isArray(l)){let m=l.length;for(let f=0;f1){let f={};for(;c--;){let b=l[c];if(typeof b=="string"){if(typeof f[b]=="number"){d=f[b];let h={instancePath:s+"/dependentRequired/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:c,j:d},message:"must NOT have duplicate items (items ## "+d+" and "+c+" are identical)"};e===null?e=[h]:e.push(h),r++;break}f[b]=c}}}}else{let m={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=[m]:e.push(m),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 ct.errors=e,r===0}ct.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 Nn={$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 yt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=yt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Nn.type},message:"must be object,boolean"};e===null?e=[o]:e.push(o),r++}if(a.meta||(a.meta=yt),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 yt.errors=e,r===0}yt.evaluated={props:{title:!0,description:!0,default:!0,deprecated:!0,readOnly:!0,writeOnly:!0,examples:!0},dynamicProps:!1,dynamicItems:!1};var _n={$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 dt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=dt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:_n.type},message:"must be object,boolean"};e===null?e=[o]:e.push(o),r++}if(a.meta||(a.meta=dt),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 dt.errors=e,r===0}dt.evaluated={props:{format:!0},dynamicProps:!1,dynamicItems:!1};var In={$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 ze(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ze.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:In.type},message:"must be object,boolean"};e===null?e=[m]:e.push(m),r++}if(a.meta||(a.meta=ze),t&&typeof t=="object"&&!Array.isArray(t)){if(t.contentEncoding!==void 0&&typeof t.contentEncoding!="string"){let m={instancePath:s+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.contentMediaType!==void 0&&typeof t.contentMediaType!="string"){let m={instancePath:s+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.contentSchema!==void 0){let m=t.contentSchema,c=a.meta;if(c)if(!c(m,{instancePath:s+"/contentSchema",parentData:t,parentDataProperty:"contentSchema",rootData:u,dynamicAnchors:a}))e=e===null?c.errors:e.concat(c.errors),r=e.length;else var o=c.evaluated.props,i=c.evaluated.items;else if(!ze(m,{instancePath:s+"/contentSchema",parentData:t,parentDataProperty:"contentSchema",rootData:u,dynamicAnchors:a}))e=e===null?ze.errors:e.concat(ze.errors),r=e.length;else{var n=ze.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=ze.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}}return ze.errors=e,r===0}ze.evaluated={props:{contentEncoding:!0,contentMediaType:!0,contentSchema:!0},dynamicProps:!1,dynamicItems:!1};function xe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=xe.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let h={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:kn.type},message:"must be object,boolean"};e===null?e=[h]:e.push(h),r++}if(a.meta||(a.meta=xe),Ee(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length),C(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?C.errors:e.concat(C.errors),r=e.length),be(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?be.errors:e.concat(be.errors),r=e.length),ct(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?ct.errors:e.concat(ct.errors),r=e.length),yt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?yt.errors:e.concat(yt.errors),r=e.length),dt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?dt.errors:e.concat(dt.errors),r=e.length),ze(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?ze.errors:e.concat(ze.errors),r=e.length),t&&typeof t=="object"&&!Array.isArray(t)){if(t.definitions!==void 0){let h=t.definitions;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=h[P],q=a.meta;if(q)if(!q($,{instancePath:s+"/definitions/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?q.errors:e.concat(q.errors),r=e.length;else var o=q.evaluated.props,i=q.evaluated.items;else if(!xe($,{instancePath:s+"/definitions/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?xe.errors:e.concat(xe.errors),r=e.length;else{var n=xe.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=xe.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}else{let P={instancePath:s+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.dependencies!==void 0){let h=t.dependencies;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=h[P],q=r,w=!1,j=r,v=a.meta;if(v)if(!v($,{instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?v.errors:e.concat(v.errors),r=e.length;else var m=v.evaluated.props,c=v.evaluated.items;else if(!xe($,{instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?xe.errors:e.concat(xe.errors),r=e.length;else{var d=xe.evaluated.props;m!==!0&&d!==void 0&&(d===!0?m=!0:(m=m||{},Object.assign(m,d)));var f=xe.evaluated.items;c!==!0&&f!==void 0&&(c=f===!0?!0:c>f?c:f)}var b=j===r;w=w||b;let k=r;if(Array.isArray($)){let O=$.length;for(let Z=0;Z1){let Z={};for(;x--;){let A=$[x];if(typeof A=="string"){if(typeof Z[A]=="number"){I=Z[A];let _={instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"meta/validation#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:x,j:I},message:"must NOT have duplicate items (items ## "+I+" and "+x+" are identical)"};e===null?e=[_]:e.push(_),r++;break}Z[A]=x}}}}else{let O={instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"meta/validation#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[O]:e.push(O),r++}var b=k===r;if(w=w||b,b&&c!==!0&&(c=!0),w)r=q,e!==null&&(q?e.length=q:e=null);else{let O={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"};e===null?e=[O]:e.push(O),r++}}else{let P={instancePath:s+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.$recursiveAnchor!==void 0){let h=t.$recursiveAnchor;if(typeof h=="string"){if(!Hs.test(h)){let P={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=[P]:e.push(P),r++}}else{let P={instancePath:s+"/$recursiveAnchor",schemaPath:"meta/core#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}if(t.$recursiveRef!==void 0&&typeof t.$recursiveRef!="string"){let h={instancePath:s+"/$recursiveRef",schemaPath:"meta/core#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}}return xe.errors=e,r===0}xe.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 Sn(t){return t==="#"?"":t.slice(1)}function Yi(t){return/"([^"]+)"/.exec(t)?.[1]}function Rn(t){let s={};return t.keyword==="required"&&(s.missingProperty=Yi(t.error)),t.keyword==="additionalProperties"&&(s.additionalProperty=Yi(t.error)),{instancePath:Sn(t.instanceLocation),keyword:t.keyword,params:s,message:t.error}}function Dn(t){let s=new Set,y=[];function g(u){if(!(!u||typeof u!="object")){typeof u.$anchor=="string"&&s.add(u.$anchor),typeof u.$dynamicAnchor=="string"&&s.add(u.$dynamicAnchor);for(let a of["$ref","$dynamicRef","$recursiveRef"])typeof u[a]=="string"&&y.push(u[a]);for(let a of Object.values(u))g(a)}}g(t);for(let u of y){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 a=t;for(let e of u.slice(2).split("/").map(r=>r.replaceAll("~1","/").replaceAll("~0","~"))){if(!a||typeof a!="object"||!Object.hasOwn(a,e))throw new Error(`can't resolve reference ${u}`);a=a[e]}}}function Zn(t,s){Dn(t);let y=new Tn(t,s,!1),g=u=>{let a=y.validate(u);return g.errors=a.valid?null:a.errors.map(Rn),a.valid};return g.errors=null,g}var zs=class{constructor(s={}){this.errors=null}compile(s){let y=Fi.get(s?.description);return y||Zn(s,this.constructor.draft)}validateSchema(s){let y=this.constructor.draft==="7"?Wi:Ki,g=y(s);return this.errors=y.errors,g}},Ws=class extends zs{static draft="7"},Ne=class extends zs{static draft="2020-12"},lt=Ws;function _e(t){return t}function Ks(t){let s=[],y="",g=0;for(;g0;)t[e]==="{"?r++:t[e]==="}"&&r--,e++;if(r>0)throw new Error(`Unclosed expression in template: ${t}`);let p=t.slice(a,e-1),o=Cn(p);s.push(o),g=e}else y+=u,g++}return y&&s.push({type:"literal",value:y}),{template:t,parts:s}}function Cn(t){if(!t.trim())throw new Error("Empty expression");let s=t[0],y=["+","#",".","/",";","?","&"],g,u=t;return y.includes(s)&&(g=s,u=t.slice(1)),{type:"expression",expressions:Vn(u).map(Mn),operator:g}}function Vn(t){let s=[],y="",g=0;for(;g=y.length)return{uri_index:s};let a=y[g];if(a.type==="literal")return t.slice(s).startsWith(a.value)?Bs(t,s+a.value.length,y,g+1,u):null;{let e=y[g+1],p=Un(t,s,e).sort((o,i)=>e&&e.type==="expression"&&!e.operator?i-o:o-i);for(let o of p){let i=t.slice(s,o),n={...u};if(Ln(i,a,n,t,s)){let m=Bs(t,o,y,g+1,n);if(m)return Object.assign(u,n),m}}return null}}function Un(t,s,y){let g=[];if(y&&y.type==="literal"){let u=s;for(;uu-a)}function Ln(t,s,y,g,u){if(s.type!=="expression")return!1;switch(s.operator){case"+":return Jn(t,s,y);case"#":return Fn(t,s,y);case".":return Wn(t,s,y);case"/":return Bn(t,s,y);case";":return Kn(t,s,y);case"?":case"&":return Yn(t,s,y);default:return Hn(t,s,y,g,u)}}function Fn(t,s,y){if(s.type!=="expression")return!1;if(!t.startsWith("#")){for(let u of s.expressions)y[u.name]="";return t===""}let g=t.slice(1);if(s.expressions.length===1){let u=s.expressions[0],a=g;return u.prefix&&a.length>u.prefix&&(a=a.slice(0,u.prefix)),y[u.name]=decodeURIComponent(a),!0}else{let u=g.split(",");for(let a=0;ae.prefix&&(r=r.slice(0,e.prefix)),y[e.name]=decodeURIComponent(r)}return!0}}function Jn(t,s,y){if(s.type!=="expression")return!1;if(s.expressions.length===1){let g=s.expressions[0],u=t;return g.prefix&&u.length>g.prefix&&(u=u.slice(0,g.prefix)),y[g.name]=decodeURIComponent(u),!0}else{let g=t.split(",");for(let u=0;ua.prefix&&(e=e.slice(0,a.prefix)),y[a.name]=decodeURIComponent(e)}return!0}}function Hn(t,s,y,g,u){if(s.type!=="expression")return!1;if(s.expressions.length===1){let a=s.expressions[0],e=t;return e.includes("/")||e===""&&u+t.length===g.length&&g.endsWith("/")?!1:(a.prefix&&e.length>a.prefix&&(e=e.slice(0,a.prefix)),y[a.name]=decodeURIComponent(e),!0)}else{let a=t.split(",");for(let e=0;er.prefix&&(p=p.slice(0,r.prefix)),y[r.name]=decodeURIComponent(p)}return!0}}function Wn(t,s,y){if(s.type!=="expression")return!1;if(t===""){for(let u of s.expressions)y[u.name]="";return!0}let g=t.startsWith(".")?t.slice(1):t;if(s.expressions.length===1){let u=s.expressions[0];if(u.explode){let a=g.split(".");y[u.name]=a.map(e=>decodeURIComponent(e))}else y[u.name]=decodeURIComponent(g);return!0}else{let u=g.split(".");for(let a=0;ae.prefix&&(r=r.slice(0,e.prefix)),y[e.name]=decodeURIComponent(r)}return!0}}function Bn(t,s,y){if(s.type!=="expression")return!1;let g=t.startsWith("/")?t.slice(1):t;if(s.expressions.length===1){let u=s.expressions[0];return y[u.name]=decodeURIComponent(g),!0}else{let u=g.split(",");for(let a=0;ae.prefix&&(r=r.slice(0,e.prefix)),y[e.name]=decodeURIComponent(r)}return!0}}function Kn(t,s,y){if(s.type!=="expression")return!1;let g=t.split(";").filter(u=>u);for(let u of g){let a=u.indexOf("=");if(a!==-1){let e=u.slice(0,a),r=u.slice(a+1),p=s.expressions.find(o=>o.name===e);p&&(y[p.name]=decodeURIComponent(r))}}return!0}function Yn(t,s,y){if(s.type!=="expression")return!1;let g=t.replace(/^[?&]/,"");if(s.expressions.length===1){let u=s.expressions[0];if(u.explode){let a=g.split("&");y[u.name]=a.map(e=>decodeURIComponent(e))}else{let a=g.split("&");for(let e of a){let r=e.indexOf("=");if(r!==-1){let p=e.slice(0,r),o=e.slice(r+1);p===u.name&&(y[u.name]=decodeURIComponent(o))}}}}else{let u=g.split("&");for(let a of u){let e=a.indexOf("=");if(e!==-1){let r=a.slice(0,e),p=a.slice(e+1),o=s.expressions.find(i=>i.name===r);o&&(y[o.name]=decodeURIComponent(p))}}}return!0}var Ie=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 y=Ks(s);this.templates.push(y)}catch(y){throw new Error(`Invalid template: ${s} - ${y instanceof Error?y.message:String(y)}`)}}match(s){if(typeof s!="string")throw new Error("URI must be a string");for(let y of this.templates){let g=Qi(s,y);if(g!==null)return{template:y.template,params:g}}return null}clear(){this.templates=[]}all(){return this.templates.map(s=>s.template)}};var Gi={$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 cs=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),M=new Map(cs.map((t,s)=>[t,s])),at="2025-11-25",Ys="2025-06-18",Ns=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([])}),Gn=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-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 _s(t){return Ns.officialIdentifiers.includes(t)?"official":Ns.experimentalIdentifiers.includes(t)?"experimental":"uncatalogued"}function Qs(t){let s=t==="2020-12"?Ne:lt,y=new s({allErrors:!0,strict:!1});return _e(y),y}function mt(t){return[...t].sort((s,y)=>M.get(s)-M.get(y))}function $e(t,s,y){return mt(s?.protocolVersions??y??t.protocolVersions??[])}function Xi(t,s){let y=new Set(s);return t.filter(g=>y.has(g))}function Xn(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let y of Object.values(t.flows??{}))for(let g of Object.keys(y?.scopes??{}))s.add(g);return s}function io(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 oo(t){let s=[];function y(g){if(Array.isArray(g))return g.map(y);if(!g||typeof g!="object")return g;let u={};for(let[a,e]of Object.entries(g)){if(a==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[a]=y(e)}return u}return{schema:y(t),externalReferences:s}}function T(t,s,y,g){if(!Array.isArray(g))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:y,path:g}}function ea(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),y=s.split(".");if(y.length<2)return!1;let g=y[1].toLowerCase();return g==="modelcontextprotocol"||g==="mcp"}function ta(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let y=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?y.slice(0,-1).some(g=>["modelcontextprotocol","mcp"].includes(g.toLowerCase())):y.length>=2&&["modelcontextprotocol","mcp"].includes(y[1].toLowerCase())}function eo(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function ra(t,s,y){let g=mt(t.protocolVersions??[]),u=g.filter(r=>M.get(r)0;else return!1;return m?c||y.push(T("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...l,r])):y.push(T("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...l,r])),!0}function e(r,p,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[l,m]of Object.entries(r)){if(!Gn.test(l)){y.push(T("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(l)}`,[...n,l]));continue}for(let c of o.filter(d=>M.get(d)>=M.get(Ys)))a(l,m,p,c,i,n)||ta(l,c)&&y.push(T("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(l)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,l]))}}for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{let n=$e(t,o,g),l=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...l,"_meta"]),r==="tools")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.content??[]).forEach((h,P)=>{let $=`${f}.content[${P}]`,q=[...b,"content",P];e(h?._meta,"content",n,`${$}._meta`,[...q,"_meta"]),h?.type==="resource"&&e(h.resource?._meta,"content",n,`${$}.resource._meta`,[...q,"resource","_meta"])})}else if(r!=="prompts")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.contents??[]).forEach((h,P)=>{e(h?._meta,"content",n,`${f}.contents[${P}]._meta`,[...b,"contents",P,"_meta"])})}})}function sa(t,s,y){let g=new Set;if((t.tags??[]).forEach((u,a)=>{if(g.has(u.name)){y.push(T("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",a,"name"]));return}g.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((e,r)=>{(e.tags??[]).forEach((p,o)=>{g.has(p)||y.push(T("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(p)}`,[u,r,"tags",o]))})})}function ia(t,s,y){let g=t.securitySchemes??{},u=new Set(Object.keys(g)),a=new Map(Object.entries(g).map(([r,p])=>[r,Xn(p)]));function e(r,p,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[l,m]of Object.entries(i)){if(!u.has(l)){y.push(T("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(l)}`,[...o,n,l]));continue}let c=g[l];if(!Array.isArray(m))continue;if(m.filter((f,b)=>m.indexOf(f)!==b).length&&y.push(T("duplicate-security-scope","error",`${p}[${n}].${l} contains duplicate scope values`,[...o,n,l])),(c.type==="http"||c.type==="apiKey")&&m.length>0&&y.push(T("non-oauth-scope-misuse","error",`${p}[${n}].${l} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,l])),c.type==="oauth2"||c.type==="openIdConnect"){let f=a.get(l)??new Set;m.forEach((b,h)=>{f.has(b)||y.push(T("uncatalogued-oauth-scope","warning",`${p}[${n}].${l} references scope ${JSON.stringify(b)} that is not present in the declared static scope catalogue`,[...o,n,l,h]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,p)=>{e(r.security,`transports[${p}].security`,["transports",p,"security"])});for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function oa(t,s,y){let g=mt(t.protocolVersions??[]),u=new Set;function a(r,p,o,i){let n=new Set(p);for(let l of r)n.has(l)||y.push(T("protocol-scope-outside-parent","error",`${o} includes protocol version ${l} outside its parent scope`,i))}(t.transports??[]).forEach((r,p)=>{let o=$e(t,r,g);a(o,g,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of g)u.has(r)||y.push(T("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,p)=>{let o=$e(t,r,g);a(o,g,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let r=0;r0&&y.push(T("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,p,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,l)=>{let m=n[o],c=$e(t,n,g);a(c,g,`${r}[${l}].protocolVersions`,[r,l,"protocolVersions"]),(n.elicitations??[]).forEach((f,b)=>{let h=$e(t,f,c);a(h,c,`${r}[${l}].elicitations[${b}].protocolVersions`,[r,l,"elicitations",b,"protocolVersions"])});let d=i.get(m)??[];for(let f of d){let b=Xi(c,f.scope);b.length>0&&y.push(T("primitive-scope-overlap","error",`${r}[${l}] with identifier ${JSON.stringify(m)} overlaps ${r}[${f.index}] for protocol versions ${b.join(", ")}`,[r,l,"protocolVersions"]))}d.push({index:l,scope:c}),i.set(m,d)})}}function na(t,s,y){let g=mt(t.protocolVersions??[]);function u(a,e,r,p){if(!a||typeof a!="object"||Array.isArray(a))return;e==="2025-06-18"&&Object.hasOwn(a,"$schema")&&y.push(T("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(a.properties??{}));(a.required??[]).forEach((i,n)=>{o.has(i)||y.push(T("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(a.properties??{})){let l=`${r}.properties[${JSON.stringify(i)}]`,m=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&y.push(T("elicitation-form-schema-version-mismatch","error",`${l} uses an enum form introduced after MCP ${e}`,m)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&y.push(T("elicitation-form-schema-version-mismatch","error",`${l}.default is not defined for this property type in MCP ${e}`,[...m,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&y.push(T("elicitation-form-enum-names-mismatch","error",`${l}.enumNames must contain one display name for every enum value`,[...m,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(d=>d.const):void 0;if(c&&!c.includes(n.default)&&y.push(T("elicitation-form-default-outside-enum","error",`${l}.default must be one of the declared enum values`,[...m,"default"])),n.type==="array"){let d=n.items?.enum??n.items?.anyOf?.map(f=>f.const);Array.isArray(d)&&n.default.some(f=>!d.includes(f))&&y.push(T("elicitation-form-default-outside-enum","error",`${l}.default contains a value outside the declared enum values`,[...m,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&y.push(T("elicitation-form-invalid-range","error",`${l}.minLength must not exceed maxLength`,[...m,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&y.push(T("elicitation-form-invalid-range","error",`${l}.minimum must not exceed maximum`,[...m,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&y.push(T("elicitation-form-invalid-range","error",`${l}.minItems must not exceed maxItems`,[...m,"minItems"]))}}}for(let[a,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,p)=>{let o=$e(t,r,g),i=new Set;(r.elicitations??[]).forEach((n,l)=>{let m=`${a}[${p}].elicitations[${l}]`,c=[a,p,"elicitations",l];i.has(n.name)&&y.push(T("duplicate-elicitation-name","error",`${m}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let d=$e(t,n,o);for(let f of d)M.get(f){let p=$e(t,e,g);if(e.type==="streamable-http")for(let o of p)M.get(o)>=M.get("2025-03-26")||y.push(T("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 p)M.get(o){let p=$e(t,e,g),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",p),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${r}]`,o,e,"_meta","2025-06-18",p),u(`tools[${r}]`,o,e,"annotations","2025-03-26",p),a(`tools[${r}]`,o,e,"execution","2025-11-25",p),u(`tools[${r}]`,o,e,"icons","2025-11-25",p)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((p,o)=>{let i=$e(t,p,g),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 l of i)M.get(l)>=M.get("2025-06-18")||y.push(T("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${l}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((l,m)=>{u(`${e}[${o}].arguments[${m}]`,[...n,"arguments",m],l,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let p=$e(t,e,g),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&y.push(T("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 p)M.get(i)y(i,`${u}.${o}[${n}]`,[...a,o,n],!1,!1));for(let o of pa){let i=g[o];Array.isArray(i)?i.forEach((n,l)=>y(n,`${u}.${o}[${l}]`,[...a,o,l],!1,!1)):y(i,`${u}.${o}`,[...a,o],!1,!1)}let p=g.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||y(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...a,"dependencies",o],!1,!1)}return y(t,"inputSchema",["inputSchema"],!0,!1),s}function ca(t,s,y,g,u){let a=fa(t.inputSchema);if(!a.length)return;for(let r of y)r!=="2026-07-28"&&u.push(T("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 a){let p=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(T("invalid-x-mcp-header","error",`${p} 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(T("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(T("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(T("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function ya(t,s,y,g,u){if(Object.hasOwn(t,"properties")){let a=t.properties;if(!a||typeof a!="object"||Array.isArray(a))u.push(T("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${at}`,[...y,"properties"]));else for(let[e,r]of Object.entries(a))r&&typeof r=="object"&&!Array.isArray(r)||u.push(T("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${at}`,[...y,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(a=>typeof a!="string"))&&u.push(T("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${at}`,[...y,"required"]))}function da(t,s,y){let g=mt(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{let e=$e(t,u,g);for(let r of["inputSchema","outputSchema"]){let p=u[r];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${a}].${r}`,i=["tools",a,r],n=e.some(m=>M.get(m)M.get(m)>=M.get(at));if(Object.hasOwn(p,"$schema"))for(let m of e)M.get(m)>=M.get(at)||y.push(T("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${m}; it requires ${at} or later`,[...i,"$schema"]));if(n&&ya(p,o,i,s,y),l){let m=io(p);if(!m)y.push(T("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=Qs(m);try{if(c.validateSchema(p,!0))c.compile(p);else{let d=c.errors?.map(f=>`${f.instancePath||"/"} ${f.message}`).join("; ")??"unknown meta-schema error";y.push(T("invalid-tool-schema","error",`${o} is not valid JSON Schema ${m}: ${d}`,i))}}catch(d){let f=oo(p);try{if(!f.externalReferences.length)throw d;Qs(m).compile(f.schema);let b=[...new Set(f.externalReferences)].sort();y.push(T("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${b.map(h=>JSON.stringify(h)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(b){y.push(T("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${m}: ${b.message}`,i))}}}}if(r==="outputSchema"&&p.type!=="object")for(let m of e)m!=="2026-07-28"&&y.push(T("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${m}`,[...i,"type"]))}ca(u,a,e,s,y)})}function to(t,s,y,g,u,a){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){a.push(T("tool-example-schema-mismatch","error",`${y} must be an object`,g));return}for(let e of t.required??[])Object.hasOwn(s,e)||a.push(T("tool-example-schema-mismatch","error",`${y} is missing required property ${JSON.stringify(e)}`,[...g,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||a.push(T("tool-example-schema-mismatch","error",`${y} contains undeclared property ${JSON.stringify(e)}`,[...g,e]))}function ro(t,s,y,g,u,a){let e=io(t);if(!e)return;let r=oo(t);if(r.externalReferences.length){let p=[...new Set(r.externalReferences)].sort();a.push(T("incomplete-tool-example-validation","warning",`${y} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,g));return}try{let p=Qs(e).compile(t);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";a.push(T("tool-example-schema-mismatch","error",`${y} does not validate against its associated Tool schema: ${o}`,g))}}catch{}}function ha(t,s,y){let g=mt(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=$e(t,u,g),r=e.filter(o=>M.get(o)M.get(o)>=M.get(at));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${a}].examples[${JSON.stringify(o)}]`,l=["tools",a,"examples",o],m=i.result??{},c=[...l,"result"],d=m.isError!==!0;for(let f of["jsonrpc","id","error"])Object.hasOwn(m,f)&&y.push(T("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(f)}`,[...c,f]));for(let f of["task","inputRequests","requestState"])Object.hasOwn(m,f)&&y.push(T("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(f)}`,[...c,f]));for(let f of e){let b=`${n}.result`;f==="2026-07-28"&&m.resultType!=="complete"&&y.push(T("tool-example-result-version-mismatch","error",`${b}.resultType must be "complete" for MCP ${f}`,[...c,"resultType"])),f!=="2026-07-28"&&Object.hasOwn(m,"resultType")&&y.push(T("tool-example-result-version-mismatch","error",`${b}.resultType is not defined for MCP ${f}`,[...c,"resultType"])),Object.hasOwn(m,"structuredContent")&&M.get(f){let $=`${b}.content[${P}]`,q=[...c,"content",P];h.type==="audio"&&M.get(f){Object.hasOwn(r,"_meta")&&M.get(e){let n=`${g}.result.contents[${i}]`,l=[...u,"result","contents",i];if(o.uri===s&&(p=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(T("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...l,"mimeType"])),t.size!==void 0)){let m=typeof o.text=="string"?ua.encode(o.text).byteLength:typeof o.blob=="string"&&so(o.blob)?ga(o.blob):void 0;m!==void 0&&m!==t.size&&e.push(T("resource-example-size-mismatch","warning",`${n} contains ${m} raw bytes, which differs from the declared Resource size ${t.size}`,l))}typeof o.blob=="string"&&!so(o.blob)&&e.push(T("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...l,"blob"]))}),p||e.push(T("resource-example-requested-uri-not-returned","warning",`${g}.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 Pa(t,s,y){let g=mt(t.protocolVersions??[]);for(let[u,a]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])a.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=$e(t,e,g),o;if(u==="resourceTemplates")try{o=new Ie,o.add(e.uriTemplate)}catch(i){o=void 0,y.push(T("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 l=`${u}[${r}].examples[${JSON.stringify(i)}]`,m=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let d=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof d=="string"&&o&&!o.match(d)&&y.push(T("resource-template-example-invalid-expansion","error",`${l}.uri ${JSON.stringify(d)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...m,"uri"])),ba(c,p,`${l}.result`,[...m,"result"],s,y),typeof d=="string"&&$a(e,d,c,l,m,s,y)}})}function Gs(t,s="document"){let y=[];return oa(t,s,y),ia(t,s,y),sa(t,s,y),aa(t,s,y),na(t,s,y),ra(t,s,y),da(t,s,y),ha(t,s,y),Pa(t,s,y),y.sort((g,u)=>g.code.localeCompare(u.code)||g.message.localeCompare(u.message)||JSON.stringify(g.path).localeCompare(JSON.stringify(u.path))),y}var ei="__interaction_example__",ri=new Ne({allErrors:!0,strict:!1});_e(ri);var po=new lt({allErrors:!0,strict:!1});_e(po);var no=ri.compile(Gi),lo=["tools","resources","resourceTemplates","prompts"],va=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],wa=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),se=new Map(cs.map((t,s)=>[t,s])),ja={"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 U(t,s,y,g){return{code:t,severity:s,message:y,path:g}}function ka(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 ys(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function Xs(t,s,y,g){return{code:t,severity:"error",message:`${s}.${g.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${y}`,path:g}}function si(t,s="document"){let y=structuredClone(t),g=[],u=[],a=0;function e(p,o,i,n=[]){let l=/^#\/components\/([^/]+)\/([^/]+)$/.exec(p?.$componentRef??"");if(!l)return p;let[,m,c]=l;if(m!==o)return g.push(Xs("wrong-component-reference-namespace",s,`must target #/components/${o}, not #/components/${m}`,i)),{value:p};let d=`${m}/${c}`;if(n.includes(d))return g.push(Xs("component-reference-cycle",s,`forms a cycle through ${[...n,d].join(" -> ")}`,i)),{value:p};let f=t?.components?.[m]?.[c];return f===void 0?(g.push(Xs("missing-component-reference-target",s,`targets missing component ${JSON.stringify(p.$componentRef)}`,i)),{value:p}):(a+=1,ys(f)?e(f,o,i,[...n,d]):{value:structuredClone(f),targetPath:["components",m,c]})}function r(p,o,i,n=[]){let l=e(p,o,i,n);return l.targetPath&&u.push({referencePath:i,targetPath:l.targetPath}),l.value}for(let p of va)for(let[o,i]of Object.entries(t?.components?.[p]??{}))ys(i)&&(y.components[p][o]=r(i,p,["components",p,o],[`${p}/${o}`]));for(let[p,o]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates,prompts:t?.prompts}))for(let[i,n]of(o??[]).entries()){let l=y[p][i];if(p==="tools")for(let c of["inputSchema","outputSchema"])ys(n[c])&&(l[c]=r(n[c],"schemas",[p,i,c]));let m=p==="tools"?"toolExamples":p==="resources"?"resourceExamples":p==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[c,d]of Object.entries(n.examples??{}))ys(d)&&(l.examples[c]=r(d,m,[p,i,"examples",c]))}for(let p of lo)for(let[o,i]of(t?.[p]??[]).entries())for(let[n,l]of(i.elicitations??[]).entries())ys(l.requestedSchema)&&(y[p][o].elicitations[n].requestedSchema=r(l.requestedSchema,"schemas",[p,o,"elicitations",n,"requestedSchema"]));return{document:y,diagnostics:g,substitutions:a,provenance:u}}function Oa(t,s){let y=s.instancePath?s.instancePath.slice(1).split("/").map(g=>g.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?y.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&y.push(s.params.additionalProperty),y.map(g=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(g)?Number(g):g)}function mo(t){return no(t)?[]:(no.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:Oa(t,s)}))}function ti(t){return Array.isArray(t)?t.map(ti):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([s],[y])=>s.localeCompare(y)).map(([s,y])=>[s,ti(y)])):t}function ao(t){return JSON.stringify(ti(t))}function qa(t,s,y){if(!Array.isArray(t.path))return t;let g=["tools",0,"examples",ei];return g.every((a,e)=>t.path[e]===a)?{...t,message:t.message.replace(`tools[0].examples[${JSON.stringify(ei)}]`,`tools[${s}].interactionExamples[${JSON.stringify(y)}]`),path:["tools",s,"interactionExamples",y,...t.path.slice(g.length)]}:t}function xa(t,s,y,g,u){let a={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:{[ei]:{input:structuredClone(g.input),result:structuredClone(g.result)}}}]};return Gs(a).map(e=>qa(e,s,y)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function Aa(t,s,y,g,u){try{let a=ri.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(U("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{try{let a=po.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(U("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{}}}function Ea(t,s,y,g,u){let a=t.clientRequirements;if(!a||typeof a!="object"||Array.isArray(a))return;function e(r,p){u.push(U("interaction-example-client-requirements-contradiction","warning",`${y} ${r}`,p))}if(s.type==="roots"){Object.hasOwn(a,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...g,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(a,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...g,"type"]);return}let r=a.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",[...g,"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",[...g,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(a,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...g,"type"]);return}let r=a.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(r,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...g,"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",[...g,"request","mode"])}}function za(t){let s=[],y=t.protocolVersions??[];for(let[g,u]of(t.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let a=u.protocolVersions??y;for(let[e,r]of Object.entries(u.interactionExamples)){if(!r||typeof r!="object"||Array.isArray(r))continue;let p=`tools[${g}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",g,"interactionExamples",e];s.push(...xa(u,g,e,r,a));for(let[i,n]of(r.steps??[]).entries()){let l=`${p}.steps[${i}]`,m=[...o,"steps",i];if(Ea(u,n,l,m,s),n.type==="elicitation"){let c=n.request??{},d=n.response??{},f=typeof n.declaration=="string"?(u.elicitations??[]).find(b=>b.name===n.declaration):void 0;for(let b of a)se.get(b)[r.name,r]));for(let[r,p]of Object.entries(u.examples)){if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`prompts[${g}].examples[${JSON.stringify(r)}]`,i=["prompts",g,"examples",r],n=p.result??{},l=[...i,"result"],m=p.arguments;if(m&&typeof m=="object"&&!Array.isArray(m))for(let[c]of Object.entries(m))e.has(c)||s.push(U("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,d]of e)d.required===!0&&!Object.hasOwn(m??{},c)&&s.push(U("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(U("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...l,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(U("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...l,c]));for(let c of a){let d=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(U("prompt-example-result-version-mismatch","error",`${d}.resultType must be "complete" for MCP ${c}`,[...l,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(U("prompt-example-result-version-mismatch","error",`${d}.resultType is not defined for MCP ${c}`,[...l,"resultType"])),Object.hasOwn(n,"_meta")&&se.get(c){let h=`${d}.messages[${b}].content`,P=[...l,"messages",b,"content"];_a(f.content??{},h,P,c,s)})}}}return s}function Ta(t){let s=new Ie;return s.add(t),new Set(s.templates.flatMap(y=>y.parts).filter(y=>y.type==="expression").flatMap(y=>y.expressions.map(g=>g.name)))}function Sa(t,s,y,g,u){let a=`${s}.result`,e=[...y,"result"];for(let r of["jsonrpc","id","error"])Object.hasOwn(t,r)&&u.push(U("completion-example-json-rpc-envelope","error",`${a} 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(U("incomplete-completion-example-result","error",`${a} must not contain non-completed workflow field ${JSON.stringify(r)}`,[...e,r]));g==="2026-07-28"&&t.resultType!=="complete"&&u.push(U("completion-example-result-version-mismatch","error",`${a}.resultType must be "complete" for MCP ${g}`,[...e,"resultType"])),g!=="2026-07-28"&&Object.hasOwn(t,"resultType")&&u.push(U("completion-example-result-version-mismatch","error",`${a}.resultType is not defined for MCP ${g}`,[...e,"resultType"])),Object.hasOwn(t,"_meta")&&se.get(g)i.name));else try{o=Ta(e.uriTemplate)}catch(i){s.push(U("resource-template-completion-example-invalid-template","error",`${p}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[g,a,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let l=`${p}.completionExamples[${JSON.stringify(i)}]`,m=[g,a,"completionExamples",i],c=n.argument?.name,d=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(U(g==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",g==="prompts"?`${l}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${l}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...m,"argument","name"])),d&&typeof d=="object"&&!Array.isArray(d))for(let b of Object.keys(d))o&&!o.has(b)&&s.push(U(g==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",g==="prompts"?`${l}.context.arguments contains undeclared Prompt argument ${JSON.stringify(b)}`:`${l}.context.arguments contains no RFC 6570 variable ${JSON.stringify(b)} from ${JSON.stringify(e.uriTemplate)}`,[...m,"context","arguments",b])),b===c&&s.push(U("completion-example-duplicate-target-context","error",`${l}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(b)}`,[...m,"context","arguments",b]));let f=n.result??{};for(let b of r){if(se.get(b)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 uo(t){let s=mo(t);return s.length?s:Da(t)}var ii="0.8.0-rc.2",Za="v0.8.0-rc.2",Ca="40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8";function Va(t){let s=uo(t);return{valid:!s.some(y=>y.severity==="error"),diagnostics:s}}var gi={};Pi(gi,{schemaSha256:()=>Ep,snapshotTag:()=>Ap,specification:()=>hi,supportedProtocolVersions:()=>ds,validate:()=>zp});var fo={$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 ds=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),L=new Map(ds.map((t,s)=>[t,s])),pt="2025-11-25",ni="2025-06-18",ai=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([])}),Ua=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-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 li(t){return ai.officialIdentifiers.includes(t)?"official":ai.experimentalIdentifiers.includes(t)?"experimental":"uncatalogued"}function pi(t){let s=t==="2020-12"?Ne:lt,y=new s({allErrors:!0,strict:!1});return _e(y),y}function ut(t){return[...t].sort((s,y)=>L.get(s)-L.get(y))}function Pe(t,s,y){return ut(s?.protocolVersions??y??t.protocolVersions??[])}function co(t,s){let y=new Set(s);return t.filter(g=>y.has(g))}function La(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let y of Object.values(t.flows??{}))for(let g of Object.keys(y?.scopes??{}))s.add(g);return s}function $o(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 Po(t){let s=[];function y(g){if(Array.isArray(g))return g.map(y);if(!g||typeof g!="object")return g;let u={};for(let[a,e]of Object.entries(g)){if(a==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[a]=y(e)}return u}return{schema:y(t),externalReferences:s}}function S(t,s,y,g){if(!Array.isArray(g))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:y,path:g}}function Fa(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),y=s.split(".");if(y.length<2)return!1;let g=y[1].toLowerCase();return g==="modelcontextprotocol"||g==="mcp"}function Ja(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let y=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?y.slice(0,-1).some(g=>["modelcontextprotocol","mcp"].includes(g.toLowerCase())):y.length>=2&&["modelcontextprotocol","mcp"].includes(y[1].toLowerCase())}function yo(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function Ha(t,s,y){let g=ut(t.protocolVersions??[]),u=g.filter(r=>L.get(r)0;else return!1;return m?c||y.push(S("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...l,r])):y.push(S("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...l,r])),!0}function e(r,p,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[l,m]of Object.entries(r)){if(!Ua.test(l)){y.push(S("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(l)}`,[...n,l]));continue}for(let c of o.filter(d=>L.get(d)>=L.get(ni)))a(l,m,p,c,i,n)||Ja(l,c)&&y.push(S("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(l)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,l]))}}for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{let n=Pe(t,o,g),l=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...l,"_meta"]),r==="tools")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.content??[]).forEach((h,P)=>{let $=`${f}.content[${P}]`,q=[...b,"content",P];e(h?._meta,"content",n,`${$}._meta`,[...q,"_meta"]),h?.type==="resource"&&e(h.resource?._meta,"content",n,`${$}.resource._meta`,[...q,"resource","_meta"])})}else if(r!=="prompts")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.contents??[]).forEach((h,P)=>{e(h?._meta,"content",n,`${f}.contents[${P}]._meta`,[...b,"contents",P,"_meta"])})}})}function Wa(t,s,y){let g=new Set;if((t.tags??[]).forEach((u,a)=>{if(g.has(u.name)){y.push(S("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",a,"name"]));return}g.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((e,r)=>{(e.tags??[]).forEach((p,o)=>{g.has(p)||y.push(S("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(p)}`,[u,r,"tags",o]))})})}function Ba(t,s,y){let g=t.securitySchemes??{},u=new Set(Object.keys(g)),a=new Map(Object.entries(g).map(([r,p])=>[r,La(p)]));function e(r,p,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[l,m]of Object.entries(i)){if(!u.has(l)){y.push(S("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(l)}`,[...o,n,l]));continue}let c=g[l];if(!Array.isArray(m))continue;if(m.filter((f,b)=>m.indexOf(f)!==b).length&&y.push(S("duplicate-security-scope","error",`${p}[${n}].${l} contains duplicate scope values`,[...o,n,l])),(c.type==="http"||c.type==="apiKey")&&m.length>0&&y.push(S("non-oauth-scope-misuse","error",`${p}[${n}].${l} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,l])),c.type==="oauth2"||c.type==="openIdConnect"){let f=a.get(l)??new Set;m.forEach((b,h)=>{f.has(b)||y.push(S("uncatalogued-oauth-scope","warning",`${p}[${n}].${l} references scope ${JSON.stringify(b)} that is not present in the declared static scope catalogue`,[...o,n,l,h]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,p)=>{e(r.security,`transports[${p}].security`,["transports",p,"security"])});for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function Ka(t,s,y){let g=ut(t.protocolVersions??[]),u=new Set;function a(r,p,o,i){let n=new Set(p);for(let l of r)n.has(l)||y.push(S("protocol-scope-outside-parent","error",`${o} includes protocol version ${l} outside its parent scope`,i))}(t.transports??[]).forEach((r,p)=>{let o=Pe(t,r,g);a(o,g,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of g)u.has(r)||y.push(S("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,p)=>{let o=Pe(t,r,g);a(o,g,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let r=0;r0&&y.push(S("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,p,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,l)=>{let m=n[o],c=Pe(t,n,g);a(c,g,`${r}[${l}].protocolVersions`,[r,l,"protocolVersions"]),(n.elicitations??[]).forEach((f,b)=>{let h=Pe(t,f,c);a(h,c,`${r}[${l}].elicitations[${b}].protocolVersions`,[r,l,"elicitations",b,"protocolVersions"])});let d=i.get(m)??[];for(let f of d){let b=co(c,f.scope);b.length>0&&y.push(S("primitive-scope-overlap","error",`${r}[${l}] with identifier ${JSON.stringify(m)} overlaps ${r}[${f.index}] for protocol versions ${b.join(", ")}`,[r,l,"protocolVersions"]))}d.push({index:l,scope:c}),i.set(m,d)})}}function Ya(t,s,y){let g=ut(t.protocolVersions??[]);function u(a,e,r,p){if(!a||typeof a!="object"||Array.isArray(a))return;e==="2025-06-18"&&Object.hasOwn(a,"$schema")&&y.push(S("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(a.properties??{}));(a.required??[]).forEach((i,n)=>{o.has(i)||y.push(S("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(a.properties??{})){let l=`${r}.properties[${JSON.stringify(i)}]`,m=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&y.push(S("elicitation-form-schema-version-mismatch","error",`${l} uses an enum form introduced after MCP ${e}`,m)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&y.push(S("elicitation-form-schema-version-mismatch","error",`${l}.default is not defined for this property type in MCP ${e}`,[...m,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&y.push(S("elicitation-form-enum-names-mismatch","error",`${l}.enumNames must contain one display name for every enum value`,[...m,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(d=>d.const):void 0;if(c&&!c.includes(n.default)&&y.push(S("elicitation-form-default-outside-enum","error",`${l}.default must be one of the declared enum values`,[...m,"default"])),n.type==="array"){let d=n.items?.enum??n.items?.anyOf?.map(f=>f.const);Array.isArray(d)&&n.default.some(f=>!d.includes(f))&&y.push(S("elicitation-form-default-outside-enum","error",`${l}.default contains a value outside the declared enum values`,[...m,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&y.push(S("elicitation-form-invalid-range","error",`${l}.minLength must not exceed maxLength`,[...m,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&y.push(S("elicitation-form-invalid-range","error",`${l}.minimum must not exceed maximum`,[...m,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&y.push(S("elicitation-form-invalid-range","error",`${l}.minItems must not exceed maxItems`,[...m,"minItems"]))}}}for(let[a,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,p)=>{let o=Pe(t,r,g),i=new Set;(r.elicitations??[]).forEach((n,l)=>{let m=`${a}[${p}].elicitations[${l}]`,c=[a,p,"elicitations",l];i.has(n.name)&&y.push(S("duplicate-elicitation-name","error",`${m}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let d=Pe(t,n,o);for(let f of d)L.get(f){let p=Pe(t,e,g);if(e.type==="streamable-http")for(let o of p)L.get(o)>=L.get("2025-03-26")||y.push(S("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 p)L.get(o){let p=Pe(t,e,g),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",p),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${r}]`,o,e,"_meta","2025-06-18",p),u(`tools[${r}]`,o,e,"annotations","2025-03-26",p),a(`tools[${r}]`,o,e,"execution","2025-11-25",p),u(`tools[${r}]`,o,e,"icons","2025-11-25",p)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((p,o)=>{let i=Pe(t,p,g),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 l of i)L.get(l)>=L.get("2025-06-18")||y.push(S("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${l}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((l,m)=>{u(`${e}[${o}].arguments[${m}]`,[...n,"arguments",m],l,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let p=Pe(t,e,g),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&y.push(S("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 p)L.get(i)y(i,`${u}.${o}[${n}]`,[...a,o,n],!1,!1));for(let o of Ga){let i=g[o];Array.isArray(i)?i.forEach((n,l)=>y(n,`${u}.${o}[${l}]`,[...a,o,l],!1,!1)):y(i,`${u}.${o}`,[...a,o],!1,!1)}let p=g.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||y(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...a,"dependencies",o],!1,!1)}return y(t,"inputSchema",["inputSchema"],!0,!1),s}function sp(t,s,y,g,u){let a=rp(t.inputSchema);if(!a.length)return;for(let r of y)r!=="2026-07-28"&&u.push(S("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 a){let p=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(S("invalid-x-mcp-header","error",`${p} 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(S("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(S("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(S("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function ip(t,s,y,g,u){if(Object.hasOwn(t,"properties")){let a=t.properties;if(!a||typeof a!="object"||Array.isArray(a))u.push(S("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${pt}`,[...y,"properties"]));else for(let[e,r]of Object.entries(a))r&&typeof r=="object"&&!Array.isArray(r)||u.push(S("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${pt}`,[...y,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(a=>typeof a!="string"))&&u.push(S("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${pt}`,[...y,"required"]))}function op(t,s,y){let g=ut(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{let e=Pe(t,u,g);for(let r of["inputSchema","outputSchema"]){let p=u[r];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${a}].${r}`,i=["tools",a,r],n=e.some(m=>L.get(m)L.get(m)>=L.get(pt));if(Object.hasOwn(p,"$schema"))for(let m of e)L.get(m)>=L.get(pt)||y.push(S("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${m}; it requires ${pt} or later`,[...i,"$schema"]));if(n&&ip(p,o,i,s,y),l){let m=$o(p);if(!m)y.push(S("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=pi(m);try{if(c.validateSchema(p,!0))c.compile(p);else{let d=c.errors?.map(f=>`${f.instancePath||"/"} ${f.message}`).join("; ")??"unknown meta-schema error";y.push(S("invalid-tool-schema","error",`${o} is not valid JSON Schema ${m}: ${d}`,i))}}catch(d){let f=Po(p);try{if(!f.externalReferences.length)throw d;pi(m).compile(f.schema);let b=[...new Set(f.externalReferences)].sort();y.push(S("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${b.map(h=>JSON.stringify(h)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(b){y.push(S("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${m}: ${b.message}`,i))}}}}if(r==="outputSchema"&&p.type!=="object")for(let m of e)m!=="2026-07-28"&&y.push(S("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${m}`,[...i,"type"]))}sp(u,a,e,s,y)})}function ho(t,s,y,g,u,a){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){a.push(S("tool-example-schema-mismatch","error",`${y} must be an object`,g));return}for(let e of t.required??[])Object.hasOwn(s,e)||a.push(S("tool-example-schema-mismatch","error",`${y} is missing required property ${JSON.stringify(e)}`,[...g,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||a.push(S("tool-example-schema-mismatch","error",`${y} contains undeclared property ${JSON.stringify(e)}`,[...g,e]))}function go(t,s,y,g,u,a){let e=$o(t);if(!e)return;let r=Po(t);if(r.externalReferences.length){let p=[...new Set(r.externalReferences)].sort();a.push(S("incomplete-tool-example-validation","warning",`${y} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,g));return}try{let p=pi(e).compile(t);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";a.push(S("tool-example-schema-mismatch","error",`${y} does not validate against its associated Tool schema: ${o}`,g))}}catch{}}function np(t,s,y){let g=ut(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=Pe(t,u,g),r=e.filter(o=>L.get(o)L.get(o)>=L.get(pt));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${a}].examples[${JSON.stringify(o)}]`,l=["tools",a,"examples",o],m=i.result??{},c=[...l,"result"],d=m.isError!==!0;for(let f of["jsonrpc","id","error"])Object.hasOwn(m,f)&&y.push(S("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(f)}`,[...c,f]));for(let f of["task","inputRequests","requestState"])Object.hasOwn(m,f)&&y.push(S("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(f)}`,[...c,f]));for(let f of e){let b=`${n}.result`;f==="2026-07-28"&&m.resultType!=="complete"&&y.push(S("tool-example-result-version-mismatch","error",`${b}.resultType must be "complete" for MCP ${f}`,[...c,"resultType"])),f!=="2026-07-28"&&Object.hasOwn(m,"resultType")&&y.push(S("tool-example-result-version-mismatch","error",`${b}.resultType is not defined for MCP ${f}`,[...c,"resultType"])),Object.hasOwn(m,"structuredContent")&&L.get(f){let $=`${b}.content[${P}]`,q=[...c,"content",P];h.type==="audio"&&L.get(f){Object.hasOwn(r,"_meta")&&L.get(e){let n=`${g}.result.contents[${i}]`,l=[...u,"result","contents",i];if(o.uri===s&&(p=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(S("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...l,"mimeType"])),t.size!==void 0)){let m=typeof o.text=="string"?tp.encode(o.text).byteLength:typeof o.blob=="string"&&bo(o.blob)?ap(o.blob):void 0;m!==void 0&&m!==t.size&&e.push(S("resource-example-size-mismatch","warning",`${n} contains ${m} raw bytes, which differs from the declared Resource size ${t.size}`,l))}typeof o.blob=="string"&&!bo(o.blob)&&e.push(S("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...l,"blob"]))}),p||e.push(S("resource-example-requested-uri-not-returned","warning",`${g}.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 mp(t,s,y){let g=ut(t.protocolVersions??[]);for(let[u,a]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])a.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=Pe(t,e,g),o;if(u==="resourceTemplates")try{o=new Ie,o.add(e.uriTemplate)}catch(i){o=void 0,y.push(S("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 l=`${u}[${r}].examples[${JSON.stringify(i)}]`,m=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let d=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof d=="string"&&o&&!o.match(d)&&y.push(S("resource-template-example-invalid-expansion","error",`${l}.uri ${JSON.stringify(d)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...m,"uri"])),pp(c,p,`${l}.result`,[...m,"result"],s,y),typeof d=="string"&&lp(e,d,c,l,m,s,y)}})}function mi(t,s="document"){let y=[];return Ka(t,s,y),Ba(t,s,y),Wa(t,s,y),Qa(t,s,y),Ya(t,s,y),Ha(t,s,y),op(t,s,y),np(t,s,y),mp(t,s,y),y.sort((g,u)=>g.code.localeCompare(u.code)||g.message.localeCompare(u.message)||JSON.stringify(g.path).localeCompare(JSON.stringify(u.path))),y}var fi="__interaction_example__",yi=new Ne({allErrors:!0,strict:!1});_e(yi);var jo=new lt({allErrors:!0,strict:!1});_e(jo);var vo=yi.compile(fo),ko=["tools","resources","resourceTemplates","prompts"],up=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],fp=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),ie=new Map(ds.map((t,s)=>[t,s])),cp={"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 F(t,s,y,g){return{code:t,severity:s,message:y,path:g}}function yp(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 hs(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function ui(t,s,y,g){return{code:t,severity:"error",message:`${s}.${g.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${y}`,path:g}}function di(t,s="document"){let y=structuredClone(t),g=[],u=[],a=0;function e(p,o,i,n=[]){let l=/^#\/components\/([^/]+)\/([^/]+)$/.exec(p?.$componentRef??"");if(!l)return p;let[,m,c]=l;if(m!==o)return g.push(ui("wrong-component-reference-namespace",s,`must target #/components/${o}, not #/components/${m}`,i)),{value:p};let d=`${m}/${c}`;if(n.includes(d))return g.push(ui("component-reference-cycle",s,`forms a cycle through ${[...n,d].join(" -> ")}`,i)),{value:p};let f=t?.components?.[m]?.[c];return f===void 0?(g.push(ui("missing-component-reference-target",s,`targets missing component ${JSON.stringify(p.$componentRef)}`,i)),{value:p}):(a+=1,hs(f)?e(f,o,i,[...n,d]):{value:structuredClone(f),targetPath:["components",m,c]})}function r(p,o,i,n=[]){let l=e(p,o,i,n);return l.targetPath&&u.push({referencePath:i,targetPath:l.targetPath}),l.value}for(let p of up)for(let[o,i]of Object.entries(t?.components?.[p]??{}))hs(i)&&(y.components[p][o]=r(i,p,["components",p,o],[`${p}/${o}`]));for(let[p,o]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates,prompts:t?.prompts}))for(let[i,n]of(o??[]).entries()){let l=y[p][i];if(p==="tools")for(let c of["inputSchema","outputSchema"])hs(n[c])&&(l[c]=r(n[c],"schemas",[p,i,c]));let m=p==="tools"?"toolExamples":p==="resources"?"resourceExamples":p==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[c,d]of Object.entries(n.examples??{}))hs(d)&&(l.examples[c]=r(d,m,[p,i,"examples",c]))}for(let p of ko)for(let[o,i]of(t?.[p]??[]).entries())for(let[n,l]of(i.elicitations??[]).entries())hs(l.requestedSchema)&&(y[p][o].elicitations[n].requestedSchema=r(l.requestedSchema,"schemas",[p,o,"elicitations",n,"requestedSchema"]));return{document:y,diagnostics:g,substitutions:a,provenance:u}}function dp(t,s){let y=s.instancePath?s.instancePath.slice(1).split("/").map(g=>g.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?y.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&y.push(s.params.additionalProperty),y.map(g=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(g)?Number(g):g)}function Oo(t){return vo(t)?[]:(vo.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:dp(t,s)}))}function ci(t){return Array.isArray(t)?t.map(ci):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([s],[y])=>s.localeCompare(y)).map(([s,y])=>[s,ci(y)])):t}function wo(t){return JSON.stringify(ci(t))}function hp(t,s,y){if(!Array.isArray(t.path))return t;let g=["tools",0,"examples",fi];return g.every((a,e)=>t.path[e]===a)?{...t,message:t.message.replace(`tools[0].examples[${JSON.stringify(fi)}]`,`tools[${s}].interactionExamples[${JSON.stringify(y)}]`),path:["tools",s,"interactionExamples",y,...t.path.slice(g.length)]}:t}function gp(t,s,y,g,u){let a={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:{[fi]:{input:structuredClone(g.input),result:structuredClone(g.result)}}}]};return mi(a).map(e=>hp(e,s,y)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function bp(t,s,y,g,u){try{let a=yi.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(F("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{try{let a=jo.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(F("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{}}}function $p(t,s,y,g,u){let a=t.clientRequirements;if(!a||typeof a!="object"||Array.isArray(a))return;function e(r,p){u.push(F("interaction-example-client-requirements-contradiction","warning",`${y} ${r}`,p))}if(s.type==="roots"){Object.hasOwn(a,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...g,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(a,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...g,"type"]);return}let r=a.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",[...g,"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",[...g,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(a,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...g,"type"]);return}let r=a.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(r,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...g,"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",[...g,"request","mode"])}}function Pp(t){let s=[],y=t.protocolVersions??[];for(let[g,u]of(t.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let a=u.protocolVersions??y;for(let[e,r]of Object.entries(u.interactionExamples)){if(!r||typeof r!="object"||Array.isArray(r))continue;let p=`tools[${g}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",g,"interactionExamples",e];s.push(...gp(u,g,e,r,a));for(let[i,n]of(r.steps??[]).entries()){let l=`${p}.steps[${i}]`,m=[...o,"steps",i];if($p(u,n,l,m,s),n.type==="elicitation"){let c=n.request??{},d=n.response??{},f=typeof n.declaration=="string"?(u.elicitations??[]).find(b=>b.name===n.declaration):void 0;for(let b of a)ie.get(b)[r.name,r]));for(let[r,p]of Object.entries(u.examples)){if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`prompts[${g}].examples[${JSON.stringify(r)}]`,i=["prompts",g,"examples",r],n=p.result??{},l=[...i,"result"],m=p.arguments;if(m&&typeof m=="object"&&!Array.isArray(m))for(let[c]of Object.entries(m))e.has(c)||s.push(F("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,d]of e)d.required===!0&&!Object.hasOwn(m??{},c)&&s.push(F("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(F("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...l,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(F("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...l,c]));for(let c of a){let d=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(F("prompt-example-result-version-mismatch","error",`${d}.resultType must be "complete" for MCP ${c}`,[...l,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(F("prompt-example-result-version-mismatch","error",`${d}.resultType is not defined for MCP ${c}`,[...l,"resultType"])),Object.hasOwn(n,"_meta")&&ie.get(c){let h=`${d}.messages[${b}].content`,P=[...l,"messages",b,"content"];wp(f.content??{},h,P,c,s)})}}}return s}function kp(t){let s=new Ie;return s.add(t),new Set(s.templates.flatMap(y=>y.parts).filter(y=>y.type==="expression").flatMap(y=>y.expressions.map(g=>g.name)))}function Op(t,s,y,g,u){let a=`${s}.result`,e=[...y,"result"];for(let r of["jsonrpc","id","error"])Object.hasOwn(t,r)&&u.push(F("completion-example-json-rpc-envelope","error",`${a} 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(F("incomplete-completion-example-result","error",`${a} must not contain non-completed workflow field ${JSON.stringify(r)}`,[...e,r]));g==="2026-07-28"&&t.resultType!=="complete"&&u.push(F("completion-example-result-version-mismatch","error",`${a}.resultType must be "complete" for MCP ${g}`,[...e,"resultType"])),g!=="2026-07-28"&&Object.hasOwn(t,"resultType")&&u.push(F("completion-example-result-version-mismatch","error",`${a}.resultType is not defined for MCP ${g}`,[...e,"resultType"])),Object.hasOwn(t,"_meta")&&ie.get(g)i.name));else try{o=kp(e.uriTemplate)}catch(i){s.push(F("resource-template-completion-example-invalid-template","error",`${p}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[g,a,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let l=`${p}.completionExamples[${JSON.stringify(i)}]`,m=[g,a,"completionExamples",i],c=n.argument?.name,d=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(F(g==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",g==="prompts"?`${l}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${l}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...m,"argument","name"])),d&&typeof d=="object"&&!Array.isArray(d))for(let b of Object.keys(d))o&&!o.has(b)&&s.push(F(g==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",g==="prompts"?`${l}.context.arguments contains undeclared Prompt argument ${JSON.stringify(b)}`:`${l}.context.arguments contains no RFC 6570 variable ${JSON.stringify(b)} from ${JSON.stringify(e.uriTemplate)}`,[...m,"context","arguments",b])),b===c&&s.push(F("completion-example-duplicate-target-context","error",`${l}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(b)}`,[...m,"context","arguments",b]));let f=n.result??{};for(let b of r){if(ie.get(b)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 qo(t){let s=Oo(t);return s.length?s:xp(t)}var hi="0.8.0-rc.3",Ap="v0.8.0-rc.3",Ep="a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4";function zp(t){let s=qo(t);return{valid:!s.some(y=>y.severity==="error"),diagnostics:s}}var ft=Object.freeze({[ii]:oi,[hi]:gi}),xo=Object.freeze({"0.8.0-rc.2":si,"0.8.0-rc.3":di}),Is=Object.freeze({"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"}),Tl=Object.freeze(Object.keys(ft)),Sl=Object.freeze(["0.8.0-rc.2"]),Rl=Object.freeze([...new Set(Object.values(ft).flatMap(t=>t.supportedProtocolVersions))]),Np=Object.freeze(Object.fromEntries(Object.entries(ft).map(([t,s])=>[t,Object.freeze({snapshotTag:s.snapshotTag,schemaUri:Is[t],schemaSha256:s.schemaSha256})]))),$i=new Map;for(let t of Object.values(ft)){let s=Is[t.specification],y=$i.get(s)??[];y.push(t.specification),$i.set(s,y)}function ps(t,s,y=[]){return{code:t,severity:"error",message:s,path:y}}function bi(t,s=[]){let y=ft[t];return{status:"resolved",specification:t,schemaUri:Is[t],provenance:Np[t],diagnostics:s}}function Dl(t,s={}){let y=s?.specification;if(y!==void 0&&(typeof y!="string"||!Object.hasOwn(ft,y)))return{status:"unresolved",diagnostics:[ps("unsupported-specification",`Unsupported MCP Description specification: ${String(y)}`)]};let g=t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$schema")?t.$schema:void 0;if(g===void 0)return y!==void 0?bi(y):{status:"unresolved",diagnostics:[ps("missing-snapshot-identity","An exact specification selector or recognized $schema identity is required",["$schema"])]};if(typeof g!="string")return{status:"unresolved",diagnostics:[ps("invalid-schema-identity","$schema must be a string to resolve an MCP Description specification",["$schema"])]};let u=$i.get(g)??[];return y!==void 0?Is[y]===g?bi(y):{status:"unresolved",diagnostics:[ps("contradictory-snapshot-identity",`$schema ${JSON.stringify(g)} does not identify specification ${JSON.stringify(y)}`,["$schema"])]}:u.length===1?bi(u[0]):u.length>1?{status:"unresolved",diagnostics:[ps("ambiguous-schema-identity",`$schema ${JSON.stringify(g)} is shared by ${u.join(", ")} and does not select one immutable snapshot`,["$schema"])]}:{status:"unresolved",diagnostics:[ps("unknown-schema-identity",`Unknown MCP Description $schema identity: ${JSON.stringify(g)}`,["$schema"])]}}function Zl(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(ft,s.specification))throw new RangeError(`Unsupported MCP Description specification: ${String(s.specification)}`);return ft[s.specification].validate(t)}function Cl(t,s){if(!s||typeof s!="object"||Array.isArray(s)||!Object.hasOwn(s,"specification"))throw new TypeError("options.specification is required");if(!Object.hasOwn(xo,s.specification))throw new RangeError(`Component reference resolution does not support specification: ${String(s.specification)}`);return xo[s.specification](t)}export{Sl as deprecatedSpecifications,Ns as mcpExtensionCatalogue,_s as mcpExtensionMaturity,Cl as resolveMcpDescriptionComponentReferences,Dl as resolveMcpDescriptionSpecification,Np as specificationProvenance,Rl as supportedProtocolVersions,Tl as supportedSpecifications,Zl as validateMcpDescription}; diff --git a/packages/validator/test/api.test.js b/packages/validator/test/api.test.js index 91cc66d..a0b0b5e 100644 --- a/packages/validator/test/api.test.js +++ b/packages/validator/test/api.test.js @@ -3,6 +3,7 @@ import fs from 'node:fs'; import test from 'node:test'; import { + deprecatedSpecifications, mcpExtensionCatalogue, mcpExtensionMaturity, resolveMcpDescriptionComponentReferences, @@ -14,27 +15,23 @@ import { } from '../src/index.js'; const fixtureRoots = { - '0.8.0-draft.1': new URL('./snapshots/0.8.0-draft.1/fixtures/', import.meta.url), - '0.8.0-draft.2': new URL('./snapshots/0.8.0-draft.2/fixtures/', import.meta.url), - '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.3': new URL('./snapshots/0.8.0-rc.3/fixtures/', import.meta.url) }; -function fixture(group, name, specification = '0.8.0-draft.1') { +function fixture(group, name, specification = '0.8.0-rc.3') { return JSON.parse(fs.readFileSync(new URL(`${group}/${name}`, fixtureRoots[specification]), 'utf8')); } -function validate(document, specification = '0.8.0-draft.1') { +function validate(document, specification = '0.8.0-rc.3') { return validateMcpDescription(document, { specification }); } -test('exports the cumulative validator API', () => { +test('exports the active 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', '0.8.0-rc.3']); + assert.deepEqual(supportedSpecifications, ['0.8.0-rc.2', '0.8.0-rc.3']); + assert.deepEqual(deprecatedSpecifications, ['0.8.0-rc.2']); assert.deepEqual(supportedProtocolVersions, [ '2024-11-05', '2025-03-26', @@ -43,31 +40,6 @@ test('exports the cumulative validator API', () => { '2026-07-28' ]); assert.deepEqual(specificationProvenance, { - '0.8.0-draft.1': { - snapshotTag: 'v0.8.0-draft.1', - schemaUri: 'https://mcpdesc.org/schema/0.8.0.json', - schemaSha256: '4ceb6042c3fd31703199cd3db869ec5c35c17d2fe9ab7b2f5b96a2a3af0cebe4' - }, - '0.8.0-draft.2': { - snapshotTag: 'v0.8.0-draft.2', - schemaUri: 'https://mcpdesc.org/schema/0.8.0.json', - schemaSha256: 'ab692c1a5a0f7e5f29be1940aa8c64a56d4620be0a19d00cf0a64680b7e517fa' - }, - '0.8.0-draft.3': { - snapshotTag: 'v0.8.0-draft.3', - schemaUri: 'https://mcpdesc.org/schema/0.8.0.json', - schemaSha256: '8823c1f1946360b2a44d00920e2092e5e4acd139a1964befad4eb0bf3ce96002' - }, - '0.8.0-draft.4': { - snapshotTag: 'v0.8.0-draft.4', - schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json', - schemaSha256: '93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b' - }, - '0.8.0-rc.1': { - snapshotTag: 'v0.8.0-rc.1', - schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json', - schemaSha256: '936a0f24ade501fcabf3d6498c0440c445daa672a575573a35954cee49430ac4' - }, '0.8.0-rc.2': { snapshotTag: 'v0.8.0-rc.2', schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', @@ -138,7 +110,7 @@ test('keeps pre-standard client requirements strict and malformed extension maps } }); -for (const specification of ['0.8.0-rc.1', '0.8.0-rc.2', '0.8.0-rc.3']) { +for (const specification of ['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); @@ -157,7 +129,7 @@ for (const specification of ['0.8.0-rc.1', '0.8.0-rc.2', '0.8.0-rc.3']) { } test('rejects component resolution for unsupported selectors', () => { - const document = fixture('expected-valid', 'reusable-components.json', '0.8.0-draft.4'); + const document = fixture('expected-valid', 'reusable-components.json', '0.8.0-rc.3'); assert.throws( () => resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-draft.4' }), /does not support specification: 0\.8\.0-draft\.4/ @@ -185,13 +157,13 @@ test('resolves exact snapshot identity offline', () => { }; try { assert.deepEqual(resolveMcpDescriptionSpecification({ - $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json', + $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json', mcpdesc: '0.8.0' }), { status: 'resolved', - specification: '0.8.0-rc.1', - schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json', - provenance: specificationProvenance['0.8.0-rc.1'], + specification: '0.8.0-rc.3', + schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json', + provenance: specificationProvenance['0.8.0-rc.3'], diagnostics: [] }); } finally { @@ -199,29 +171,29 @@ test('resolves exact snapshot identity offline', () => { } }); -test('requires exact identity instead of inferring from mcpdesc', () => { +test('requires exact recognized identity instead of inferring from mcpdesc', () => { const missing = resolveMcpDescriptionSpecification({ mcpdesc: '0.8.0' }); assert.equal(missing.status, 'unresolved'); assert.equal(missing.diagnostics[0].code, 'missing-snapshot-identity'); - const ambiguous = resolveMcpDescriptionSpecification({ + const retired = resolveMcpDescriptionSpecification({ $schema: 'https://mcpdesc.org/schema/0.8.0.json', mcpdesc: '0.8.0' }); - assert.equal(ambiguous.status, 'unresolved'); - assert.equal(ambiguous.diagnostics[0].code, 'ambiguous-schema-identity'); + assert.equal(retired.status, 'unresolved'); + assert.equal(retired.diagnostics[0].code, 'unknown-schema-identity'); }); test('checks explicit selector consistency with declared schema identity', () => { const selected = resolveMcpDescriptionSpecification({ mcpdesc: '0.8.0' }, { - specification: '0.8.0-draft.4' + specification: '0.8.0-rc.3' }); assert.equal(selected.status, 'resolved'); - assert.equal(selected.specification, '0.8.0-draft.4'); + assert.equal(selected.specification, '0.8.0-rc.3'); const contradiction = resolveMcpDescriptionSpecification({ - $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json' - }, { specification: '0.8.0-draft.3' }); + $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json' + }, { specification: '0.8.0-rc.2' }); assert.equal(contradiction.status, 'unresolved'); assert.equal(contradiction.diagnostics[0].code, 'contradictory-snapshot-identity'); }); @@ -232,10 +204,10 @@ test('distinguishes invalid, unknown, and unsupported identity inputs', () => { assert.equal(resolveMcpDescriptionSpecification({}, { specification: '0.8.0-draft.99' }).diagnostics[0].code, 'unsupported-specification'); }); -test('dispatches only to the exact selected snapshot', () => { - const document = fixture('expected-valid', 'reusable-components.json', '0.8.0-draft.2'); - assert.equal(validate(document, '0.8.0-draft.2').valid, true); - assert.equal(validate(document, '0.8.0-draft.1').valid, false); +test('dispatches both active exact selectors', () => { + const document = fixture('expected-valid', 'reusable-components.json', '0.8.0-rc.3'); + assert.equal(validate(document, '0.8.0-rc.3').valid, true); + assert.equal(validate(document, '0.8.0-rc.2').valid, true); }); test('accepts an unknown JavaScript value and returns individual structural diagnostics', () => { @@ -278,31 +250,15 @@ test('is deterministic and does not mutate the input document', () => { test('exports immutable support and provenance data', () => { assert.ok(Object.isFrozen(supportedSpecifications)); + assert.ok(Object.isFrozen(deprecatedSpecifications)); assert.ok(Object.isFrozen(supportedProtocolVersions)); assert.ok(Object.isFrozen(specificationProvenance)); - assert.ok(Object.isFrozen(specificationProvenance['0.8.0-draft.1'])); - assert.ok(Object.isFrozen(specificationProvenance['0.8.0-draft.2'])); - assert.ok(Object.isFrozen(specificationProvenance['0.8.0-draft.3'])); - 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(() => { - specificationProvenance['0.8.0-draft.1'].snapshotTag = 'changed'; - }); - assert.throws(() => { - specificationProvenance['0.8.0-draft.2'].snapshotTag = 'changed'; - }); - assert.throws(() => { - specificationProvenance['0.8.0-draft.3'].snapshotTag = 'changed'; - }); - assert.throws(() => { - specificationProvenance['0.8.0-draft.4'].snapshotTag = 'changed'; - }); - assert.throws(() => { - specificationProvenance['0.8.0-rc.1'].snapshotTag = 'changed'; + specificationProvenance['0.8.0-rc.2'].snapshotTag = 'changed'; }); }); diff --git a/packages/validator/test/browser.test.js b/packages/validator/test/browser.test.js index 06e3314..a07b5c6 100644 --- a/packages/validator/test/browser.test.js +++ b/packages/validator/test/browser.test.js @@ -16,7 +16,7 @@ try { function fixture(group, name) { return JSON.parse(fs.readFileSync( - new URL(`./snapshots/0.8.0-rc.1/fixtures/${group}/${name}`, import.meta.url), + new URL(`./snapshots/0.8.0-rc.3/fixtures/${group}/${name}`, import.meta.url), 'utf8' )); } @@ -25,7 +25,7 @@ function validateUnderCsp(document) { globalThis.eval = () => { throw new EvalError('eval blocked by test CSP'); }; globalThis.Function = function BlockedFunction() { throw new EvalError('Function blocked by test CSP'); }; try { - return browser.validateMcpDescription(document, { specification: '0.8.0-rc.1' }); + return browser.validateMcpDescription(document, { specification: '0.8.0-rc.3' }); } finally { globalThis.eval = originalEval; globalThis.Function = OriginalFunction; diff --git a/packages/validator/test/fixtures.test.js b/packages/validator/test/fixtures.test.js index 2c691fb..f2d4b51 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', '0.8.0-rc.3']) { +for (const specification of ['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 f40d46e..1c5af2d 100644 --- a/packages/validator/test/import-snapshot.test.js +++ b/packages/validator/test/import-snapshot.test.js @@ -10,6 +10,9 @@ import { fileURLToPath } from 'node:url'; const script = fileURLToPath( new URL('../scripts/import-snapshot.mjs', import.meta.url), ); +const retainedImportRoot = fileURLToPath( + new URL('../snapshot-imports/', import.meta.url), +); function sha256(value) { return createHash('sha256').update(value).digest('hex'); @@ -49,6 +52,13 @@ function createBundle() { return root; } +test('does not retain snapshot intake bundles in the package workspace', () => { + const retainedImports = fs.existsSync(retainedImportRoot) + ? fs.readdirSync(retainedImportRoot) + : []; + assert.deepEqual(retainedImports, []); +}); + test('validates a complete snapshot bundle without writing it', () => { const root = createBundle(); try { diff --git a/packages/validator/test/snapshot.test.js b/packages/validator/test/snapshot.test.js index a7d77b8..7499d01 100644 --- a/packages/validator/test/snapshot.test.js +++ b/packages/validator/test/snapshot.test.js @@ -11,11 +11,6 @@ test('preserves the immutable Draft 1 schema digest and metadata', () => { const digest = createHash('sha256').update(embedded).digest('hex'); assert.equal(digest, draft1SchemaSha256); - assert.deepEqual(specificationProvenance['0.8.0-draft.1'], { - snapshotTag: 'v0.8.0-draft.1', - schemaUri: 'https://mcpdesc.org/schema/0.8.0.json', - schemaSha256: draft1SchemaSha256 - }); }); test('preserves the immutable Draft 2 schema digest and metadata', () => { @@ -24,11 +19,6 @@ test('preserves the immutable Draft 2 schema digest and metadata', () => { const digest = createHash('sha256').update(embedded).digest('hex'); assert.equal(digest, draft2SchemaSha256); - assert.deepEqual(specificationProvenance['0.8.0-draft.2'], { - snapshotTag: 'v0.8.0-draft.2', - schemaUri: 'https://mcpdesc.org/schema/0.8.0.json', - schemaSha256: draft2SchemaSha256 - }); }); test('preserves the immutable Draft 3 schema digest and metadata', () => { @@ -37,11 +27,6 @@ test('preserves the immutable Draft 3 schema digest and metadata', () => { const digest = createHash('sha256').update(embedded).digest('hex'); assert.equal(digest, draft3SchemaSha256); - assert.deepEqual(specificationProvenance['0.8.0-draft.3'], { - snapshotTag: 'v0.8.0-draft.3', - schemaUri: 'https://mcpdesc.org/schema/0.8.0.json', - schemaSha256: draft3SchemaSha256 - }); }); test('preserves the immutable Draft 4 schema digest and metadata', () => { @@ -50,11 +35,6 @@ test('preserves the immutable Draft 4 schema digest and metadata', () => { const digest = createHash('sha256').update(embedded).digest('hex'); assert.equal(digest, draft4SchemaSha256); - assert.deepEqual(specificationProvenance['0.8.0-draft.4'], { - snapshotTag: 'v0.8.0-draft.4', - schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json', - schemaSha256: draft4SchemaSha256 - }); }); test('preserves the immutable Release Candidate 1 schema digest and metadata', () => { @@ -63,11 +43,6 @@ test('preserves the immutable Release Candidate 1 schema digest and metadata', ( const digest = createHash('sha256').update(embedded).digest('hex'); assert.equal(digest, rc1SchemaSha256); - assert.deepEqual(specificationProvenance['0.8.0-rc.1'], { - snapshotTag: 'v0.8.0-rc.1', - schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json', - schemaSha256: rc1SchemaSha256 - }); }); test('preserves the immutable Release Candidate 2 schema digest and metadata', () => { diff --git a/packages/validator/test/standalone.test.js b/packages/validator/test/standalone.test.js index dbcfd86..099d647 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', '0.8.0-rc.3']) { +for (const specification of ['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 53d8af4..6d0f7c3 100644 --- a/packages/validator/test/types/api.test.ts +++ b/packages/validator/test/types/api.test.ts @@ -1,4 +1,5 @@ import { + deprecatedSpecifications, mcpExtensionCatalogue, mcpExtensionMaturity, resolveMcpDescriptionComponentReferences, @@ -16,45 +17,33 @@ import { validateMcpDescription as validateStandalone } from '@mcpdesc/validator declare const document: unknown; const result: McpDescriptionValidationResult = validateMcpDescription(document, { - specification: '0.8.0-draft.1' + specification: '0.8.0-rc.2' }); const componentResolution = resolveMcpDescriptionComponentReferences(document, { - specification: '0.8.0-rc.1' + specification: '0.8.0-rc.2' }); 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' + specification: '0.8.0-rc.3' }); const browserResult: McpDescriptionValidationResult = validateBrowser(document, { - specification: '0.8.0-rc.1' + specification: '0.8.0-rc.3' }); const diagnostic: McpDescriptionDiagnostic | undefined = result.diagnostics[0]; const pathSegment: string | number | undefined = diagnostic?.path[0]; -const draft1: '0.8.0-draft.1' = supportedSpecifications[0]; -const draft2: '0.8.0-draft.2' = supportedSpecifications[1]; -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 rc2: '0.8.0-rc.2' = supportedSpecifications[0]; +const rc3: '0.8.0-rc.3' = supportedSpecifications[1]; +const deprecatedRc2: '0.8.0-rc.2' = deprecatedSpecifications[0]; const catalogueDate: '2026-09-04' = mcpExtensionCatalogue.effectiveDate; const extensionMaturity: 'official' | 'experimental' | 'uncatalogued' = mcpExtensionMaturity('io.modelcontextprotocol/ui'); const protocolVersion: string = supportedProtocolVersions[0]; -const draft1Tag: 'v0.8.0-draft.1' = specificationProvenance[draft1].snapshotTag; -const draft2Tag: 'v0.8.0-draft.2' = specificationProvenance[draft2].snapshotTag; -const draft3Tag: 'v0.8.0-draft.3' = specificationProvenance[draft3].snapshotTag; -const draft4Tag: 'v0.8.0-draft.4' = specificationProvenance[draft4].snapshotTag; -const draft4SchemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-draft.4.json' = specificationProvenance[draft4].schemaUri; -const rc1SchemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.1.json' = specificationProvenance[rc1].schemaUri; -const resolution = resolveMcpDescriptionSpecification(document, { specification: draft4 }); +const rc2Tag: 'v0.8.0-rc.2' = specificationProvenance[rc2].snapshotTag; +const rc3SchemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json' = specificationProvenance[rc3].schemaUri; +const resolution = resolveMcpDescriptionSpecification(document, { specification: rc3 }); if (resolution.status === 'resolved') { const resolvedSelector: string = resolution.specification; const resolvedSchemaUri: string = resolution.schemaUri; @@ -64,14 +53,11 @@ if (resolution.status === 'resolved') { void pathSegment; void protocolVersion; -void draft1Tag; -void draft2Tag; -void draft3Tag; -void draft4Tag; -void draft4SchemaUri; -void rc1SchemaUri; +void rc2Tag; +void rc3SchemaUri; void rc2; void rc3; +void deprecatedRc2; void catalogueDate; void extensionMaturity; void browserResult; @@ -85,7 +71,7 @@ validateMcpDescription(document, { specification: '0.8.0' }); // @ts-expect-error Later drafts are not supported by this package version. validateMcpDescription(document, { specification: '0.8.0-draft.5' }); // @ts-expect-error Supported specification exports are readonly. -supportedSpecifications.push('0.8.0-draft.1'); +supportedSpecifications.push('0.8.0-rc.2'); // @ts-expect-error Provenance is only available for supported selectors. specificationProvenance['0.8.0-draft.5']; // @ts-expect-error Draft 4 component resolution is not supported. diff --git a/scripts/assess-release.mjs b/scripts/assess-release.mjs index fbd02b8..6780e4e 100644 --- a/scripts/assess-release.mjs +++ b/scripts/assess-release.mjs @@ -10,6 +10,7 @@ const packageDefinitions = { 'packages/core/src/', 'packages/core/package.json', 'packages/core/README.md', + 'packages/core/CHANGELOG.md', 'packages/core/LICENSE', 'packages/core/NOTICE', 'packages/core/ORIGIN.md', @@ -34,11 +35,7 @@ const packageDefinitions = { 'packages/validator/ORIGIN.md', 'packages/validator/MODIFICATIONS.md', ], - supportPaths: [ - 'packages/validator/scripts/', - 'packages/validator/test/', - 'packages/validator/snapshot-imports/', - ], + supportPaths: ['packages/validator/scripts/', 'packages/validator/test/'], }, }; diff --git a/scripts/release.mjs b/scripts/release.mjs index 7385618..d0c9d64 100644 --- a/scripts/release.mjs +++ b/scripts/release.mjs @@ -4,7 +4,7 @@ import { readFileSync } from 'node:fs'; const targets = { core: { manifest: 'packages/core/package.json', - changelog: 'CHANGELOG.md', + changelog: 'packages/core/CHANGELOG.md', tagPrefix: 'v', validation: ['npm', ['run', 'check']], },