@cueframe/kernel 0.2.57 → 0.2.58

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 (98) hide show
  1. package/dist/THIRD_PARTY_NOTICES.md +111 -0
  2. package/dist/_members/component-runtime/template/bind.d.ts +22 -0
  3. package/dist/_members/component-runtime/template/bind.d.ts.map +1 -0
  4. package/dist/_members/component-runtime/template/extract.d.ts +31 -0
  5. package/dist/_members/component-runtime/template/extract.d.ts.map +1 -0
  6. package/dist/_members/component-runtime/template/index.d.ts +5 -0
  7. package/dist/_members/component-runtime/template/index.d.ts.map +1 -0
  8. package/dist/_members/component-runtime/template/schema.d.ts +1580 -0
  9. package/dist/_members/component-runtime/template/schema.d.ts.map +1 -0
  10. package/dist/_members/component-runtime/template/testing/fixtures.d.ts +33 -0
  11. package/dist/_members/component-runtime/template/testing/fixtures.d.ts.map +1 -0
  12. package/dist/_members/component-runtime/template/testing/index.d.ts +3 -0
  13. package/dist/_members/component-runtime/template/testing/index.d.ts.map +1 -0
  14. package/dist/_members/component-runtime/template/testing/templateApplyContract.d.ts +54 -0
  15. package/dist/_members/component-runtime/template/testing/templateApplyContract.d.ts.map +1 -0
  16. package/dist/_members/composition/primitive-catalog/index.d.ts +2 -1
  17. package/dist/_members/composition/primitive-catalog/types.d.ts +3 -1
  18. package/dist/_members/composition/validators/brandKit.d.ts +7 -0
  19. package/dist/_members/composition/validators/brandKitBody.d.ts +543 -0
  20. package/dist/_members/errors/registry.d.ts +36 -0
  21. package/dist/_members/mcp/server.d.ts +5 -2
  22. package/dist/_members/primitives/backgrounds/dynamic-grid/config.d.ts +1 -1
  23. package/dist/_members/primitives/effects/blur/config.d.ts +1 -1
  24. package/dist/_members/primitives/effects/color-grade/config.d.ts +2 -2
  25. package/dist/_members/primitives/effects/grain/config.d.ts +3 -3
  26. package/dist/_members/primitives/effects/particles/config.d.ts +2 -2
  27. package/dist/_members/primitives/effects/stage-camera/config.d.ts +6 -6
  28. package/dist/_members/primitives/effects/vignette/config.d.ts +1 -1
  29. package/dist/_members/primitives/layouts/flex-layout/config.d.ts +3 -3
  30. package/dist/_members/primitives/layouts/picture-in-picture/config.d.ts +2 -2
  31. package/dist/_members/primitives/lib/types.d.ts +1 -1
  32. package/dist/_members/primitives/scenes/device-showcase/config.d.ts +7 -7
  33. package/dist/_members/primitives/text/cinematic-title/config.d.ts +3 -3
  34. package/dist/_members/primitives/text/karaoke/config.d.ts +1 -1
  35. package/dist/_members/primitives/text/kinetic-type/config.d.ts +3 -3
  36. package/dist/_members/primitives/text/stat-counter/config.d.ts +1 -1
  37. package/dist/_members/primitives/text/text-effect/config.d.ts +2 -2
  38. package/dist/_members/primitives/transitions/grid-pixelate-wipe/config.d.ts +1 -1
  39. package/dist/_members/primitives/ui-blocks/badge-pop/config.d.ts +3 -3
  40. package/dist/_members/primitives/ui-blocks/terminal-simulator/config.d.ts +2 -2
  41. package/dist/_members/primitives/ui-blocks/toast-notification/config.d.ts +2 -2
  42. package/dist/authoring/build-tools.js +5 -4
  43. package/dist/authoring/context.js +2 -1
  44. package/dist/authoring/tools.js +4 -3
  45. package/dist/authoring.js +7 -6
  46. package/dist/{chunk-R7G2PNEZ.js → chunk-2L33CKIY.js} +11 -13
  47. package/dist/{chunk-N54EGUVM.js → chunk-3VLDQE26.js} +1 -1
  48. package/dist/{chunk-7AZLFN26.js → chunk-4NIJWK45.js} +20 -12
  49. package/dist/{chunk-KSRFYFUZ.js → chunk-5T655LYZ.js} +1 -1
  50. package/dist/{chunk-RERR5JLM.js → chunk-6UZYUWBX.js} +1 -1
  51. package/dist/{chunk-LBN5KQC6.js → chunk-7EDLPIUN.js} +3 -3
  52. package/dist/{chunk-MZB4ZXYW.js → chunk-7NIOFHMH.js} +1 -1
  53. package/dist/{chunk-E63UEO5C.js → chunk-AK5QBHOB.js} +6 -0
  54. package/dist/{chunk-BDFAA747.js → chunk-GQ6XGAFB.js} +1 -1
  55. package/dist/chunk-IG3YAOUZ.js +418 -0
  56. package/dist/{chunk-Z4G3VM3H.js → chunk-JN3GF36B.js} +1 -1
  57. package/dist/{chunk-DV7ZFVL4.js → chunk-MFMR3LHO.js} +1 -1
  58. package/dist/{chunk-JPMVNMF3.js → chunk-MNO6AO2J.js} +1 -1
  59. package/dist/{chunk-VXGA7LQQ.js → chunk-NVXSKKRN.js} +2 -2
  60. package/dist/chunk-PWWZTY3G.js +254 -0
  61. package/dist/chunk-REST55RC.js +366 -0
  62. package/dist/chunk-TR53N6HB.js +196 -0
  63. package/dist/{chunk-4PV3UYJF.js → chunk-UXRSEMJJ.js} +201 -201
  64. package/dist/component-runtime/template/testing.d.ts +1 -0
  65. package/dist/component-runtime/template/testing.js +380 -0
  66. package/dist/component-runtime/template.d.ts +1 -0
  67. package/dist/component-runtime/template.js +99 -0
  68. package/dist/compose.js +20 -20
  69. package/dist/composition/floors.js +1 -1
  70. package/dist/composition/ops.js +2 -1
  71. package/dist/composition/primitive-catalog.js +3 -1
  72. package/dist/composition/projection.js +2 -2
  73. package/dist/composition/validators/brand-kit-body.d.ts +1 -0
  74. package/dist/composition/validators/brand-kit-body.js +17 -0
  75. package/dist/composition/validators.js +10 -6
  76. package/dist/composition-ops.js +7 -6
  77. package/dist/composition.js +12 -8
  78. package/dist/{context-6HPUO36M.js → context-4WSFPRLX.js} +2 -1
  79. package/dist/core/render.js +4 -4
  80. package/dist/core/select.js +2 -2
  81. package/dist/core.js +4 -4
  82. package/dist/director/ai-sdk.js +3 -3
  83. package/dist/director/domain.js +2 -2
  84. package/dist/director.js +3 -3
  85. package/dist/errors.js +1 -1
  86. package/dist/mcp/adapter.js +3 -3
  87. package/dist/mcp/server.js +3 -26
  88. package/dist/mcp.js +3 -26
  89. package/dist/nle-export.js +1 -1
  90. package/dist/primitives/captions.js +3 -3
  91. package/dist/primitives.js +18 -18
  92. package/dist/render-harness/cardAssetAdmission.js +2 -2
  93. package/dist/render-harness/cardFonts.js +2 -2
  94. package/dist/render-harness/renderInputAssets.js +2 -2
  95. package/dist/render-harness.js +8 -8
  96. package/dist/src-ZP6727AA.js +70 -0
  97. package/package.json +22 -10
  98. package/dist/chunk-AXRSCHQX.js +0 -661
