Revert "feat: replace manifest_version with $schema field"
This reverts commit 7997e72758.
This commit is contained in:
parent
1de373a9c9
commit
5a46a05108
3 changed files with 30 additions and 94 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue