feat: generate JSON schemas for all manifest versions

Updated build script to generate JSON schemas for all historical manifest
versions (v0.1, v0.2, v0.3) in addition to the latest version.

Changes:
- Generate mcpb-manifest-v0.1.schema.json
- Generate mcpb-manifest-v0.2.schema.json
- Generate mcpb-manifest-v0.3.schema.json
- Generate mcpb-manifest-latest.schema.json
- Keep mcpb-manifest.schema.json as alias for latest
- All schemas generated to both dist/ and schemas/ directories
- Added exports in package.json for all versioned schemas

Benefits:
- Tools can validate against specific manifest versions
- Backwards compatibility for all historical versions
- Latest schema always available at predictable path
- JSON schema files match the Zod schema versions

Usage:
import manifestSchema from '@anthropic-ai/mcpb/mcpb-manifest-v0.2.schema.json'
import latestSchema from '@anthropic-ai/mcpb/mcpb-manifest-latest.schema.json'
This commit is contained in:
Joan Xie 2025-10-29 16:39:57 -07:00
commit b5fa7df6eb
No known key found for this signature in database

View file

@ -28,6 +28,10 @@
"require": "./dist/cli.js"
},
"./mcpb-manifest.schema.json": "./dist/mcpb-manifest.schema.json",
"./mcpb-manifest-v0.1.schema.json": "./dist/mcpb-manifest-v0.1.schema.json",
"./mcpb-manifest-v0.2.schema.json": "./dist/mcpb-manifest-v0.2.schema.json",
"./mcpb-manifest-v0.3.schema.json": "./dist/mcpb-manifest-v0.3.schema.json",
"./mcpb-manifest-latest.schema.json": "./dist/mcpb-manifest-latest.schema.json",
"./schemas": {
"types": "./dist/schemas/index.d.ts",
"import": "./dist/schemas/index.js",