Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 2 additions & 51 deletions schemas/mcpb-manifest-latest.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -355,13 +313,6 @@
],
"additionalProperties": false
}
},
"_meta": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {}
}
}
},
"required": [
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/latest.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./0.3.js";
export * from "./0.2.js";
2 changes: 1 addition & 1 deletion src/schemas_loose/latest.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./0.3.js";
export * from "./0.2.js";
4 changes: 3 additions & 1 deletion src/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/icon-validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 7 additions & 7 deletions test/schemas.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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",
Expand Down Expand Up @@ -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);
Expand All @@ -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);
});

Expand All @@ -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);
});
});
Expand All @@ -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);
});

Expand All @@ -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);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/valid-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"manifest_version": "0.3",
"manifest_version": "0.2",
"name": "test-extension",
"display_name": "Test Extension",
"version": "1.0.0",
Expand Down