@nodaro/shared 2.7.0 → 2.10.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
@@ -742,6 +742,9 @@ var IMAGE_MODELS = {
742
742
  series: "Grok",
743
743
  description: "Grok Imagine Image 2.0 \u2014 expressive, high-contrast t2i. Generations chain into grok-2-segment (free named region masks) and grok-2-edit (region-targeted edits).",
744
744
  useCases: ["stylized", "expressive", "general"],
745
+ // Refs auto-route to grok-2-i2i (segment-map → image-edit chain); ONE
746
+ // reference (REF_IMAGE_MAX_LIMITS).
747
+ features: ["reference-image"],
745
748
  aspectRatios: GROK_RATIOS,
746
749
  pricing: [{ identifier: "grok-2", credits: 10 }]
747
750
  },
@@ -756,6 +759,21 @@ var IMAGE_MODELS = {
756
759
  useCases: ["edit", "region-edit"],
757
760
  pricing: [{ identifier: "grok-2-edit", credits: 10 }]
758
761
  },
762
+ // Auto-selected when references are attached to grok-2 (T2I_TO_I2I_VARIANT):
763
+ // the t2i endpoint takes no image, so the FREE segment-map mints a task id
764
+ // from the reference URL and image-edit consumes it. Single reference.
765
+ "grok-2-i2i": {
766
+ id: "grok-2-i2i",
767
+ kind: "image",
768
+ modes: ["i2i"],
769
+ family: "xAI",
770
+ label: "Grok Imagine 2 (reference)",
771
+ series: "Grok",
772
+ description: "grok-2 guided by ONE reference image via the segment-map \u2192 image-edit chain \u2014 preserves the reference's composition while applying the prompt.",
773
+ useCases: ["restyle", "edit", "reference"],
774
+ features: ["reference-image"],
775
+ pricing: [{ identifier: "grok-2-i2i", credits: 10 }]
776
+ },
759
777
  "grok-2-segment": {
760
778
  id: "grok-2-segment",
761
779
  kind: "image",
@@ -2540,7 +2558,7 @@ function getMaxTtsChars(provider) {
2540
2558
  }
2541
2559
  var SUNO_TITLE_MAX = 80;
2542
2560
  function getMaxSunoPromptChars(model, customMode) {
2543
- if (!customMode) return 500;
2561
+ if (!customMode) return 3e3;
2544
2562
  return model === "V4" || model === "V3_5" ? 3e3 : 5e3;
2545
2563
  }
2546
2564
  function getMaxSunoStyleChars(model) {
@@ -2599,6 +2617,7 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
2599
2617
  "gpt-image",
2600
2618
  "gpt-image-2",
2601
2619
  "grok",
2620
+ "grok-2",
2602
2621
  "qwen",
2603
2622
  "seedream",
2604
2623
  "seedream-5-lite",
@@ -2609,6 +2628,7 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
2609
2628
  "nano-banana-edit",
2610
2629
  "gpt-image-i2i",
2611
2630
  "gpt-image-2-i2i",
2631
+ "grok-2-i2i",
2612
2632
  "flux-i2i",
2613
2633
  "flux-pro-i2i",
2614
2634
  "flux-kontext",
@@ -2638,6 +2658,9 @@ var T2I_TO_I2I_VARIANT = {
2638
2658
  "gpt-image": "gpt-image-i2i",
2639
2659
  "gpt-image-2": "gpt-image-2-i2i",
2640
2660
  "grok": "grok-i2i",
2661
+ // grok-2's t2i takes NO image input; its "i2i" is the segment-map(image_url)
2662
+ // → image-edit(task_id) chain in the KIE provider (single reference).
2663
+ "grok-2": "grok-2-i2i",
2641
2664
  "qwen": "qwen-i2i",
2642
2665
  "seedream": "seedream-edit",
2643
2666
  "seedream-5-lite": "seedream-5-lite-i2i",
@@ -2653,6 +2676,8 @@ var REF_IMAGE_MAX_LIMITS = {
2653
2676
  "nano-banana-2": 4,
2654
2677
  "nano-banana-2-lite": 10,
2655
2678
  "wan-2.7": 9,
2679
+ // grok-2 reference chain consumes exactly one image (segment-map input).
2680
+ "grok-2-i2i": 1,
2656
2681
  // Image-to-image (multi-source array)
2657
2682
  "nano-banana-edit": 8,
2658
2683
  "gpt-image-i2i": 16,
@@ -2762,6 +2787,7 @@ var IMAGE_I2I_PROVIDERS = [
2762
2787
  "flux-pro-i2i",
2763
2788
  "gpt-image-i2i",
2764
2789
  "gpt-image-2-i2i",
2790
+ "grok-2-i2i",
2765
2791
  "ideogram-edit",
2766
2792
  "ideogram-remix",
2767
2793
  "ideogram-reframe",
@@ -2922,6 +2948,15 @@ function resolveVideoProviderForMode(provider, mode) {
2922
2948
  }
2923
2949
  return provider;
2924
2950
  }
2951
+ function resolveVideoModeForInputs(provider, inputs) {
2952
+ if (inputs.hasStartFrame) return "image-to-video";
2953
+ if (!provider || !inputs.hasImageRefs) return "text-to-video";
2954
+ const i2v = resolveVideoProviderForMode(provider, "image-to-video");
2955
+ const t2v = resolveVideoProviderForMode(provider, "text-to-video");
2956
+ if (i2v === t2v) return "text-to-video";
2957
+ const carriesImageRefs = (id) => (VIDEO_REF_LIMITS_BY_PROVIDER[id]?.images ?? 0) > 0;
2958
+ return carriesImageRefs(i2v) && !carriesImageRefs(t2v) ? "image-to-video" : "text-to-video";
2959
+ }
2925
2960
  var VIDEO_GEN_COLLAPSED_T2V_IDS = new Set(
2926
2961
  VIDEO_MODE_ALIASES.filter((g) => g.t2v !== g.base).map((g) => g.t2v)
2927
2962
  );
@@ -4818,6 +4853,30 @@ var LLM_MODELS = [
4818
4853
  // direct is the reliability fallback only.
4819
4854
  directGeminiModel: "gemini-3.6-flash"
4820
4855
  },
4856
+ {
4857
+ id: "gemini-3.7-flash",
4858
+ displayName: "Gemini 3.7 Flash",
4859
+ desc: "Newest fast Gemini, agentic-tuned",
4860
+ tier: "economy",
4861
+ kieFormat: "chat-completions",
4862
+ // KIE serves it on the OpenAI-compatible dialect under this slug
4863
+ // (docs.kie.ai/market/gemini/gemini-3-7-flash-openai.md) — same
4864
+ // chat-completions path shape as gemini-3.6-flash.
4865
+ kieSlugOrModel: "gemini-3-7-flash-openai",
4866
+ vendor: "google",
4867
+ structuredOutputMode: "kie-response-format",
4868
+ supportsImages: true,
4869
+ // Google's own cap is 65,536, but the field feeds BOTH lanes and the KIE
4870
+ // flash endpoints cap at 8192 (the measured 3.6 posture) — stay at the
4871
+ // KIE-safe intersection, same reasoning as `reasoningEfforts` below.
4872
+ maxOutputTokens: 8192,
4873
+ // KIE's 3.7 endpoint enumerates reasoning_effort low | high (verified
4874
+ // against its OpenAPI spec 2026-08-18), identical to 3.6.
4875
+ reasoningEfforts: ["low", "high"],
4876
+ // Assumed parity with 3.6 pending a live probe on the direct lane.
4877
+ directReasoningEfforts: ["none", "low", "medium", "high"],
4878
+ directGeminiModel: "gemini-3.7-flash"
4879
+ },
4821
4880
  {
4822
4881
  id: "claude-haiku-4.5",
4823
4882
  displayName: "Claude Haiku 4.5",
@@ -4980,7 +5039,35 @@ var LLM_MODELS = [
4980
5039
  reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
4981
5040
  supportsTemperature: false
4982
5041
  },
4983
- // grok-4.5 deferred — KIE chat endpoint not yet live (2026-07-13); add entry + rate row + docs when it activates.
5042
+ {
5043
+ id: "grok-4.6",
5044
+ displayName: "Grok 4.6",
5045
+ desc: "xAI flagship, strong reasoning",
5046
+ tier: "standard",
5047
+ kieFormat: "responses",
5048
+ // KIE serves Grok on the responses dialect under its own family path —
5049
+ // grok/v1/responses, NOT codex/v1/responses (llm-client derives the path
5050
+ // from `vendor`). Live-verified end-to-end 2026-08-18: array `input`,
5051
+ // `developer` system role, `input_image` URL vision, `text.format`
5052
+ // json_schema enforcement, SSE `response.output_text.delta` stream, and
5053
+ // `credits_consumed` actual-cost capture. (grok-4.5 was deferred 2026-07-13
5054
+ // because none of this was live; 4.6 is its activation.)
5055
+ kieSlugOrModel: "grok-4-6",
5056
+ vendor: "xai",
5057
+ structuredOutputMode: "responses-json-schema",
5058
+ supportsImages: true,
5059
+ maxOutputTokens: 16384,
5060
+ // KIE's documented enum, each level live-verified (echoed back) 2026-08-18.
5061
+ // No `none`: the endpoint reasons unconditionally (see thinkingDefaultOn).
5062
+ reasoningEfforts: ["low", "medium", "high", "xhigh"],
5063
+ // Live-probed 2026-08-18: `temperature` is silently IGNORED (request echo
5064
+ // stays at the 0.7 default), so never send it — same treatment as GPT-5.5+.
5065
+ supportsTemperature: false,
5066
+ // Reasons with NO reasoning param sent (effort defaults to "low" server-side
5067
+ // — a trivial probe spent 169 of 170 output tokens on reasoning), so every
5068
+ // call needs output headroom, not just xhigh.
5069
+ thinkingDefaultOn: true
5070
+ },
4984
5071
  {
4985
5072
  id: "claude-sonnet-5",
4986
5073
  displayName: "Claude Sonnet 5",
@@ -5056,6 +5143,25 @@ var LLM_MODEL_IDS = LLM_MODELS.map((m) => m.id);
5056
5143
  var STRUCTURED_VISION_MODELS = LLM_MODELS.filter(
5057
5144
  (m) => m.supportsImages && m.structuredOutputMode != null
5058
5145
  );
5146
+ var LLM_VENDOR_ORDER = ["anthropic", "google", "openai", "xai"];
5147
+ var LLM_VENDOR_LABELS = {
5148
+ anthropic: "Anthropic",
5149
+ google: "Google",
5150
+ openai: "OpenAI",
5151
+ xai: "xAI"
5152
+ };
5153
+ var TIER_RANK = { economy: 0, standard: 1, premium: 2 };
5154
+ function groupLlmModelsByVendor(models = LLM_MODELS) {
5155
+ const groups = [];
5156
+ for (const vendor of LLM_VENDOR_ORDER) {
5157
+ const members = models.filter((m) => m.vendor === vendor).sort((a, b) => TIER_RANK[a.tier] - TIER_RANK[b.tier]);
5158
+ if (members.length > 0) groups.push({ vendor, label: LLM_VENDOR_LABELS[vendor], models: members });
5159
+ }
5160
+ return groups;
5161
+ }
5162
+ function orderedLlmModels(models = LLM_MODELS) {
5163
+ return groupLlmModelsByVendor(models).flatMap((g) => g.models);
5164
+ }
5059
5165
  function motionGraphicsFeature(engine) {
5060
5166
  return engine === "lottie" ? "motion-graphics-lottie" : "motion-graphics";
5061
5167
  }
@@ -5075,11 +5181,18 @@ var LLM_FEATURE_DEFAULTS = {
5075
5181
  "generate-script": "gemini-3.6-flash",
5076
5182
  "translate": "gemini-3.6-flash",
5077
5183
  "image-critic": "claude-sonnet-4.6",
5078
- "pick-best-llm": "claude-sonnet-4.6"
5184
+ "pick-best-llm": "claude-sonnet-4.6",
5185
+ "workflow-copilot": "claude-sonnet-5"
5079
5186
  };
5080
5187
  var LLM_MODALITY_CAPS = {
5081
5188
  "gemini-3-flash": { image: true, video: true, audio: true },
5082
5189
  "gemini-3.6-flash": { image: true, video: true, audio: true },
5190
+ // gemini-3.7-flash is IMAGE-ONLY by DECISION, not omission: full video+audio
5191
+ // caps would auto-enroll it in VIDEO_ANALYSIS_LLM_MODELS (derived below) and
5192
+ // force a video-analysis tier + pricing decision that is deliberately
5193
+ // deferred while the smart-family A/B routes this model internally (#747).
5194
+ // Flip these two flags ONLY together with that VA-side decision.
5195
+ "gemini-3.7-flash": { image: true, video: false, audio: false },
5083
5196
  "gemini-3.1-pro": { image: true, video: true, audio: true },
5084
5197
  "claude-haiku-4.5": { image: true, video: false, audio: false },
5085
5198
  "claude-sonnet-4.6": { image: true, video: false, audio: false },
@@ -5090,6 +5203,7 @@ var LLM_MODALITY_CAPS = {
5090
5203
  "gpt-5.6-luna": { image: true, video: false, audio: false },
5091
5204
  "gpt-5.6-terra": { image: true, video: false, audio: false },
5092
5205
  "gpt-5.6-sol": { image: true, video: false, audio: false },
5206
+ "grok-4.6": { image: true, video: false, audio: false },
5093
5207
  "claude-sonnet-5": { image: true, video: false, audio: false },
5094
5208
  "claude-opus-4.8": { image: true, video: false, audio: false },
5095
5209
  "claude-opus-5": { image: true, video: false, audio: false },
@@ -6847,33 +6961,6 @@ function isTiltDirection(direction) {
6847
6961
  function defaultCarriedFraction(direction) {
6848
6962
  return isTiltDirection(direction) ? TILT_CARRIED_FRACTION : DEFAULT_CARRIED_FRACTION;
6849
6963
  }
6850
- var EDGE = {
6851
- right: { carried: "left", painted: "right" },
6852
- left: { carried: "right", painted: "left" },
6853
- up: { carried: "bottom", painted: "top" },
6854
- down: { carried: "top", painted: "bottom" }
6855
- };
6856
- var TILT_SUBJECT = {
6857
- up: {
6858
- word: "up",
6859
- subject: "the open sky directly overhead \u2014 sky, clouds, or (for an interior) the canopy or ceiling",
6860
- where: "overhead"
6861
- },
6862
- down: {
6863
- word: "down",
6864
- subject: "the ground directly below \u2014 terrain, floor, or water surface",
6865
- where: "below"
6866
- }
6867
- };
6868
- function buildSurroundFillPrompt(direction, userPrompt) {
6869
- const scene = userPrompt && userPrompt.trim() ? `${userPrompt.trim()}. ` : "";
6870
- const { carried, painted } = EDGE[direction];
6871
- if (direction === "up" || direction === "down") {
6872
- const t2 = TILT_SUBJECT[direction];
6873
- return `${scene}This is a camera tilted straight ${t2.word} from the same scene. The ${carried} strip holds real, finished pixels from the edge of the horizon view; the ${painted} region is flat gray and MUST be painted as ${t2.subject}. Render what is genuinely ${t2.where} \u2014 do NOT repeat, mirror, or continue the landscape, and do NOT draw a horizon line or distant scenery in the painted region. CRITICAL: keep the ${carried} strip unchanged and match the scene's EXACT lighting, time of day, white balance, and color grade \u2014 the same light as the ${carried} strip; no golden hour, no sunset, no warm relight, no cinematic regrade. Blend smoothly into the ${carried} strip with no visible seam. No people, no text, no labels, no watermarks.`;
6874
- }
6875
- return `${scene}This is a partial frame: the ${carried} portion contains real, finished pixels and the ${painted} portion is flat gray that MUST be painted in. Paint ONLY the ${painted} gray region as a natural, seamless continuation of the ${carried} portion \u2014 same scene, same perspective, continuing the horizon, geometry, and content across the boundary with no break. Keep the ${carried} portion completely unchanged. CRITICAL: do NOT change the lighting, exposure, white balance, or time of day. Match the ${carried} portion's EXACT light, color temperature, and contrast across the whole frame \u2014 if it is flat overcast daylight, keep flat overcast daylight. No golden hour, no sunset, no warm relight, no cinematic regrade. The seam between the ${carried} and ${painted} portions must be invisible. No people, no text, no labels, no watermarks.`;
6876
- }
6877
6964
 
6878
6965
  // src/parameter-node-value.ts
6879
6966
  var PARAMETER_NODE_TYPES = /* @__PURE__ */ new Set([
@@ -9271,18 +9358,18 @@ function isKineticCaptionStyle(style) {
9271
9358
 
9272
9359
  // src/i18n/types.ts
9273
9360
  var LANGUAGES = [
9274
- { id: "en", englishName: "English", nativeName: "English", shortCode: "EN", dir: "ltr", flag: "\u{1F1EC}\u{1F1E7}" },
9275
- { id: "es", englishName: "Spanish", nativeName: "Espa\xF1ol", shortCode: "ES", dir: "ltr", flag: "\u{1F1EA}\u{1F1F8}" },
9276
- { id: "fr", englishName: "French", nativeName: "Fran\xE7ais", shortCode: "FR", dir: "ltr", flag: "\u{1F1EB}\u{1F1F7}" },
9277
- { id: "de", englishName: "German", nativeName: "Deutsch", shortCode: "DE", dir: "ltr", flag: "\u{1F1E9}\u{1F1EA}" },
9278
- { id: "pt-BR", englishName: "Portuguese (Brazil)", nativeName: "Portugu\xEAs", shortCode: "PT", dir: "ltr", flag: "\u{1F1E7}\u{1F1F7}" },
9279
- { id: "ru", englishName: "Russian", nativeName: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439", shortCode: "RU", dir: "ltr", flag: "\u{1F1F7}\u{1F1FA}" },
9280
- { id: "hi", englishName: "Hindi", nativeName: "\u0939\u093F\u0928\u094D\u0926\u0940", shortCode: "HI", dir: "ltr", flag: "\u{1F1EE}\u{1F1F3}" },
9281
- { id: "ja", englishName: "Japanese", nativeName: "\u65E5\u672C\u8A9E", shortCode: "JA", dir: "ltr", flag: "\u{1F1EF}\u{1F1F5}" },
9282
- { id: "ko", englishName: "Korean", nativeName: "\uD55C\uAD6D\uC5B4", shortCode: "KO", dir: "ltr", flag: "\u{1F1F0}\u{1F1F7}" },
9283
- { id: "zh-CN", englishName: "Chinese (Simplified)", nativeName: "\u7B80\u4F53\u4E2D\u6587", shortCode: "ZH", dir: "ltr", flag: "\u{1F1E8}\u{1F1F3}" },
9284
- { id: "he", englishName: "Hebrew", nativeName: "\u05E2\u05D1\u05E8\u05D9\u05EA", shortCode: "HE", dir: "rtl", flag: "\u{1F1EE}\u{1F1F1}" },
9285
- { id: "ar", englishName: "Arabic", nativeName: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629", shortCode: "AR", dir: "rtl", flag: "\u{1F1F8}\u{1F1E6}" }
9361
+ { id: "en", englishName: "English", nativeName: "English", shortCode: "EN", dir: "ltr" },
9362
+ { id: "es", englishName: "Spanish", nativeName: "Espa\xF1ol", shortCode: "ES", dir: "ltr" },
9363
+ { id: "fr", englishName: "French", nativeName: "Fran\xE7ais", shortCode: "FR", dir: "ltr" },
9364
+ { id: "de", englishName: "German", nativeName: "Deutsch", shortCode: "DE", dir: "ltr" },
9365
+ { id: "pt-BR", englishName: "Portuguese (Brazil)", nativeName: "Portugu\xEAs", shortCode: "PT", dir: "ltr" },
9366
+ { id: "ru", englishName: "Russian", nativeName: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439", shortCode: "RU", dir: "ltr" },
9367
+ { id: "hi", englishName: "Hindi", nativeName: "\u0939\u093F\u0928\u094D\u0926\u0940", shortCode: "HI", dir: "ltr" },
9368
+ { id: "ja", englishName: "Japanese", nativeName: "\u65E5\u672C\u8A9E", shortCode: "JA", dir: "ltr" },
9369
+ { id: "ko", englishName: "Korean", nativeName: "\uD55C\uAD6D\uC5B4", shortCode: "KO", dir: "ltr" },
9370
+ { id: "zh-CN", englishName: "Chinese (Simplified)", nativeName: "\u7B80\u4F53\u4E2D\u6587", shortCode: "ZH", dir: "ltr" },
9371
+ { id: "he", englishName: "Hebrew", nativeName: "\u05E2\u05D1\u05E8\u05D9\u05EA", shortCode: "HE", dir: "rtl" },
9372
+ { id: "ar", englishName: "Arabic", nativeName: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629", shortCode: "AR", dir: "rtl" }
9286
9373
  ];
9287
9374
  LANGUAGES.map((l) => l.id);
9288
9375
  var NON_EN_LOCALE_IDS = LANGUAGES.filter((l) => l.id !== "en").map((l) => l.id);
@@ -11800,6 +11887,26 @@ function resolveXfadeName(id) {
11800
11887
  }
11801
11888
  return entry.xfade;
11802
11889
  }
11890
+ var PICKER_TO_COMBINE_TRANSITION = {
11891
+ "none": "cut",
11892
+ "auto": "dissolve",
11893
+ // an explicitly wired "auto" wants A blend — the classic slideshow default
11894
+ "cross-dissolve": "dissolve",
11895
+ "fade-to-black": "dip-to-black",
11896
+ "fade-to-white": "dip-to-white",
11897
+ "iris": "circle-open",
11898
+ "wipe": "wipe-left",
11899
+ "pixelate-reform": "pixelize",
11900
+ "dissolve-to-mist": "hblur",
11901
+ "match-cut": "cut",
11902
+ "smash-cut": "cut",
11903
+ "freeze-frame-jump": "cut"
11904
+ };
11905
+ function resolveSlideshowTransition(value) {
11906
+ if (!value) return "cut";
11907
+ if (COMBINE_TRANSITION_IDS.includes(value)) return value;
11908
+ return PICKER_TO_COMBINE_TRANSITION[value] ?? "cut";
11909
+ }
11803
11910
 
11804
11911
  // src/audio-crossfade-curves.ts
11805
11912
  var AUDIO_CROSSFADE_CURVES = [
@@ -11908,7 +12015,13 @@ var VIDEO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
11908
12015
  // Cinematic Avatar (HeyGen cinematic_avatar): prompt + 1–3 avatar looks → video.
11909
12016
  "cinematic-avatar",
11910
12017
  // Assemble Narrated Video: fits N (clip, voice) blocks into one MP4 → video.
11911
- "assemble-narrated-video"
12018
+ "assemble-narrated-video",
12019
+ // Still to Video: one still image + one audio track → MP4 (local FFmpeg,
12020
+ // no provider). Emits generatedVideoUrl like every other ffmpeg video node.
12021
+ "still-to-video",
12022
+ // Slideshow: 2-100 stills + one optional audio track → MP4 (local FFmpeg,
12023
+ // no provider). Same contract; images arrive via the image-collage lane.
12024
+ "slideshow"
11912
12025
  ]);
11913
12026
  var DYNAMIC_PRODUCER_TYPES = /* @__PURE__ */ new Set([
11914
12027
  "list",
@@ -11977,6 +12090,19 @@ var FAN_OUT_EACH_TYPES = /* @__PURE__ */ new Set([
11977
12090
  "selector"
11978
12091
  ]);
11979
12092
 
12093
+ // src/suno-track-sources.ts
12094
+ var SUNO_TRACK_SOURCE_TYPES = /* @__PURE__ */ new Set([
12095
+ "suno-generate",
12096
+ "suno-cover",
12097
+ "suno-extend",
12098
+ "suno-mashup",
12099
+ "suno-replace-section",
12100
+ "suno-add-instrumental",
12101
+ "suno-add-vocals",
12102
+ "suno-convert-wav",
12103
+ "suno-upload-extend"
12104
+ ]);
12105
+
11980
12106
  // src/voice-changer-models.ts
11981
12107
  var VOICE_CHANGER_MODELS = [
11982
12108
  {
@@ -13221,9 +13347,8 @@ var VIDEO_ANALYSIS_BUCKET_CREDITS = {
13221
13347
  "video-analysis:mixed:180s": 289,
13222
13348
  "video-analysis:mixed:360s": 724,
13223
13349
  "video-analysis:mixed:600s": 1169,
13224
- // SMART — the accuracy tier, and since the 2026-08-03 hybrid re-plan a
13225
- // multi-roll plan like the others: one native 6fps skeleton pass plus 2
13226
- // fast + 2 pro donor rolls, always refined (`selectionMode` does not apply
13350
+ // SMART — the accuracy tier, and since the 2026-08-03 re-plan a multi-roll
13351
+ // plan like the others, always refined (`selectionMode` does not apply
13227
13352
  // here — smart always refines; it never offers a cheaper "choose" path).
13228
13353
  // Priced above the economy tiers because it genuinely costs more to run;
13229
13354
  // the only tier whose accuracy is validated against a hand-counted edit
@@ -13287,7 +13412,93 @@ function clampSmartCutWindow(value) {
13287
13412
  if (n > SMART_CUT_WINDOW_MAX) return SMART_CUT_WINDOW_MAX;
13288
13413
  return n;
13289
13414
  }
13415
+ var WORKSPACE_HEADER = "X-Nodaro-Workspace";
13416
+ var WORKSPACE_HEADER_LOWER = "x-nodaro-workspace";
13417
+ var ORG_KINDS = ["school", "team"];
13418
+ var ORG_ROLES = ["owner", "admin", "member"];
13419
+ var WORKSPACE_ROLES = ["admin", "member"];
13420
+ var MEMBER_STATUSES = ["active", "suspended"];
13421
+ var ORG_STATUSES = ["pending", "active", "suspended", "deleted"];
13422
+ var COLLABORATOR_ROLES = ["editor", "viewer"];
13423
+ var WORKFLOW_VISIBILITIES = ["private", "workspace"];
13424
+ var ACCESS_LEVELS = ["own", "edit", "view", "none"];
13425
+ var GRANTED_ACCESS = ["view", "edit"];
13426
+ var SUBMISSION_STATUSES = ["submitted", "in_review", "returned", "approved"];
13427
+ var ORG_ERROR_CODES = [
13428
+ "not_a_member",
13429
+ "insufficient_role",
13430
+ "org_not_active",
13431
+ "member_suspended",
13432
+ "workspace_archived",
13433
+ "personal_space_disabled",
13434
+ "token_workspace_mismatch",
13435
+ "run_requires_authenticated_member",
13436
+ "budget_exceeded",
13437
+ "member_cap_exceeded",
13438
+ "model_not_allowed",
13439
+ "invitation_expired",
13440
+ "invitation_revoked",
13441
+ "email_mismatch",
13442
+ "join_code_invalid",
13443
+ "domain_not_allowed",
13444
+ "already_started",
13445
+ "collab_unavailable",
13446
+ // Organization, workspace and membership endpoints.
13447
+ "terms_required",
13448
+ "not_org_member",
13449
+ "already_a_member",
13450
+ "owner_cannot_leave",
13451
+ "has_active_workspaces",
13452
+ // Invitations and join codes.
13453
+ "invitation_not_found",
13454
+ "invitation_accepted",
13455
+ "bulk_invite_cap_exceeded"
13456
+ ];
13457
+ var PresetSettingsSchema = zod.z.object({
13458
+ /** What org/workspace admins may do with a member's workflow. */
13459
+ admin_access: zod.z.enum(GRANTED_ACCESS),
13460
+ default_workflow_visibility: zod.z.enum(WORKFLOW_VISIBILITIES),
13461
+ /** What a plain member may do with a `visibility = workspace` workflow. */
13462
+ member_access_to_shared: zod.z.enum(GRANTED_ACCESS),
13463
+ members_can_create_projects: zod.z.boolean(),
13464
+ member_caps_enabled: zod.z.boolean(),
13465
+ /** Whether members keep a personal (non-workspace) space at all. */
13466
+ personal_space_enabled: zod.z.boolean(),
13467
+ /** Whether a workspace admin may invite NEW people into the org. */
13468
+ workspace_admins_can_invite: zod.z.boolean(),
13469
+ /** Whether an editor collaborator may invite further collaborators. */
13470
+ collaborators_can_invite: zod.z.boolean(),
13471
+ /**
13472
+ * When the organization is SUSPENDED, do its content rules still bind its
13473
+ * members?
13474
+ *
13475
+ * Today this governs exactly one rule — `personal_space_enabled` — and that
13476
+ * is not an accident: every other key above governs behaviour INSIDE a
13477
+ * workspace, and a suspended organization grants no workspace context at
13478
+ * all, so those are already moot.
13479
+ *
13480
+ * The name is general because an organization is deciding a principle here,
13481
+ * not one checkbox's fate. Default `false`, which is today's behaviour: a
13482
+ * suspended organization stops binding, and its members work independently
13483
+ * until it resumes. An organization whose reason for disabling the personal
13484
+ * space is contractual — the work made here belongs to the institution —
13485
+ * turns this on, because an unpaid invoice does not void a contract.
13486
+ */
13487
+ policy_survives_suspension: zod.z.boolean()
13488
+ });
13489
+ var PRESET_SETTING_KEYS = Object.freeze(
13490
+ Object.keys(PresetSettingsSchema.shape)
13491
+ );
13492
+ var WorkspaceSettingsSchema = PresetSettingsSchema.partial();
13493
+ var EMAIL_DOMAIN_PATTERN = /^[a-z0-9-]+(\.[a-z0-9-]+)+$/;
13494
+ var OrgSettingsSchema = PresetSettingsSchema.partial().extend({
13495
+ /** Lower-case domains that join codes / domain auto-join accept. Empty = any. */
13496
+ allowed_email_domains: zod.z.array(zod.z.string().regex(EMAIL_DOMAIN_PATTERN)).optional(),
13497
+ /** Per-org relabelling of the kind vocabulary (./vocabulary.ts). */
13498
+ vocabulary_overrides: zod.z.record(zod.z.string(), zod.z.string()).optional()
13499
+ });
13290
13500
 
13501
+ exports.ACCESS_LEVELS = ACCESS_LEVELS;
13291
13502
  exports.ACTIVE_SCENE_HELPERS = ACTIVE_SCENE_HELPERS;
13292
13503
  exports.ADVANCED_MODE_UNAVAILABLE_REASON = ADVANCED_MODE_UNAVAILABLE_REASON;
13293
13504
  exports.AGGREGATEABLE_TYPES = AGGREGATEABLE_TYPES;
@@ -13352,6 +13563,7 @@ exports.CINEMATIC_MIN_DURATION_SEC = CINEMATIC_MIN_DURATION_SEC;
13352
13563
  exports.CINEMATIC_MIN_LOOKS = CINEMATIC_MIN_LOOKS;
13353
13564
  exports.CINEMATIC_PROMPT_MAX = CINEMATIC_PROMPT_MAX;
13354
13565
  exports.CINEMATIC_RESERVE_IDS = CINEMATIC_RESERVE_IDS;
13566
+ exports.COLLABORATOR_ROLES = COLLABORATOR_ROLES;
13355
13567
  exports.COLLECT_IN_HANDLE = COLLECT_IN_HANDLE;
13356
13568
  exports.COMBINE_TRANSITIONS = COMBINE_TRANSITIONS;
13357
13569
  exports.COMBINE_TRANSITION_GROUP_LABELS = COMBINE_TRANSITION_GROUP_LABELS;
@@ -13425,6 +13637,7 @@ exports.FixContinuityInputSchema = FixContinuityInputSchema;
13425
13637
  exports.FixContinuityResultSchema = FixContinuityResultSchema;
13426
13638
  exports.GENERATE_TEXT_DELIMITER = GENERATE_TEXT_DELIMITER;
13427
13639
  exports.GLOBAL_MAX_DURATION_SECONDS = GLOBAL_MAX_DURATION_SECONDS;
13640
+ exports.GRANTED_ACCESS = GRANTED_ACCESS;
13428
13641
  exports.GROUP_HANDLE_PREFIX = GROUP_HANDLE_PREFIX;
13429
13642
  exports.GUIDANCE_SCALE_SUPPORT = GUIDANCE_SCALE_SUPPORT;
13430
13643
  exports.GVP_ANCHOR_CHOICES = GVP_ANCHOR_CHOICES;
@@ -13478,6 +13691,8 @@ exports.LLM_MODEL_IDS = LLM_MODEL_IDS;
13478
13691
  exports.LLM_REASONING_EFFORTS = LLM_REASONING_EFFORTS;
13479
13692
  exports.LLM_ROUTE_DEFAULTS = LLM_ROUTE_DEFAULTS;
13480
13693
  exports.LLM_TEXT_INPUT_MAX = LLM_TEXT_INPUT_MAX;
13694
+ exports.LLM_VENDOR_LABELS = LLM_VENDOR_LABELS;
13695
+ exports.LLM_VENDOR_ORDER = LLM_VENDOR_ORDER;
13481
13696
  exports.LOCATION_ASSET_TYPES = LOCATION_ASSET_TYPES;
13482
13697
  exports.LOCATION_ASSET_VARIANTS = LOCATION_ASSET_VARIANTS;
13483
13698
  exports.LOCATION_ATMOSPHERE_PROVIDERS = LOCATION_ATMOSPHERE_PROVIDERS;
@@ -13500,6 +13715,7 @@ exports.MAX_NEGATIVE_PROMPT_CHARS_BY_PROVIDER = MAX_NEGATIVE_PROMPT_CHARS_BY_PRO
13500
13715
  exports.MAX_PANELS_PER_SHEET = MAX_PANELS_PER_SHEET;
13501
13716
  exports.MAX_TTS_CHARS_BY_PROVIDER = MAX_TTS_CHARS_BY_PROVIDER;
13502
13717
  exports.MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER = MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER;
13718
+ exports.MEMBER_STATUSES = MEMBER_STATUSES;
13503
13719
  exports.MINIMAX_H3_DEFAULT_RESOLUTION = MINIMAX_H3_DEFAULT_RESOLUTION;
13504
13720
  exports.MINIMAX_H3_PROVIDERS = MINIMAX_H3_PROVIDERS;
13505
13721
  exports.MODELS_WITH_REFERENCE_IMAGE_SUPPORT = MODELS_WITH_REFERENCE_IMAGE_SUPPORT;
@@ -13532,15 +13748,21 @@ exports.OBJECT_ASSET_VARIANTS = OBJECT_ASSET_VARIANTS;
13532
13748
  exports.OBJECT_ATTACH_COLUMNS = OBJECT_ATTACH_COLUMNS;
13533
13749
  exports.OBJECT_MOTION_PROVIDERS = OBJECT_MOTION_PROVIDERS;
13534
13750
  exports.OBJECT_PICKER_NODE_TYPES = OBJECT_PICKER_NODE_TYPES;
13751
+ exports.ORG_ERROR_CODES = ORG_ERROR_CODES;
13752
+ exports.ORG_KINDS = ORG_KINDS;
13753
+ exports.ORG_ROLES = ORG_ROLES;
13754
+ exports.ORG_STATUSES = ORG_STATUSES;
13535
13755
  exports.OUTPUT_FIELD_MAP = OUTPUT_FIELD_MAP;
13536
13756
  exports.OUTPUT_FORMATS = OUTPUT_FORMATS;
13537
13757
  exports.ObjectMetadataSchema = ObjectMetadataSchema;
13538
13758
  exports.OptimizeForModelInputSchema = OptimizeForModelInputSchema;
13539
13759
  exports.OptimizeForModelResultSchema = OptimizeForModelResultSchema;
13760
+ exports.OrgSettingsSchema = OrgSettingsSchema;
13540
13761
  exports.PARAMETER_NODE_TYPES = PARAMETER_NODE_TYPES;
13541
13762
  exports.PASSTHROUGH_TYPES = PASSTHROUGH_TYPES;
13542
13763
  exports.PAYG_RETENTION_DAYS = PAYG_RETENTION_DAYS;
13543
13764
  exports.PER_FORMAT_DURATION_BOUNDS = PER_FORMAT_DURATION_BOUNDS;
13765
+ exports.PICKER_TO_COMBINE_TRANSITION = PICKER_TO_COMBINE_TRANSITION;
13544
13766
  exports.PIPELINE_ACTIVATION_MODES = PIPELINE_ACTIVATION_MODES;
13545
13767
  exports.PIPELINE_FORMATS = PIPELINE_FORMATS;
13546
13768
  exports.PIPELINE_HARD_TIMEOUT_MS = PIPELINE_HARD_TIMEOUT_MS;
@@ -13559,6 +13781,7 @@ exports.PLATFORM_SPECS = PLATFORM_SPECS;
13559
13781
  exports.PRESET_APPLY_CLEAR_KEYS = PRESET_APPLY_CLEAR_KEYS;
13560
13782
  exports.PRESET_EXCLUDED_KEYS = PRESET_EXCLUDED_KEYS;
13561
13783
  exports.PRESET_LABELS = PRESET_LABELS;
13784
+ exports.PRESET_SETTING_KEYS = PRESET_SETTING_KEYS;
13562
13785
  exports.PRICING_DEFAULT_DURATION_SEC = PRICING_DEFAULT_DURATION_SEC;
13563
13786
  exports.PRICING_DEFAULT_RESOLUTION = PRICING_DEFAULT_RESOLUTION;
13564
13787
  exports.PROMPT_HARD_CEILING = PROMPT_HARD_CEILING;
@@ -13575,6 +13798,7 @@ exports.PipelineStageNameSchema = PipelineStageNameSchema;
13575
13798
  exports.PipelineStageStatusSchema = PipelineStageStatusSchema;
13576
13799
  exports.PipelineStateSchema = PipelineStateSchema;
13577
13800
  exports.PipelineStatusSchema = PipelineStatusSchema;
13801
+ exports.PresetSettingsSchema = PresetSettingsSchema;
13578
13802
  exports.QA_CHECK_PROVIDERS = QA_CHECK_PROVIDERS;
13579
13803
  exports.REDUCE_STRATEGIES = REDUCE_STRATEGIES;
13580
13804
  exports.REDUCE_STRATEGY_IDS = REDUCE_STRATEGY_IDS;
@@ -13625,11 +13849,13 @@ exports.STAGE_PATCH_SCHEMA = STAGE_PATCH_SCHEMA;
13625
13849
  exports.STATIC_CAPTION_STYLES = STATIC_CAPTION_STYLES;
13626
13850
  exports.STRUCTURAL_SECTIONS = STRUCTURAL_SECTIONS;
13627
13851
  exports.STRUCTURED_VISION_MODELS = STRUCTURED_VISION_MODELS;
13852
+ exports.SUBMISSION_STATUSES = SUBMISSION_STATUSES;
13628
13853
  exports.SUNO_ADD_TRACK_MODELS = SUNO_ADD_TRACK_MODELS;
13629
13854
  exports.SUNO_FIELD_HANDLE_FIELDS = SUNO_FIELD_HANDLE_FIELDS;
13630
13855
  exports.SUNO_MODELS = SUNO_MODELS;
13631
13856
  exports.SUNO_TEXT_MAX = SUNO_TEXT_MAX;
13632
13857
  exports.SUNO_TITLE_MAX = SUNO_TITLE_MAX;
13858
+ exports.SUNO_TRACK_SOURCE_TYPES = SUNO_TRACK_SOURCE_TYPES;
13633
13859
  exports.SUPPORTED_FONT_NAMES = SUPPORTED_FONT_NAMES;
13634
13860
  exports.SURROUND_DIRECTIONS = SURROUND_DIRECTIONS;
13635
13861
  exports.SWITCHX_BLOCK_FRAMES = SWITCHX_BLOCK_FRAMES;
@@ -13724,6 +13950,11 @@ exports.WARDROBE_VARIANTS = WARDROBE_VARIANTS;
13724
13950
  exports.WEAPONS = WEAPONS;
13725
13951
  exports.WEAPON_SUBCATEGORY_LABELS = WEAPON_SUBCATEGORY_LABELS;
13726
13952
  exports.WEAPON_SUBCATEGORY_ORDER = WEAPON_SUBCATEGORY_ORDER;
13953
+ exports.WORKFLOW_VISIBILITIES = WORKFLOW_VISIBILITIES;
13954
+ exports.WORKSPACE_HEADER = WORKSPACE_HEADER;
13955
+ exports.WORKSPACE_HEADER_LOWER = WORKSPACE_HEADER_LOWER;
13956
+ exports.WORKSPACE_ROLES = WORKSPACE_ROLES;
13957
+ exports.WorkspaceSettingsSchema = WorkspaceSettingsSchema;
13727
13958
  exports.aggregateByType = aggregateByType;
13728
13959
  exports.aiAvatarReserveCreditId = aiAvatarReserveCreditId;
13729
13960
  exports.analyzedSceneSchema = analyzedSceneSchema;
@@ -13756,7 +13987,6 @@ exports.buildPanelPrompt = buildPanelPrompt;
13756
13987
  exports.buildProgressSegments = buildProgressSegments;
13757
13988
  exports.buildRangeLabel = buildRangeLabel;
13758
13989
  exports.buildScraperCreditId = buildScraperCreditId;
13759
- exports.buildSurroundFillPrompt = buildSurroundFillPrompt;
13760
13990
  exports.buildVideoAnalysisCreditId = buildVideoAnalysisCreditId;
13761
13991
  exports.buildVideoAuditCreditId = buildVideoAuditCreditId;
13762
13992
  exports.buildVideoCreditModelIdentifier = buildVideoCreditModelIdentifier;
@@ -13875,6 +14105,7 @@ exports.getWeapon = getWeapon;
13875
14105
  exports.getWeaponLabel = getWeaponLabel;
13876
14106
  exports.groupByFamily = groupByFamily;
13877
14107
  exports.groupHandleId = groupHandleId;
14108
+ exports.groupLlmModelsByVendor = groupLlmModelsByVendor;
13878
14109
  exports.hasContiguousSegmentDurations = hasContiguousSegmentDurations;
13879
14110
  exports.hasFeature = hasFeature;
13880
14111
  exports.hexToRgbaArray = hexToRgbaArray;
@@ -13933,6 +14164,7 @@ exports.normalizeModelInput = normalizeModelInput;
13933
14164
  exports.normalizeNodeModelParams = normalizeNodeModelParams;
13934
14165
  exports.normalizePinterestUrl = normalizePinterestUrl;
13935
14166
  exports.normalizeRoleSlug = normalizeRoleSlug;
14167
+ exports.orderedLlmModels = orderedLlmModels;
13936
14168
  exports.parseAttributedDialogue = parseAttributedDialogue;
13937
14169
  exports.parseCharacterMentionToken = parseCharacterMentionToken;
13938
14170
  exports.parseGroupHandle = parseGroupHandle;
@@ -13988,10 +14220,12 @@ exports.resolveScraperCreditId = resolveScraperCreditId;
13988
14220
  exports.resolveSelectorRefs = resolveSelectorRefs;
13989
14221
  exports.resolveSeparator = resolveSeparator;
13990
14222
  exports.resolveSheetSections = resolveSheetSections;
14223
+ exports.resolveSlideshowTransition = resolveSlideshowTransition;
13991
14224
  exports.resolveSourceThroughConnectedList = resolveSourceThroughConnectedList;
13992
14225
  exports.resolveStoredTier = resolveStoredTier;
13993
14226
  exports.resolveSwitchXCreditId = resolveSwitchXCreditId;
13994
14227
  exports.resolveVideoAnalysisModel = resolveVideoAnalysisModel;
14228
+ exports.resolveVideoModeForInputs = resolveVideoModeForInputs;
13995
14229
  exports.resolveVideoProviderForMode = resolveVideoProviderForMode;
13996
14230
  exports.resolveXfadeName = resolveXfadeName;
13997
14231
  exports.rewriteSceneBindings = rewriteSceneBindings;