Revert "feat: replace manifest_version with $schema field"

This reverts commit 7997e72758.
This commit is contained in:
Joan Xie 2025-08-27 11:24:18 -07:00
commit 5a46a05108
No known key found for this signature in database
3 changed files with 30 additions and 94 deletions

View file

@ -773,7 +773,7 @@ export function buildManifest(
const { keywords, license, repository } = optionalFields;
return {
$schema: "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
manifest_version: "0.1",
name,
...(displayName && displayName !== name
? { display_name: displayName }

View file

@ -79,7 +79,8 @@ export const McpbUserConfigValuesSchema = z.record(
export const McpbManifestSchema = z
.object({
$schema: z.string().optional(),
dxt_version: z.string().optional().describe("@deprecated - Use $schema instead"),
dxt_version: z.string().optional().describe("@deprecated Use manifest_version instead"),
manifest_version: z.string().optional(),
name: z.string(),
display_name: z.string().optional(),
version: z.string(),
@ -105,9 +106,9 @@ export const McpbManifestSchema = z
.optional(),
})
.refine(
(data) => !!(data.$schema || data.dxt_version),
(data) => !!(data.dxt_version || data.manifest_version),
{
message: "Either '$schema' or 'dxt_version' (deprecated) must be provided",
message: "Either 'dxt_version' (deprecated) or 'manifest_version' must be provided",
}
);

View file

@ -79,7 +79,8 @@ export const McpbUserConfigValuesSchema = z.record(
export const McpbManifestSchema = z
.strictObject({
$schema: z.string().optional(),
dxt_version: z.string().optional().describe("@deprecated - Use $schema instead"),
dxt_version: z.string().optional().describe("@deprecated Use manifest_version instead"),
manifest_version: z.string().optional(),
name: z.string(),
display_name: z.string().optional(),
version: z.string(),
@ -105,9 +106,9 @@ export const McpbManifestSchema = z
.optional(),
})
.refine(
(data) => !!(data.$schema || data.dxt_version),
(data) => !!(data.dxt_version || data.manifest_version),
{
message: "Either '$schema' or 'dxt_version' (deprecated) must be provided",
message: "Either 'dxt_version' (deprecated) or 'manifest_version' must be provided",
}
);