@forgeailab/spark-schema 0.4.1 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/pack.ts +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeailab/spark-schema",
3
- "version": "0.4.1",
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",
package/src/pack.ts CHANGED
@@ -67,6 +67,17 @@ export const PackTasksSchema = z
67
67
  })
68
68
  .strict();
69
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
+
70
81
  export const PackManifestSchema = z
71
82
  .object({
72
83
  name: PackName,
@@ -83,6 +94,7 @@ export const PackManifestSchema = z
83
94
  files: z.array(PackFileOperationSchema).optional(),
84
95
  skills: PackSkillsSchema.optional(),
85
96
  tasks: PackTasksSchema.optional(),
97
+ runtime_package: RuntimePackageSchema.optional(),
86
98
  })
87
99
  .strict();
88
100