From efe9e3345dd5d612257bab157dd0e0b935dc8722 Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Mon, 3 Nov 2025 15:33:31 -0800 Subject: [PATCH] Make McpbManifest point to v0.2 for backwards compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change McpbManifest type to point to v0.2 schema instead of McpbManifestAny - Add DEFAULT_MANIFEST_VERSION export to browser.ts - Update test fixtures to use manifest_version "0.2" when using McpbManifest type - Keep @deprecated annotation directing users to McpbManifestAny for multi-version support This maintains backwards compatibility for existing code using McpbManifest while encouraging new code to use McpbManifestAny for broader version support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/browser.ts | 1 + src/types.ts | 4 +++- test/config.test.ts | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/browser.ts b/src/browser.ts index 71c124f..037b024 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -1,4 +1,5 @@ // Browser-compatible exports export * from "./schemas/index.js"; export * from "./shared/config.js"; +export * from "./shared/constants.js"; export * from "./types.js"; diff --git a/src/types.ts b/src/types.ts index 6ca81ff..20296af 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,6 +1,7 @@ import type * as z from "zod"; import type { McpbManifestSchema as McpbManifestSchemaAny } from "./schemas/any.js"; +import type { McpbManifestSchema as McpbManifestSchemaV0_2 } from "./schemas/0.2.js"; import type { McpbManifestAuthorSchema, McpbManifestCompatibilitySchema, @@ -52,9 +53,10 @@ export type McpbUserConfigValues = z.infer; export type McpbManifestAny = z.infer; /** + * McpbManifest type for v0.2 (default version) for backwards compatibility * @deprecated Use McpbManifestAny instead to support all manifest versions. */ -export type McpbManifest = McpbManifestAny; +export type McpbManifest = z.infer; /** * Information about a MCPB package signature diff --git a/test/config.test.ts b/test/config.test.ts index f7a0eb8..062c66e 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -90,7 +90,7 @@ describe("getMcpConfigForManifest", () => { }; const baseManifest: McpbManifest = { - manifest_version: "0.3", + manifest_version: "0.2", name: "test-extension", version: "1.0.0", description: "Test extension", @@ -305,7 +305,7 @@ describe("getMcpConfigForManifest", () => { describe("hasRequiredConfigMissing", () => { const baseManifest: McpbManifest = { - manifest_version: "0.3", + manifest_version: "0.2", name: "test-extension", version: "1.0.0", description: "Test extension",