@cueframe/kernel 0.2.33 → 0.2.35

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 (36) hide show
  1. package/dist/_members/errors/registry.d.ts +6 -0
  2. package/dist/_members/plane/contract.d.ts +34 -0
  3. package/dist/authoring.js +2 -2
  4. package/dist/{chunk-3OOMVQ6I.js → chunk-5YO4LAB7.js} +2 -2
  5. package/dist/{chunk-RAPDICTC.js → chunk-6PBYCESM.js} +1 -1
  6. package/dist/{chunk-F5B6OM73.js → chunk-ANNB4VC6.js} +1283 -1271
  7. package/dist/{chunk-GMVUJYPM.js → chunk-AYOVAVNO.js} +1 -1
  8. package/dist/{chunk-4RREA7VA.js → chunk-BUAAQDDJ.js} +1 -1
  9. package/dist/{chunk-TCYULWNP.js → chunk-IHKMFEBT.js} +1 -1
  10. package/dist/{chunk-3GNTA646.js → chunk-IYZEK6WY.js} +1 -1
  11. package/dist/{chunk-W44ASS4N.js → chunk-L5XECASW.js} +6 -6
  12. package/dist/{chunk-JGXJEY77.js → chunk-NJOWIGUL.js} +3 -3
  13. package/dist/{chunk-A3MXR6JI.js → chunk-QSWONRX2.js} +1 -0
  14. package/dist/{chunk-DLKCGEKP.js → chunk-WEXGESUQ.js} +1 -1
  15. package/dist/{chunk-JTVHOHT6.js → chunk-YOE5Y2SJ.js} +1 -1
  16. package/dist/compose.js +1 -1
  17. package/dist/composition/projection.js +2 -2
  18. package/dist/composition-ops.js +3 -3
  19. package/dist/composition.js +2 -2
  20. package/dist/core/render.js +3 -3
  21. package/dist/core/select.js +2 -2
  22. package/dist/core.js +3 -3
  23. package/dist/director/ai-sdk.js +3 -3
  24. package/dist/director/domain.js +2 -2
  25. package/dist/director.js +3 -3
  26. package/dist/errors.js +1 -1
  27. package/dist/mcp/adapter.js +3 -3
  28. package/dist/mcp/core.js +1 -1
  29. package/dist/mcp/curation.js +1 -1
  30. package/dist/mcp/server.js +4 -4
  31. package/dist/mcp.js +4 -4
  32. package/dist/plane/contract.js +18 -2
  33. package/dist/render-harness/cardAssetAdmission.js +2 -2
  34. package/dist/render-harness/cardFonts.js +2 -2
  35. package/dist/render-harness.js +5 -5
  36. package/package.json +10 -10
@@ -1557,6 +1557,12 @@ export declare const ERROR_CODES: {
1557
1557
  readonly retryable: true;
1558
1558
  readonly httpStatus: 504;
1559
1559
  };
