@nodaro/shared 2.13.0 → 2.15.0

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/dist/index.d.cts CHANGED
@@ -1724,6 +1724,13 @@ declare function collectAncestorRefs<N extends GenericNode, E extends GenericEdg
1724
1724
  * the backend (which sees node data as `Record<string, unknown>`) can pass
1725
1725
  * raw JSON through `expandExtraRefsToConnectedReferences`. */
1726
1726
  interface ExtraRefInput {
1727
+ /**
1728
+ * Stable id of this extra reference, when the row has one. What a
1729
+ * `{ref:<id>}` token in the prompt names; passed through to the shared video
1730
+ * resolver's slot map by both the canvas and the orchestrator. Absent → the
1731
+ * row still numbers normally but cannot be addressed by id.
1732
+ */
1733
+ readonly id?: string;
1727
1734
  readonly url?: string;
1728
1735
  readonly description?: string;
1729
1736
  readonly characterSlug?: string;
@@ -9521,6 +9528,7 @@ declare const windowSceneSchema: z.ZodObject<{
9521
9528
  morph: "morph";
9522
9529
  jump: "jump";
9523
9530
  }>>;
9531
+ transition: z.ZodOptional<z.ZodString>;
9524
9532
  audio: z.ZodArray<z.ZodObject<{
9525
9533
  mode: z.ZodEnum<{
9526
9534
  music: "music";
@@ -9643,6 +9651,7 @@ declare const windowAnalysisSchema: z.ZodObject<{
9643
9651
  morph: "morph";
9644
9652
  jump: "jump";
9645
9653
  }>>;
9654
+ transition: z.ZodOptional<z.ZodString>;
9646
9655
  audio: z.ZodArray<z.ZodObject<{
9647
9656
  mode: z.ZodEnum<{
9648
9657
  music: "music";
@@ -9731,6 +9740,7 @@ declare const analyzedSceneSchema: z.ZodObject<{
9731
9740
  morph: "morph";
9732
9741
  jump: "jump";
9733
9742
  }>>;
9743
+ transition: z.ZodOptional<z.ZodString>;
9734
9744
  audio: z.ZodArray<z.ZodObject<{
9735
9745
  mode: z.ZodEnum<{
9736
9746
  music: "music";
@@ -9863,6 +9873,7 @@ declare const videoAnalysisResultSchema: z.ZodObject<{
9863
9873
  morph: "morph";
9864
9874
  jump: "jump";
9865
9875
  }>>;
9876
+ transition: z.ZodOptional<z.ZodString>;
9866
9877
  audio: z.ZodArray<z.ZodObject<{
9867
9878
  mode: z.ZodEnum<{
9868
9879
  music: "music";
package/dist/index.d.ts CHANGED
@@ -1724,6 +1724,13 @@ declare function collectAncestorRefs<N extends GenericNode, E extends GenericEdg
1724
1724
  * the backend (which sees node data as `Record<string, unknown>`) can pass
1725
1725
  * raw JSON through `expandExtraRefsToConnectedReferences`. */
1726
1726
  interface ExtraRefInput {
1727
+ /**
1728
+ * Stable id of this extra reference, when the row has one. What a
1729
+ * `{ref:<id>}` token in the prompt names; passed through to the shared video
1730
+ * resolver's slot map by both the canvas and the orchestrator. Absent → the
1731
+ * row still numbers normally but cannot be addressed by id.
1732
+ */
1733
+ readonly id?: string;
1727
1734
  readonly url?: string;
1728
1735
  readonly description?: string;
1729
1736
  readonly characterSlug?: string;
@@ -9521,6 +9528,7 @@ declare const windowSceneSchema: z.ZodObject<{
9521
9528
  morph: "morph";
9522
9529
  jump: "jump";
9523
9530
  }>>;
9531
+ transition: z.ZodOptional<z.ZodString>;
9524
9532
  audio: z.ZodArray<z.ZodObject<{
9525
9533
  mode: z.ZodEnum<{
9526
9534
  music: "music";
@@ -9643,6 +9651,7 @@ declare const windowAnalysisSchema: z.ZodObject<{
9643
9651
  morph: "morph";
9644
9652
  jump: "jump";
9645
9653
  }>>;
9654
+ transition: z.ZodOptional<z.ZodString>;
9646
9655
  audio: z.ZodArray<z.ZodObject<{
9647
9656
  mode: z.ZodEnum<{
9648
9657
  music: "music";
@@ -9731,6 +9740,7 @@ declare const analyzedSceneSchema: z.ZodObject<{
9731
9740
  morph: "morph";
9732
9741
  jump: "jump";
9733
9742
  }>>;
9743
+ transition: z.ZodOptional<z.ZodString>;
9734
9744
  audio: z.ZodArray<z.ZodObject<{
9735
9745
  mode: z.ZodEnum<{
9736
9746
  music: "music";
@@ -9863,6 +9873,7 @@ declare const videoAnalysisResultSchema: z.ZodObject<{
9863
9873
  morph: "morph";
9864
9874
  jump: "jump";
9865
9875
  }>>;
9876
+ transition: z.ZodOptional<z.ZodString>;
9866
9877
  audio: z.ZodArray<z.ZodObject<{
9867
9878
  mode: z.ZodEnum<{
9868
9879
  music: "music";
package/dist/index.js CHANGED
@@ -1808,11 +1808,11 @@ var VIDEO_MODELS = {
1808
1808
  description: "Legacy fast-tier analysis model (pre-2026-07). Kept so stored raw-model configs keep running and keep pricing under their own identifier; new fast-tier runs use the current fast model.",
1809
1809
  useCases: ["video-analysis", "shot-list", "fast"],
1810
1810
  pricing: [
1811
- { identifier: "video-analysis:gemini-3-flash", credits: 847, note: "10-min ceiling (no duration given)" },
1812
- { identifier: "video-analysis:gemini-3-flash:60s", credits: 180 },
1811
+ { identifier: "video-analysis:gemini-3-flash", credits: 848, note: "10-min ceiling (no duration given)" },
1812
+ { identifier: "video-analysis:gemini-3-flash:60s", credits: 181 },
1813
1813
  { identifier: "video-analysis:gemini-3-flash:180s", credits: 185 },
1814
1814
  { identifier: "video-analysis:gemini-3-flash:360s", credits: 515 },
1815
- { identifier: "video-analysis:gemini-3-flash:600s", credits: 847, note: "10-min ceiling" }
1815
+ { identifier: "video-analysis:gemini-3-flash:600s", credits: 848, note: "10-min ceiling" }
1816
1816
  ]
1817
1817
  },
1818
1818
  "gemini-3.6-flash-video-analysis": {
@@ -1825,11 +1825,11 @@ var VIDEO_MODELS = {
1825
1825
  description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 fast, economy tier. Billed per duration bucket.",
1826
1826
  useCases: ["video-analysis", "shot-list", "fast"],
1827
1827
  pricing: [
1828
- { identifier: "video-analysis:gemini-3.6-flash", credits: 990, note: "10-min ceiling (no duration given)" },
1828
+ { identifier: "video-analysis:gemini-3.6-flash", credits: 992, note: "10-min ceiling (no duration given)" },
1829
1829
  { identifier: "video-analysis:gemini-3.6-flash:60s", credits: 204 },
1830
- { identifier: "video-analysis:gemini-3.6-flash:180s", credits: 218 },
1831
- { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 600 },
1832
- { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 990, note: "10-min ceiling" }
1830
+ { identifier: "video-analysis:gemini-3.6-flash:180s", credits: 219 },
1831
+ { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 602 },
1832
+ { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 992, note: "10-min ceiling" }
1833
1833
  ]
1834
1834
  },
1835
1835
  "gemini-3.1-pro-video-analysis": {
@@ -1842,11 +1842,11 @@ var VIDEO_MODELS = {
1842
1842
  description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 higher-fidelity, default tier. Billed per duration bucket.",
1843
1843
  useCases: ["video-analysis", "shot-list", "cinematic"],
1844
1844
  pricing: [
1845
- { identifier: "video-analysis:gemini-3.1-pro", credits: 1053, note: "10-min ceiling (no duration given)" },
1845
+ { identifier: "video-analysis:gemini-3.1-pro", credits: 1056, note: "10-min ceiling (no duration given)" },
1846
1846
  { identifier: "video-analysis:gemini-3.1-pro:60s", credits: 216 },
1847
1847
  { identifier: "video-analysis:gemini-3.1-pro:180s", credits: 232 },
1848
- { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 639 },
1849
- { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 1053, note: "10-min ceiling" }
1848
+ { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 640 },
1849
+ { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 1056, note: "10-min ceiling" }
1850
1850
  ]
1851
1851
  },
1852
1852
  // Both mixed tiers are variants of the same advanced multi-engine analysis
@@ -1862,11 +1862,11 @@ var VIDEO_MODELS = {
1862
1862
  description: "Our most advanced analysis tier \u2014 multiple analysis engines combined into one result for maximum completeness and accuracy. Billed per duration bucket.",
1863
1863
  useCases: ["video-analysis", "shot-list", "premium", "most-complete"],
1864
1864
  pricing: [
1865
- { identifier: "video-analysis:mixed", credits: 1174, note: "10-min ceiling (no duration given)" },
1866
- { identifier: "video-analysis:mixed:60s", credits: 269 },
1867
- { identifier: "video-analysis:mixed:180s", credits: 290 },
1868
- { identifier: "video-analysis:mixed:360s", credits: 727 },
1869
- { identifier: "video-analysis:mixed:600s", credits: 1174, note: "10-min ceiling" }
1865
+ { identifier: "video-analysis:mixed", credits: 1177, note: "10-min ceiling (no duration given)" },
1866
+ { identifier: "video-analysis:mixed:60s", credits: 270 },
1867
+ { identifier: "video-analysis:mixed:180s", credits: 291 },
1868
+ { identifier: "video-analysis:mixed:360s", credits: 729 },
1869
+ { identifier: "video-analysis:mixed:600s", credits: 1177, note: "10-min ceiling" }
1870
1870
  ]
1871
1871
  },
1872
1872
  // SMART — the accuracy tier. Since the 2026-08-03 hybrid re-plan it is a
@@ -1884,11 +1884,11 @@ var VIDEO_MODELS = {
1884
1884
  description: "Highest-accuracy analysis \u2014 a hybrid pass that blends a native skeleton read with several donor analysis rolls, then always refines the merged result to find shot boundaries and identify the cast by appearance. Best choice when the shot list will drive regeneration. Billed per duration bucket.",
1885
1885
  useCases: ["video-analysis", "shot-list", "premium", "most-accurate"],
1886
1886
  pricing: [
1887
- { identifier: "video-analysis:smart", credits: 2071, note: "10-min ceiling (no duration given)" },
1888
- { identifier: "video-analysis:smart:60s", credits: 412 },
1889
- { identifier: "video-analysis:smart:180s", credits: 502 },
1890
- { identifier: "video-analysis:smart:360s", credits: 1264 },
1891
- { identifier: "video-analysis:smart:600s", credits: 2071, note: "10-min ceiling" }
1887
+ { identifier: "video-analysis:smart", credits: 2076, note: "10-min ceiling (no duration given)" },
1888
+ { identifier: "video-analysis:smart:60s", credits: 413 },
1889
+ { identifier: "video-analysis:smart:180s", credits: 503 },
1890
+ { identifier: "video-analysis:smart:360s", credits: 1267 },
1891
+ { identifier: "video-analysis:smart:600s", credits: 2076, note: "10-min ceiling" }
1892
1892
  ]
1893
1893
  },
1894
1894
  // ── AI Audit (`video-audit`) ── a SEPARATE node from video-analysis (own
@@ -1912,11 +1912,11 @@ var VIDEO_MODELS = {
1912
1912
  description: "Re-watches a clip against a wired analysis, applies video-verified corrections under guards, and returns a disclosed report of what changed. Billed per duration bucket.",
1913
1913
  useCases: ["video-audit", "qa", "shot-list", "verification"],
1914
1914
  pricing: [
1915
- { identifier: "video-audit", credits: 1070, note: "10-min ceiling (no duration given)" },
1916
- { identifier: "video-audit:60s", credits: 214 },
1915
+ { identifier: "video-audit", credits: 1073, note: "10-min ceiling (no duration given)" },
1916
+ { identifier: "video-audit:60s", credits: 215 },
1917
1917
  { identifier: "video-audit:180s", credits: 290 },
1918
- { identifier: "video-audit:360s", credits: 661 },
1919
- { identifier: "video-audit:600s", credits: 1070, note: "10-min ceiling" }
1918
+ { identifier: "video-audit:360s", credits: 663 },
1919
+ { identifier: "video-audit:600s", credits: 1073, note: "10-min ceiling" }
1920
1920
  ]
1921
1921
  },
1922
1922
  "video-audit-auto": {
@@ -1928,11 +1928,11 @@ var VIDEO_MODELS = {
1928
1928
  description: "Same video-verified audit as AI Audit, but auto-runs a fast analysis first when none is wired in, then applies corrections under guards and returns a disclosed report. Billed per duration bucket.",
1929
1929
  useCases: ["video-audit", "qa", "shot-list", "verification", "auto-analysis"],
1930
1930
  pricing: [
1931
- { identifier: "video-audit:auto", credits: 1917, note: "10-min ceiling (no duration given)" },
1932
- { identifier: "video-audit:auto:60s", credits: 394 },
1931
+ { identifier: "video-audit:auto", credits: 1921, note: "10-min ceiling (no duration given)" },
1932
+ { identifier: "video-audit:auto:60s", credits: 396 },
1933
1933
  { identifier: "video-audit:auto:180s", credits: 475 },
1934
- { identifier: "video-audit:auto:360s", credits: 1176 },
1935
- { identifier: "video-audit:auto:600s", credits: 1917, note: "10-min ceiling" }
1934
+ { identifier: "video-audit:auto:360s", credits: 1178 },
1935
+ { identifier: "video-audit:auto:600s", credits: 1921, note: "10-min ceiling" }
1936
1936
  ]
1937
1937
  }
1938
1938
  };
@@ -13215,6 +13215,15 @@ var windowSceneBase = z.object({
13215
13215
  /** Effects on this shot's PICTURE. Absent ⇒ a clean image. */
13216
13216
  effects: z.array(z.enum(VIDEO_ANALYSIS_VISUAL_EFFECTS)).optional(),
13217
13217
  transitionOut: z.enum(VIDEO_ANALYSIS_TRANSITIONS).optional(),
13218
+ // Round 4 (2026-08-30, recast shot craft rev 1.5 Appendix F.8): the edit into
13219
+ // the next scene in the analyser's OWN WORDS — a few words of what it saw
13220
+ // ("fast blurred pan left", "fade to black", "zoom-blur warp into the tunnel")
13221
+ // — or absent when the take continues through the change or no edit is seen
13222
+ // (nothing asserted: the video model decides from story and refs). The closed
13223
+ // `transitionOut` vocabulary above is LEGACY from here on: kept so stored
13224
+ // blueprints still parse, never emitted again. Readers take
13225
+ // `transition ?? transitionOut`.
13226
+ transition: z.string().trim().min(1).max(120).optional(),
13218
13227
  // Array of concurrent layers (music + speech + sfx together); [] = silence.
13219
13228
  audio: z.array(audioLayerSchema),
13220
13229
  /** slotId → variationId for slots wearing a NON-default look in this scene
@@ -13398,37 +13407,37 @@ var WINDOW_OVERLAP = 5;
13398
13407
  var VIDEO_ANALYSIS_WINDOW = { LEN: WINDOW_LEN, STRIDE: WINDOW_STRIDE, OVERLAP: WINDOW_OVERLAP, SINGLE_MAX: 180 };
13399
13408
  var VIDEO_ANALYSIS_BUCKET_CREDITS = {
13400
13409
  // Legacy fast-tier model (pre-2026-07) — kept for stored raw-id configs.
13401
- "video-analysis:gemini-3-flash:60s": 180,
13410
+ "video-analysis:gemini-3-flash:60s": 181,
13402
13411
  "video-analysis:gemini-3-flash:180s": 185,
13403
13412
  "video-analysis:gemini-3-flash:360s": 515,
13404
- "video-analysis:gemini-3-flash:600s": 847,
13413
+ "video-analysis:gemini-3-flash:600s": 848,
13405
13414
  // Current fast tier — regenerated from the private formula for its backing
13406
13415
  // model; higher than the legacy fast schedule but still ≤ pro per bucket.
13407
13416
  "video-analysis:gemini-3.6-flash:60s": 204,
13408
- "video-analysis:gemini-3.6-flash:180s": 218,
13409
- "video-analysis:gemini-3.6-flash:360s": 600,
13410
- "video-analysis:gemini-3.6-flash:600s": 990,
13417
+ "video-analysis:gemini-3.6-flash:180s": 219,
13418
+ "video-analysis:gemini-3.6-flash:360s": 602,
13419
+ "video-analysis:gemini-3.6-flash:600s": 992,
13411
13420
  "video-analysis:gemini-3.1-pro:60s": 216,
13412
13421
  "video-analysis:gemini-3.1-pro:180s": 232,
13413
- "video-analysis:gemini-3.1-pro:360s": 639,
13414
- "video-analysis:gemini-3.1-pro:600s": 1053,
13422
+ "video-analysis:gemini-3.1-pro:360s": 640,
13423
+ "video-analysis:gemini-3.1-pro:600s": 1056,
13415
13424
  // Mixed tiers (`mixed` + `mixed-fast`) share ONE credit family — they are
13416
13425
  // variants of the same engine plan (plan internals live in the private
13417
13426
  // analysis plugin). Admin-tunable via model_pricing like every other row.
13418
- "video-analysis:mixed:60s": 269,
13419
- "video-analysis:mixed:180s": 290,
13420
- "video-analysis:mixed:360s": 727,
13421
- "video-analysis:mixed:600s": 1174,
13427
+ "video-analysis:mixed:60s": 270,
13428
+ "video-analysis:mixed:180s": 291,
13429
+ "video-analysis:mixed:360s": 729,
13430
+ "video-analysis:mixed:600s": 1177,
13422
13431
  // SMART — the accuracy tier, and since the 2026-08-03 re-plan a multi-roll
13423
13432
  // plan like the others, always refined (`selectionMode` does not apply
13424
13433
  // here — smart always refines; it never offers a cheaper "choose" path).
13425
13434
  // Priced above the economy tiers because it genuinely costs more to run;
13426
13435
  // the only tier whose accuracy is validated against a hand-counted edit
13427
13436
  // list, re-validated at the current plan before this schedule shipped.
13428
- "video-analysis:smart:60s": 412,
13429
- "video-analysis:smart:180s": 502,
13430
- "video-analysis:smart:360s": 1264,
13431
- "video-analysis:smart:600s": 2071
13437
+ "video-analysis:smart:60s": 413,
13438
+ "video-analysis:smart:180s": 503,
13439
+ "video-analysis:smart:360s": 1267,
13440
+ "video-analysis:smart:600s": 2076
13432
13441
  };
13433
13442
  function videoAnalysisCreditSegment(modelOrSentinel) {
13434
13443
  return modelOrSentinel === "mixed-fast" ? "mixed" : modelOrSentinel;
@@ -13449,14 +13458,14 @@ function videoAnalysisNumWindows(bucketSec) {
13449
13458
  return bucketSec <= VIDEO_ANALYSIS_WINDOW.SINGLE_MAX ? 1 : 1 + Math.ceil((bucketSec - WINDOW_LEN) / WINDOW_STRIDE);
13450
13459
  }
13451
13460
  var VIDEO_AUDIT_BUCKET_CREDITS = {
13452
- "video-audit:60s": 214,
13461
+ "video-audit:60s": 215,
13453
13462
  "video-audit:180s": 290,
13454
- "video-audit:360s": 661,
13455
- "video-audit:600s": 1070,
13456
- "video-audit:auto:60s": 394,
13463
+ "video-audit:360s": 663,
13464
+ "video-audit:600s": 1073,
13465
+ "video-audit:auto:60s": 396,
13457
13466
  "video-audit:auto:180s": 475,
13458
- "video-audit:auto:360s": 1176,
13459
- "video-audit:auto:600s": 1917
13467
+ "video-audit:auto:360s": 1178,
13468
+ "video-audit:auto:600s": 1921
13460
13469
  };
13461
13470
  function buildVideoAuditCreditId(args) {
13462
13471
  const { analysisProvided, durationSec } = args;