@forgeailab/spark-schema 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeailab/spark-schema",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Shared Zod schemas + TOML parsers for spark pack and template manifests.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,6 +14,7 @@ export const PACK_CAPABILITY_VALUES = [
14
14
  'blob-storage',
15
15
  'analytics',
16
16
  'data-api',
17
+ 'admin',
17
18
  ] as const;
18
19
 
19
20
  export const TEMPLATE_CAPABILITY_VALUES = ['static', 'server', 'react', 'native', 'vue', 'svelte', 'mdx-content', 'edge-runtime'] as const;
@@ -39,6 +40,7 @@ export const EXCLUSIVE_CAPABILITIES: ReadonlySet<PackCapability> = new Set<PackC
39
40
  'payments',
40
41
  'ui-kit',
41
42
  'data-api',
43
+ 'admin',
42
44
  ]);
43
45
 
44
46
  export const NON_EXCLUSIVE_CAPABILITIES: ReadonlySet<PackCapability> = new Set<PackCapability>([
package/src/pack.ts CHANGED
@@ -17,6 +17,7 @@ export const PackCategory = z.enum([
17
17
  'deploy',
18
18
  'analytics',
19
19
  'storage',
20
+ 'admin',
20
21
  ]);
21
22
  export type PackCategory = z.infer<typeof PackCategory>;
22
23
 
@@ -66,6 +67,17 @@ export const PackTasksSchema = z
66
67
  })
67
68
  .strict();
68
69
 
70
+ // A `hybrid` pack points at a companion workspace helper via a `[runtime_package]`
71
+ // table (e.g. package = "@forgeailab/spark-<name>", version = "^0.1"). The version is a
72
+ // dependency range, not a strict semver, so it is a plain non-empty string.
73
+ export const RuntimePackageSchema = z
74
+ .object({
75
+ package: z.string().min(1),
76
+ version: z.string().min(1),
77
+ })
78
+ .strict();
79
+ export type RuntimePackageBlock = z.infer<typeof RuntimePackageSchema>;
80
+
69
81
  export const PackManifestSchema = z
70
82
  .object({
71
83
  name: PackName,
@@ -82,6 +94,7 @@ export const PackManifestSchema = z
82
94
  files: z.array(PackFileOperationSchema).optional(),
83
95
  skills: PackSkillsSchema.optional(),
84
96
  tasks: PackTasksSchema.optional(),
97
+ runtime_package: RuntimePackageSchema.optional(),
85
98
  })
86
99
  .strict();
87
100