1560
+ readonly still_batch_too_large: {
1561
+ readonly stage: "validate";
1562
+ readonly category: "authoring";
1563
+ readonly retryable: false;
1564
+ readonly httpStatus: 422;
1565
+ };
1560
1566
  readonly sighted_provider_unreachable: {
1561
1567
  readonly stage: "render";
1562
1568
  readonly category: "transient";
@@ -1,4 +1,38 @@
1
1
  import { z } from "zod";
2
+ /**
3
+ * Still-capture budget. ONE definition, because the batch a caller may ask for
4
+ * and the time the renderer is given to serve it are the same number seen from
5
+ * two ends — and when they drifted apart, the API accepted work the renderer
6
+ * provably could not finish.
7
+ *
8
+ * What went wrong (CUE-39): `timestamps` had no maximum, while the Modal still
9
+ * worker computed `min(280, 60 + 45 * beats)`. The per-beat term is dead above
10
+ * four beats — the cap TRUNCATES the budget instead of refusing the batch — so
11
+ * a 124-beat request got the same 280s as a 5-beat one. It burned the full 280s
12
+ * and failed with an untyped `render_still_failed`.
13
+ *
14
+ * MAX_STILL_BEATS_PER_BATCH is DERIVED, not chosen. The still worker is
15
+ * `@modal.batched`, so up to CO_BATCHED_CALLERS callers share ONE harness run
16
+ * and one ceiling. The largest per-caller batch that survives the worst case is
17
+ * therefore the largest N where
18
+ *
19
+ * BASE + PER_BEAT * (N * CO_BATCHED_CALLERS) <= CEILING
20
+ *
21
+ * which is 18 (19 overflows at 288s). Two independent facts agree with
22
+ * PER_BEAT = 3s: the verify lane's worst case is 6 eval beats x 3 burst frames
23
+ * = 18 stills and production serves it co-batched today, and the 124-beat
24
+ * request in the report needed ~432s against the 280s ceiling. `stillBudget`
25
+ * tests pin the inequality, so moving any one of these numbers alone fails.
26
+ */
27
+ export declare const STILL_BUDGET_BASE_S = 60;
28
+ export declare const STILL_BUDGET_PER_BEAT_S = 3;
29
+ /** Below the Modal still worker's hard 300s function timeout. */
30
+ export declare const STILL_BUDGET_CEILING_S = 280;
31
+ /** `STILL_BATCH_MAX` on the still worker: callers sharing one harness run. */
32
+ export declare const CO_BATCHED_CALLERS = 4;
33
+ export declare const MAX_STILL_BEATS_PER_BATCH = 18;
34
+ /** Seconds the harness needs for `beats` stills in one run. */
35
+ export declare function stillBudgetSeconds(beats: number): number;
2
36
  export declare const PreviewFrameRequest: z.ZodObject<{
3
37
  composition: z.ZodOptional<z.ZodUnknown>;
4
38
  compositionId: z.ZodOptional<z.ZodString>;
package/dist/authoring.js CHANGED
@@ -48,7 +48,7 @@ import {
48
48
  formatPlanSteps,
49
49
  initCodeGenPrompts
50
50
  } from "./chunk-Y4HPN4BC.js";
51
- import "./chunk-GMVUJYPM.js";
51
+ import "./chunk-AYOVAVNO.js";
52
52
  import {
53
53
  cssLayoutVars
54
54
  } from "./chunk-W5W3FDDI.js";
@@ -62,7 +62,7 @@ import "./chunk-WPZKOVYF.js";
62
62
  import "./chunk-B7J5UUUV.js";
63
63
  import "./chunk-KYRDKK2D.js";
64
64
  import "./chunk-WREYUH2E.js";
65
- import "./chunk-A3MXR6JI.js";
65
+ import "./chunk-QSWONRX2.js";
66
66
  import "./chunk-7PA7FGLD.js";
67
67
  import {
68
68
  collectSceneClipIssues,
@@ -312,7 +312,7 @@ Call wait_job(kind="compose", id="${j.composeJobId}", projectId="${a.projectId}"
312
312
  name: "apply_composition",
313
313
  operationId: "applyComposition",
314
314
  pathArgs: { projectId: "id" },
315
- description: 'Atomically apply an array of CompositionOps to a project composition. All ops succeed or none do (transactional). Pass `if_match` for optimistic-concurrency control (409 stale_etag on mismatch) and `dry_run: true` to validate the batch without persisting. Use this to seed a composition (add media clips) or make targeted edits (set a crop intent, reorder clips, set the format). CAPTIONS: attach content with {type:"captions.fromTranscript", mediaId, window?} \u2014 the server slices the cached word-timed transcript, rebases times, and sentence-splits into segments (no pasting words; 422 media_no_transcript if the media has no speech); style it with {type:"setCaptionStyle", style}; or set explicit words with {type:"setCaptions", segments, style?} (e.g. translations or your own VO timings). Brand is NOT set here \u2014 it lives on the project (create_project / update_project with brandKitId \u2014 or PATCH /projects/:id over REST). CARDS: a {kind:"card", html, tokens} clip projects each `tokens` KEY `x` to the CSS custom property `--cf-x`, so the html must read it as `var(--cf-x)` \u2014 write `tokens:{"plate":"#0af"}` + `background:var(--cf-plate)`. Do NOT put dashes in the key: `"--plate"` becomes `--cf---plate` and your `var(--plate)` then resolves to NOTHING, which CSS silently degrades to a transparent background and black text. Responses carry `warnings[]` when a card reads a var nothing defines. SCENE SHOTS: for a 3D product shot \u2014 a tilted page screenshot, a lit laptop/phone showing a real screenshot, two-colour type, a colour-field backdrop, focus/grain/vignette and a camera move \u2014 use {type:"scene.add", clipId, newTrack|trackId, startTime, duration, scene, assets} and revise it with {type:"scene.update", clipId, scene?, assets?, startTime?, duration?}. You author a scene SPEC, never wrapper TSX; the server registers the component for you. There is NO built-in scene primitive in list_catalog \u2014 READ cueframe://scene-shot first for the JSON schema, the canonical V2 world-objects recipe with nested groups, slabs, pages, phones, laptops, world/screen text, admitted surfaces, camera motion, lighting, and the current resource limits.',
315
+ description: 'Atomically apply an array of CompositionOps to a project composition. All ops succeed or none do (transactional). Pass `if_match` for optimistic-concurrency control (409 stale_etag on mismatch) and `dry_run: true` to validate the batch without persisting. Ops land on the project\'s ACTIVE composition unless you pass `composition_id` (mutually exclusive with `session_id`), which targets a specific one \u2014 that is how you author a second composition minted with new_composition and run an A/B. Use this to seed a composition (add media clips) or make targeted edits (set a crop intent, reorder clips, set the format). CAPTIONS: attach content with {type:"captions.fromTranscript", mediaId, window?} \u2014 the server slices the cached word-timed transcript, rebases times, and sentence-splits into segments (no pasting words; 422 media_no_transcript if the media has no speech); style it with {type:"setCaptionStyle", style}; or set explicit words with {type:"setCaptions", segments, style?} (e.g. translations or your own VO timings). Brand is NOT set here \u2014 it lives on the project (create_project / update_project with brandKitId \u2014 or PATCH /projects/:id over REST). CARDS: a {kind:"card", html, tokens} clip projects each `tokens` KEY `x` to the CSS custom property `--cf-x`, so the html must read it as `var(--cf-x)` \u2014 write `tokens:{"plate":"#0af"}` + `background:var(--cf-plate)`. Do NOT put dashes in the key: `"--plate"` becomes `--cf---plate` and your `var(--plate)` then resolves to NOTHING, which CSS silently degrades to a transparent background and black text. Responses carry `warnings[]` when a card reads a var nothing defines. SCENE SHOTS: for a 3D product shot \u2014 a tilted page screenshot, a lit laptop/phone showing a real screenshot, two-colour type, a colour-field backdrop, focus/grain/vignette and a camera move \u2014 use {type:"scene.add", clipId, newTrack|trackId, startTime, duration, scene, assets} and revise it with {type:"scene.update", clipId, scene?, assets?, startTime?, duration?}. You author a scene SPEC, never wrapper TSX; the server registers the component for you. There is NO built-in scene primitive in list_catalog \u2014 READ cueframe://scene-shot first for the JSON schema, the canonical V2 world-objects recipe with nested groups, slabs, pages, phones, laptops, world/screen text, admitted surfaces, camera motion, lighting, and the current resource limits.',
316
316
  okFormat: (j, a) => {
317
317
  const warns = formatWarnings(j);
318
318
  if (j && typeof j.valid === "boolean") {
@@ -569,7 +569,7 @@ etag: ${j.etag}`
569
569
  name: "get_composition",
570
570
  operationId: "getComposition",
571
571
  pathArgs: { projectId: "id" },
572
- description: "READ BACK the project's active composition as JSON \u2014 the edit itself: tracks, clips, card HTML, reframe segments, captions, markers, format. This is what create_render encodes, so it is also what you hand to validate_composition (which needs a full inline composition body), what you diff after an edit, and what you archive/share so someone else can re-render the SAME video. Read-only and free. Authoring stays op-based (apply_composition) \u2014 do not round-trip this object back as a write. A composition too large to fit one MCP result degrades to a STRUCTURAL SUMMARY (every track and clip still listed; card html and caption words elided as lengths) with a header saying so \u2014 read it over REST if you need the verbatim body.",
572
+ description: "READ BACK a composition as JSON \u2014 the edit itself: tracks, clips, card HTML, reframe segments, captions, markers, format. This is what create_render encodes, so it is also what you hand to validate_composition (which needs a full inline composition body), what you diff after an edit, and what you archive/share so someone else can re-render the SAME video. Read-only and free. Authoring stays op-based (apply_composition) \u2014 do not round-trip this object back as a write. A composition too large to fit one MCP result degrades to a STRUCTURAL SUMMARY (every track and clip still listed; card html and caption words elided as lengths) with a header saying so \u2014 read it over REST if you need the verbatim body. Defaults to the project's ACTIVE composition; pass `compositionId` to read a specific one (the same id apply_composition takes as `composition_id`, and preview_frame / create_render take as compositionId) so an A/B variant can be read back, not just written.",
573
573
  okFormat: (j) => formatComposition(j),
574
574
  annotations: { readOnlyHint: true }
575
575
  },
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CueframeError
3
- } from "./chunk-A3MXR6JI.js";
3
+ } from "./chunk-QSWONRX2.js";
4
4
  import {
5
5
  bundledFontFamilyFaces,
6
6
  isGenericOnlyStack,