@cueframe/kernel 0.2.41 → 0.2.42

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 (66) hide show
  1. package/dist/_members/component-runtime/contracts.d.ts +19 -0
  2. package/dist/_members/component-runtime/contracts.d.ts.map +1 -1
  3. package/dist/_members/composition/floors/clips.d.ts +18 -0
  4. package/dist/_members/composition/floors/cohesionFloors.d.ts +31 -0
  5. package/dist/_members/composition/floors/craftFloors.d.ts +86 -0
  6. package/dist/_members/composition/floors/index.d.ts +24 -0
  7. package/dist/_members/composition/floors/occlusionFloor.d.ts +160 -0
  8. package/dist/_members/composition/floors/staticHold.d.ts +103 -0
  9. package/dist/_members/composition/floors/types.d.ts +52 -0
  10. package/dist/_members/composition/scene/introspection.d.ts +15 -0
  11. package/dist/_members/composition/scene/schema.d.ts +2 -8
  12. package/dist/_members/errors/registry.d.ts +6 -0
  13. package/dist/animate/preparation-facts.js +2 -2
  14. package/dist/animate.js +3 -3
  15. package/dist/authoring/scene.js +2 -2
  16. package/dist/authoring.js +2 -2
  17. package/dist/{chunk-JBWSK2YD.js → chunk-2PU2TSUG.js} +2 -2
  18. package/dist/{chunk-TE3PNQG6.js → chunk-4B4V3HYW.js} +6 -6
  19. package/dist/{chunk-WAUVKF2F.js → chunk-5ZQLMPDY.js} +1 -1
  20. package/dist/{chunk-C7TTI7FP.js → chunk-62VTAA6O.js} +1 -1
  21. package/dist/chunk-BUK4P6AW.js +571 -0
  22. package/dist/{chunk-XACXNDFL.js → chunk-CL5Y6V6K.js} +18 -16
  23. package/dist/{chunk-JRJQECCF.js → chunk-CZOVEX2D.js} +1 -1
  24. package/dist/{chunk-L5XECASW.js → chunk-D72CKEOC.js} +9 -9
  25. package/dist/{chunk-GA6NRDK3.js → chunk-DQRJJ2YN.js} +3 -1
  26. package/dist/{chunk-JNOM4FW3.js → chunk-J53SGAWP.js} +1 -1
  27. package/dist/{chunk-5NGYBI5Z.js → chunk-JX7NKSJP.js} +1 -1
  28. package/dist/{chunk-4MK6YGKV.js → chunk-N2OZDD44.js} +4 -1
  29. package/dist/{chunk-BLDL2EKL.js → chunk-P472GIBJ.js} +8 -563
  30. package/dist/{chunk-5BAWOULP.js → chunk-PCCVZYAF.js} +2 -2
  31. package/dist/{chunk-CJF3KBJ5.js → chunk-RO57QD5M.js} +4 -4
  32. package/dist/{chunk-QHLCJ3PE.js → chunk-UAOTQSS3.js} +4 -4
  33. package/dist/{chunk-ZVG446DJ.js → chunk-UGYYZBG4.js} +2 -0
  34. package/dist/{chunk-OBA6NW4S.js → chunk-XV2K3AQT.js} +1 -1
  35. package/dist/component-runtime/browserOptions.js +3 -3
  36. package/dist/component-runtime/contracts.js +3 -1
  37. package/dist/component-runtime/importPolicy.js +2 -2
  38. package/dist/component-runtime/render.js +5 -5
  39. package/dist/component-runtime/sourceAdmission.js +2 -2
  40. package/dist/component-runtime.js +9 -7
  41. package/dist/compose.js +15 -15
  42. package/dist/composition/floors.d.ts +1 -0
  43. package/dist/composition/floors.js +517 -0
  44. package/dist/composition/scene.js +1 -1
  45. package/dist/composition-ops.js +3 -3
  46. package/dist/core/render.js +3 -3
  47. package/dist/core.js +3 -3
  48. package/dist/mcp/adapter.js +2 -2
  49. package/dist/mcp/core.js +1 -1
  50. package/dist/mcp/scene-shot.d.ts +1 -0
  51. package/dist/mcp/scene-shot.js +18 -0
  52. package/dist/mcp/server.js +4 -3
  53. package/dist/mcp.js +4 -3
  54. package/dist/primitives/captions.js +3 -3
  55. package/dist/primitives/effects.js +4 -4
  56. package/dist/primitives/hero-text.js +2 -2
  57. package/dist/primitives/layouts.js +4 -4
  58. package/dist/primitives/lib/index.js +8 -8
  59. package/dist/primitives/lib.js +8 -8
  60. package/dist/primitives/scenes.js +5 -5
  61. package/dist/primitives/text.js +2 -2
  62. package/dist/primitives.js +13 -13
  63. package/dist/render-harness.js +10 -10
  64. package/package.json +17 -9
  65. package/dist/{chunk-RL5SO653.js → chunk-7SQOXIWR.js} +3 -3
  66. package/dist/{chunk-RBWS5XHE.js → chunk-X34KW2SL.js} +4 -4
@@ -659,6 +659,25 @@ export declare const ComponentBakeJobV2: z.ZodObject<{
659
659
  seed: z.ZodString;
660
660
  }, z.core.$strict>;
661
661
  export type ComponentBakeJobV2 = z.infer<typeof ComponentBakeJobV2>;
