@nodaro/shared 1.11.0 → 1.13.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 = {
@@ -4454,8 +4474,18 @@ function getLlmModalityCaps(modelId) {
4454
4474
  if (!modelId) return { image: true, video: false, audio: false };
4455
4475
  return LLM_MODALITY_CAPS[modelId] ?? { image: true, video: false, audio: false };
4456
4476
  }
4477
+ function dashAliasToCanonical(id) {
4478
+ return id.replace(/-(\d+)-(\d+)$/, "-$1.$2");
4479
+ }
4457
4480
  function getLlmModel(id) {
4458
- return LLM_MODELS.find((m) => m.id === id);
4481
+ const exact = LLM_MODELS.find((m) => m.id === id);
4482
+ if (exact) return exact;
4483
+ const canonical = dashAliasToCanonical(id);
4484
+ if (canonical !== id) {
4485
+ const aliased = LLM_MODELS.find((m) => m.id === canonical);
4486
+ if (aliased) return aliased;
4487
+ }
4488
+ return LLM_MODELS.find((m) => m.kieSlugOrModel === id || m.directFallbackModel === id);
4459
4489
  }
4460
4490
  function getLlmTier(id) {
4461
4491
  return getLlmModel(id)?.tier ?? "standard";
@@ -4488,15 +4518,27 @@ function resolveLlmCreditId(feature, body) {
4488
4518
  }
4489
4519
  var VIDEO_ANALYSIS_LLM_MODELS = LLM_MODELS.filter((m) => getLlmModalityCaps(m.id).video && getLlmModalityCaps(m.id).audio).map((m) => m.id);
4490
4520
  var VIDEO_ANALYSIS_TIERS = { fast: "gemini-3-flash", pro: "gemini-3.1-pro" };
4491
- var VIDEO_ANALYSIS_TIER_ORDER = ["pro", "fast"];
4521
+ var VIDEO_ANALYSIS_MIXED_TIERS = ["mixed", "mixed-fast"];
4522
+ var VIDEO_ANALYSIS_TIER_ORDER = ["pro", "fast", "mixed", "mixed-fast"];
4492
4523
  var DEFAULT_VIDEO_ANALYSIS_TIER = "pro";
4493
4524
  var DEFAULT_VIDEO_ANALYSIS_MODEL = VIDEO_ANALYSIS_TIERS[DEFAULT_VIDEO_ANALYSIS_TIER];
4494
- var VIDEO_ANALYSIS_TIER_LABELS = { fast: "Fast", pro: "Pro" };
4525
+ var VIDEO_ANALYSIS_TIER_LABELS = {
4526
+ fast: "Fast",
4527
+ pro: "Pro",
4528
+ mixed: "Mixed",
4529
+ "mixed-fast": "Mixed (consistent)"
4530
+ };
4495
4531
  function isVideoAnalysisTier(v) {
4496
- return Object.prototype.hasOwnProperty.call(VIDEO_ANALYSIS_TIERS, v);
4532
+ return VIDEO_ANALYSIS_TIER_ORDER.includes(v);
4533
+ }
4534
+ function isVideoAnalysisMixedTier(v) {
4535
+ return VIDEO_ANALYSIS_MIXED_TIERS.includes(v);
4497
4536
  }
4498
4537
  function resolveVideoAnalysisModel(input) {
4499
- if (input && isVideoAnalysisTier(input)) return VIDEO_ANALYSIS_TIERS[input];
4538
+ if (input && isVideoAnalysisMixedTier(input)) return input;
4539
+ if (input && Object.prototype.hasOwnProperty.call(VIDEO_ANALYSIS_TIERS, input)) {
4540
+ return VIDEO_ANALYSIS_TIERS[input];
4541
+ }
4500
4542
  if (input && VIDEO_ANALYSIS_LLM_MODELS.includes(input)) return input;
4501
4543
  return DEFAULT_VIDEO_ANALYSIS_MODEL;
4502
4544
  }
@@ -6205,6 +6247,12 @@ var PARAMETER_NODE_TYPES = /* @__PURE__ */ new Set([
6205
6247
  "voice-character",
6206
6248
  "voice-delivery"
6207
6249
  ]);
6250
+ var HINT_EXEMPT_PARAMETER_TYPES = /* @__PURE__ */ new Set([
6251
+ "motion",
6252
+ "scene-count",
6253
+ "duration",
6254
+ "aspect-ratio"
6255
+ ]);
6208
6256
  function getParameterValue(data, nodeType) {
6209
6257
  switch (nodeType) {
6210
6258
  case "text-prompt":
@@ -12124,15 +12172,25 @@ var VIDEO_ANALYSIS_BUCKET_CREDITS = {
12124
12172
  "video-analysis:gemini-3.1-pro:60s": 2,
12125
12173
  "video-analysis:gemini-3.1-pro:180s": 3,
12126
12174
  "video-analysis:gemini-3.1-pro:360s": 7,
12127
- "video-analysis:gemini-3.1-pro:600s": 11
12175
+ "video-analysis:gemini-3.1-pro:600s": 11,
12176
+ // Mixed tiers (`mixed` + `mixed-fast`) share ONE credit family — they are
12177
+ // variants of the same engine plan (plan internals live in the private
12178
+ // analysis plugin). Admin-tunable via model_pricing like every other row.
12179
+ "video-analysis:mixed:60s": 3,
12180
+ "video-analysis:mixed:180s": 4,
12181
+ "video-analysis:mixed:360s": 9,
12182
+ "video-analysis:mixed:600s": 14
12128
12183
  };
12184
+ function videoAnalysisCreditSegment(modelOrSentinel) {
12185
+ return modelOrSentinel === "mixed-fast" ? "mixed" : modelOrSentinel;
12186
+ }
12129
12187
  function pickVideoAnalysisBucket(durationSec) {
12130
12188
  for (const b of VIDEO_ANALYSIS_DURATION_BUCKETS) if (durationSec <= b) return b;
12131
12189
  return VIDEO_ANALYSIS_MAX_DURATION_SEC;
12132
12190
  }
12133
12191
  function buildVideoAnalysisCreditId(model, durationSec) {
12134
12192
  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`;
12193
+ return `video-analysis:${videoAnalysisCreditSegment(model)}:${bucket}s`;
12136
12194
  }
12137
12195
  function bucketSecondsFromCreditId(creditId) {
12138
12196
  const m = /^video-analysis:.+:(\d+)s$/.exec(creditId);
@@ -12282,6 +12340,7 @@ exports.GenerateMotionResultSchema = GenerateMotionResultSchema;
12282
12340
  exports.HANDLE_PORT_SEPARATOR = HANDLE_PORT_SEPARATOR;
12283
12341
  exports.HELPERS_SHIPPED_IN_1B3 = HELPERS_SHIPPED_IN_1B3;
12284
12342
  exports.HIGH_QUALITY_PROVIDERS = HIGH_QUALITY_PROVIDERS;
12343
+ exports.HINT_EXEMPT_PARAMETER_TYPES = HINT_EXEMPT_PARAMETER_TYPES;
12285
12344
  exports.I2I_MASK_SUPPORT = I2I_MASK_SUPPORT;
12286
12345
  exports.I2I_STRENGTH_SUPPORT = I2I_STRENGTH_SUPPORT;
12287
12346
  exports.IDEOGRAM_PROVIDERS = IDEOGRAM_PROVIDERS;
@@ -12506,6 +12565,7 @@ exports.VIDEO_ANALYSIS_ENTITY_SOURCES = VIDEO_ANALYSIS_ENTITY_SOURCES;
12506
12565
  exports.VIDEO_ANALYSIS_LLM_MODELS = VIDEO_ANALYSIS_LLM_MODELS;
12507
12566
  exports.VIDEO_ANALYSIS_MAX_DURATION_SEC = VIDEO_ANALYSIS_MAX_DURATION_SEC;
12508
12567
  exports.VIDEO_ANALYSIS_MAX_SCENE_SEC = VIDEO_ANALYSIS_MAX_SCENE_SEC;
12568
+ exports.VIDEO_ANALYSIS_MIXED_TIERS = VIDEO_ANALYSIS_MIXED_TIERS;
12509
12569
  exports.VIDEO_ANALYSIS_TIERS = VIDEO_ANALYSIS_TIERS;
12510
12570
  exports.VIDEO_ANALYSIS_TIER_LABELS = VIDEO_ANALYSIS_TIER_LABELS;
12511
12571
  exports.VIDEO_ANALYSIS_TIER_ORDER = VIDEO_ANALYSIS_TIER_ORDER;
@@ -12703,6 +12763,7 @@ exports.isSeedance2Provider = isSeedance2Provider;
12703
12763
  exports.isTiltDirection = isTiltDirection;
12704
12764
  exports.isUsageMode = isUsageMode;
12705
12765
  exports.isVeoProvider = isVeoProvider;
12766
+ exports.isVideoAnalysisMixedTier = isVideoAnalysisMixedTier;
12706
12767
  exports.isVideoAnalysisTier = isVideoAnalysisTier;
12707
12768
  exports.jsonResultToList = jsonResultToList;
12708
12769
  exports.listBoardTemplates = listBoardTemplates;
@@ -12827,6 +12888,7 @@ exports.validateObjects = validateObjects;
12827
12888
  exports.validateProviderForNodeType = validateProviderForNodeType;
12828
12889
  exports.validateSubWorkflowRoutes = validateSubWorkflowRoutes;
12829
12890
  exports.variantJobId = variantJobId;
12891
+ exports.videoAnalysisCreditSegment = videoAnalysisCreditSegment;
12830
12892
  exports.videoAnalysisNumWindows = videoAnalysisNumWindows;
12831
12893
  exports.videoAnalysisResultSchema = videoAnalysisResultSchema;
12832
12894
  exports.videoModelCanSpeakDialogue = videoModelCanSpeakDialogue;