diff --git a/src/cli/init.ts b/src/cli/init.ts index 1a390fa..0d2df69 100644 --- a/src/cli/init.ts +++ b/src/cli/init.ts @@ -2,7 +2,7 @@ import { confirm, input, select } from "@inquirer/prompts"; import { existsSync, readFileSync, writeFileSync } from "fs"; import { basename, join, resolve } from "path"; -import { CURRENT_MANIFEST_VERSION } from "../schemas/0.2.js"; +import { MANIFEST_VERSION } from "../schemas/0.2.js"; import type { McpbManifest } from "../types.js"; interface PackageJson { @@ -774,7 +774,7 @@ export function buildManifest( const { keywords, license, repository } = optionalFields; return { - manifest_version: CURRENT_MANIFEST_VERSION, + manifest_version: MANIFEST_VERSION, name, ...(displayName && displayName !== name ? { display_name: displayName } diff --git a/src/cli/pack.ts b/src/cli/pack.ts index acf136d..30ce068 100644 --- a/src/cli/pack.ts +++ b/src/cli/pack.ts @@ -13,7 +13,7 @@ import { basename, join, relative, resolve, sep } from "path"; import { getAllFilesWithCount, readMcpbIgnorePatterns } from "../node/files.js"; import { validateManifest } from "../node/validate.js"; -import { CURRENT_MANIFEST_VERSION, McpbManifestSchema } from "../schemas/0.2.js"; +import { MANIFEST_VERSION, McpbManifestSchema } from "../schemas/0.2.js"; import { getLogger } from "../shared/log.js"; import { initExtension } from "./init.js"; @@ -102,12 +102,12 @@ export async function packExtension({ } const manifestVersion = manifest.manifest_version || manifest.dxt_version; - if (manifestVersion !== CURRENT_MANIFEST_VERSION) { + if (manifestVersion !== MANIFEST_VERSION) { logger.error( - `ERROR: Manifest version mismatch. Expected "${CURRENT_MANIFEST_VERSION}", found "${manifestVersion}"`, + `ERROR: Manifest version mismatch. Expected "${MANIFEST_VERSION}", found "${manifestVersion}"`, ); logger.error( - ` Please update the manifest_version in your manifest.json to "${CURRENT_MANIFEST_VERSION}"`, + ` Please update the manifest_version in your manifest.json to "${MANIFEST_VERSION}"`, ); return false; } diff --git a/src/schemas/0.1.ts b/src/schemas/0.1.ts index 1f7ece2..f478c3e 100644 --- a/src/schemas/0.1.ts +++ b/src/schemas/0.1.ts @@ -1,6 +1,6 @@ import * as z from "zod"; -export const CURRENT_MANIFEST_VERSION = "0.2"; +export const MANIFEST_VERSION = "0.1"; export const McpServerConfigSchema = z.strictObject({ command: z.string(), diff --git a/src/schemas/0.2.ts b/src/schemas/0.2.ts index e44ba2a..86332bd 100644 --- a/src/schemas/0.2.ts +++ b/src/schemas/0.2.ts @@ -1,6 +1,8 @@ import * as z from "zod"; -export const McpServerConfigSchema = z.object({ +export const MANIFEST_VERSION = "0.2"; + +export const McpServerConfigSchema = z.strictObject({ command: z.string(), args: z.array(z.string()).optional(), env: z.record(z.string(), z.string()).optional(),