662
+ /**
663
+ * The shape of the request FILE a host writes for the preview sidecar it spawns, as a number the
664
+ * two sides can compare before either of them reads the other's bytes.
665
+ *
666
+ * It is not the bake job's version. The job above is one field inside that file; version 1 was the
667
+ * job alone at the top level, and version 2 is `{ job, sceneHost }` — the scene-preparation host
668
+ * block that arrived with sealed scene shots. The file itself carries no discriminator, and the
669
+ * sidecar accepts either shape by sniffing for `job`, so a host and a sidecar that disagree do not
670
+ * fail at the seam: the sidecar hands the whole file to `ComponentBakeJobV2.parse` and the host
671
+ * reads back a raw Zod issue array naming `version`, `source`, `params` and `assets` — an error
672
+ * about the outer envelope wearing the vocabulary of the inner job.
673
+ *
674
+ * That is exactly the failure a desktop build hits when its staged `resources/component-runtime`
675
+ * predates the app running against it, and nothing in either artifact's own manifest can see it:
676
+ * a stale staged tree is internally self-consistent, digest included. So the number is published
677
+ * here and the staging step records it in `runtime-manifest.json`, which lets the host refuse a
678
+ * sidecar that does not read what it writes — with the re-stage command — before it spawns one.
679
+ */
680
+ export declare const COMPONENT_PREVIEW_REQUEST_VERSION: 2;
662
681
  export declare const ComponentGraphicsActualV2: z.ZodObject<{
663
682
  api: z.ZodEnum<{
664
683
  canvas2d: "canvas2d";
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB,EAAG,CAAU,CAAC;AACnD,eAAO,MAAM,wBAAwB,EAAG,CAAU,CAAC;AACnD,eAAO,MAAM,yBAAyB,EAAG,CAAU,CAAC;AAEpD,eAAO,M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,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;IACzC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,mHAAmH;IACnH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAGzC,IAAI,EAAE,yBAAyB,EAC/B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE;CAQxF;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,EACnD,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,mBAAmB,GAAG,gBAAgB,CAAC,GAC9E,IAAI,CAoBN;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,EACnD,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,GAClD,IAAI,CAUN"}
@@ -0,0 +1,18 @@
1
+ /** Shared timeline readers for the floors. Pure; no I/O. */
2
+ import type { Composition, TimelineClip } from "../validators/composition.js";
3
+ export interface VisualClip {
4
+ clip: TimelineClip;
5
+ trackKind: string;
6
+ }
7
+ /** Every enabled non-audio track's source-bearing clips, with their track kind. */
8
+ export declare function visualClips(composition: Composition): VisualClip[];
9
+ /** Every enabled audio track's source-bearing clips. */
10
+ export declare function audioClips(composition: Composition): TimelineClip[];
11
+ /** A clip is "video" if its own declared family or its track says so. */
12
+ export declare function isVideoClip(clip: TimelineClip, trackKind: string): boolean;
13
+ /**
14
+ * The clip covers (approximately) the whole output frame: no region, or a region
15
+ * that spans the frame within a small margin. Full-frame graphics are the ones
16
+ * that read as a "room" rather than an inset element.
17
+ */
18
+ export declare function isFullFrame(clip: TimelineClip): boolean;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Cohesion floors — the two slop mechanisms that separate a slideshow from a
3
+ * film a scene detector reads as one continuous shot.
4
+ *
5
+ * 1. STATIC HOLD — a single visual state parked on screen long enough to read
6
+ * as a slide. What counts as "parked" is decided by `analyzeHold`, which
7
+ * credits a card for the motion vars it reads and an overlay for the
8
+ * animation length its primitive was designed around; see that module for
9
+ * why "has no keyframes" is the wrong test in this repo.
10
+ *
11
+ * 2. A VOICE WITHOUT ITS SPINE — a narration (vo-role clip) with no word-timed
12
+ * caption layer. The persistent word-synced line is what lets the visuals
13
+ * change every beat while the film still coheres; a VO whose words appear
14
+ * nowhere on screen wastes the strongest cohesion device available, and
15
+ * `setCaptions` makes authoring it a one-op fix.
16
+ *
17
+ * Composition-level, render-free, criterion `editorial`. Advisories, never gates.
18
+ */
19
+ import type { Composition } from "../validators/composition.js";
20
+ import type { FloorAdvisory } from "./types.js";
21
+ /**
22
+ * A visual state parked past this reads as a slide. A well-cut reference rarely
23
+ * holds one past ~3s; 4s leaves editorial room.
24
+ */
25
+ export declare const STATIC_HOLD_MAX_SEC = 4;
26
+ /** Anything held past the slide line, measured as time with nothing moving. */
27
+ export declare function detectStaticHolds(composition: Composition): FloorAdvisory[];
28
+ /** A narration (vo-role audio) with no word-timed caption layer. */
29
+ export declare function detectSilentNarration(composition: Composition): FloorAdvisory[];
30
+ /** All cohesion floors, in stable order. */
31
+ export declare function detectCohesionAdvisories(composition: Composition): FloorAdvisory[];
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Craft floors — deterministic checks over the composition's clips ALONE (no
3
+ * pixels, no model), each making one founder critique measurable:
4
+ *
5
+ * 1. SFX SAME-SOUND REUSE — the mix leans on a tiny palette of transients. The
6
+ * same "tick" over and over reads as canned. Measured as distinct sfx
7
+ * mediaIds ÷ total sfx hits.
8
+ *
9
+ * 2. DEAD HOLD — the HARD ceiling above static-hold's "reads as a slide" line.
10
+ * No single beat should park a visual state past DEAD_HOLD_MAX_SEC no matter
11
+ * how it is dressed. A 30s card fires this AND static-hold: they are
12
+ * different critiques (one says "add motion", this one says "no beat holds
13
+ * this long"). Same hold analysis as static-hold, so a card reading the
14
+ * motion vars and an overlay inside its designed length are exempt here too.
15
+ *
16
+ * 3. ROOM CHANGES — a graphics-led film (NO video footage) that cuts between
17
+ * too many sequential full-frame "rooms" reads as a deck of slides rather
18
+ * than one continuous space. A ROOM is a backdrop: a full-frame clip that
19
+ * PAINTS the frame (proven for a card, declared for a component, catalogued
20
+ * for an overlay) with nothing painted beneath it — never a beat card
21
+ * composited over a persistent world, which is the shape the Director is
22
+ * told to author. This is the WEAKEST proxy of the four — true
23
+ * scene-discontinuity detection needs the rendered pixels — so it reports
24
+ * only what the timeline honestly shows.
25
+ *
26
+ * 4. MONTAGE PACING — a run of video cuts churning too fast to read, or a
27
+ * single subliminal clip the eye never registers.
28
+ *
29
+ * All land on `editorial`. Advisories, never gates.
30
+ */
31
+ import type { Composition } from "../validators/composition.js";
32
+ import type { FloorAdvisory } from "./types.js";
33
+ /**
34
+ * A mix with this many SFX hits is dense enough that palette variety matters —
35
+ * below it, reuse is unremarkable (a 3-hit film reusing one tick is fine).
36
+ */
37
+ export declare const SFX_VARIETY_MIN_HITS = 6;
38
+ /**
39
+ * distinct sounds ÷ hits below this reads as "the same sound over and over".
40
+ * 15 hits from 3 sounds = 0.20 fires; 9 hits from 5 sounds = 0.56 is clean.
41
+ */
42
+ export declare const SFX_VARIETY_MIN_RATIO = 0.4;
43
+ /**
44
+ * The absolute ceiling for one parked visual state, above static-hold's "reads
45
+ * as a slide" line. Past this a beat is a parked slide however it is dressed.
46
+ */
47
+ export declare const DEAD_HOLD_MAX_SEC = 8;
48
+ /**
49
+ * More than this many sequential full-frame "rooms" in a graphics-led film reads
50
+ * as a slide deck. Two backdrops (a before / after) is a legitimate contrast.
51
+ */
52
+ export declare const ROOM_CHANGE_MAX = 2;
53
+ /** A clip shorter than this is a churn cut; MONTAGE_MIN_RUN in a row strobe. */
54
+ export declare const MONTAGE_FAST_CLIP_SEC = 1.2;
55
+ /** A single clip shorter than this is subliminal — the eye cannot register it. */
56
+ export declare const MONTAGE_HARD_MIN_SEC = 0.4;
57
+ /** How many adjacent video clips make a "montage" run worth grading for rhythm. */
58
+ export declare const MONTAGE_MIN_RUN = 3;
59
+ /**
60
+ * Floor 1 — SFX same-sound reuse. Among sfx-role audio clips, distinct mediaIds
61
+ * ÷ total hits. Fires only once the mix is dense enough for variety to matter.
62
+ * Composition-scoped (not one clip's fault) → no clipId.
63
+ */
64
+ export declare function detectSfxSameSoundReuse(composition: Composition): FloorAdvisory[];
65
+ /**
66
+ * Floor 2 — dead hold. Any judgeable medium parking one visual state past the
67
+ * HARD ceiling. Components stay exempt: nothing on the wire says how long their
68
+ * own choreography runs.
69
+ */
70
+ export declare function detectDeadHolds(composition: Composition): FloorAdvisory[];
71
+ /**
72
+ * Floor 3 — room changes (graphics-led only). Gated on NO video footage. Counts
73
+ * full-frame backdrop graphics with nothing painted beneath them that tile time
74
+ * without overlapping (a sequence of rooms). WEAKEST proxy — see the file
75
+ * header. Composition-scoped.
76
+ */
77
+ export declare function detectRoomChanges(composition: Composition): FloorAdvisory[];
78
+ /**
79
+ * Floor 4 — montage pacing. Over the video clips: any subliminal clip, and a
80
+ * MONTAGE_MIN_RUN-in-a-row churn of sub-MONTAGE_FAST_CLIP_SEC cuts. Both are
81
+ * findings about what the eye can resolve; see MONTAGE_MIN_RUN for why the
82
+ * too-slow half of this floor no longer exists.
83
+ */
84
+ export declare function detectMontagePacing(composition: Composition): FloorAdvisory[];
85
+ /** All craft floors, in stable order. Composition-level, render-free. */
86
+ export declare function detectCraftAdvisories(composition: Composition): FloorAdvisory[];
@@ -0,0 +1,24 @@
1
+ /**
2
+ * CRAFT FLOORS — deterministic, render-free advisories over an authored
3
+ * composition. Pure functions: no I/O, no network, no model. They never refuse a
4
+ * composition; they tell its author which beat reads as a slide, which mix reads
5
+ * as canned, and which run of cuts reads as strobe.
6
+ */
7
+ export type { FloorAdvisory, FloorCriterion, FloorRule } from "./types.js";
8
+ export { floorAdvisoryLine } from "./types.js";
9
+ export { STATIC_HOLD_MAX_SEC, detectStaticHolds, detectSilentNarration, detectCohesionAdvisories, } from "./cohesionFloors.js";
10
+ export { DEAD_HOLD_MAX_SEC, ROOM_CHANGE_MAX, SFX_VARIETY_MIN_HITS, SFX_VARIETY_MIN_RATIO, MONTAGE_FAST_CLIP_SEC, MONTAGE_HARD_MIN_SEC, MONTAGE_MIN_RUN, detectSfxSameSoundReuse, detectDeadHolds, detectRoomChanges, detectMontagePacing, detectCraftAdvisories, } from "./craftFloors.js";
11
+ export { OCCLUSION_MIN_COVERAGE, OCCLUSION_MIN_SEC, OCCLUSION_DECLARED_ALPHA_MIN_SEC, cardIsOpaque, declaredAlphaPolicy, layeredVisualClips, detectBackdropOcclusion, } from "./occlusionFloor.js";
12
+ export type { DeclaredAlphaPolicy, LayeredClip, OcclusionEvidence } from "./occlusionFloor.js";
13
+ export { CARD_EDGE_RAMP_FRAMES, analyzeHold, cardMotionSeconds, compositionFps, keyframeMotionSeconds, overlayDesignedSeconds, } from "./staticHold.js";
14
+ export type { HoldAnalysis, StaticMedium } from "./staticHold.js";
15
+ import type { Composition } from "../validators/composition.js";
16
+ import { type FloorAdvisory } from "./types.js";
17
+ /** Every floor, in stable order: cohesion first, then craft, then layering. */
18
+ export declare function detectFloorAdvisories(composition: Composition): FloorAdvisory[];
19
+ /**
20
+ * Every floor, rendered for a string `warnings[]` channel. The structured
21
+ * advisories are the source of truth; these lines are derived from them so the
22
+ * two can never drift.
23
+ */
24
+ export declare function floorAdvisoryLines(composition: Composition): string[];
@@ -0,0 +1,160 @@
1
+ /**
2
+ * BACKDROP OCCLUSION — the film that hides itself.
3
+ *
4
+ * CueFrame's track order is INVERTED from the NLE convention every author
5
+ * arrives with: track index 0 is the TOP layer, and the LAST track is the
6
+ * backdrop. A Director that reaches for "track 0 = the bottom = the world"
7
+ * authors a persistent full-frame card there and buries every beat under it.
8
+ * That is not hypothetical — a real desktop run shipped a 30s launch video
9
+ * whose four beat cards were never once on screen, and nothing in the loop
10
+ * said so.
11
+ *
12
+ * This floor is the deterministic catch: an OPAQUE FULL-FRAME clip on a HIGHER
13
+ * layer that hides clips on LOWER layers for a SUBSTANTIAL span.
14
+ *
15
+ * ── The layer arithmetic ─────────────────────────────────────────────────────
16
+ * `layerIndex = trackCount - trackIndex`, over `composition.tracks` in wire
17
+ * order, with `trackCount = composition.tracks.length` — INCLUDING audio and
18
+ * disabled tracks, because the renderer counts them too. That is a re-derivation
19
+ * of `packages/execution/core/src/render/trackProjection.ts` (`visualIdentity`),
20
+ * fed to `zIndex` in `render-entry`'s `MainComposition`, not an import: this
21
+ * package is UPSTREAM of the execution packages (execution depends on
22
+ * composition, never the reverse), so importing the renderer's copy would invert
23
+ * the dependency graph. The two are pinned together instead by mirroring the
24
+ * renderer's own deliberate ordering fixture — the `top-overlay` (0→3) /
25
+ * `middle-video` (1→2) / `bottom-effect` (2→1) case in
26
+ * `core/src/render/__tests__/compositionRender.test.ts` — in this module's test,
27
+ * so a flip of the convention breaks both files at once. The `alphaPolicy`
28
+ * literals below are inlined for the same reason: they are
29
+ * `ComponentManifestV2.alphaPolicy` in
30
+ * `packages/execution/component-runtime/src/contracts.ts`, and importing that
31
+ * contract would invert the dependency graph.
32
+ *
33
+ * ── What counts as OPAQUE — two grades of evidence ───────────────────────────
34
+ * PROVEN (a CARD). A card's paint is literally on the wire (`html` + `tokens`),
35
+ * so we can READ whether it lays down an opaque plate.
36
+ *
37
+ * DECLARED (a component whose manifest travels on the clip). A component's
38
+ * pixels live in source we do not execute, but its author's alpha INTENT is on
39
+ * the wire: `source.params.componentManifest.alphaPolicy` (local desktop
40
+ * components ride as `overlay` + `primitiveId: 'custom'`, and the manifest is
41
+ * set beside `jsxSource`; `source.props` is read too, for the kinds that name
42
+ * their bag `props`). `requires-transparency` is strong evidence the clip is NOT
43
+ * an occluder and never fires. `allows-opaque` is PERMISSION to be opaque, not
44
+ * proof of it — so it is held to a much longer buried span (see
45
+ * `OCCLUSION_DECLARED_ALPHA_MIN_SEC`) and the advisory says the manifest ALLOWS
46
+ * opacity rather than asserting the pixels are.
47
+ *
48
+ * Nothing else is judged: a catalog overlay's alpha is not on the clip, and a
49
+ * media clip's coverage depends on intrinsic aspect and `fit`. A false positive
50
+ * here is worse than a miss — it would tell an author to move a clip that is
51
+ * fine — so every medium we cannot read stays see-through and never fires, and a
52
+ * clip with no readable manifest is simply unjudged.
53
+ *
54
+ * Composition-level, render-free, criterion `editorial`. Advisory, never a gate.
55
+ */
56
+ import type { Composition, TimelineClip } from "../validators/composition.js";
57
+ import type { FloorAdvisory } from "./types.js";
58
+ /**
59
+ * A lower clip hidden for at least this FRACTION of its own life is effectively
60
+ * never seen. Below it the clip still reads before or after the takeover, which
61
+ * is ordinary layering — a title card punched over a beat, a transition plate.
62
+ * 0.9 leaves room for a takeover that lands a frame early or runs a beat long
63
+ * without indicting a clip the viewer does actually see.
64
+ */
65
+ export declare const OCCLUSION_MIN_COVERAGE = 0.9;
66
+ /**
67
+ * THE TRIGGER: at least ONE buried clip must be hidden for this many seconds
68
+ * before the floor speaks. A deliberate full-frame takeover for a beat is
69
+ * legitimate craft, and a short stinger can legitimately swallow a short clip
70
+ * whole. Past 3s of a lower clip buried, the takeover is not a beat any more —
71
+ * it is a layer in the wrong place. (Once it does speak it names every buried
72
+ * clip, short ones included; this floor gates the FINDING, not the evidence.)
73
+ */
74
+ export declare const OCCLUSION_MIN_SEC = 3;
75
+ /**
76
+ * THE TRIGGER for a clip whose opacity is only DECLARED, never proven — a
77
+ * component whose manifest says `allows-opaque`. That policy is PERMISSION to
78
+ * paint opaque pixels, not a statement that it does: a component free to be
79
+ * opaque may still render a transparent lower-third. So the declared grade does
80
+ * not get the card's 3s trigger. At this many seconds of a lower clip buried,
81
+ * no reading of the timeline leaves the takeover a beat — either the component
82
+ * is opaque and the film is hiding itself, or it is transparent and the author
83
+ * dismisses one advisory. Below it, the cost of being wrong outweighs the catch.
84
+ */
85
+ export declare const OCCLUSION_DECLARED_ALPHA_MIN_SEC = 10;
86
+ /**
87
+ * `ComponentManifestV2.alphaPolicy` values, INLINED rather than imported from
88
+ * `packages/execution/component-runtime/src/contracts.ts` — see the dependency
89
+ * note in the module header. If the contract ever grows a third value, this
90
+ * module treats it as unreadable and stays silent, which is the safe direction.
91
+ */
92
+ declare const ALPHA_POLICY_ALLOWS_OPAQUE = "allows-opaque";
93
+ declare const ALPHA_POLICY_REQUIRES_TRANSPARENCY = "requires-transparency";
94
+ /**
95
+ * The alpha policy DECLARED on this clip, or `null` when the clip carries no
96
+ * readable manifest — which is most clips, and which leaves them unjudged.
97
+ *
98
+ * The manifest rides in the clip's own param bag: `params` for an `overlay`
99
+ * (how a local desktop component travels — `primitiveId: 'custom'`, manifest
100
+ * beside `jsxSource`), `props` for the kinds that name their bag that way.
101
+ * Read structurally and defensively: this bag is `Record<string, unknown>` on
102
+ * the wire, so anything that is not literally one of the two contract strings
103
+ * reads as "not declared".
104
+ */
105
+ export type DeclaredAlphaPolicy = typeof ALPHA_POLICY_ALLOWS_OPAQUE | typeof ALPHA_POLICY_REQUIRES_TRANSPARENCY;
106
+ export declare function declaredAlphaPolicy(source: TimelineClip["source"]): DeclaredAlphaPolicy | null;
107
+ /** A visual clip with the layer the renderer will actually give it. */
108
+ export interface LayeredClip {
109
+ clip: TimelineClip;
110
+ layerIndex: number;
111
+ }
112
+ /**
113
+ * Every enabled non-audio clip, carrying `layerIndex = trackCount - trackIndex`.
114
+ * Deliberately NOT built on `visualClips()`: that reader drops the track index,
115
+ * and the index is this floor's entire subject.
116
+ */
117
+ export declare function layeredVisualClips(composition: Composition): LayeredClip[];
118
+ /**
119
+ * Does this card lay down an opaque full-bleed plate?
120
+ *
121
+ * We judge the FIRST `background` declaration in document order, because HTML is
122
+ * written outside-in: the first background an author writes is the outermost
123
+ * element's, which is the one that fills the frame. Judging *any* background
124
+ * would fire on a transparent card carrying one opaque inner chip — precisely
125
+ * the false positive that would make this floor untrustworthy. The same block's
126
+ * sizing is then checked, so a card whose ROOT is itself a small opaque chip is
127
+ * ruled out too.
128
+ *
129
+ * Two bounds keep that premise honest, and both were false positives before
130
+ * they were written: the scan reads INLINE styles only (`maskStyleElements` —
131
+ * document order says nothing about which element a `<style>` rule hits), and a
132
+ * background found below the root counts only if that element `claimsWholeFrame`
133
+ * (an opaque `<span>` chip inside a transparent card is not a backdrop).
134
+ */
135
+ export declare function cardIsOpaque(source: {
136
+ html: string;
137
+ tokens?: Record<string, string>;
138
+ }): boolean;
139
+ /**
140
+ * Does the clip's own geometry still cover the frame? `isFullFrame` reads
141
+ * `region`; these read the transforms that can pull an otherwise full-frame clip
142
+ * off or away from the frame. Any transform we cannot reason about → not an
143
+ * occluder. Exported because the room-changes floor asks the same geometric
144
+ * question of a candidate world and must not answer it differently.
145
+ */
146
+ export declare function coversFrame(clip: TimelineClip): boolean;
147
+ /**
148
+ * How strong our evidence is that this clip paints over everything beneath it.
149
+ * `proven` — a card whose own wire paint is an opaque full-bleed plate.
150
+ * `declared` — a component whose manifest ALLOWS opacity; permission, not fact.
151
+ */
152
+ export type OcclusionEvidence = "proven" | "declared";
153
+ /** Effects are applied to lanes, not painted as one — they are never "hidden". */
154
+ export declare function isPaintedLane(clip: TimelineClip): boolean;
155
+ /**
156
+ * The floor. One advisory per occluding clip — that is the ONE clip to edit —
157
+ * naming every clip it buries and the numbers that prove it.
158
+ */
159
+ export declare function detectBackdropOcclusion(composition: Composition): FloorAdvisory[];
160
+ export {};
@@ -0,0 +1,103 @@
1
+ /**
2
+ * HOW LONG DOES THIS CLIP PARK A SINGLE VISUAL STATE?
3
+ *
4
+ * Both hold floors (`static-hold`, `dead-hold`) ask exactly this question and
5
+ * differ only in where they draw the line, so they share one answer.
6
+ *
7
+ * The naive test — "a card or an un-Ken-Burnsed still is static, full stop" —
8
+ * is wrong here, in both directions:
9
+ *
10
+ * • A CARD IS NOT NECESSARILY STATIC. The card motion runtime drives a set of
11
+ * CSS custom properties per frame (`--cf-progress`, `--cf-ease`, `--cf-frame`,
12
+ * `--cf-t`, plus the edge ramps `--cf-enter` / `--cf-exit`). A card whose html
13
+ * reads a CONTINUOUS one of those moves for its whole life and is not a slide.
14
+ * A card that reads only the EDGE ramps animates in and out and is parked in
15
+ * between — which is the honest number to judge.
16
+ *
17
+ * • AN OVERLAY IS NOT STATIC JUST BECAUSE IT HAS NO KEYFRAMES. Catalog
18
+ * primitives animate internally; treating "no `animate` channels" as "no
19
+ * motion" would fire on every well-authored overlay in the catalog. What is
20
+ * actually knowable is each primitive's DESIGNED animation length
21
+ * (`durationInFrames` / `fps` in the catalog meta). Held within it, the
22
+ * overlay is moving. Held past it, the surplus is the parked tail — the eye
23
+ * sees a finished animation holding its last frame, which is exactly the
24
+ * slide texture these floors exist to catch.
25
+ *
26
+ * Clip-level `animate` keyframes are motion on any medium and are subtracted the
27
+ * same way. CSS `@keyframes` in card html are NOT counted: they run on wall
28
+ * clock, and a frame-seeking renderer does not advance them, so they are not
29
+ * motion anyone will see in the output.
30
+ *
31
+ * Components stay EXEMPT. A component carries its own choreography and nothing
32
+ * on the wire says how long it runs, so the composition cannot honestly judge it.
33
+ */
34
+ import type { Composition, TimelineClip } from "../validators/composition.js";
35
+ import type { CardMotionVarName } from "../projection/cardTokens.js";
36
+ /**
37
+ * Card motion vars that change on EVERY frame of the clip: a card reading one of
38
+ * these is in motion for its whole duration.
39
+ */
40
+ declare const CONTINUOUS_CARD_MOTION_VARS: readonly ["--cf-frame", "--cf-t", "--cf-progress", "--cf-ease"];
41
+ /**
42
+ * Card motion vars that ramp only at the edges: `--cf-enter` rises over the first
43
+ * frames, `--cf-exit` falls over the last. A card reading only these is parked
44
+ * for everything in between. (`--cf-fps` and `--cf-duration` are constants and
45
+ * are motion for nobody.)
46
+ */
47
+ declare const EDGE_CARD_MOTION_VARS: readonly ["--cf-enter", "--cf-exit"];
48
+ /**
49
+ * Frames each edge ramp spans in the card motion runtime. Duplicated here rather
50
+ * than imported because the runtime lives downstream of this package (it depends
51
+ * on the composition types, not the other way round); the test below pins the
52
+ * number so a drift is visible.
53
+ */
54
+ export declare const CARD_EDGE_RAMP_FRAMES = 18;
55
+ /**
56
+ * Compile-time proof that the two lists above plus the two constants partition
57
+ * `CARD_MOTION_VAR_NAMES`. Add a var to the runtime without classifying it here
58
+ * and this line stops type-checking, rather than the floor quietly mis-reading a
59
+ * moving card as a parked one.
60
+ */
61
+ type AssertNever<T extends never> = T;
62
+ type UnclassifiedCardMotionVar = Exclude<CardMotionVarName, (typeof CONTINUOUS_CARD_MOTION_VARS)[number] | (typeof EDGE_CARD_MOTION_VARS)[number] | "--cf-fps" | "--cf-duration">;
63
+ export type CardMotionVarsArePartitioned = AssertNever<UnclassifiedCardMotionVar>;
64
+ export type StaticMedium = "card" | "still image" | "overlay";
65
+ export interface HoldAnalysis {
66
+ /** Seconds this clip parks one unchanging visual state. */
67
+ staticSeconds: number;
68
+ /** Which medium, for prose the author can act on. */
69
+ medium: StaticMedium;
70
+ /** For overlays: the primitive's designed animation length, in seconds. */
71
+ designedSeconds?: number;
72
+ /** For overlays: the primitive the clip mounts. */
73
+ primitiveId?: string;
74
+ }
75
+ export declare function compositionFps(composition: Composition): number;
76
+ /**
77
+ * The longest span any `animate` channel covers, in clip-relative seconds.
78
+ * Keyframe times are clip-relative (the renderer evaluates channels at
79
+ * `frame / fps` within the clip), so this is directly comparable to `duration`.
80
+ */
81
+ export declare function keyframeMotionSeconds(clip: TimelineClip): number;
82
+ /**
83
+ * Seconds of motion a card gets from the card motion runtime: its whole duration
84
+ * if it reads a continuous var, the two edge ramps if it reads only those, zero
85
+ * if it reads none.
86
+ */
87
+ export declare function cardMotionSeconds(source: {
88
+ html: string;
89
+ tokens?: Record<string, string>;
90
+ }, duration: number, fps: number): number;
91
+ /**
92
+ * A catalog primitive's designed animation length in seconds, or `null` when the
93
+ * catalog does not know the primitive (an org component id, or a build this
94
+ * catalog predates) — in which case the clip is not judged at all.
95
+ */
96
+ export declare function overlayDesignedSeconds(primitiveId: string, fallbackFps: number): number | null;
97
+ /**
98
+ * How long this clip holds one unchanging frame, or `null` when the medium is
99
+ * not judgeable (video, component, effect, nested composition, an animated
100
+ * still, an overlay the catalog does not know).
101
+ */
102
+ export declare function analyzeHold(clip: TimelineClip, fps: number, trackKind?: string): HoldAnalysis | null;
103
+ export {};
@@ -0,0 +1,52 @@
1
+ /**
2
+ * A FLOOR ADVISORY — a deterministic finding about the authored timeline,
3
+ * addressed to the clip its author can edit.
4
+ *
5
+ * Floors are ADVISORIES, never gates. They are computed from the composition
6
+ * alone: no pixels, no network, no model. Their job is to be FIXED, so every
7
+ * one of them carries the numbers that prove it (`detail`) and the edit that
8
+ * resolves it (`fix`) — never a vibe, and never a lone score.
9
+ *
10
+ * The shape is the public API's `advisories[]` item
11
+ * (`{ rule, criterion, clipId?, detail, fix }`), narrowed here to the rules and
12
+ * the single criterion these floors can emit. It is structurally assignable to
13
+ * that wire type; nothing new is invented.
14
+ */
15
+ /** Stable machine names. An author reads `fix`; a human reads `rule` in a trace. */
16
+ export type FloorRule = "static-hold" | "caption-spine" | "sfx-same-sound-reuse" | "dead-hold" | "room-changes" | "montage-pacing" | "backdrop-occlusion";
17
+ /**
18
+ * Every floor lands on `editorial` — pacing and continuity territory. There is
19
+ * deliberately no new criterion: the criterion set is load-bearing across
20
+ * weights, prompts and score columns, and none of these findings is a new axis.
21
+ */
22
+ export type FloorCriterion = "editorial";
23
+ export interface FloorAdvisory {
24
+ /** Which criterion this advisory floors. Always `editorial`. */
25
+ criterion: FloorCriterion;
26
+ /** The rule that fired. */
27
+ rule: FloorRule;
28
+ /**
29
+ * THE CLIP TO EDIT. The author already holds the composition, so a clip id
30
+ * turns "something is wrong" into a targeted amendment. Absent only where the
31
+ * finding genuinely is not one clip's fault (an SFX palette is the whole mix;
32
+ * a room count is the whole film) — saying so honestly beats naming a clip we
33
+ * cannot justify.
34
+ */
35
+ clipId?: string;
36
+ /** What is wrong, WITH THE NUMBERS that prove it. */
37
+ detail: string;
38
+ /** The edit that resolves it. Imperative, specific, actually available. */
39
+ fix: string;
40
+ }
41
+ /**
42
+ * The one-line rendering of an advisory, for the string `warnings[]` channels
43
+ * that predate the structured shape (the local apply verdict, the MCP warning
44
+ * banner). Kept here so prose and structure can never drift: one is derived
45
+ * from the other.
46
+ *
47
+ * `<rule> — <detail>. Fix: <fix>` matches the house style already used by the
48
+ * card-token advisories (`card_token_unresolved — …`): the machine name leads
49
+ * so the reader can grep or dedupe it, the evidence follows, and the imperative
50
+ * closes the line where an author's eye lands last.
51
+ */
52
+ export declare function floorAdvisoryLine(advisory: FloorAdvisory): string;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Introspection and parsing over the `SceneShotSpecV2` contract.
3
+ *
4
+ * These helpers CONSUME the zod contract defined in `./schema` — they admit untrusted data
5
+ * through it and walk an already-parsed shot — rather than define it, so they live beside the
6
+ * contract instead of inside it. `./schema` re-exports them, so every import path is unchanged.
7
+ */
8
+ import { SceneShotSpecV2 } from './schema.js';
9
+ /** Parse untrusted authored data through the same public schema all consumers embed. */
10
+ export declare function parseSceneShotSpecV2(value: unknown): SceneShotSpecV2;
11
+ /** Distinct outer image asset slots in first-use order, recursively through groups. */
12
+ export declare function sceneShotImageSlots(spec: Pick<SceneShotSpecV2, 'layers'>): string[];
13
+ /** Distinct video media ids in first-use order, recursively through groups. */
14
+ export declare function sceneShotVideoSlots(spec: Pick<SceneShotSpecV2, 'layers'>): string[];
15
+ export declare function sceneShotSurfaceCount(spec: Pick<SceneShotSpecV2, 'layers'>): number;
@@ -340,13 +340,8 @@ export type SceneRefusalCode = 'scene_spec_version_unsupported' | 'scene_lightin
340
340
  * second stage parses/materializes the schema that is also published as JSON Schema.
341
341
  */
342
342
  export declare const SceneShotSpecV2: z.ZodType<SceneShotSpecV2>;
343
- /** Parse untrusted authored data through the same public schema all consumers embed. */
344
- export declare function parseSceneShotSpecV2(value: unknown): SceneShotSpecV2;
345
- /** Distinct outer image asset slots in first-use order, recursively through groups. */
346
- export declare function sceneShotImageSlots(spec: Pick<SceneShotSpecV2, 'layers'>): string[];
347
- /** Distinct video media ids in first-use order, recursively through groups. */
348
- export declare function sceneShotVideoSlots(spec: Pick<SceneShotSpecV2, 'layers'>): string[];
349
- export declare function sceneShotSurfaceCount(spec: Pick<SceneShotSpecV2, 'layers'>): number;
343
+ /** Introspection and parsing over this contract; re-exported so `./schema` keeps its surface. */
344
+ export * from './introspection.js';
350
345
  /**
351
346
  * What a scene shot IS, for a caller reading the published contract.
352
347
  *
@@ -425,4 +420,3 @@ export declare const sceneShotJsonSchema: {
425
420
  _prefault?: unknown;
426
421
  };
427
422
  export declare function sceneShotJsonSchemaText(): string;
428
- export {};
@@ -1646,6 +1646,12 @@ export interface Envelope {
1646
1646
  message: string;
1647
1647
  fix?: Record<string, unknown>;
1648
1648
  locator?: Record<string, unknown>;
1649
+ /**
1650
+ * Contract version that produced this verdict. If it differs between two
1651
+ * calls the rules changed underneath the caller, not the request (CUE-42).
1652
+ * Not sensitive, so it survives the scrub for untrusted callers too.
1653
+ */
1654
+ contract?: string;
1649
1655
  }
1650
1656
  export declare class CueframeError extends Error {
1651
1657
  readonly code: ErrorCode;
@@ -4,11 +4,11 @@ import {
4
4
  sceneGrainPreparationCpuAllocationV1,
5
5
  scenePresetBuilderDescriptorV1,
6
6
  sceneSlabPreparationFactsV1
7
- } from "../chunk-OBA6NW4S.js";
7
+ } from "../chunk-XV2K3AQT.js";
8
8
  import {
9
9
  photographicStudioPreparationFactsV1,
10
10
  sceneFocusPreparationAllocationsV1
11
- } from "../chunk-XACXNDFL.js";
11
+ } from "../chunk-CL5Y6V6K.js";
12
12
  import "../chunk-2L7PYYJK.js";
