@nodaro/shared 1.18.0 → 1.20.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 +62 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -1
- package/dist/index.d.ts +58 -1
- package/dist/index.js +59 -40
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/llm-models.test.ts +46 -21
- package/src/__tests__/smart-cut-windows.test.ts +43 -0
- package/src/index.ts +3 -0
- package/src/llm-models.ts +22 -1
- package/src/model-catalog.ts +21 -21
- package/src/smart-cut-windows.ts +50 -0
- package/src/video-analysis-pricing.ts +16 -16
package/dist/index.cjs
CHANGED
|
@@ -1664,14 +1664,14 @@ var VIDEO_MODELS = {
|
|
|
1664
1664
|
family: "Nodaro",
|
|
1665
1665
|
label: "Video Analysis (Fast \u2014 legacy)",
|
|
1666
1666
|
series: "Video Analysis",
|
|
1667
|
-
description: "Legacy fast-tier analysis model (pre-2026-07). Kept so stored raw-model configs keep running and pricing
|
|
1667
|
+
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.",
|
|
1668
1668
|
useCases: ["video-analysis", "shot-list", "fast"],
|
|
1669
1669
|
pricing: [
|
|
1670
|
-
{ identifier: "video-analysis:gemini-3-flash", credits:
|
|
1671
|
-
{ identifier: "video-analysis:gemini-3-flash:60s", credits:
|
|
1672
|
-
{ identifier: "video-analysis:gemini-3-flash:180s", credits:
|
|
1673
|
-
{ identifier: "video-analysis:gemini-3-flash:360s", credits:
|
|
1674
|
-
{ identifier: "video-analysis:gemini-3-flash:600s", credits:
|
|
1670
|
+
{ identifier: "video-analysis:gemini-3-flash", credits: 9, note: "10-min ceiling (no duration given)" },
|
|
1671
|
+
{ identifier: "video-analysis:gemini-3-flash:60s", credits: 2 },
|
|
1672
|
+
{ identifier: "video-analysis:gemini-3-flash:180s", credits: 3 },
|
|
1673
|
+
{ identifier: "video-analysis:gemini-3-flash:360s", credits: 6 },
|
|
1674
|
+
{ identifier: "video-analysis:gemini-3-flash:600s", credits: 9, note: "10-min ceiling" }
|
|
1675
1675
|
]
|
|
1676
1676
|
},
|
|
1677
1677
|
"gemini-3.6-flash-video-analysis": {
|
|
@@ -1684,11 +1684,11 @@ var VIDEO_MODELS = {
|
|
|
1684
1684
|
description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 fast, economy tier. Billed per duration bucket.",
|
|
1685
1685
|
useCases: ["video-analysis", "shot-list", "fast"],
|
|
1686
1686
|
pricing: [
|
|
1687
|
-
{ identifier: "video-analysis:gemini-3.6-flash", credits:
|
|
1688
|
-
{ identifier: "video-analysis:gemini-3.6-flash:60s", credits:
|
|
1689
|
-
{ identifier: "video-analysis:gemini-3.6-flash:180s", credits:
|
|
1690
|
-
{ identifier: "video-analysis:gemini-3.6-flash:360s", credits:
|
|
1691
|
-
{ identifier: "video-analysis:gemini-3.6-flash:600s", credits:
|
|
1687
|
+
{ identifier: "video-analysis:gemini-3.6-flash", credits: 25, note: "10-min ceiling (no duration given)" },
|
|
1688
|
+
{ identifier: "video-analysis:gemini-3.6-flash:60s", credits: 5 },
|
|
1689
|
+
{ identifier: "video-analysis:gemini-3.6-flash:180s", credits: 6 },
|
|
1690
|
+
{ identifier: "video-analysis:gemini-3.6-flash:360s", credits: 15 },
|
|
1691
|
+
{ identifier: "video-analysis:gemini-3.6-flash:600s", credits: 25, note: "10-min ceiling" }
|
|
1692
1692
|
]
|
|
1693
1693
|
},
|
|
1694
1694
|
"gemini-3.1-pro-video-analysis": {
|
|
@@ -1701,11 +1701,11 @@ var VIDEO_MODELS = {
|
|
|
1701
1701
|
description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 higher-fidelity, default tier. Billed per duration bucket.",
|
|
1702
1702
|
useCases: ["video-analysis", "shot-list", "cinematic"],
|
|
1703
1703
|
pricing: [
|
|
1704
|
-
{ identifier: "video-analysis:gemini-3.1-pro", credits:
|
|
1705
|
-
{ identifier: "video-analysis:gemini-3.1-pro:60s", credits:
|
|
1706
|
-
{ identifier: "video-analysis:gemini-3.1-pro:180s", credits:
|
|
1707
|
-
{ identifier: "video-analysis:gemini-3.1-pro:360s", credits:
|
|
1708
|
-
{ identifier: "video-analysis:gemini-3.1-pro:600s", credits:
|
|
1704
|
+
{ identifier: "video-analysis:gemini-3.1-pro", credits: 33, note: "10-min ceiling (no duration given)" },
|
|
1705
|
+
{ identifier: "video-analysis:gemini-3.1-pro:60s", credits: 6 },
|
|
1706
|
+
{ identifier: "video-analysis:gemini-3.1-pro:180s", credits: 8 },
|
|
1707
|
+
{ identifier: "video-analysis:gemini-3.1-pro:360s", credits: 20 },
|
|
1708
|
+
{ identifier: "video-analysis:gemini-3.1-pro:600s", credits: 33, note: "10-min ceiling" }
|
|
1709
1709
|
]
|
|
1710
1710
|
},
|
|
1711
1711
|
// Both mixed tiers are variants of the same advanced multi-engine analysis
|
|
@@ -1721,11 +1721,11 @@ var VIDEO_MODELS = {
|
|
|
1721
1721
|
description: "Our most advanced analysis tier \u2014 multiple analysis engines combined into one result for maximum completeness and accuracy. Billed per duration bucket.",
|
|
1722
1722
|
useCases: ["video-analysis", "shot-list", "premium", "most-complete"],
|
|
1723
1723
|
pricing: [
|
|
1724
|
-
{ identifier: "video-analysis:mixed", credits:
|
|
1725
|
-
{ identifier: "video-analysis:mixed:60s", credits:
|
|
1726
|
-
{ identifier: "video-analysis:mixed:180s", credits:
|
|
1727
|
-
{ identifier: "video-analysis:mixed:360s", credits:
|
|
1728
|
-
{ identifier: "video-analysis:mixed:600s", credits:
|
|
1724
|
+
{ identifier: "video-analysis:mixed", credits: 57, note: "10-min ceiling (no duration given)" },
|
|
1725
|
+
{ identifier: "video-analysis:mixed:60s", credits: 10 },
|
|
1726
|
+
{ identifier: "video-analysis:mixed:180s", credits: 13 },
|
|
1727
|
+
{ identifier: "video-analysis:mixed:360s", credits: 35 },
|
|
1728
|
+
{ identifier: "video-analysis:mixed:600s", credits: 57, note: "10-min ceiling" }
|
|
1729
1729
|
]
|
|
1730
1730
|
}
|
|
1731
1731
|
};
|
|
@@ -4354,7 +4354,11 @@ var LLM_MODELS = [
|
|
|
4354
4354
|
{
|
|
4355
4355
|
id: "claude-opus-4.7",
|
|
4356
4356
|
displayName: "Claude Opus 4.7",
|
|
4357
|
-
desc
|
|
4357
|
+
// Superlatives belong to the CURRENT top model only — `desc` renders in every
|
|
4358
|
+
// model picker, so leaving "highest quality" on an older Opus steers
|
|
4359
|
+
// quality-critical work backwards (all three Opus entries bill premium, so
|
|
4360
|
+
// the mis-steer is invisible on the invoice).
|
|
4361
|
+
desc: "Older Opus, complex tasks",
|
|
4358
4362
|
tier: "premium",
|
|
4359
4363
|
kieFormat: "messages",
|
|
4360
4364
|
kieSlugOrModel: "claude-opus-4-7",
|
|
@@ -4486,7 +4490,10 @@ var LLM_MODELS = [
|
|
|
4486
4490
|
directFallbackModel: "claude-opus-5",
|
|
4487
4491
|
reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
4488
4492
|
supportsTemperature: false,
|
|
4489
|
-
preferKie: true
|
|
4493
|
+
preferKie: true,
|
|
4494
|
+
// Opus 5 reasons with NO thinking param sent (vendor default flipped from
|
|
4495
|
+
// Opus 4.8/4.7) — so every call needs output headroom, not just xhigh/max.
|
|
4496
|
+
thinkingDefaultOn: true
|
|
4490
4497
|
},
|
|
4491
4498
|
{
|
|
4492
4499
|
id: "claude-fable-5",
|
|
@@ -12304,27 +12311,27 @@ var WINDOW_OVERLAP = 5;
|
|
|
12304
12311
|
var VIDEO_ANALYSIS_WINDOW = { LEN: WINDOW_LEN, STRIDE: WINDOW_STRIDE, OVERLAP: WINDOW_OVERLAP, SINGLE_MAX: 180 };
|
|
12305
12312
|
var VIDEO_ANALYSIS_BUCKET_CREDITS = {
|
|
12306
12313
|
// Legacy fast-tier model (pre-2026-07) — kept for stored raw-id configs.
|
|
12307
|
-
"video-analysis:gemini-3-flash:60s":
|
|
12308
|
-
"video-analysis:gemini-3-flash:180s":
|
|
12309
|
-
"video-analysis:gemini-3-flash:360s":
|
|
12310
|
-
"video-analysis:gemini-3-flash:600s":
|
|
12314
|
+
"video-analysis:gemini-3-flash:60s": 2,
|
|
12315
|
+
"video-analysis:gemini-3-flash:180s": 3,
|
|
12316
|
+
"video-analysis:gemini-3-flash:360s": 6,
|
|
12317
|
+
"video-analysis:gemini-3-flash:600s": 9,
|
|
12311
12318
|
// Current fast tier — regenerated from the private formula for its backing
|
|
12312
12319
|
// model; higher than the legacy fast schedule but still ≤ pro per bucket.
|
|
12313
|
-
"video-analysis:gemini-3.6-flash:60s":
|
|
12314
|
-
"video-analysis:gemini-3.6-flash:180s":
|
|
12315
|
-
"video-analysis:gemini-3.6-flash:360s":
|
|
12316
|
-
"video-analysis:gemini-3.6-flash:600s":
|
|
12317
|
-
"video-analysis:gemini-3.1-pro:60s":
|
|
12318
|
-
"video-analysis:gemini-3.1-pro:180s":
|
|
12319
|
-
"video-analysis:gemini-3.1-pro:360s":
|
|
12320
|
-
"video-analysis:gemini-3.1-pro:600s":
|
|
12320
|
+
"video-analysis:gemini-3.6-flash:60s": 5,
|
|
12321
|
+
"video-analysis:gemini-3.6-flash:180s": 6,
|
|
12322
|
+
"video-analysis:gemini-3.6-flash:360s": 15,
|
|
12323
|
+
"video-analysis:gemini-3.6-flash:600s": 25,
|
|
12324
|
+
"video-analysis:gemini-3.1-pro:60s": 6,
|
|
12325
|
+
"video-analysis:gemini-3.1-pro:180s": 8,
|
|
12326
|
+
"video-analysis:gemini-3.1-pro:360s": 20,
|
|
12327
|
+
"video-analysis:gemini-3.1-pro:600s": 33,
|
|
12321
12328
|
// Mixed tiers (`mixed` + `mixed-fast`) share ONE credit family — they are
|
|
12322
12329
|
// variants of the same engine plan (plan internals live in the private
|
|
12323
12330
|
// analysis plugin). Admin-tunable via model_pricing like every other row.
|
|
12324
|
-
"video-analysis:mixed:60s":
|
|
12325
|
-
"video-analysis:mixed:180s":
|
|
12326
|
-
"video-analysis:mixed:360s":
|
|
12327
|
-
"video-analysis:mixed:600s":
|
|
12331
|
+
"video-analysis:mixed:60s": 10,
|
|
12332
|
+
"video-analysis:mixed:180s": 13,
|
|
12333
|
+
"video-analysis:mixed:360s": 35,
|
|
12334
|
+
"video-analysis:mixed:600s": 57
|
|
12328
12335
|
};
|
|
12329
12336
|
function videoAnalysisCreditSegment(modelOrSentinel) {
|
|
12330
12337
|
return modelOrSentinel === "mixed-fast" ? "mixed" : modelOrSentinel;
|
|
@@ -12345,6 +12352,18 @@ function videoAnalysisNumWindows(bucketSec) {
|
|
|
12345
12352
|
return bucketSec <= VIDEO_ANALYSIS_WINDOW.SINGLE_MAX ? 1 : 1 + Math.ceil((bucketSec - WINDOW_LEN) / WINDOW_STRIDE);
|
|
12346
12353
|
}
|
|
12347
12354
|
|
|
12355
|
+
// src/smart-cut-windows.ts
|
|
12356
|
+
var SMART_CUT_WINDOW_MAX = 24;
|
|
12357
|
+
var SMART_CUT_WINDOW_MIN = 1;
|
|
12358
|
+
var SMART_CUT_WINDOW_DEFAULT = 8;
|
|
12359
|
+
function clampSmartCutWindow(value) {
|
|
12360
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
|
|
12361
|
+
const n = Math.round(value);
|
|
12362
|
+
if (n < SMART_CUT_WINDOW_MIN) return SMART_CUT_WINDOW_MIN;
|
|
12363
|
+
if (n > SMART_CUT_WINDOW_MAX) return SMART_CUT_WINDOW_MAX;
|
|
12364
|
+
return n;
|
|
12365
|
+
}
|
|
12366
|
+
|
|
12348
12367
|
exports.ACTIVE_SCENE_HELPERS = ACTIVE_SCENE_HELPERS;
|
|
12349
12368
|
exports.AGGREGATEABLE_TYPES = AGGREGATEABLE_TYPES;
|
|
12350
12369
|
exports.AI_AVATAR_DURATION_BUCKETS = AI_AVATAR_DURATION_BUCKETS;
|
|
@@ -12658,6 +12677,9 @@ exports.SHORT_FILM_ANGLE_COUNT = SHORT_FILM_ANGLE_COUNT;
|
|
|
12658
12677
|
exports.SHORT_FILM_EXPRESSION_COUNT = SHORT_FILM_EXPRESSION_COUNT;
|
|
12659
12678
|
exports.SHORT_FILM_VARIANT_THRESHOLD_SEC = SHORT_FILM_VARIANT_THRESHOLD_SEC;
|
|
12660
12679
|
exports.SLOT_TOKEN_RE = SLOT_TOKEN_RE;
|
|
12680
|
+
exports.SMART_CUT_WINDOW_DEFAULT = SMART_CUT_WINDOW_DEFAULT;
|
|
12681
|
+
exports.SMART_CUT_WINDOW_MAX = SMART_CUT_WINDOW_MAX;
|
|
12682
|
+
exports.SMART_CUT_WINDOW_MIN = SMART_CUT_WINDOW_MIN;
|
|
12661
12683
|
exports.SOCIAL_POST_NODE_TYPES = SOCIAL_POST_NODE_TYPES;
|
|
12662
12684
|
exports.STAGE_PATCH_SCHEMA = STAGE_PATCH_SCHEMA;
|
|
12663
12685
|
exports.STATIC_CAPTION_STYLES = STATIC_CAPTION_STYLES;
|
|
@@ -12798,6 +12820,7 @@ exports.characterSheetRefItems = characterSheetRefItems;
|
|
|
12798
12820
|
exports.characterVariantAssetArrays = characterVariantAssetArrays;
|
|
12799
12821
|
exports.cinematicCreditId = cinematicCreditId;
|
|
12800
12822
|
exports.clampCinematicDuration = clampCinematicDuration;
|
|
12823
|
+
exports.clampSmartCutWindow = clampSmartCutWindow;
|
|
12801
12824
|
exports.cleanOrphanedItems = cleanOrphanedItems;
|
|
12802
12825
|
exports.clearImageCriticMetadata = clearImageCriticMetadata;
|
|
12803
12826
|
exports.clearVideoCriticMetadata = clearVideoCriticMetadata;
|