@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.cjs +58 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +58 -49
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/video-analysis-catalog-sync.test.ts +5 -3
- package/src/__tests__/video-analysis-pricing.test.ts +7 -7
- package/src/__tests__/video-analysis.test.ts +11 -0
- package/src/extra-refs.ts +7 -0
- package/src/model-catalog.ts +28 -28
- package/src/video-analysis-pricing.ts +29 -21
- package/src/video-analysis.ts +9 -0
package/dist/index.cjs
CHANGED
|
@@ -1810,11 +1810,11 @@ var VIDEO_MODELS = {
|
|
|
1810
1810
|
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.",
|
|
1811
1811
|
useCases: ["video-analysis", "shot-list", "fast"],
|
|
1812
1812
|
pricing: [
|
|
1813
|
-
{ identifier: "video-analysis:gemini-3-flash", credits:
|
|
1814
|
-
{ identifier: "video-analysis:gemini-3-flash:60s", credits:
|
|
1813
|
+
{ identifier: "video-analysis:gemini-3-flash", credits: 848, note: "10-min ceiling (no duration given)" },
|
|
1814
|
+
{ identifier: "video-analysis:gemini-3-flash:60s", credits: 181 },
|
|
1815
1815
|
{ identifier: "video-analysis:gemini-3-flash:180s", credits: 185 },
|
|
1816
1816
|
{ identifier: "video-analysis:gemini-3-flash:360s", credits: 515 },
|
|
1817
|
-
{ identifier: "video-analysis:gemini-3-flash:600s", credits:
|
|
1817
|
+
{ identifier: "video-analysis:gemini-3-flash:600s", credits: 848, note: "10-min ceiling" }
|
|
1818
1818
|
]
|
|
1819
1819
|
},
|
|
1820
1820
|
"gemini-3.6-flash-video-analysis": {
|
|
@@ -1827,11 +1827,11 @@ var VIDEO_MODELS = {
|
|
|
1827
1827
|
description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 fast, economy tier. Billed per duration bucket.",
|
|
1828
1828
|
useCases: ["video-analysis", "shot-list", "fast"],
|
|
1829
1829
|
pricing: [
|
|
1830
|
-
{ identifier: "video-analysis:gemini-3.6-flash", credits:
|
|
1830
|
+
{ identifier: "video-analysis:gemini-3.6-flash", credits: 992, note: "10-min ceiling (no duration given)" },
|
|
1831
1831
|
{ identifier: "video-analysis:gemini-3.6-flash:60s", credits: 204 },
|
|
1832
|
-
{ identifier: "video-analysis:gemini-3.6-flash:180s", credits:
|
|
1833
|
-
{ identifier: "video-analysis:gemini-3.6-flash:360s", credits:
|
|
1834
|
-
{ identifier: "video-analysis:gemini-3.6-flash:600s", credits:
|
|
1832
|
+
{ identifier: "video-analysis:gemini-3.6-flash:180s", credits: 219 },
|
|
1833
|
+
{ identifier: "video-analysis:gemini-3.6-flash:360s", credits: 602 },
|
|
1834
|
+
{ identifier: "video-analysis:gemini-3.6-flash:600s", credits: 992, note: "10-min ceiling" }
|
|
1835
1835
|
]
|
|
1836
1836
|
},
|
|
1837
1837
|
"gemini-3.1-pro-video-analysis": {
|
|
@@ -1844,11 +1844,11 @@ var VIDEO_MODELS = {
|
|
|
1844
1844
|
description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 higher-fidelity, default tier. Billed per duration bucket.",
|
|
1845
1845
|
useCases: ["video-analysis", "shot-list", "cinematic"],
|
|
1846
1846
|
pricing: [
|
|
1847
|
-
{ identifier: "video-analysis:gemini-3.1-pro", credits:
|
|
1847
|
+
{ identifier: "video-analysis:gemini-3.1-pro", credits: 1056, note: "10-min ceiling (no duration given)" },
|
|
1848
1848
|
{ identifier: "video-analysis:gemini-3.1-pro:60s", credits: 216 },
|
|
1849
1849
|
{ identifier: "video-analysis:gemini-3.1-pro:180s", credits: 232 },
|
|
1850
|
-
{ identifier: "video-analysis:gemini-3.1-pro:360s", credits:
|
|
1851
|
-
{ identifier: "video-analysis:gemini-3.1-pro:600s", credits:
|
|
1850
|
+
{ identifier: "video-analysis:gemini-3.1-pro:360s", credits: 640 },
|
|
1851
|
+
{ identifier: "video-analysis:gemini-3.1-pro:600s", credits: 1056, note: "10-min ceiling" }
|
|
1852
1852
|
]
|
|
1853
1853
|
},
|
|
1854
1854
|
// Both mixed tiers are variants of the same advanced multi-engine analysis
|
|
@@ -1864,11 +1864,11 @@ var VIDEO_MODELS = {
|
|
|
1864
1864
|
description: "Our most advanced analysis tier \u2014 multiple analysis engines combined into one result for maximum completeness and accuracy. Billed per duration bucket.",
|
|
1865
1865
|
useCases: ["video-analysis", "shot-list", "premium", "most-complete"],
|
|
1866
1866
|
pricing: [
|
|
1867
|
-
{ identifier: "video-analysis:mixed", credits:
|
|
1868
|
-
{ identifier: "video-analysis:mixed:60s", credits:
|
|
1869
|
-
{ identifier: "video-analysis:mixed:180s", credits:
|
|
1870
|
-
{ identifier: "video-analysis:mixed:360s", credits:
|
|
1871
|
-
{ identifier: "video-analysis:mixed:600s", credits:
|
|
1867
|
+
{ identifier: "video-analysis:mixed", credits: 1177, note: "10-min ceiling (no duration given)" },
|
|
1868
|
+
{ identifier: "video-analysis:mixed:60s", credits: 270 },
|
|
1869
|
+
{ identifier: "video-analysis:mixed:180s", credits: 291 },
|
|
1870
|
+
{ identifier: "video-analysis:mixed:360s", credits: 729 },
|
|
1871
|
+
{ identifier: "video-analysis:mixed:600s", credits: 1177, note: "10-min ceiling" }
|
|
1872
1872
|
]
|
|
1873
1873
|
},
|
|
1874
1874
|
// SMART — the accuracy tier. Since the 2026-08-03 hybrid re-plan it is a
|
|
@@ -1886,11 +1886,11 @@ var VIDEO_MODELS = {
|
|
|
1886
1886
|
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.",
|
|
1887
1887
|
useCases: ["video-analysis", "shot-list", "premium", "most-accurate"],
|
|
1888
1888
|
pricing: [
|
|
1889
|
-
{ identifier: "video-analysis:smart", credits:
|
|
1890
|
-
{ identifier: "video-analysis:smart:60s", credits:
|
|
1891
|
-
{ identifier: "video-analysis:smart:180s", credits:
|
|
1892
|
-
{ identifier: "video-analysis:smart:360s", credits:
|
|
1893
|
-
{ identifier: "video-analysis:smart:600s", credits:
|
|
1889
|
+
{ identifier: "video-analysis:smart", credits: 2076, note: "10-min ceiling (no duration given)" },
|
|
1890
|
+
{ identifier: "video-analysis:smart:60s", credits: 413 },
|
|
1891
|
+
{ identifier: "video-analysis:smart:180s", credits: 503 },
|
|
1892
|
+
{ identifier: "video-analysis:smart:360s", credits: 1267 },
|
|
1893
|
+
{ identifier: "video-analysis:smart:600s", credits: 2076, note: "10-min ceiling" }
|
|
1894
1894
|
]
|
|
1895
1895
|
},
|
|
1896
1896
|
// ── AI Audit (`video-audit`) ── a SEPARATE node from video-analysis (own
|
|
@@ -1914,11 +1914,11 @@ var VIDEO_MODELS = {
|
|
|
1914
1914
|
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.",
|
|
1915
1915
|
useCases: ["video-audit", "qa", "shot-list", "verification"],
|
|
1916
1916
|
pricing: [
|
|
1917
|
-
{ identifier: "video-audit", credits:
|
|
1918
|
-
{ identifier: "video-audit:60s", credits:
|
|
1917
|
+
{ identifier: "video-audit", credits: 1073, note: "10-min ceiling (no duration given)" },
|
|
1918
|
+
{ identifier: "video-audit:60s", credits: 215 },
|
|
1919
1919
|
{ identifier: "video-audit:180s", credits: 290 },
|
|
1920
|
-
{ identifier: "video-audit:360s", credits:
|
|
1921
|
-
{ identifier: "video-audit:600s", credits:
|
|
1920
|
+
{ identifier: "video-audit:360s", credits: 663 },
|
|
1921
|
+
{ identifier: "video-audit:600s", credits: 1073, note: "10-min ceiling" }
|
|
1922
1922
|
]
|
|
1923
1923
|
},
|
|
1924
1924
|
"video-audit-auto": {
|
|
@@ -1930,11 +1930,11 @@ var VIDEO_MODELS = {
|
|
|
1930
1930
|
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.",
|
|
1931
1931
|
useCases: ["video-audit", "qa", "shot-list", "verification", "auto-analysis"],
|
|
1932
1932
|
pricing: [
|
|
1933
|
-
{ identifier: "video-audit:auto", credits:
|
|
1934
|
-
{ identifier: "video-audit:auto:60s", credits:
|
|
1933
|
+
{ identifier: "video-audit:auto", credits: 1921, note: "10-min ceiling (no duration given)" },
|
|
1934
|
+
{ identifier: "video-audit:auto:60s", credits: 396 },
|
|
1935
1935
|
{ identifier: "video-audit:auto:180s", credits: 475 },
|
|
1936
|
-
{ identifier: "video-audit:auto:360s", credits:
|
|
1937
|
-
{ identifier: "video-audit:auto:600s", credits:
|
|
1936
|
+
{ identifier: "video-audit:auto:360s", credits: 1178 },
|
|
1937
|
+
{ identifier: "video-audit:auto:600s", credits: 1921, note: "10-min ceiling" }
|
|
1938
1938
|
]
|
|
1939
1939
|
}
|
|
1940
1940
|
};
|
|
@@ -13217,6 +13217,15 @@ var windowSceneBase = zod.z.object({
|
|
|
13217
13217
|
/** Effects on this shot's PICTURE. Absent ⇒ a clean image. */
|
|
13218
13218
|
effects: zod.z.array(zod.z.enum(VIDEO_ANALYSIS_VISUAL_EFFECTS)).optional(),
|
|
13219
13219
|
transitionOut: zod.z.enum(VIDEO_ANALYSIS_TRANSITIONS).optional(),
|
|
13220
|
+
// Round 4 (2026-08-30, recast shot craft rev 1.5 Appendix F.8): the edit into
|
|
13221
|
+
// the next scene in the analyser's OWN WORDS — a few words of what it saw
|
|
13222
|
+
// ("fast blurred pan left", "fade to black", "zoom-blur warp into the tunnel")
|
|
13223
|
+
// — or absent when the take continues through the change or no edit is seen
|
|
13224
|
+
// (nothing asserted: the video model decides from story and refs). The closed
|
|
13225
|
+
// `transitionOut` vocabulary above is LEGACY from here on: kept so stored
|
|
13226
|
+
// blueprints still parse, never emitted again. Readers take
|
|
13227
|
+
// `transition ?? transitionOut`.
|
|
13228
|
+
transition: zod.z.string().trim().min(1).max(120).optional(),
|
|
13220
13229
|
// Array of concurrent layers (music + speech + sfx together); [] = silence.
|
|
13221
13230
|
audio: zod.z.array(audioLayerSchema),
|
|
13222
13231
|
/** slotId → variationId for slots wearing a NON-default look in this scene
|
|
@@ -13400,37 +13409,37 @@ var WINDOW_OVERLAP = 5;
|
|
|
13400
13409
|
var VIDEO_ANALYSIS_WINDOW = { LEN: WINDOW_LEN, STRIDE: WINDOW_STRIDE, OVERLAP: WINDOW_OVERLAP, SINGLE_MAX: 180 };
|
|
13401
13410
|
var VIDEO_ANALYSIS_BUCKET_CREDITS = {
|
|
13402
13411
|
// Legacy fast-tier model (pre-2026-07) — kept for stored raw-id configs.
|
|
13403
|
-
"video-analysis:gemini-3-flash:60s":
|
|
13412
|
+
"video-analysis:gemini-3-flash:60s": 181,
|
|
13404
13413
|
"video-analysis:gemini-3-flash:180s": 185,
|
|
13405
13414
|
"video-analysis:gemini-3-flash:360s": 515,
|
|
13406
|
-
"video-analysis:gemini-3-flash:600s":
|
|
13415
|
+
"video-analysis:gemini-3-flash:600s": 848,
|
|
13407
13416
|
// Current fast tier — regenerated from the private formula for its backing
|
|
13408
13417
|
// model; higher than the legacy fast schedule but still ≤ pro per bucket.
|
|
13409
13418
|
"video-analysis:gemini-3.6-flash:60s": 204,
|
|
13410
|
-
"video-analysis:gemini-3.6-flash:180s":
|
|
13411
|
-
"video-analysis:gemini-3.6-flash:360s":
|
|
13412
|
-
"video-analysis:gemini-3.6-flash:600s":
|
|
13419
|
+
"video-analysis:gemini-3.6-flash:180s": 219,
|
|
13420
|
+
"video-analysis:gemini-3.6-flash:360s": 602,
|
|
13421
|
+
"video-analysis:gemini-3.6-flash:600s": 992,
|
|
13413
13422
|
"video-analysis:gemini-3.1-pro:60s": 216,
|
|
13414
13423
|
"video-analysis:gemini-3.1-pro:180s": 232,
|
|
13415
|
-
"video-analysis:gemini-3.1-pro:360s":
|
|
13416
|
-
"video-analysis:gemini-3.1-pro:600s":
|
|
13424
|
+
"video-analysis:gemini-3.1-pro:360s": 640,
|
|
13425
|
+
"video-analysis:gemini-3.1-pro:600s": 1056,
|
|
13417
13426
|
// Mixed tiers (`mixed` + `mixed-fast`) share ONE credit family — they are
|
|
13418
13427
|
// variants of the same engine plan (plan internals live in the private
|
|
13419
13428
|
// analysis plugin). Admin-tunable via model_pricing like every other row.
|
|
13420
|
-
"video-analysis:mixed:60s":
|
|
13421
|
-
"video-analysis:mixed:180s":
|
|
13422
|
-
"video-analysis:mixed:360s":
|
|
13423
|
-
"video-analysis:mixed:600s":
|
|
13429
|
+
"video-analysis:mixed:60s": 270,
|
|
13430
|
+
"video-analysis:mixed:180s": 291,
|
|
13431
|
+
"video-analysis:mixed:360s": 729,
|
|
13432
|
+
"video-analysis:mixed:600s": 1177,
|
|
13424
13433
|
// SMART — the accuracy tier, and since the 2026-08-03 re-plan a multi-roll
|
|
13425
13434
|
// plan like the others, always refined (`selectionMode` does not apply
|
|
13426
13435
|
// here — smart always refines; it never offers a cheaper "choose" path).
|
|
13427
13436
|
// Priced above the economy tiers because it genuinely costs more to run;
|
|
13428
13437
|
// the only tier whose accuracy is validated against a hand-counted edit
|
|
13429
13438
|
// list, re-validated at the current plan before this schedule shipped.
|
|
13430
|
-
"video-analysis:smart:60s":
|
|
13431
|
-
"video-analysis:smart:180s":
|
|
13432
|
-
"video-analysis:smart:360s":
|
|
13433
|
-
"video-analysis:smart:600s":
|
|
13439
|
+
"video-analysis:smart:60s": 413,
|
|
13440
|
+
"video-analysis:smart:180s": 503,
|
|
13441
|
+
"video-analysis:smart:360s": 1267,
|
|
13442
|
+
"video-analysis:smart:600s": 2076
|
|
13434
13443
|
};
|
|
13435
13444
|
function videoAnalysisCreditSegment(modelOrSentinel) {
|
|
13436
13445
|
return modelOrSentinel === "mixed-fast" ? "mixed" : modelOrSentinel;
|
|
@@ -13451,14 +13460,14 @@ function videoAnalysisNumWindows(bucketSec) {
|
|
|
13451
13460
|
return bucketSec <= VIDEO_ANALYSIS_WINDOW.SINGLE_MAX ? 1 : 1 + Math.ceil((bucketSec - WINDOW_LEN) / WINDOW_STRIDE);
|
|
13452
13461
|
}
|
|
13453
13462
|
var VIDEO_AUDIT_BUCKET_CREDITS = {
|
|
13454
|
-
"video-audit:60s":
|
|
13463
|
+
"video-audit:60s": 215,
|
|
13455
13464
|
"video-audit:180s": 290,
|
|
13456
|
-
"video-audit:360s":
|
|
13457
|
-
"video-audit:600s":
|
|
13458
|
-
"video-audit:auto:60s":
|
|
13465
|
+
"video-audit:360s": 663,
|
|
13466
|
+
"video-audit:600s": 1073,
|
|
13467
|
+
"video-audit:auto:60s": 396,
|
|
13459
13468
|
"video-audit:auto:180s": 475,
|
|
13460
|
-
"video-audit:auto:360s":
|
|
13461
|
-
"video-audit:auto:600s":
|
|
13469
|
+
"video-audit:auto:360s": 1178,
|
|
13470
|
+
"video-audit:auto:600s": 1921
|
|
13462
13471
|
};
|
|
13463
13472
|
function buildVideoAuditCreditId(args) {
|
|
13464
13473
|
const { analysisProvided, durationSec } = args;
|