From 5779cf0689dde517c3b99e4645ba2e0dd2cbaeb0 Mon Sep 17 00:00:00 2001 From: Bryan Thompson Date: Sat, 1 Nov 2025 11:43:34 -0500 Subject: [PATCH] fix: revert to v0.2 manifest for Claude Desktop compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude Desktop does not yet support v0.3 manifests (localization/theming features). Reverting LATEST_MANIFEST_VERSION to v0.2 until Desktop support is available. Changes: - Set LATEST_MANIFEST_VERSION back to "0.2" in src/shared/constants.ts - Updated src/schemas/latest.ts to export v0.2 schema - Updated src/schemas_loose/latest.ts to export v0.2 schema - Updated test manifests and test assertions to match new default - v0.3 schema remains available for testing via explicit import This fixes the issue where npx mcpb pack rejects v0.2 manifests that Claude Desktop requires, introduced in PR #132 (commit 1640ade). Fixes compatibility with Claude Desktop versions that only support v0.2. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- schemas/mcpb-manifest-latest.schema.json | 53 +----------------------- src/schemas/latest.ts | 2 +- src/schemas_loose/latest.ts | 2 +- src/shared/constants.ts | 4 +- test/icon-validation.test.ts | 2 +- test/schemas.test.ts | 14 +++---- test/valid-manifest.json | 2 +- 7 files changed, 16 insertions(+), 63 deletions(-) diff --git a/schemas/mcpb-manifest-latest.schema.json b/schemas/mcpb-manifest-latest.schema.json index 64471c5..fc522b9 100644 --- a/schemas/mcpb-manifest-latest.schema.json +++ b/schemas/mcpb-manifest-latest.schema.json @@ -6,12 +6,12 @@ }, "dxt_version": { "type": "string", - "const": "0.3", + "const": "0.2", "description": "@deprecated Use manifest_version instead" }, "manifest_version": { "type": "string", - "const": "0.3" + "const": "0.2" }, "name": { "type": "string" @@ -80,54 +80,12 @@ "icon": { "type": "string" }, - "icons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "src": { - "type": "string" - }, - "size": { - "type": "string", - "pattern": "^\\d+x\\d+$" - }, - "theme": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "src", - "size" - ], - "additionalProperties": false - } - }, "screenshots": { "type": "array", "items": { "type": "string" } }, - "localization": { - "type": "object", - "properties": { - "resources": { - "type": "string", - "pattern": "\\$\\{locale\\}" - }, - "default_locale": { - "type": "string", - "pattern": "^[A-Za-z0-9]{2,8}(?:-[A-Za-z0-9]{1,8})*$" - } - }, - "required": [ - "resources", - "default_locale" - ], - "additionalProperties": false - }, "server": { "type": "object", "properties": { @@ -355,13 +313,6 @@ ], "additionalProperties": false } - }, - "_meta": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": {} - } } }, "required": [ diff --git a/src/schemas/latest.ts b/src/schemas/latest.ts index e79a613..79797d0 100644 --- a/src/schemas/latest.ts +++ b/src/schemas/latest.ts @@ -1 +1 @@ -export * from "./0.3.js"; +export * from "./0.2.js"; diff --git a/src/schemas_loose/latest.ts b/src/schemas_loose/latest.ts index e79a613..79797d0 100644 --- a/src/schemas_loose/latest.ts +++ b/src/schemas_loose/latest.ts @@ -1 +1 @@ -export * from "./0.3.js"; +export * from "./0.2.js"; diff --git a/src/shared/constants.ts b/src/shared/constants.ts index 95a5cf4..ccc49cf 100644 --- a/src/shared/constants.ts +++ b/src/shared/constants.ts @@ -9,8 +9,10 @@ import { McpbManifestSchema as CurrentLooseManifestSchema } from "../schemas_loo /** * Latest manifest version - the version that new manifests should use + * Currently set to 0.2 for Claude Desktop compatibility + * (0.3 schema is available but not yet supported by Claude Desktop) */ -export const LATEST_MANIFEST_VERSION = "0.3" as const; +export const LATEST_MANIFEST_VERSION = "0.2" as const; /** * Map of manifest versions to their strict schemas diff --git a/test/icon-validation.test.ts b/test/icon-validation.test.ts index b55abd4..b3e8510 100644 --- a/test/icon-validation.test.ts +++ b/test/icon-validation.test.ts @@ -132,7 +132,7 @@ describe("Icon Validation", () => { function createTestManifest(filename: string, iconConfig: { icon?: string }) { const manifest = { - manifest_version: "0.3", + manifest_version: "0.2", name: "test-extension", version: "1.0.0", description: "Test extension for icon validation", diff --git a/test/schemas.test.ts b/test/schemas.test.ts index 70f181f..adbd7db 100644 --- a/test/schemas.test.ts +++ b/test/schemas.test.ts @@ -134,7 +134,7 @@ describe("McpbManifestSchema", () => { }, }; - const result = McpbManifestSchema.safeParse(fullManifest); + const result = v0_3.McpbManifestSchema.safeParse(fullManifest); expect(result.success).toBe(true); if (result.success) { @@ -152,7 +152,7 @@ describe("McpbManifestSchema", () => { serverTypes.forEach((type) => { const manifest = { - manifest_version: "0.3", + manifest_version: "0.2", name: "test", version: "1.0.0", description: "Test", @@ -270,7 +270,7 @@ describe("McpbManifestSchema", () => { default_locale: "en-US", }, }; - const result = McpbManifestSchema.safeParse(manifest); + const result = v0_3.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(false); if (!result.success) { const messages = result.error.issues.map((issue) => issue.message); @@ -286,7 +286,7 @@ describe("McpbManifestSchema", () => { default_locale: "en_us", }, }; - const result = McpbManifestSchema.safeParse(manifest); + const result = v0_3.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(false); }); @@ -298,7 +298,7 @@ describe("McpbManifestSchema", () => { default_locale: "en-US", }, }; - const result = McpbManifestSchema.safeParse(manifest); + const result = v0_3.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(true); }); }); @@ -322,7 +322,7 @@ describe("McpbManifestSchema", () => { ...base, icons: [{ src: "assets/icon.png", size: "16", theme: "light" }], }; - const result = McpbManifestSchema.safeParse(manifest); + const result = v0_3.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(false); }); @@ -331,7 +331,7 @@ describe("McpbManifestSchema", () => { ...base, icons: [{ src: "assets/icon.png", size: "128x128" }], }; - const result = McpbManifestSchema.safeParse(manifest); + const result = v0_3.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(true); }); }); diff --git a/test/valid-manifest.json b/test/valid-manifest.json index fcc9b9b..c2d121d 100644 --- a/test/valid-manifest.json +++ b/test/valid-manifest.json @@ -1,5 +1,5 @@ { - "manifest_version": "0.3", + "manifest_version": "0.2", "name": "test-extension", "display_name": "Test Extension", "version": "1.0.0",