@@ -1,661 +0,0 @@
1
- import {
2
- Composition,
3
- Copy,
4
- Format,
5
- GraphicRole,
6
- OpaqueId
7
- } from "./chunk-UFD4EZHM.js";
8
- import {
9
- brandKitCaptionFaceIssues
10
- } from "./chunk-OOL7ZUG7.js";
11
-
12
- // ../composition/src/validators/composePlan.ts
13
- import { z } from "zod";
14
- var PlanSubject = z.discriminatedUnion("kind", [
15
- z.object({ kind: z.literal("face"), faceId: z.string().min(1) }),
16
- z.object({ kind: z.literal("all-faces") }),
17
- z.object({ kind: z.literal("frame-center") }),
18
- z.object({ kind: z.literal("active-speaker") }),
19
- z.object({
20
- kind: z.literal("point"),
21
- x: z.number().min(0).max(1),
22
- y: z.number().min(0).max(1)
23
- })
24
- ]);
25
- var PlanFramingSegment = z.object({
26
- startSec: z.number().nonnegative(),
27
- endSec: z.number().positive(),
28
- action: z.enum(["frame", "keep", "trim"]).describe(
29
- "'frame' = SHOW this span cropped/tracked per `subject`. 'keep' = SHOW this span as-is, no reframe (footage with nothing to track). 'trim' = DELETE this span from the output entirely \u2014 trimmed footage never appears."
30
- ),
31
- subject: PlanSubject.optional(),
32
- shotScale: z.enum(["close", "standard", "wide"]).optional(),
33
- zoomScale: z.number().min(0.4).max(1).optional(),
34
- verticalBias: z.number().min(-0.3).max(0.3).optional(),
35
- lateralBias: z.number().min(-0.3).max(0.3).optional(),
36
- intent: z.string().optional()
37
- }).refine((s) => s.action !== "frame" || s.subject !== void 0, {
38
- message: "frame segment requires a subject \u2014 for footage with no trackable subject use action:'keep' (shown as-is); do NOT trim spans you want shown"
39
- }).refine((s) => s.action !== "keep" || s.subject === void 0, {
40
- message: "keep segment shows footage as-is \u2014 it takes no subject (use action:'frame' to track one)"
41
- }).refine((s) => s.shotScale === void 0 || s.zoomScale === void 0, {
42
- message: "framing segment takes EITHER shotScale (editorial scale \u2014 the bake calibrates the zoom to the detected face) OR zoomScale (an explicit fraction of the frame), never both: shotScale wins and the zoomScale would be silently discarded",
43
- path: ["zoomScale"]
44
- });
45
- var PlanCut = z.object({
46
- startSec: z.number().nonnegative(),
47
- endSec: z.number().positive(),
48
- reason: z.string().min(1)
49
- });
50
- var PlanAssetRequest = z.object({
51
- id: z.string().min(1),
52
- atSec: z.number().nonnegative(),
53
- durSec: z.number().positive(),
54
- kind: z.enum(["broll", "audio", "sfx", "music", "ambience", "gif", "image"]),
55
- source: z.enum(["find", "generate"]),
56
- intent: z.string().min(1),
57
- resolvedMediaId: z.string().optional()
58
- });
59
- var PlanGraphicRequest = z.object({
60
- id: z.string().min(1),
61
- atSec: z.number().nonnegative(),
62
- durSec: z.number().positive(),
63
- role: GraphicRole,
64
- copy: Copy,
65
- intent: z.string().min(1)
66
- });
67
- var PlanMarker = z.object({
68
- startSec: z.number().nonnegative(),
69
- endSec: z.number().nonnegative().optional(),
70
- kind: z.string().min(1),
71
- name: z.string().optional()
72
- });
73
- var ComposePlan = z.object({
74
- framing: z.array(PlanFramingSegment).min(1),
75
- cuts: z.array(PlanCut).optional(),
76
- captions: z.object({ styleIntent: z.string().optional() }).optional(),
77
- assets: z.array(PlanAssetRequest).optional(),
78
- graphics: z.array(PlanGraphicRequest).optional(),
79
- markers: z.array(PlanMarker).optional()
80
- });
81
-
82
- // ../composition/src/validators/brandKit.ts
83
- import { z as z2 } from "zod";
84
- var EasingValue = z2.union([
85
- z2.enum(["linear", "ease", "ease-in", "ease-out", "ease-in-out"]),
86
- z2.object({
87
- kind: z2.literal("cubic-bezier"),
88
- x1: z2.number().min(0).max(1),
89
- y1: z2.number(),
90
- x2: z2.number().min(0).max(1),
91
- y2: z2.number()
92
- })
93
- ]);
94
- var AudioPaletteRef = z2.string().min(1);
95
- var FontRef = z2.union([
96
- z2.object({
97
- kind: z2.literal("system"),
98
- family: z2.string().min(1),
99
- weight: z2.number().int().min(1).max(1e3).optional(),
100
- style: z2.enum(["normal", "italic"]).optional()
101
- }),
102
- z2.object({
103
- kind: z2.literal("web"),
104
- family: z2.string().min(1),
105
- url: z2.string().url().optional(),
106
- weight: z2.number().int().min(1).max(1e3).optional(),
107
- style: z2.enum(["normal", "italic"]).optional()
108
- }),
109
- z2.object({
110
- kind: z2.literal("uploaded"),
111
- fontId: OpaqueId,
112
- family: z2.string().optional(),
113
- weight: z2.number().int().min(1).max(1e3).optional(),
114
- style: z2.enum(["normal", "italic"]).optional()
115
- })
116
- ]);
117
- var Colors = z2.object({
118
- primary: z2.string().min(1),
119
- secondary: z2.string().optional(),
120
- accent: z2.string().min(1),
121
- background: z2.string().min(1),
122
- text: z2.string().min(1),
123
- textMuted: z2.string().optional(),
124
- border: z2.string().optional(),
125
- surface: z2.string().optional(),
126
- card: z2.string().optional(),
127
- gridLine: z2.string().optional(),
128
- accentMuted: z2.string().optional(),
129
- textOnAccent: z2.string().optional(),
130
- textOnSurface: z2.string().optional()
131
- });
132
- var Fonts = z2.object({
133
- heading: FontRef,
134
- body: FontRef.optional(),
135
- caption: FontRef.optional()
136
- });
137
- var Spacing = z2.object({
138
- base: z2.number().positive().optional(),
139
- lg: z2.number().positive().optional(),
140
- sm: z2.number().positive().optional()
141
- });
142
- var Sizing = z2.object({
143
- fontSizeHeading: z2.number().positive().optional(),
144
- fontSizeBody: z2.number().positive().optional(),
145
- fontSizeLabel: z2.number().positive().optional(),
146
- borderRadius: z2.number().nonnegative().optional()
147
- });
148
- var Motion = z2.object({
149
- duration: z2.number().positive().optional(),
150
- easing: EasingValue.optional(),
151
- entrance: z2.enum(["none", "fade", "word-pop", "stagger-up"]).optional(),
152
- staggerMs: z2.number().nonnegative().optional(),
153
- exitMs: z2.number().nonnegative().optional()
154
- });
155
- var Placement = z2.enum(["tl", "tr", "bl", "br"]);
156
- var Logo = z2.object({
157
- src: z2.string().min(1),
158
- alt: z2.string().optional(),
159
- placement: Placement.optional(),
160
- sizePct: z2.number().positive().optional()
161
- });
162
- var IntroOutro = z2.object({
163
- kind: z2.enum(["card", "video"]),
164
- src: z2.string().min(1).optional(),
165
- title: z2.string().optional(),
166
- subtitle: z2.string().optional(),
167
- durationMs: z2.number().positive().optional()
168
- });
169
- var Watermark = z2.object({
170
- src: z2.string().min(1),
171
- opacity: z2.number().min(0).max(1).optional(),
172
- placement: Placement.optional()
173
- });
174
- var MotifBody = z2.discriminatedUnion("kind", [
175
- z2.object({
176
- kind: z2.literal("card"),
177
- html: z2.string().min(1),
178
- tokens: z2.record(z2.string(), z2.string()).optional()
179
- }),
180
- z2.object({
181
- kind: z2.literal("overlay"),
182
- primitiveId: z2.string().min(1),
183
- params: z2.record(z2.string(), z2.unknown()).optional()
184
- }),
185
- z2.object({
186
- kind: z2.literal("component"),
187
- componentId: z2.string().min(1),
188
- props: z2.record(z2.string(), z2.unknown()).optional()
189
- })
190
- ]);
191
- var MotifMotionPreset = z2.enum([
192
- "fade-up",
193
- "slide-in-left",
194
- "slide-in-right",
195
- "scale-pop",
196
- "stagger-reveal"
197
- ]);
198
- var Motif = z2.object({
199
- id: z2.string().min(1).max(40),
200
- observed: z2.string().min(1).max(500),
201
- body: MotifBody,
202
- motion: z2.object({
203
- preset: MotifMotionPreset,
204
- enterMs: z2.number().int().min(0).max(5e3).optional(),
205
- exitMs: z2.number().int().min(0).max(5e3).optional(),
206
- staggerMs: z2.number().int().min(0).max(2e3).optional(),
207
- confidence: z2.enum(["high", "low"]).optional()
208
- }).optional(),
209
- role: GraphicRole,
210
- zone: z2.object({ x: z2.number(), y: z2.number(), w: z2.number(), h: z2.number() }).optional(),
211
- evidence: z2.array(z2.number().int().min(0)).max(24).optional(),
212
- diffScore: z2.number().min(0).max(1).optional(),
213
- coverage: z2.enum(["reproduced", "approximated", "skipped"]),
214
- skipReason: z2.string().max(300).optional()
215
- });
216
- var AccessControl = z2.object({
217
- public: z2.boolean().optional(),
218
- readerOrgIds: z2.array(z2.string()).optional(),
219
- writerOrgIds: z2.array(z2.string()).optional()
220
- });
221
- var LicenseDeclaration = z2.object({
222
- type: z2.string().min(1),
223
- source: z2.string().optional(),
224
- notes: z2.string().optional()
225
- });
226
- var BrandKit = z2.object({
227
- id: z2.string().min(1),
228
- name: z2.string().min(1),
229
- colors: Colors,
230
- fonts: Fonts,
231
- syncCaptions: z2.boolean().optional(),
232
- spacing: Spacing.optional(),
233
- sizing: Sizing.optional(),
234
- motion: Motion.optional(),
235
- captionProfile: z2.object({
236
- color: z2.string().optional(),
237
- highlightColor: z2.string().optional(),
238
- emphasisColor: z2.string().optional(),
239
- plate: z2.enum(["glass", "solid", "none"]).optional(),
240
- entrance: z2.enum(["none", "fade", "word-pop", "stagger-up"]).optional(),
241
- entranceMs: z2.number().optional(),
242
- entranceStaggerMs: z2.number().optional(),
243
- exitMs: z2.number().optional(),
244
- fontFamily: z2.string().optional(),
245
- // The ordinary run's weight. The profile could name a caption family but never how heavy it
246
- // was drawn, so the only answer to "that weight has no file behind it" was to change the
247
- // family. A family that does not declare this weight is still refused here — but now at a
248
- // field the author can set, and a family that ships it needs no setting at all: every
249
- // bundled family declares a base and an emphasis weight it has bytes for.
250
- fontWeight: z2.number().int().min(100).max(900).multipleOf(100).optional(),
251
- emphasisFontFamily: z2.string().optional(),
252
- emphasisScale: z2.number().positive().optional(),
253
- // A CSS weight, and the profile is projected straight onto the caption style, so it is held
254
- // to the same range the composition holds `emphasisFontWeight` to. An unbounded number here
255
- // was a hole: 0 or 1500 named no face at all.
256
- emphasisFontWeight: z2.number().int().min(100).max(900).optional(),
257
- emphasisFontStyle: z2.enum(["normal", "italic"]).optional(),
258
- emphasisTextTransform: z2.enum(["none", "uppercase"]).optional(),
259
- emphasisLetterSpacing: z2.number().optional(),
260
- emphasisPlate: z2.boolean().optional(),
261
- emphasisPlateColor: z2.string().optional(),
262
- emphasisPlateTextColor: z2.string().optional()
263
- }).optional(),
264
- exemplarKeys: z2.array(z2.string().min(1)).max(24).optional(),
265
- contactSheetKey: z2.string().min(1).optional(),
266
- motifs: z2.array(Motif).max(24).optional(),
267
- styleRubric: z2.string().max(4e3).optional(),
268
- density: z2.object({
269
- graphicsPerMin: z2.number().min(0).max(60),
270
- maxSimultaneous: z2.number().int().min(1).max(6)
271
- }).optional(),
272
- inspiration: z2.object({
273
- sources: z2.array(z2.string()).min(1).max(24),
274
- extractedAt: z2.number(),
275
- extractionVersion: z2.string().min(1).max(60)
276
- }).optional(),
277
- logo: Logo.optional(),
278
- intro: IntroOutro.optional(),
279
- outro: IntroOutro.optional(),
280
- watermark: Watermark.optional(),
281
- audio: z2.object({
282
- sfxIntensity: z2.enum(["off", "light", "standard", "dense"]).optional(),
283
- musicEnabled: z2.boolean().optional(),
284
- musicMood: z2.string().max(300).optional(),
285
- sonicLogo: z2.object({
286
- ref: AudioPaletteRef,
287
- placement: z2.enum(["intro", "outro", "both"]),
288
- offsetMs: z2.number().int().min(0).max(1e4).optional()
289
- }).optional(),
290
- uiSoundSet: z2.object({
291
- tick: AudioPaletteRef.optional(),
292
- pop: AudioPaletteRef.optional(),
293
- impact: AudioPaletteRef.optional(),
294
- confirm: AudioPaletteRef.optional(),
295
- error: AudioPaletteRef.optional(),
296
- whoosh: AudioPaletteRef.optional(),
297
- riser: AudioPaletteRef.optional()
298
- }).optional(),
299
- bedStyle: z2.object({
300
- bedId: AudioPaletteRef.optional(),
301
- genre: z2.string().max(120).optional(),
302
- bpmRange: z2.object({ min: z2.number(), max: z2.number() }).optional()
303
- }).optional(),
304
- ambiencePreference: z2.object({ ref: AudioPaletteRef }).nullable().optional()
305
- }).optional(),
306
- license: LicenseDeclaration.optional(),
307
- licenseVerification: z2.enum([
308
- "attested",
309
- "cueframe-verified",
310
- "third-party-verified"
311
- ]).optional(),
312
- ownerOrgId: z2.string().optional(),
313
- acl: AccessControl.optional()
314
- }).superRefine((kit, ctx) => {
315
- for (const issue of brandKitCaptionFaceIssues(kit)) {
316
- ctx.addIssue({ code: "custom", path: issue.path.split("."), message: issue.message });
317
- }
318
- });
319
-
320
- // ../composition/src/validators/font.ts
321
- import { z as z3 } from "zod";
322
- var FontStatus = z3.enum([
323
- "pending",
324
- "uploading",
325
- "analyzing",
326
- "subsetting",
327
- "ready",
328
- "partial",
329
- // common-glyphs buffer present, custom glyphs still subsetting
330
- "failed"
331
- ]);
332
- var FontVariant = z3.object({
333
- weight: z3.number().int().min(100).max(900),
334
- style: z3.enum(["normal", "italic"]),
335
- storageKey: z3.string().min(1),
336
- byteSize: z3.number().int().nonnegative().optional(),
337
- subsetComplete: z3.boolean().optional()
338
- });
339
- var Font = z3.object({
340
- id: z3.string().min(1),
341
- family: z3.string().min(1),
342
- status: FontStatus,
343
- variants: z3.array(FontVariant).nonempty(),
344
- source: z3.enum(["uploaded", "system", "web"]).optional(),
345
- license: z3.object({
346
- type: z3.string().min(1),
347
- source: z3.string().optional(),
348
- notes: z3.string().optional()
349
- }).optional(),
350
- createdAt: z3.number().optional(),
351
- // epoch ms
352
- ownerOrgId: z3.string().optional()
353
- });
354
-
355
- // ../composition/src/validators/render.ts
356
- import { z as z4 } from "zod";
357
- var RenderPriority = z4.enum(["interactive", "standard", "background"]);
358
- var RenderIntent = z4.enum(["preview", "final"]);
359
- var RenderMode = z4.enum(["offline", "live"]);
360
- var RenderCancelReason = z4.enum([
361
- "user",
362
- "agent",
363
- "cost_limit",
364
- "superseded",
365
- "source_removed",
366
- "timeout",
367
- "error"
368
- ]);
369
- var RenderStatus = z4.enum([
370
- "pending",
371
- "rendering",
372
- "complete",
373
- "error",
374
- "cancelled"
375
- ]);
376
- var RenderProgressPhase = z4.object({
377
- phase: z4.string().min(1),
378
- percent: z4.number().min(0).max(100),
379
- scenesTotal: z4.number().int().positive().optional()
380
- });
381
- var RegistryPin = z4.object({
382
- package: z4.string().min(1),
383
- name: z4.string().min(1),
384
- version: z4.string().min(1)
385
- });
386
- var MediaSourceSnapshot = z4.object({
387
- mediaId: OpaqueId,
388
- presignedUrl: z4.string().url(),
389
- expiresAt: z4.number().optional()
390
- });
391
- var RenderSnapshot = z4.object({
392
- composition: Composition,
393
- brandKit: BrandKit.optional(),
394
- mediaSources: z4.array(MediaSourceSnapshot),
395
- registryPins: z4.array(RegistryPin),
396
- capturedAt: z4.number()
397
- });
398
- var R2Destination = z4.object({
399
- kind: z4.literal("r2"),
400
- path: z4.string().optional()
401
- });
402
- var S3Destination = z4.object({
403
- kind: z4.literal("s3"),
404
- credentialId: z4.string().min(1),
405
- bucket: z4.string().min(1),
406
- key: z4.string().min(1),
407
- region: z4.string().optional(),
408
- acl: z4.string().optional()
409
- });
410
- var YoutubeDestination = z4.object({
411
- kind: z4.literal("youtube"),
412
- credentialId: z4.string().min(1),
413
- title: z4.string().min(1),
414
- description: z4.string().optional(),
415
- privacy: z4.enum(["public", "unlisted", "private"]),
416
- tags: z4.array(z4.string()).optional()
417
- });
418
- var MuxDestination = z4.object({
419
- kind: z4.literal("mux"),
420
- credentialId: z4.string().min(1),
421
- passthrough: z4.string().optional()
422
- });
423
- var WebhookDestination = z4.object({
424
- kind: z4.literal("webhook"),
425
- url: z4.string().url(),
426
- signingKeyId: z4.string().optional(),
427
- headers: z4.record(z4.string(), z4.string()).optional()
428
- });
429
- var Destination = z4.discriminatedUnion("kind", [
430
- R2Destination,
431
- S3Destination,
432
- YoutubeDestination,
433
- MuxDestination,
434
- WebhookDestination
435
- ]);
436
- var DestinationDeliveryStatus = z4.enum([
437
- "pending",
438
- "uploading",
439
- "delivered",
440
- "failed"
441
- ]);
442
- var DestinationResult = z4.object({
443
- destinationIndex: z4.number().int().nonnegative(),
444
- status: DestinationDeliveryStatus,
445
- url: z4.string().url().optional(),
446
- deliveredAt: z4.number().optional(),
447
- error: z4.string().optional()
448
- });
449
- var RenderJob = z4.object({
450
- id: OpaqueId,
451
- projectId: OpaqueId.optional(),
452
- compositionId: OpaqueId,
453
- compositionVersionId: z4.string().min(1),
454
- status: RenderStatus,
455
- progress: RenderProgressPhase.optional(),
456
- mode: RenderMode.optional(),
457
- priority: RenderPriority,
458
- // required per data-model.md § Render priority
459
- intent: RenderIntent.optional(),
460
- snapshot: RenderSnapshot.optional(),
461
- snapshotRef: z4.string().optional(),
462
- outputUrl: z4.string().url().optional(),
463
- outputExpiresAt: z4.number().optional(),
464
- // epoch ms
465
- destinations: z4.array(Destination).optional(),
466
- destinationResults: z4.array(DestinationResult).optional(),
467
- cancelReason: RenderCancelReason.optional(),
468
- error: z4.object({
469
- code: z4.string(),
470
- message: z4.string(),
471
- details: z4.record(z4.string(), z4.unknown()).optional()
472
- }).optional(),
473
- createdAt: z4.number(),
474
- updatedAt: z4.number()
475
- });
476
- var RenderProgress = z4.object({
477
- jobId: OpaqueId,
478
- status: RenderStatus,
479
- percent: z4.number().min(0).max(100).optional(),
480
- framesRendered: z4.number().int().nonnegative().optional(),
481
- framesTotal: z4.number().int().positive().optional()
482
- });
483
-
484
- // ../composition/src/validators/registry.ts
485
- import { z as z5 } from "zod";
486
- var PrimitiveOriginClass = z5.enum([
487
- "first-party",
488
- "community-verified",
489
- "community-unverified",
490
- "user-private",
491
- "sandbox",
492
- "deprecated"
493
- ]);
494
- var PrimitiveMode = z5.enum(["2d", "immersive", "interactive"]);
495
- var PrimitiveToken = z5.object({
496
- path: z5.string().min(1),
497
- fallback: z5.unknown()
498
- });
499
- var PrimitiveOtioMapping = z5.object({
500
- effectName: z5.string().min(1),
501
- metadata: z5.record(z5.string(), z5.unknown()).optional()
502
- });
503
- var PrimitiveMeta = z5.object({
504
- description: z5.string().optional(),
505
- use_when: z5.array(z5.string()).optional(),
506
- avoid_when: z5.array(z5.string()).optional(),
507
- vibe: z5.array(z5.string()).optional(),
508
- formats: z5.array(z5.string()).optional(),
509
- pairs_well_with: z5.array(z5.string()).optional(),
510
- exemplars: z5.array(z5.string()).optional()
511
- });
512
- var PrimitiveRegistryEntry = z5.object({
513
- name: z5.string().min(1),
514
- package: z5.string().min(1),
515
- category: z5.enum(["overlay", "text", "effect", "transition", "layout"]),
516
- version: z5.string().min(1),
517
- origin: PrimitiveOriginClass,
518
- modes: z5.array(PrimitiveMode).optional(),
519
- paramsSchema: z5.unknown(),
520
- varyingParams: z5.array(z5.string()).optional(),
521
- extends: z5.string().optional(),
522
- tokens: z5.array(PrimitiveToken).optional(),
523
- otio: PrimitiveOtioMapping.optional(),
524
- meta: PrimitiveMeta.optional()
525
- });
526
-
527
- // ../composition/src/validators/project.ts
528
- import { z as z6 } from "zod";
529
- var Project = z6.object({
530
- id: OpaqueId,
531
- name: z6.string().min(1),
532
- defaultFormat: Format.optional(),
533
- palConformDefault: z6.union([z6.literal(24), z6.literal(30)]).optional(),
534
- activeCompositionId: OpaqueId.nullable().optional(),
535
- brandKitId: z6.string().optional(),
536
- ownerOrgId: z6.string().optional(),
537
- createdAt: z6.number(),
538
- updatedAt: z6.number()
539
- });
540
-
541
- // ../composition/src/validators/session.ts
542
- import { z as z7 } from "zod";
543
- var SessionMediaRole = z7.enum([
544
- "main",
545
- "wide",
546
- "facecam",
547
- "screen",
548
- "audio"
549
- ]);
550
- var SessionMember = z7.object({
551
- mediaId: OpaqueId,
552
- role: SessionMediaRole,
553
- label: z7.string().optional()
554
- // human-readable annotation, e.g., "host's camera"
555
- });
556
- var SessionMux = z7.object({
557
- videoRole: z7.enum(["main", "wide", "facecam", "screen"]),
558
- audioRole: z7.literal("audio")
559
- });
560
- var Session = z7.object({
561
- id: OpaqueId,
562
- name: z7.string().min(1),
563
- members: z7.array(SessionMember).nonempty(),
564
- mux: z7.array(SessionMux).optional(),
565
- ownerOrgId: z7.string().optional(),
566
- createdAt: z7.number(),
567
- updatedAt: z7.number()
568
- });
569
-
570
- // ../composition/src/validators/webhook.ts
571
- import { z as z8 } from "zod";
572
- var SubstrateWebhookEvent = z8.enum([
573
- "render.completed",
574
- "media.transcribed",
575
- "media.completed",
576
- "composition.updated"
577
- ]);
578
- var WebhookDeliveryStatus = z8.enum([
579
- "pending",
580
- "delivering",
581
- "delivered",
582
- "failed",
583
- "exhausted"
584
- // retry budget burned through
585
- ]);
586
- var Webhook = z8.object({
587
- id: OpaqueId,
588
- url: z8.string().url(),
589
- events: z8.array(z8.string().min(1)).nonempty(),
590
- signingKeyId: z8.string().optional(),
591
- headers: z8.record(z8.string(), z8.string()).optional(),
592
- enabled: z8.boolean().optional(),
593
- ownerOrgId: z8.string().optional(),
594
- createdAt: z8.number(),
595
- updatedAt: z8.number()
596
- });
597
- var WebhookDelivery = z8.object({
598
- id: z8.string().min(1),
599
- webhookId: OpaqueId,
600
- event: z8.string().min(1),
601
- payload: z8.record(z8.string(), z8.unknown()),
602
- status: WebhookDeliveryStatus,
603
- attemptCount: z8.number().int().nonnegative(),
604
- responseStatus: z8.number().int().optional(),
605
- responseBody: z8.string().optional(),
606
- error: z8.string().optional(),
607
- createdAt: z8.number(),
608
- deliveredAt: z8.number().optional()
609
- });
610
-
611
- export {
612
- PlanSubject,
613
- PlanFramingSegment,
614
- PlanCut,
615
- PlanAssetRequest,
616
- PlanGraphicRequest,
617
- PlanMarker,
618
- ComposePlan,
619
- EasingValue,
620
- AudioPaletteRef,
621
- FontRef,
622
- Motif,
623
- BrandKit,
624
- FontStatus,
625
- FontVariant,
626
- Font,
627
- RenderPriority,
628
- RenderIntent,
629
- RenderMode,
630
- RenderCancelReason,
631
- RenderStatus,
632
- RenderProgressPhase,
633
- RegistryPin,
634
- MediaSourceSnapshot,
635
- RenderSnapshot,
636
- R2Destination,
637
- S3Destination,
638
- YoutubeDestination,
639
- MuxDestination,
640
- WebhookDestination,
641
- Destination,
642
- DestinationDeliveryStatus,
643
- DestinationResult,
644
- RenderJob,
645
- RenderProgress,
646
- PrimitiveOriginClass,
647
- PrimitiveMode,
648
- PrimitiveToken,
649
- PrimitiveOtioMapping,
650
- PrimitiveMeta,
651
- PrimitiveRegistryEntry,
652
- Project,
653
- SessionMediaRole,
654
- SessionMember,
655
- SessionMux,
656
- Session,
657
- SubstrateWebhookEvent,
658
- WebhookDeliveryStatus,
659
- Webhook,
660
- WebhookDelivery
661
- };