feat: add any schema

This commit is contained in:
Joan Xie 2025-10-29 17:06:55 -07:00
commit c29d1000f3
No known key found for this signature in database
2 changed files with 16 additions and 0 deletions

15
src/schemas/any.ts Normal file
View file

@ -0,0 +1,15 @@
import * as z from "zod";
import * as v0_1 from "./0.1.js";
import * as v0_2 from "./0.2.js";
import * as v0_3 from "./0.3.js";
/**
* Union schema that accepts any supported manifest version (0.1, 0.2, 0.3).
* Use this when you need to validate manifests of any version.
*/
export const McpbManifestSchema = z.union([
v0_1.McpbManifestSchema,
v0_2.McpbManifestSchema,
v0_3.McpbManifestSchema,
]);

View file

@ -1,6 +1,7 @@
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 any from "./any.js";
export * as latest from "./latest.js";
export {
MANIFEST_VERSION as LATEST_MANIFEST_VERSION,