@mcpdesc/validator 0.2.0 → 0.4.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/README.md CHANGED
@@ -2,14 +2,16 @@
2
2
 
3
3
  Isomorphic structural and semantic validation for immutable MCP Description specification snapshots.
4
4
 
5
- Version `0.2.0` cumulatively supports these immutable snapshots:
5
+ Version `0.4.0` cumulatively supports these immutable snapshots and is intended for npm `latest` after the Draft 4 specification tag and package tarball are reviewed.
6
6
 
7
7
  | Selector | Tag | Embedded schema SHA-256 |
8
8
  |---|---|---|
9
9
  | `0.8.0-draft.1` | `v0.8.0-draft.1` | `4ceb6042c3fd31703199cd3db869ec5c35c17d2fe9ab7b2f5b96a2a3af0cebe4` |
10
10
  | `0.8.0-draft.2` | `v0.8.0-draft.2` | `ab692c1a5a0f7e5f29be1940aa8c64a56d4620be0a19d00cf0a64680b7e517fa` |
11
+ | `0.8.0-draft.3` | `v0.8.0-draft.3` | `8823c1f1946360b2a44d00920e2092e5e4acd139a1964befad4eb0bf3ce96002` |
12
+ | `0.8.0-draft.4` | `v0.8.0-draft.4` | `93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b` |
11
13
 
12
- This cumulative release is intended to receive the npm `latest` dist-tag after the Draft 2 tag and tarball are reviewed. Repository changes alone do not publish the package or create either tag.
14
+ Repository changes alone do not publish the package or create specification or validator tags.
13
15
 
14
16
  ## Usage
15
17
 
@@ -17,7 +19,7 @@ This cumulative release is intended to receive the npm `latest` dist-tag after t
17
19
  import { validateMcpDescription } from '@mcpdesc/validator';
18
20
 
19
21
  const result = validateMcpDescription(parsedDocument, {
20
- specification: '0.8.0-draft.2'
22
+ specification: '0.8.0-draft.4'
21
23
  });
22
24
 
23
25
  if (!result.valid) {
@@ -51,7 +53,7 @@ Structural paths start with AJV's instance path. A `required` error appends its
51
53
 
52
54
  ## Support metadata
53
55
 
54
- The package exports frozen `supportedSpecifications`, `supportedProtocolVersions`, and `specificationProvenance` values. Public validation dispatches through a registry keyed by exact specification selectors. The current selector set is `0.8.0-draft.1` and `0.8.0-draft.2`; the protocol-version export is the deduplicated union supported by those snapshots.
56
+ The package exports frozen `supportedSpecifications`, `supportedProtocolVersions`, and `specificationProvenance` values. 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`, and `0.8.0-draft.4`; the protocol-version export is the deduplicated union supported by those snapshots.
55
57
 
56
58
  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.
57
59
 
@@ -81,4 +83,4 @@ npm run test:browser --workspace @mcpdesc/validator
81
83
  npm run test:package --workspace @mcpdesc/validator
82
84
  ```
83
85
 
84
- 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, build both runtime snapshots for a browser target, and inspect `npm pack --dry-run --json` against the intended tarball contents, including both runtime snapshots and exclusion of test snapshots.
86
+ 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, build all runtime snapshots for a browser target, and inspect `npm pack --dry-run --json` against the intended tarball contents, including all runtime snapshots and exclusion of test snapshots.
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type McpDescriptionSpecification = '0.8.0-draft.1' | '0.8.0-draft.2';
1
+ export type McpDescriptionSpecification = '0.8.0-draft.1' | '0.8.0-draft.2' | '0.8.0-draft.3' | '0.8.0-draft.4';
2
2
 
3
3
  export type SupportedProtocolVersion =
4
4
  | '2024-11-05'
@@ -34,9 +34,17 @@ export interface SpecificationProvenance {
34
34
  readonly snapshotTag: 'v0.8.0-draft.2';
35
35
  readonly schemaSha256: 'ab692c1a5a0f7e5f29be1940aa8c64a56d4620be0a19d00cf0a64680b7e517fa';
36
36
  };
37
+ readonly '0.8.0-draft.3': {
38
+ readonly snapshotTag: 'v0.8.0-draft.3';
39
+ readonly schemaSha256: '8823c1f1946360b2a44d00920e2092e5e4acd139a1964befad4eb0bf3ce96002';
40
+ };
41
+ readonly '0.8.0-draft.4': {
42
+ readonly snapshotTag: 'v0.8.0-draft.4';
43
+ readonly schemaSha256: '93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b';
44
+ };
37
45
  }
38
46
 
39
- export declare const supportedSpecifications: readonly ['0.8.0-draft.1', '0.8.0-draft.2'];
47
+ 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'];
40
48
 
41
49
  export declare const supportedProtocolVersions: readonly [
42
50
  '2024-11-05',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpdesc/validator",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Structural and semantic validation for MCP Description snapshots",
5
5
  "type": "module",
6
6
  "types": "./index.d.ts",
package/src/index.js CHANGED
@@ -1,9 +1,13 @@
1
1
  import * as draft1 from './snapshots/0.8.0-draft.1/index.js';
2
2
  import * as draft2 from './snapshots/0.8.0-draft.2/index.js';
3
+ import * as draft3 from './snapshots/0.8.0-draft.3/index.js';
4
+ import * as draft4 from './snapshots/0.8.0-draft.4/index.js';
3
5
 
4
6
  const snapshots = Object.freeze({
5
7
  [draft1.specification]: draft1,
6
- [draft2.specification]: draft2
8
+ [draft2.specification]: draft2,
9
+ [draft3.specification]: draft3,
10
+ [draft4.specification]: draft4
7
11
  });
8
12
 
9
13
  export const supportedSpecifications = Object.freeze(Object.keys(snapshots));