From 6e607fe004ee09e82711896eea2b523a1ff7e595 Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Fri, 24 Oct 2025 20:50:56 -0700 Subject: [PATCH 1/6] 0.3 -> next --- src/schemas/index.ts | 2 +- src/schemas/{0.3.ts => vNext.ts} | 6 ++---- test/schemas.test.ts | 14 +++++++------- 3 files changed, 10 insertions(+), 12 deletions(-) rename src/schemas/{0.3.ts => vNext.ts} (96%) diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 1b7c64b..bd82cff 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -1,6 +1,6 @@ export * as v0_1 from "./0.1.js"; export * as v0_2 from "./0.2.js"; -export * as v0_3 from "./0.3.js"; +export * as vNext from "./vNext.js"; export * as latest from "./latest.js"; export { MANIFEST_VERSION as LATEST_MANIFEST_VERSION, diff --git a/src/schemas/0.3.ts b/src/schemas/vNext.ts similarity index 96% rename from src/schemas/0.3.ts rename to src/schemas/vNext.ts index 3862ba4..470533e 100644 --- a/src/schemas/0.3.ts +++ b/src/schemas/vNext.ts @@ -1,8 +1,6 @@ // WIP: This schema is under development and not yet finalized import * as z from "zod"; -export const MANIFEST_VERSION = "0.3"; - export const McpServerConfigSchema = z.strictObject({ command: z.string(), args: z.array(z.string()).optional(), @@ -81,10 +79,10 @@ export const McpbManifestSchema = z .strictObject({ $schema: z.string().optional(), dxt_version: z - .literal(MANIFEST_VERSION) + .string() .optional() .describe("@deprecated Use manifest_version instead"), - manifest_version: z.literal(MANIFEST_VERSION).optional(), + manifest_version: z.string().optional(), name: z.string(), display_name: z.string().optional(), version: z.string(), diff --git a/test/schemas.test.ts b/test/schemas.test.ts index f88fe47..f94175b 100644 --- a/test/schemas.test.ts +++ b/test/schemas.test.ts @@ -1,7 +1,7 @@ import { readFileSync } from "fs"; import { join } from "path"; -import { McpbManifestSchema, v0_3 } from "../src/schemas/index.js"; +import { McpbManifestSchema, vNext } from "../src/schemas/index.js"; describe("McpbManifestSchema", () => { it("should validate a valid manifest", () => { @@ -139,7 +139,7 @@ describe("McpbManifestSchema", () => { describe("_meta", () => { const base = { - manifest_version: "0.3", + manifest_version: "vNext", name: "client-ext-test", version: "1.0.0", description: "Test manifest", @@ -162,7 +162,7 @@ describe("McpbManifestSchema", () => { "com.apple.darwin": { bundle_id: "com.example.app", notarized: true }, }, }; - const result = v0_3.McpbManifestSchema.safeParse(manifest); + const result = vNext.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(true); }); @@ -176,7 +176,7 @@ describe("McpbManifestSchema", () => { >, }, }; - const result = v0_3.McpbManifestSchema.safeParse(manifest); + const result = vNext.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(false); if (!result.success) { const messages = result.error.issues.map((i) => i.message).join("\n"); @@ -191,7 +191,7 @@ describe("McpbManifestSchema", () => { "com.apple.darwin": [] as unknown as Record, }, }; - const result = v0_3.McpbManifestSchema.safeParse(manifest); + const result = vNext.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(false); }); @@ -202,13 +202,13 @@ describe("McpbManifestSchema", () => { custom: null as unknown as Record, }, }; - const result = v0_3.McpbManifestSchema.safeParse(manifest); + const result = vNext.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(false); }); it("allows empty object for _meta", () => { const manifest = { ...base, _meta: {} }; - const result = v0_3.McpbManifestSchema.safeParse(manifest); + const result = vNext.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(true); }); }); From 110a4071a3a347ea4d86cfd7aec4d6c5f783139b Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Fri, 24 Oct 2025 20:52:58 -0700 Subject: [PATCH 2/6] remove import --- src/schemas/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/schemas/index.ts b/src/schemas/index.ts index bd82cff..9e4a580 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -1,6 +1,5 @@ export * as v0_1 from "./0.1.js"; export * as v0_2 from "./0.2.js"; -export * as vNext from "./vNext.js"; export * as latest from "./latest.js"; export { MANIFEST_VERSION as LATEST_MANIFEST_VERSION, From 058349d218e6e3ff5dbbd2318a5e43635aa01639 Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Fri, 24 Oct 2025 20:54:05 -0700 Subject: [PATCH 3/6] cleanup --- src/schemas/vNext.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/schemas/vNext.ts b/src/schemas/vNext.ts index 470533e..055d3ea 100644 --- a/src/schemas/vNext.ts +++ b/src/schemas/vNext.ts @@ -1,6 +1,8 @@ // WIP: This schema is under development and not yet finalized import * as z from "zod"; +export const MANIFEST_VERSION = "0.3"; + export const McpServerConfigSchema = z.strictObject({ command: z.string(), args: z.array(z.string()).optional(), @@ -78,11 +80,7 @@ export const McpbUserConfigValuesSchema = z.record( export const McpbManifestSchema = z .strictObject({ $schema: z.string().optional(), - dxt_version: z - .string() - .optional() - .describe("@deprecated Use manifest_version instead"), - manifest_version: z.string().optional(), + manifest_version: z.literal(MANIFEST_VERSION).optional(), name: z.string(), display_name: z.string().optional(), version: z.string(), From c7e9bb8ec5eaf192ab71088e3d89f3eec6aa9f01 Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Fri, 24 Oct 2025 20:54:34 -0700 Subject: [PATCH 4/6] vNext --- src/schemas/vNext.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/vNext.ts b/src/schemas/vNext.ts index 055d3ea..d54759f 100644 --- a/src/schemas/vNext.ts +++ b/src/schemas/vNext.ts @@ -1,7 +1,7 @@ // WIP: This schema is under development and not yet finalized import * as z from "zod"; -export const MANIFEST_VERSION = "0.3"; +export const MANIFEST_VERSION = "vNext"; export const McpServerConfigSchema = z.strictObject({ command: z.string(), From 55b831d3f92da25bc9d5bdf3c3f97c9deb551e6d Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Fri, 24 Oct 2025 20:55:35 -0700 Subject: [PATCH 5/6] remove support for dxt_version --- src/schemas/vNext.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/schemas/vNext.ts b/src/schemas/vNext.ts index d54759f..6b3ba7a 100644 --- a/src/schemas/vNext.ts +++ b/src/schemas/vNext.ts @@ -106,10 +106,6 @@ export const McpbManifestSchema = z .record(z.string(), McpbUserConfigurationOptionSchema) .optional(), _meta: z.record(z.string(), z.record(z.string(), z.any())).optional(), - }) - .refine((data) => !!(data.dxt_version || data.manifest_version), { - message: - "Either 'dxt_version' (deprecated) or 'manifest_version' must be provided", }); export const McpbSignatureInfoSchema = z.strictObject({ From 874e02d433f5bb66235e0bddda76d54510417b9a Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Fri, 24 Oct 2025 20:58:25 -0700 Subject: [PATCH 6/6] yarn lint --- src/schemas/0.1.ts | 2 +- src/schemas/vNext.ts | 59 ++++++++++++++++++++++---------------------- test/schemas.test.ts | 1 - 3 files changed, 30 insertions(+), 32 deletions(-) diff --git a/src/schemas/0.1.ts b/src/schemas/0.1.ts index 3ff5453..4d77ccc 100644 --- a/src/schemas/0.1.ts +++ b/src/schemas/0.1.ts @@ -98,7 +98,7 @@ export const McpbManifestSchema = z screenshots: z.array(z.string()).optional(), server: McpbManifestServerSchema, tools: z.array(McpbManifestToolSchema).optional(), - tools_generated: z.boolean().optional(), + tools_generated: z.boolean().optional(), prompts: z.array(McpbManifestPromptSchema).optional(), prompts_generated: z.boolean().optional(), keywords: z.array(z.string()).optional(), diff --git a/src/schemas/vNext.ts b/src/schemas/vNext.ts index 6b3ba7a..714937d 100644 --- a/src/schemas/vNext.ts +++ b/src/schemas/vNext.ts @@ -77,36 +77,35 @@ export const McpbUserConfigValuesSchema = z.record( z.union([z.string(), z.number(), z.boolean(), z.array(z.string())]), ); -export const McpbManifestSchema = z - .strictObject({ - $schema: z.string().optional(), - manifest_version: z.literal(MANIFEST_VERSION).optional(), - name: z.string(), - display_name: z.string().optional(), - version: z.string(), - description: z.string(), - long_description: z.string().optional(), - author: McpbManifestAuthorSchema, - repository: McpbManifestRepositorySchema.optional(), - homepage: z.string().url().optional(), - documentation: z.string().url().optional(), - support: z.string().url().optional(), - icon: z.string().optional(), - screenshots: z.array(z.string()).optional(), - server: McpbManifestServerSchema, - tools: z.array(McpbManifestToolSchema).optional(), - tools_generated: z.boolean().optional(), - prompts: z.array(McpbManifestPromptSchema).optional(), - prompts_generated: z.boolean().optional(), - keywords: z.array(z.string()).optional(), - license: z.string().optional(), - privacy_policies: z.array(z.string().url()).optional(), - compatibility: McpbManifestCompatibilitySchema.optional(), - user_config: z - .record(z.string(), McpbUserConfigurationOptionSchema) - .optional(), - _meta: z.record(z.string(), z.record(z.string(), z.any())).optional(), - }); +export const McpbManifestSchema = z.strictObject({ + $schema: z.string().optional(), + manifest_version: z.literal(MANIFEST_VERSION).optional(), + name: z.string(), + display_name: z.string().optional(), + version: z.string(), + description: z.string(), + long_description: z.string().optional(), + author: McpbManifestAuthorSchema, + repository: McpbManifestRepositorySchema.optional(), + homepage: z.string().url().optional(), + documentation: z.string().url().optional(), + support: z.string().url().optional(), + icon: z.string().optional(), + screenshots: z.array(z.string()).optional(), + server: McpbManifestServerSchema, + tools: z.array(McpbManifestToolSchema).optional(), + tools_generated: z.boolean().optional(), + prompts: z.array(McpbManifestPromptSchema).optional(), + prompts_generated: z.boolean().optional(), + keywords: z.array(z.string()).optional(), + license: z.string().optional(), + privacy_policies: z.array(z.string().url()).optional(), + compatibility: McpbManifestCompatibilitySchema.optional(), + user_config: z + .record(z.string(), McpbUserConfigurationOptionSchema) + .optional(), + _meta: z.record(z.string(), z.record(z.string(), z.any())).optional(), +}); export const McpbSignatureInfoSchema = z.strictObject({ status: z.enum(["signed", "unsigned", "self-signed"]), diff --git a/test/schemas.test.ts b/test/schemas.test.ts index f94175b..bbffd4f 100644 --- a/test/schemas.test.ts +++ b/test/schemas.test.ts @@ -212,5 +212,4 @@ describe("McpbManifestSchema", () => { expect(result.success).toBe(true); }); }); - });