-
Notifications
You must be signed in to change notification settings - Fork 187
Expand file tree
/
Copy pathconstants.ts
More file actions
64 lines (55 loc) · 2.12 KB
/
constants.ts
File metadata and controls
64 lines (55 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { McpbManifestSchema as ManifestSchemaV0_1 } from "../schemas/0.1.js";
import { McpbManifestSchema as ManifestSchemaV0_2 } from "../schemas/0.2.js";
import { McpbManifestSchema as ManifestSchemaV0_3 } from "../schemas/0.3.js";
import { McpbManifestSchema as CurrentManifestSchema } from "../schemas/latest.js";
import { McpbManifestSchema as LooseManifestSchemaV0_1 } from "../schemas_loose/0.1.js";
import { McpbManifestSchema as LooseManifestSchemaV0_2 } from "../schemas_loose/0.2.js";
import { McpbManifestSchema as LooseManifestSchemaV0_3 } from "../schemas_loose/0.3.js";
import { McpbManifestSchema as CurrentLooseManifestSchema } from "../schemas_loose/latest.js";
/**
* Default manifest version - the version that new manifests should use
* This is the version that most clients currently support
*/
export const DEFAULT_MANIFEST_VERSION = "0.2" as const;
/**
* Latest manifest version - the newest version of the manifest schema
*/
export const LATEST_MANIFEST_VERSION = "0.3" as const;
/**
* Map of manifest versions to their strict schemas
*/
export const MANIFEST_SCHEMAS = {
"0.1": ManifestSchemaV0_1,
"0.2": ManifestSchemaV0_2,
"0.3": ManifestSchemaV0_3,
} as const;
/**
* Valid manifest versions
*/
export const VALID_MANIFEST_VERSIONS = Object.keys(
MANIFEST_SCHEMAS,
) as Array<keyof typeof MANIFEST_SCHEMAS>;
/**
* Map of manifest versions to their loose schemas (with passthrough)
*/
export const MANIFEST_SCHEMAS_LOOSE = {
"0.1": LooseManifestSchemaV0_1,
"0.2": LooseManifestSchemaV0_2,
"0.3": LooseManifestSchemaV0_3,
} as const;
/**
* Get the latest manifest schema based on LATEST_MANIFEST_VERSION
*/
export const LATEST_MANIFEST_SCHEMA = CurrentManifestSchema;
/**
* Get the latest loose manifest schema based on LATEST_MANIFEST_VERSION
*/
export const LATEST_MANIFEST_SCHEMA_LOOSE = CurrentLooseManifestSchema;
/**
* Get the default manifest schema based on DEFAULT_MANIFEST_VERSION
*/
export const DEFAULT_MANIFEST_SCHEMA = ManifestSchemaV0_2;
/**
* Get the default loose manifest schema based on DEFAULT_MANIFEST_VERSION
*/
export const DEFAULT_MANIFEST_SCHEMA_LOOSE = LooseManifestSchemaV0_2;