@mcpdesc/validator 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -2
- package/MODIFICATIONS.md +9 -0
- package/ORIGIN.md +28 -6
- package/README.md +28 -9
- package/package.json +10 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
and this package follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
Dates for published releases are the UTC publication dates recorded by npm.
|
|
8
8
|
|
|
9
|
-
## [
|
|
9
|
+
## [0.7.0] - 2026-09-02
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Moved package maintenance and publication from the MCP Description
|
|
14
|
+
specification repository to the MCP Description tooling repository without
|
|
15
|
+
changing public APIs, immutable snapshots, diagnostics, or validation
|
|
16
|
+
behavior.
|
|
17
|
+
|
|
18
|
+
## [0.6.0] - 2026-09-02
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Added `@mcpdesc/validator/browser` as a descriptive strict-CSP alias for the existing `@mcpdesc/validator/standalone` implementation, with the same API and declarations.
|
|
23
|
+
- Added blocked-code-generation validation coverage, including document-provided schemas, plus esbuild, Vite, runtime-AJV exclusion, and packed-export checks.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Documented the strict-CSP and runtime-compilation behavior of the default, browser, and standalone entries. The default and standalone exports remain unchanged, and no conditional browser export was added.
|
|
28
|
+
|
|
29
|
+
### Bundle size
|
|
30
|
+
|
|
31
|
+
- Before this change, the generated standalone artifact was 1,730,897 bytes (195,998 bytes gzip). After adding the zero-source-file browser alias it remains 1,730,897 bytes (195,998 bytes gzip). Minified esbuild bundles of `/browser` and `/standalone` are both 1,752,417 bytes (0-byte delta); the minified Vite `/browser` bundle is 2,088,016 bytes in the same development environment.
|
|
32
|
+
- A metadata-only entry was evaluated but not added. The current public metadata is coupled to the cumulative snapshot registry, and splitting it would introduce another declaration and synchronization boundary without an approved consumer or measured package-level benefit.
|
|
10
33
|
|
|
11
34
|
## [0.5.0] - 2026-08-31
|
|
12
35
|
|
|
@@ -46,7 +69,9 @@ Dates for published releases are the UTC publication dates recorded by npm.
|
|
|
46
69
|
- Added synchronous structural and semantic validation for parsed JavaScript values with deterministic diagnostics and exact selector dispatch.
|
|
47
70
|
- Added ESM browser support, TypeScript declarations, embedded schema provenance, frozen fixtures, and package-content checks.
|
|
48
71
|
|
|
49
|
-
[Unreleased]: https://github.com/mcpdesc/
|
|
72
|
+
[Unreleased]: https://github.com/mcpdesc/core/compare/validator-v0.7.0...HEAD
|
|
73
|
+
[0.7.0]: https://github.com/mcpdesc/core/releases/tag/validator-v0.7.0
|
|
74
|
+
[0.6.0]: https://github.com/mcpdesc/mcpdesc-specification/compare/validator-v0.5.0...validator-v0.6.0
|
|
50
75
|
[0.5.0]: https://github.com/mcpdesc/mcpdesc-specification/compare/17cc533e79b19ea2dbc1edcf06e30ba68a7d9b79...validator-v0.5.0
|
|
51
76
|
[0.4.0]: https://www.npmjs.com/package/@mcpdesc/validator/v/0.4.0
|
|
52
77
|
[0.3.0]: https://github.com/mcpdesc/mcpdesc-specification/releases/tag/validator-v0.3.0
|
package/MODIFICATIONS.md
CHANGED
|
@@ -4,6 +4,15 @@ This file records material imported from `cisco-open/mcptoolkit-contract` and su
|
|
|
4
4
|
|
|
5
5
|
The exact source repository and commit are recorded in [`ORIGIN.md`](ORIGIN.md).
|
|
6
6
|
|
|
7
|
+
## Validator repository migration — 2026-09-02
|
|
8
|
+
|
|
9
|
+
The complete `@mcpdesc/validator@0.6.0` package source and package-local tests
|
|
10
|
+
were moved from `mcpdesc/mcpdesc-specification` commit
|
|
11
|
+
`6eb1b54330f8b7dc11468c7e31614214c7521cd0` into `mcpdesc/core`. Package metadata,
|
|
12
|
+
release documentation, and repository guidance were updated for the new
|
|
13
|
+
maintenance location. Existing immutable snapshot implementations, embedded
|
|
14
|
+
schemas, frozen fixtures, diagnostics, and runtime behavior were not changed.
|
|
15
|
+
|
|
7
16
|
## Repository bootstrap — 2026-07-28
|
|
8
17
|
|
|
9
18
|
| File or path | Change | Reason |
|
package/ORIGIN.md
CHANGED
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
# Origin and provenance
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Validator repository migration
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
`@mcpdesc/validator` versions through `0.6.0` were maintained in the MCP
|
|
6
|
+
Description specification repository. Version `0.7.0` moves the package to the
|
|
7
|
+
MCP Description tooling repository without changing its public API or the
|
|
8
|
+
behavior and bytes of its published immutable snapshot implementations.
|
|
9
|
+
|
|
10
|
+
| Field | Value |
|
|
11
|
+
|---|---|
|
|
12
|
+
| Source repository | `https://github.com/mcpdesc/mcpdesc-specification` |
|
|
13
|
+
| Source commit | `6eb1b54330f8b7dc11468c7e31614214c7521cd0` |
|
|
14
|
+
| Source package | `packages/validator` (`@mcpdesc/validator@0.6.0`) |
|
|
15
|
+
| Destination repository | `https://github.com/mcpdesc/core` |
|
|
16
|
+
| Destination package | `packages/validator` |
|
|
17
|
+
| Migration date | `2026-09-02` |
|
|
18
|
+
|
|
19
|
+
The specification repository continues to own normative text, canonical
|
|
20
|
+
schemas, and mutable draft fixtures. This package owns executable validation,
|
|
21
|
+
immutable runtime snapshots, frozen package-test fixtures, and its public API.
|
|
22
|
+
|
|
23
|
+
MCP Description v0.7.0 originated in the Cisco Open `mcptoolkit-contract`
|
|
24
|
+
repository and remains the current stable release as of 2026-07-28. The
|
|
25
|
+
specification repository imported that material as the basis for v0.8.0
|
|
26
|
+
community work and created the validator package from it. Neither repository
|
|
27
|
+
migration is a copyright assignment or donation.
|
|
9
28
|
|
|
10
29
|
## Source import
|
|
11
30
|
|
|
@@ -17,4 +36,7 @@ existing contributions.
|
|
|
17
36
|
| Method | History-preserving filtered import (`git-filter-repo`); commit hashes rewritten by path filtering |
|
|
18
37
|
| Imported paths | `spec/**`, `schemas/mcp-description/**`, `schemas/latest.json`, `LICENSE`, `NOTICE` |
|
|
19
38
|
|
|
20
|
-
The imported v0.7.0 JSON Schemas are preserved byte-for-byte
|
|
39
|
+
The imported v0.7.0 JSON Schemas are preserved byte-for-byte in their immutable
|
|
40
|
+
validator snapshots. The v0.7.0 specification text is not stored here; its
|
|
41
|
+
canonical source remains the upstream repository above. Changes to imported
|
|
42
|
+
material are recorded in [`MODIFICATIONS.md`](MODIFICATIONS.md) and Git history.
|
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Isomorphic structural and semantic validation for immutable MCP Description specification snapshots.
|
|
4
4
|
|
|
5
|
-
Version `0.
|
|
5
|
+
Version `0.7.0` cumulatively supports these immutable snapshots. This release
|
|
6
|
+
moves package maintenance from the MCP Description specification repository to
|
|
7
|
+
the MCP Description tooling repository without changing conformance behavior.
|
|
6
8
|
|
|
7
9
|
| Selector | Tag | Embedded schema SHA-256 |
|
|
8
10
|
|---|---|---|
|
|
@@ -32,15 +34,23 @@ Callers provide an already parsed JavaScript value. JSON and YAML parsing are ou
|
|
|
32
34
|
|
|
33
35
|
The `options` argument and exact `specification` selector are required. The unqualified selector `0.8.0` is intentionally unsupported because draft and release-candidate iterations are immutable compatibility contracts.
|
|
34
36
|
|
|
35
|
-
###
|
|
37
|
+
### Entry points
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
| Entry | Strict CSP without `unsafe-eval` | Fixed MCP Description schemas | Document-provided schemas |
|
|
40
|
+
|---|---|---|---|
|
|
41
|
+
| `@mcpdesc/validator` | No | Compiled by AJV at runtime | Compiled or interpreted at runtime |
|
|
42
|
+
| `@mcpdesc/validator/browser` | Yes | Precompiled during package development | Interpreted at runtime |
|
|
43
|
+
| `@mcpdesc/validator/standalone` | Yes | Precompiled during package development | Interpreted at runtime |
|
|
44
|
+
|
|
45
|
+
Browser applications that prohibit dynamic code generation should use the descriptive CSP-safe browser entry:
|
|
38
46
|
|
|
39
47
|
```js
|
|
40
|
-
import { validateMcpDescription } from '@mcpdesc/validator/
|
|
48
|
+
import { validateMcpDescription } from '@mcpdesc/validator/browser';
|
|
41
49
|
```
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
The `/browser` entry is a public alias for the existing `/standalone` implementation. `/standalone` remains supported for backward compatibility. Both have the same synchronous API, selectors, diagnostics, and offline external-reference behavior as the default entry. Fixed MCP Description schemas and JSON Schema meta-schemas are precompiled during package development; document-provided Tool and Elicitation schemas use the package's interpreted JSON Schema dependency, so neither entry uses `eval` or `new Function` or requires `unsafe-eval`. These entries are larger and slower than the default AJV-based entry and are JavaScript, not WASM.
|
|
52
|
+
|
|
53
|
+
The default entry remains unchanged and uses AJV runtime compilation. Applications that need dynamic schema compilation can use it where their runtime policy permits dynamic code generation. Importing it may fail when a browser enforces strict CSP. The package intentionally does not select a different implementation through conditional exports; consumers choose the required behavior explicitly.
|
|
44
54
|
|
|
45
55
|
## Snapshot resolution
|
|
46
56
|
|
|
@@ -101,11 +111,12 @@ The package exports frozen `supportedSpecifications`, `supportedProtocolVersions
|
|
|
101
111
|
|
|
102
112
|
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.
|
|
103
113
|
|
|
104
|
-
The runtime bundles its schema, performs no network fetches for external schema references, and imports no Node.js built-ins. Unresolved external Tool-schema references produce incomplete-validation warnings and are preserved.
|
|
114
|
+
The runtime bundles its schema, performs no network fetches for external schema references, and imports no Node.js built-ins. Unresolved external Tool-schema references produce incomplete-validation warnings and are preserved. All three ESM entry points support Node.js 20 or later and browser bundlers.
|
|
105
115
|
|
|
106
116
|
## Snapshot lifecycle
|
|
107
117
|
|
|
108
|
-
For each approved specification snapshot, maintainers
|
|
118
|
+
For each approved specification snapshot, maintainers import artifacts from an
|
|
119
|
+
exact specification repository tag or commit and then:
|
|
109
120
|
|
|
110
121
|
1. Add a versioned implementation under `src/snapshots/<selector>/` with its exact selector, snapshot tag, embedded schema, schema SHA-256 digest, and semantic rules. Existing snapshot directories remain unchanged.
|
|
111
122
|
2. Freeze the matching fixture corpus under `test/snapshots/<selector>/fixtures/`. Package tests must not read mutable `spec/draft/fixtures/` for an already published selector.
|
|
@@ -114,7 +125,15 @@ For each approved specification snapshot, maintainers:
|
|
|
114
125
|
|
|
115
126
|
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.
|
|
116
127
|
|
|
117
|
-
|
|
128
|
+
Specification approval and imported supporting code do not authorize package
|
|
129
|
+
publication. During release review, a maintainer explicitly decides the
|
|
130
|
+
validator package version and npm dist-tag, reviews the exact imported source
|
|
131
|
+
and frozen fixture provenance, runs the full checks, and inspects the tarball.
|
|
132
|
+
The trusted-publishing workflow requires an annotated
|
|
133
|
+
`validator-v<semver>` tag whose version matches this package and whose commit is
|
|
134
|
+
the current `origin/main` tip. It publishes SemVer prereleases with npm `next`
|
|
135
|
+
and stable versions with `latest`. Scripts and other CI workflows do not choose
|
|
136
|
+
versions, create tags, or publish packages.
|
|
118
137
|
|
|
119
138
|
## Development checks
|
|
120
139
|
|
|
@@ -127,4 +146,4 @@ npm run test:browser --workspace @mcpdesc/validator
|
|
|
127
146
|
npm run test:package --workspace @mcpdesc/validator
|
|
128
147
|
```
|
|
129
148
|
|
|
130
|
-
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,
|
|
149
|
+
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.
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcpdesc/validator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Structural and semantic validation for MCP Description snapshots",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/mcpdesc/
|
|
10
|
+
"url": "git+https://github.com/mcpdesc/core.git",
|
|
11
11
|
"directory": "packages/validator"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"types": "./index.d.ts",
|
|
19
19
|
"import": "./src/index.js"
|
|
20
20
|
},
|
|
21
|
+
"./browser": {
|
|
22
|
+
"types": "./index.d.ts",
|
|
23
|
+
"import": "./standalone.js"
|
|
24
|
+
},
|
|
21
25
|
"./standalone": {
|
|
22
26
|
"types": "./index.d.ts",
|
|
23
27
|
"import": "./standalone.js"
|
|
@@ -37,7 +41,9 @@
|
|
|
37
41
|
],
|
|
38
42
|
"scripts": {
|
|
39
43
|
"build:standalone": "node scripts/build-standalone.mjs",
|
|
40
|
-
"
|
|
44
|
+
"check:snapshots": "node scripts/check-snapshot-integrity.mjs",
|
|
45
|
+
"import:snapshot": "node scripts/import-snapshot.mjs",
|
|
46
|
+
"test": "npm run check:snapshots && npm run build:standalone && node --test test/*.test.js && npm run test:types && npm run test:browser && npm run test:package",
|
|
41
47
|
"test:browser": "node scripts/check-browser-bundle.mjs",
|
|
42
48
|
"test:package": "node scripts/check-package.mjs",
|
|
43
49
|
"test:types": "tsc --project test/types/tsconfig.json && node scripts/check-declarations.mjs"
|
|
@@ -51,6 +57,7 @@
|
|
|
51
57
|
"devDependencies": {
|
|
52
58
|
"esbuild": "^0.25.0",
|
|
53
59
|
"typescript": "^5.9.0",
|
|
60
|
+
"vite": "^6.4.3",
|
|
54
61
|
"yaml": "^2.9.0"
|
|
55
62
|
}
|
|
56
63
|
}
|