@nodaro/shared 1.11.0 → 1.12.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 CHANGED
@@ -1690,6 +1690,26 @@ var VIDEO_MODELS = {
1690
1690
  { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 7 },
1691
1691
  { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 11, note: "10-min ceiling" }
1692
1692
  ]
1693
+ },
1694
+ // Both mixed tiers are variants of the same advanced multi-engine analysis
1695
+ // and share this ONE credit family (videoAnalysisCreditSegment maps both;
1696
+ // plan internals live in the private analysis plugin).
1697
+ "mixed-video-analysis": {
1698
+ id: "mixed-video-analysis",
1699
+ kind: "video",
1700
+ modes: ["video-analysis"],
1701
+ family: "Nodaro",
1702
+ label: "Video Analysis (Mixed)",
1703
+ series: "Video Analysis",
1704
+ description: "Our most advanced analysis tier \u2014 multiple analysis engines combined into one result for maximum completeness and accuracy. Billed per duration bucket.",
1705
+ useCases: ["video-analysis", "shot-list", "premium", "most-complete"],
1706
+ pricing: [
1707
+ { identifier: "video-analysis:mixed", credits: 14, note: "10-min ceiling (no duration given)" },
1708
+ { identifier: "video-analysis:mixed:60s", credits: 3 },
1709
+ { identifier: "video-analysis:mixed:180s", credits: 4 },
1710
+ { identifier: "video-analysis:mixed:360s", credits: 9 },
1711
+ { identifier: "video-analysis:mixed:600s", credits: 14, note: "10-min ceiling" }
1712
+ ]
1693
1713
  }
1694
1714
  };