13
13
  import "../chunk-2ESYSVXG.js";
14
14
  export {
package/dist/animate.js CHANGED
@@ -102,7 +102,7 @@ import {
102
102
  useStage,
103
103
  weightsAt,
104
104
  worldTransform
105
- } from "./chunk-JBWSK2YD.js";
105
+ } from "./chunk-2PU2TSUG.js";
106
106
  import {
107
107
  DEFAULT_LIGHTING_PROFILE,
108
108
  DEVICE_GLASS_OPACITY_ENCODED,
@@ -161,7 +161,7 @@ import {
161
161
  studioShadowFrustum,
162
162
  verifyPhotographicStudioHdr,
163
163
  withNormalisedFaceUv
164
- } from "./chunk-OBA6NW4S.js";
164
+ } from "./chunk-XV2K3AQT.js";
165
165
  import {
166
166
  ALLOWED_BAKE_SCALES,
167
167
  DEFAULT_BAKE_SCALE,
@@ -183,7 +183,7 @@ import {
183
183
  projectedSlotEdges,
184
184
  sceneFocusPreparationAllocationsV1,
185
185
  selectSceneBakeScale
186
- } from "./chunk-XACXNDFL.js";
186
+ } from "./chunk-CL5Y6V6K.js";
187
187
  import "./chunk-2L7PYYJK.js";
188
188
  import "./chunk-AVTEPAWI.js";
189
189
  import "./chunk-2ESYSVXG.js";
@@ -13,7 +13,7 @@ import {
13
13
  sceneTrackIdFor,
14
14
  validateSceneAdd,
15
15
  validateSceneUpdate
16
- } from "../chunk-4MK6YGKV.js";
16
+ } from "../chunk-N2OZDD44.js";
17
17
  import {
18
18
  SCENE_TRANSITION_KINDS,
19
19
  collectSceneClipIssues,
@@ -22,7 +22,7 @@ import {
22
22
  offFrameLattice,
23
23
  readSceneSourceRef,
24
24
  sceneClipShapeIssues
25
- } from "../chunk-XACXNDFL.js";
25
+ } from "../chunk-CL5Y6V6K.js";
26
26
  import "../chunk-2L7PYYJK.js";
27
27
  import "../chunk-2ESYSVXG.js";
28
28
  export {