From 67938cdab9206eefd75eb8a58bc0f19e38cbaa49 Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Wed, 29 Oct 2025 16:30:32 -0700 Subject: [PATCH] feat: export versioned schemas in package.json Add exports for versioned schemas to allow consumers to import: - ./schemas: All versioned schemas (v0_1, v0_2, v0_3, latest) - ./schemas/*: Specific schema versions (./schemas/0.1, ./schemas/any, etc.) - ./schemas-loose: Loose validation schemas This enables cleaner imports like: import { McpbManifestSchema } from '@anthropic-ai/mcpb/schemas/any' import * as v0_2 from '@anthropic-ai/mcpb/schemas/0.2' import * as schemas from '@anthropic-ai/mcpb/schemas' --- package.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3a01cce..ea00746 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,22 @@ "import": "./dist/cli.js", "require": "./dist/cli.js" }, - "./mcpb-manifest.schema.json": "./dist/mcpb-manifest.schema.json" + "./mcpb-manifest.schema.json": "./dist/mcpb-manifest.schema.json", + "./schemas": { + "types": "./dist/schemas/index.d.ts", + "import": "./dist/schemas/index.js", + "require": "./dist/schemas/index.js" + }, + "./schemas/*": { + "types": "./dist/schemas/*.d.ts", + "import": "./dist/schemas/*.js", + "require": "./dist/schemas/*.js" + }, + "./schemas-loose": { + "types": "./dist/schemas-loose.d.ts", + "import": "./dist/schemas-loose.js", + "require": "./dist/schemas-loose.js" + } }, "bin": "dist/cli/cli.js", "files": [