1695
1715
  var AUDIO_MODELS = {
@@ -4488,15 +4508,27 @@ function resolveLlmCreditId(feature, body) {
4488
4508
  }
4489
4509
  var VIDEO_ANALYSIS_LLM_MODELS = LLM_MODELS.filter((m) => getLlmModalityCaps(m.id).video && getLlmModalityCaps(m.id).audio).map((m) => m.id);
4490
4510
  var VIDEO_ANALYSIS_TIERS = { fast: "gemini-3-flash", pro: "gemini-3.1-pro" };
4491
- var VIDEO_ANALYSIS_TIER_ORDER = ["pro", "fast"];
4511
+ var VIDEO_ANALYSIS_MIXED_TIERS = ["mixed", "mixed-fast"];
4512
+ var VIDEO_ANALYSIS_TIER_ORDER = ["pro", "fast", "mixed", "mixed-fast"];
4492
4513
  var DEFAULT_VIDEO_ANALYSIS_TIER = "pro";
4493
4514
  var DEFAULT_VIDEO_ANALYSIS_MODEL = VIDEO_ANALYSIS_TIERS[DEFAULT_VIDEO_ANALYSIS_TIER];
4494
- var VIDEO_ANALYSIS_TIER_LABELS = { fast: "Fast", pro: "Pro" };
4515
+ var VIDEO_ANALYSIS_TIER_LABELS = {
4516
+ fast: "Fast",
4517
+ pro: "Pro",
4518
+ mixed: "Mixed",
4519
+ "mixed-fast": "Mixed (consistent)"
4520
+ };
4495
4521
  function isVideoAnalysisTier(v) {
4496
- return Object.prototype.hasOwnProperty.call(VIDEO_ANALYSIS_TIERS, v);
4522
+ return VIDEO_ANALYSIS_TIER_ORDER.includes(v);
4523
+ }
4524
+ function isVideoAnalysisMixedTier(v) {
4525
+ return VIDEO_ANALYSIS_MIXED_TIERS.includes(v);
4497
4526
  }
4498
4527
  function resolveVideoAnalysisModel(input) {
4499
- if (input && isVideoAnalysisTier(input)) return VIDEO_ANALYSIS_TIERS[input];
4528
+ if (input && isVideoAnalysisMixedTier(input)) return input;
4529
+ if (input && Object.prototype.hasOwnProperty.call(VIDEO_ANALYSIS_TIERS, input)) {
4530
+ return VIDEO_ANALYSIS_TIERS[input];
4531
+ }
4500
4532
  if (input && VIDEO_ANALYSIS_LLM_MODELS.includes(input)) return input;
4501
4533
  return DEFAULT_VIDEO_ANALYSIS_MODEL;
4502
4534
  }
@@ -12124,15 +12156,25 @@ var VIDEO_ANALYSIS_BUCKET_CREDITS = {
12124
12156
  "video-analysis:gemini-3.1-pro:60s": 2,
12125
12157
  "video-analysis:gemini-3.1-pro:180s": 3,
12126
12158
  "video-analysis:gemini-3.1-pro:360s": 7,
12127
- "video-analysis:gemini-3.1-pro:600s": 11
12159
+ "video-analysis:gemini-3.1-pro:600s": 11,
12160
+ // Mixed tiers (`mixed` + `mixed-fast`) share ONE credit family — they are
12161
+ // variants of the same engine plan (plan internals live in the private
12162
+ // analysis plugin). Admin-tunable via model_pricing like every other row.
12163
+ "video-analysis:mixed:60s": 3,
12164
+ "video-analysis:mixed:180s": 4,
12165
+ "video-analysis:mixed:360s": 9,
12166
+ "video-analysis:mixed:600s": 14
12128
12167
  };
12168
+ function videoAnalysisCreditSegment(modelOrSentinel) {
12169
+ return modelOrSentinel === "mixed-fast" ? "mixed" : modelOrSentinel;
12170
+ }
12129
12171
  function pickVideoAnalysisBucket(durationSec) {
12130
12172
  for (const b of VIDEO_ANALYSIS_DURATION_BUCKETS) if (durationSec <= b) return b;
12131
12173
  return VIDEO_ANALYSIS_MAX_DURATION_SEC;
12132
12174
  }
12133
12175
  function buildVideoAnalysisCreditId(model, durationSec) {
12134
12176
  const bucket = durationSec !== void 0 && durationSec > 0 ? pickVideoAnalysisBucket(Math.min(durationSec, VIDEO_ANALYSIS_MAX_DURATION_SEC)) : VIDEO_ANALYSIS_MAX_DURATION_SEC;
12135
- return `video-analysis:${model}:${bucket}s`;
12177
+ return `video-analysis:${videoAnalysisCreditSegment(model)}:${bucket}s`;
12136
12178
  }
12137
12179
  function bucketSecondsFromCreditId(creditId) {
12138
12180
  const m = /^video-analysis:.+:(\d+)s$/.exec(creditId);
@@ -12506,6 +12548,7 @@ exports.VIDEO_ANALYSIS_ENTITY_SOURCES = VIDEO_ANALYSIS_ENTITY_SOURCES;
12506
12548
  exports.VIDEO_ANALYSIS_LLM_MODELS = VIDEO_ANALYSIS_LLM_MODELS;
12507
12549
  exports.VIDEO_ANALYSIS_MAX_DURATION_SEC = VIDEO_ANALYSIS_MAX_DURATION_SEC;
12508
12550
  exports.VIDEO_ANALYSIS_MAX_SCENE_SEC = VIDEO_ANALYSIS_MAX_SCENE_SEC;
12551
+ exports.VIDEO_ANALYSIS_MIXED_TIERS = VIDEO_ANALYSIS_MIXED_TIERS;
12509
12552
  exports.VIDEO_ANALYSIS_TIERS = VIDEO_ANALYSIS_TIERS;
12510
12553
  exports.VIDEO_ANALYSIS_TIER_LABELS = VIDEO_ANALYSIS_TIER_LABELS;
12511
12554
  exports.VIDEO_ANALYSIS_TIER_ORDER = VIDEO_ANALYSIS_TIER_ORDER;
@@ -12703,6 +12746,7 @@ exports.isSeedance2Provider = isSeedance2Provider;
12703
12746
  exports.isTiltDirection = isTiltDirection;
12704
12747
  exports.isUsageMode = isUsageMode;
12705
12748
  exports.isVeoProvider = isVeoProvider;
12749
+ exports.isVideoAnalysisMixedTier = isVideoAnalysisMixedTier;
12706
12750
  exports.isVideoAnalysisTier = isVideoAnalysisTier;
12707
12751
  exports.jsonResultToList = jsonResultToList;
12708
12752
  exports.listBoardTemplates = listBoardTemplates;
@@ -12827,6 +12871,7 @@ exports.validateObjects = validateObjects;
12827
12871
  exports.validateProviderForNodeType = validateProviderForNodeType;
12828
12872
  exports.validateSubWorkflowRoutes = validateSubWorkflowRoutes;
12829
12873
  exports.variantJobId = variantJobId;
12874
+ exports.videoAnalysisCreditSegment = videoAnalysisCreditSegment;
12830
12875
  exports.videoAnalysisNumWindows = videoAnalysisNumWindows;
12831
12876
  exports.videoAnalysisResultSchema = videoAnalysisResultSchema;
12832
12877
  exports.videoModelCanSpeakDialogue = videoModelCanSpeakDialogue;