@nodaro/shared 3.24.0 → 3.26.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.
Files changed (50) hide show
  1. package/dist/index.cjs +1086 -257
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +531 -97
  4. package/dist/index.d.ts +531 -97
  5. package/dist/index.js +1034 -258
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/__tests__/condition-variables.test.ts +12 -0
  9. package/src/__tests__/content-recipe-ideas.test.ts +9 -4
  10. package/src/__tests__/credit-identifiers.test.ts +31 -6
  11. package/src/__tests__/dialogue-capabilities.test.ts +3 -2
  12. package/src/__tests__/edit-plan-minute-ids.test.ts +82 -0
  13. package/src/__tests__/image-model-roles.test.ts +57 -0
  14. package/src/__tests__/image-ref-limit.test.ts +1 -0
  15. package/src/__tests__/json-kinds.test.ts +179 -0
  16. package/src/__tests__/llm-models.test.ts +136 -37
  17. package/src/__tests__/lone-media-url.test.ts +78 -0
  18. package/src/__tests__/presentation-utils.test.ts +1 -0
  19. package/src/__tests__/preview-gate.test.ts +2 -2
  20. package/src/__tests__/pricing-default-duration.test.ts +56 -15
  21. package/src/__tests__/private-host.test.ts +24 -0
  22. package/src/__tests__/prompt-length-limits.test.ts +2 -0
  23. package/src/__tests__/render-nodes.test.ts +22 -3
  24. package/src/__tests__/tts-capabilities.test.ts +61 -1
  25. package/src/__tests__/video-link-input.test.ts +148 -0
  26. package/src/__tests__/video-link-needs.test.ts +67 -0
  27. package/src/__tests__/video-request-normalize.test.ts +18 -3
  28. package/src/condition-variables.ts +3 -1
  29. package/src/content-recipe-ideas.ts +5 -2
  30. package/src/credit-identifiers.ts +48 -37
  31. package/src/edit-plan-contract.ts +67 -1
  32. package/src/fan-out-rows.ts +2 -2
  33. package/src/image-model-roles.ts +62 -0
  34. package/src/index.ts +59 -1
  35. package/src/json-kinds.ts +188 -0
  36. package/src/llm-models.ts +348 -23
  37. package/src/lone-media-url.ts +57 -0
  38. package/src/model-catalog.ts +160 -13
  39. package/src/model-constants.ts +79 -43
  40. package/src/node-default-mappings.ts +4 -0
  41. package/src/pipeline-types.ts +13 -2
  42. package/src/presentation-utils.ts +8 -1
  43. package/src/private-host.ts +91 -0
  44. package/src/producer-types.ts +3 -0
  45. package/src/render-nodes.ts +12 -1
  46. package/src/scene-node-types.ts +17 -5
  47. package/src/settings-input.ts +2 -1
  48. package/src/social-post-readers.ts +37 -0
  49. package/src/video-link.ts +238 -0
  50. package/src/voices.ts +16 -9
package/dist/index.cjs CHANGED
@@ -56,27 +56,28 @@ function isAutoVideoDuration(duration) {
56
56
  var SPEECH_UNIT_PRICE_NOTE = "per started 100 characters, at least 8 units \u2014 where length pricing is on";
57
57
  var MODEL_RECOMMENDATIONS = [
58
58
  // image
59
- { intent: "best for typography / logos / text-heavy", modelIds: ["nano-banana-pro", "gpt-image-2"], note: "Nano Banana Pro for diagrams / complex text; GPT Image 2 for logos and short copy." },
59
+ { intent: "best for typography / logos / text-heavy", modelIds: ["gpt-image-2", "gpt-image-2-5-flare"], note: "GPT Image 2 for exact copy, labels and non-Latin text; GPT Image 2.5 Flare is close and faster." },
60
60
  // Notes name the RANKING, not the price — the price sits in the generated
61
61
  // table directly below them and in `pricing`, so restating it here just
62
62
  // creates a copy that rots (this one said "1 credit" long after it was 2).
63
63
  { intent: "cheapest realistic image", modelIds: ["z-image", "qwen", "imagen4-fast"], note: "Z-Image is the cheapest. Qwen / Imagen4 Fast for slightly higher quality." },
64
- { intent: "highest fidelity image", modelIds: ["nano-banana-pro", "imagen4-ultra", "flux-flex"], note: "Pick by family preference; all three are premium tiers." },
65
- { intent: "image edit / restyle", modelIds: ["flux-kontext", "ideogram-remix", "seedream-5-pro-i2i"], note: "Flux Kontext preserves identity; Ideogram Remix is character-aware; Seedream 5 Pro for instruction-based edits (5 Lite is the budget option)." },
66
- { intent: "highest-resolution image", modelIds: ["topaz-image-upscale", "nano-banana-pro", "gpt-image-2"], note: "Generate at the model's top tier, then Topaz upscale 4x (Topaz's only lever is the 1x/2x/4x factor)." },
64
+ { intent: "highest fidelity image", modelIds: ["gpt-image-2", "gpt-image-2-5-sunburst", "imagen4-ultra"], note: "GPT Image 2 for characters and identity; GPT Image 2.5 Sunburst for wide or in-between ratios GPT Image 2 can't draw." },
65
+ { intent: "image edit / restyle", modelIds: ["gpt-image-2-5-flare-i2i", "gpt-image-2-i2i", "seedream-5-pro-i2i"], note: "GPT Image 2.5 Flare keeps pose, framing and product detail; GPT Image 2 i2i for identity-critical edits; Seedream 5 Pro for instruction-based edits." },
66
+ { intent: "highest-resolution image", modelIds: ["topaz-image-upscale", "gpt-image-2", "gpt-image-2-5-sunburst"], note: "Generate at the model's top tier, then Topaz upscale 4x (Topaz's only lever is the 1x/2x/4x factor)." },
67
67
  { intent: "background removal / cutout", modelIds: ["recraft-remove-bg"], note: "Cheap, no prompt needed." },
68
68
  // video
69
69
  { intent: "best cinematic video", modelIds: ["veo3", "kling-3.0", "seedance-2"], note: "VEO 3.1 Quality for premium narrative; Kling 3.0 for music-synced motion; Seedance 2 for reference-driven consistency." },
70
70
  { intent: "cheap batch video clips", modelIds: ["veo3.1", "wan-turbo", "bytedance-lite"], note: "VEO 3.1 Fast is the best price/quality balance with native audio." },
71
71
  { intent: "video with start + end frame", modelIds: ["veo3", "veo3.1", "kling-turbo", "minimax", "hailuo-standard", "seedance-2"], note: "All listed support an end frame; VEO uses imageUrls[start, end]." },
72
72
  { intent: "music / song generation", modelIds: ["suno-v6", "suno-v6_wild", "suno-v6_mini", "suno-v5_5"], note: "V6 is the default flagship; V6 Wild for bolder, less predictable results; V6 Mini when speed matters; v5.5 / v5 / v4 keep their own character. Same price." },
73
- { intent: "voice over / narration", modelIds: ["elevenlabs-v4", "elevenlabs-v3", "elevenlabs-turbo"], note: "v4 is the default: [audio tags] for emotion and up to 10,000 characters per request. v3 is the previous expressive model, still selectable. Turbo is cheaper for plain narration." },
73
+ { intent: "voice over / narration", modelIds: ["elevenlabs-v4", "elevenlabs-v3", "elevenlabs-v4-turbo", "elevenlabs-turbo"], note: "v4 is the default: [audio tags] for emotion and up to 10,000 characters per request. v3 is the previous expressive model, still selectable. v4 Turbo keeps v4's tags at Turbo's credit price; Turbo v2.5 is the cheapest for plain narration without tags." },
74
74
  { intent: "lip-sync a portrait to audio", modelIds: ["kling-avatar-pro", "kling-avatar", "infinitalk"], note: "Pro for best mouth shape; InfiniTalk for resolution control." },
75
75
  { intent: "transcription / captions", modelIds: ["elevenlabs-stt", "incredibly-fast-whisper", "whisper"], note: "Captions need WORD timestamps: ElevenLabs STT (always) or Incredibly Fast Whisper. Plain Whisper returns phrase segments only." },
76
76
  { intent: "motion transfer (drive a subject by another video)", modelIds: ["motion-transfer", "kling-3.0-motion"], note: "Kling 2.6 base is cheap; Kling 3.0 is premium." }
77
77
  ];
78
78
  var NANO_BANANA_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "4:5", "5:4", "21:9"];
79
79
  var NANO_BANANA_2_LITE_RATIOS = ["auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "4:5", "5:4", "21:9", "4:1", "1:4", "8:1", "1:8"];
80
+ var NANO_BANANA_2_1_RATIOS = ["auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "4:5", "5:4", "21:9", "4:1", "1:4", "8:1", "1:8"];
80
81
  var FLUX_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"];
81
82
  var KONTEXT_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "21:9"];
82
83
  var GROK_RATIOS = ["1:1", "16:9", "9:16", "3:2", "2:3"];
@@ -146,6 +147,26 @@ var IMAGE_MODELS = {
146
147
  { identifier: "nano-banana-2:4K", credits: 50, note: "4K" }
147
148
  ]
148
149
  },
150
+ "nano-banana-2-1": {
151
+ id: "nano-banana-2-1",
152
+ kind: "image",
153
+ // Single id for both modes, like nano-banana-2: optional input images via
154
+ // image_input (up to 10) on the one endpoint.
155
+ modes: ["t2i", "i2i"],
156
+ family: "Google",
157
+ label: "Nano Banana 2.1",
158
+ series: "Nano Banana",
159
+ description: "Google's high-efficiency image model for generation and editing \u2014 sharper quality, prompt adherence, character consistency and text rendering, up to 10 references and 4K output.",
160
+ useCases: ["realistic", "character", "typography", "high-res"],
161
+ features: ["reference-image"],
162
+ aspectRatios: NANO_BANANA_2_1_RATIOS,
163
+ resolutions: ["1K", "2K", "4K"],
164
+ pricing: [
165
+ { identifier: "nano-banana-2-1", credits: 10, note: "1K default" },
166
+ { identifier: "nano-banana-2-1:2K", credits: 20, note: "2K" },
167
+ { identifier: "nano-banana-2-1:4K", credits: 30, note: "4K" }
168
+ ]
169
+ },
149
170
  "nano-banana-2-lite": {
150
171
  id: "nano-banana-2-lite",
151
172
  kind: "image",
@@ -177,8 +198,7 @@ var IMAGE_MODELS = {
177
198
  pricing: [
178
199
  { identifier: "nano-banana-pro", credits: 45, note: "1K / 2K" },
179
200
  { identifier: "nano-banana-pro:4K", credits: 60, note: "4K" }
180
- ],
181
- featured: true
201
+ ]
182
202
  },
183
203
  "nano-banana-edit": {
184
204
  id: "nano-banana-edit",
@@ -422,7 +442,8 @@ var IMAGE_MODELS = {
422
442
  { identifier: "gpt-image-2:2K", credits: 30, note: "2K" },
423
443
  { identifier: "gpt-image-2:4K", credits: 60, note: "4K" }
424
444
  ],
425
- safetyFilter: { stochastic: true, fallback: "nano-banana-pro" }
445
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
446
+ featured: true
426
447
  },
427
448
  "gpt-image-2-i2i": {
428
449
  id: "gpt-image-2-i2i",
@@ -753,6 +774,40 @@ var IMAGE_MODELS = {
753
774
  { identifier: "seedream-5-pro-i2i:high", credits: 60, note: "high / 2K" }
754
775
  ]
755
776
  },
777
+ // Seedream 5 Flash — fast, low-cost Seedream 5. Its lever is KIE's `size`
778
+ // (1K / 1.5K / 2K), NOT the siblings' `quality`: declared as `resolutions`
779
+ // (the KIE config renames it to `size` on the wire). Flat price at every
780
+ // offered size. 1.5K is not offered yet: no other image model or route enum
781
+ // carries it, and its price has not been confirmed.
782
+ // See: docs.kie.ai/market/seedream/5-flash-text-to-image.md
783
+ "seedream-5-flash": {
784
+ id: "seedream-5-flash",
785
+ kind: "image",
786
+ modes: ["t2i"],
787
+ family: "Bytedance",
788
+ label: "Seedream 5 Flash",
789
+ series: "Seedream",
790
+ description: "Fast, low-cost Seedream 5 \u2014 quick generations at 1K or 2K, same price at either size.",
791
+ useCases: ["realistic", "drafts", "iteration"],
792
+ features: ["reference-image"],
793
+ aspectRatios: SEEDREAM_RATIOS,
794
+ resolutions: ["1K", "2K"],
795
+ pricing: [{ identifier: "seedream-5-flash", credits: 10, note: "1K / 2K flat" }]
796
+ },
797
+ "seedream-5-flash-i2i": {
798
+ id: "seedream-5-flash-i2i",
799
+ kind: "image",
800
+ modes: ["i2i"],
801
+ family: "Bytedance",
802
+ label: "Seedream 5 Flash (I2I)",
803
+ series: "Seedream",
804
+ description: "Image-to-image with Seedream 5 Flash \u2014 fast edits from up to 10 input images at 1K or 2K, same price at either size.",
805
+ useCases: ["edit", "iteration"],
806
+ features: ["reference-image"],
807
+ aspectRatios: SEEDREAM_RATIOS,
808
+ resolutions: ["1K", "2K"],
809
+ pricing: [{ identifier: "seedream-5-flash-i2i", credits: 10, note: "1K / 2K flat" }]
810
+ },
756
811
  // ── Alibaba Qwen ──
757
812
  "qwen": {
758
813
  id: "qwen",
@@ -961,6 +1016,7 @@ var VIDEO_MODELS = {
961
1016
  useCases: ["realistic", "motion", "narrative"],
962
1017
  features: ["end-frame"],
963
1018
  durations: [5],
1019
+ defaultDuration: 5,
964
1020
  pricing: [{ identifier: "minimax", credits: 143, note: "5s, 1080p" }]
965
1021
  },
966
1022
  // MiniMax Hailuo 3 (KIE "minimax-h3") — t2v / i2v (first and/or last frame) /
@@ -986,6 +1042,7 @@ var VIDEO_MODELS = {
986
1042
  features: ["end-frame", "audio", "reference-image", "video-reference"],
987
1043
  aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
988
1044
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1045
+ defaultDuration: 6,
989
1046
  // First entry = default (the UI dropdown + fail-safe snap use opts[0], and
990
1047
  // 2K is the KIE-side default). Uppercase values are the exact KIE wire enum.
991
1048
  resolutions: ["2K", "768P"],
@@ -1011,6 +1068,7 @@ var VIDEO_MODELS = {
1011
1068
  description: "Hailuo 2.3 Pro \u2014 newer Hailuo with 768P / 1080P resolutions.",
1012
1069
  useCases: ["realistic", "motion"],
1013
1070
  durations: [6, 10],
1071
+ defaultDuration: 6,
1014
1072
  resolutions: ["768P", "1080P"],
1015
1073
  pricing: [
1016
1074
  { identifier: "hailuo-2.3-pro", credits: 200, note: "10s default" },
@@ -1030,6 +1088,7 @@ var VIDEO_MODELS = {
1030
1088
  description: "Cheaper Hailuo 2.3 tier \u2014 good baseline quality.",
1031
1089
  useCases: ["realistic", "cheap"],
1032
1090
  durations: [6, 10],
1091
+ defaultDuration: 6,
1033
1092
  pricing: [
1034
1093
  { identifier: "hailuo-2.3", credits: 75, note: "6s default" },
1035
1094
  { identifier: "hailuo-2.3:6s", credits: 80, note: "6s" },
@@ -1047,6 +1106,7 @@ var VIDEO_MODELS = {
1047
1106
  useCases: ["cheap", "motion"],
1048
1107
  features: ["end-frame"],
1049
1108
  durations: [6, 10],
1109
+ defaultDuration: 6,
1050
1110
  resolutions: ["512P", "768P"],
1051
1111
  pricing: [
1052
1112
  { identifier: "hailuo-standard", credits: 75, note: "6s default" },
@@ -1074,6 +1134,7 @@ var VIDEO_MODELS = {
1074
1134
  // `veo3_lite` DO serve it and keep the flag.
1075
1135
  features: ["end-frame", "audio"],
1076
1136
  durations: [4, 6, 8],
1137
+ defaultDuration: 8,
1077
1138
  aspectRatios: VIDEO_RATIOS_HV,
1078
1139
  // 720p (default) + 1080p inline. 4K generates the base at 1080p then chains
1079
1140
  // KIE's /api/v1/veo/get-4k-video endpoint (worker handleImageToVideo / handleTextToVideo).
@@ -1095,6 +1156,7 @@ var VIDEO_MODELS = {
1095
1156
  useCases: ["cinematic", "fast", "general"],
1096
1157
  features: ["end-frame", "audio", "reference-image"],
1097
1158
  durations: [4, 6, 8],
1159
+ defaultDuration: 8,
1098
1160
  aspectRatios: VIDEO_RATIOS_HV,
1099
1161
  resolutions: ["720p", "1080p", "4k"],
1100
1162
  pricing: [
@@ -1115,6 +1177,7 @@ var VIDEO_MODELS = {
1115
1177
  useCases: ["cinematic", "cheap", "high-volume"],
1116
1178
  features: ["end-frame", "audio", "reference-image"],
1117
1179
  durations: [4, 6, 8],
1180
+ defaultDuration: 8,
1118
1181
  aspectRatios: VIDEO_RATIOS_HV,
1119
1182
  resolutions: ["720p", "1080p", "4k"],
1120
1183
  pricing: [
@@ -1138,6 +1201,7 @@ var VIDEO_MODELS = {
1138
1201
  aspectRatios: VIDEO_RATIOS_HV,
1139
1202
  resolutions: ["720p", "1080p", "4k"],
1140
1203
  durations: [4, 6, 8, 10],
1204
+ defaultDuration: 8,
1141
1205
  pricing: [
1142
1206
  { identifier: "gemini-omni-video", credits: 315, note: "default \u2014 720p/1080p 4s" },
1143
1207
  { identifier: "gemini-omni-video:4", credits: 230, note: "720p/1080p 4s" },
@@ -1174,6 +1238,7 @@ var VIDEO_MODELS = {
1174
1238
  aspectRatios: VIDEO_RATIOS_HV,
1175
1239
  resolutions: ["720p", "1080p", "4k"],
1176
1240
  durations: [4, 6, 8, 10],
1241
+ defaultDuration: 8,
1177
1242
  pricing: [
1178
1243
  { identifier: "gemini-omni-flash", credits: 270, note: "default \u2014 8s 720p/1080p (the credit builder's duration fallback)" },
1179
1244
  { identifier: "gemini-omni-flash:4", credits: 160, note: "720p/1080p 4s" },
@@ -1201,6 +1266,7 @@ var VIDEO_MODELS = {
1201
1266
  features: ["audio"],
1202
1267
  aspectRatios: VIDEO_RATIOS_HVS,
1203
1268
  durations: [5, 10],
1269
+ defaultDuration: 5,
1204
1270
  pricing: [
1205
1271
  { identifier: "kling", credits: 280, note: "10s no audio default" },
1206
1272
  { identifier: "kling:5s", credits: 138, note: "5s no audio" },
@@ -1220,6 +1286,7 @@ var VIDEO_MODELS = {
1220
1286
  useCases: ["fast", "motion", "cheap"],
1221
1287
  features: ["end-frame"],
1222
1288
  durations: [5, 10],
1289
+ defaultDuration: 5,
1223
1290
  pricing: [
1224
1291
  { identifier: "kling-turbo", credits: 125, note: "5s default" },
1225
1292
  { identifier: "kling-turbo:5s", credits: 110 },
@@ -1237,6 +1304,7 @@ var VIDEO_MODELS = {
1237
1304
  useCases: ["premium", "narrative", "cinematic"],
1238
1305
  features: ["end-frame", "audio"],
1239
1306
  durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1307
+ defaultDuration: 5,
1240
1308
  resolutions: ["720P", "1080P"],
1241
1309
  pricing: [
1242
1310
  { identifier: "kling-3.0", credits: 500, note: "5s 1080p with audio" },
@@ -1259,6 +1327,7 @@ var VIDEO_MODELS = {
1259
1327
  description: "Master tier I2V \u2014 strong cinematic quality.",
1260
1328
  useCases: ["cinematic", "premium"],
1261
1329
  durations: [5, 10],
1330
+ defaultDuration: 5,
1262
1331
  pricing: [
1263
1332
  { identifier: "kling-master", credits: 400, note: "5s default" },
1264
1333
  { identifier: "kling-master:5s", credits: 400 },
@@ -1276,6 +1345,7 @@ var VIDEO_MODELS = {
1276
1345
  useCases: ["motion", "cinematic", "reference"],
1277
1346
  features: ["end-frame", "reference-image"],
1278
1347
  durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1348
+ defaultDuration: 5,
1279
1349
  resolutions: ["720p", "1080p"],
1280
1350
  aspectRatios: VIDEO_RATIOS_HVS,
1281
1351
  pricing: [
@@ -1297,6 +1367,7 @@ var VIDEO_MODELS = {
1297
1367
  description: "Grok image-to-video \u2014 stylized motion. Up to 15s.",
1298
1368
  useCases: ["stylized", "motion"],
1299
1369
  durations: [6, 10],
1370
+ defaultDuration: 6,
1300
1371
  resolutions: ["480p", "720p"],
1301
1372
  pricing: [
1302
1373
  { identifier: "grok-i2v", credits: 150, note: "6s default" },
@@ -1325,6 +1396,7 @@ var VIDEO_MODELS = {
1325
1396
  useCases: ["stylized", "motion"],
1326
1397
  aspectRatios: ["16:9", "9:16", "1:1", "4:3", "3:4"],
1327
1398
  durations: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1399
+ defaultDuration: 8,
1328
1400
  resolutions: ["480p", "720p"],
1329
1401
  pricing: [
1330
1402
  { identifier: "grok-imagine-video-1.5", credits: 295, note: "default 8s 480p \u2014 see :Ns:res variants" },
@@ -1346,6 +1418,7 @@ var VIDEO_MODELS = {
1346
1418
  useCases: ["motion", "narrative"],
1347
1419
  features: ["end-frame"],
1348
1420
  durations: [4, 8, 12],
1421
+ defaultDuration: 8,
1349
1422
  resolutions: ["480p", "720p", "1080p"],
1350
1423
  pricing: [
1351
1424
  { identifier: "seedance", credits: 250, note: "8s default" },
@@ -1367,6 +1440,7 @@ var VIDEO_MODELS = {
1367
1440
  features: ["end-frame", "audio", "reference-image", "video-reference"],
1368
1441
  aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1369
1442
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1443
+ defaultDuration: 8,
1370
1444
  autoDuration: true,
1371
1445
  resolutions: ["480p", "720p", "1080p", "4k"],
1372
1446
  pricing: [
@@ -1393,6 +1467,7 @@ var VIDEO_MODELS = {
1393
1467
  features: ["end-frame", "audio", "reference-image", "video-reference"],
1394
1468
  aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1395
1469
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1470
+ defaultDuration: 8,
1396
1471
  autoDuration: true,
1397
1472
  resolutions: ["480p", "720p"],
1398
1473
  pricing: [
@@ -1415,6 +1490,7 @@ var VIDEO_MODELS = {
1415
1490
  features: ["end-frame", "audio", "reference-image", "video-reference"],
1416
1491
  aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1417
1492
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1493
+ defaultDuration: 8,
1418
1494
  autoDuration: true,
1419
1495
  resolutions: ["480p", "720p"],
1420
1496
  pricing: [
@@ -1443,6 +1519,7 @@ var VIDEO_MODELS = {
1443
1519
  features: ["end-frame", "audio", "reference-image", "video-reference"],
1444
1520
  aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1445
1521
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
1522
+ defaultDuration: 8,
1446
1523
  autoDuration: true,
1447
1524
  resolutions: ["480p", "720p", "1080p"],
1448
1525
  pricing: [
@@ -1484,6 +1561,7 @@ var VIDEO_MODELS = {
1484
1561
  features: ["end-frame", "audio", "reference-image"],
1485
1562
  aspectRatios: VIDEO_RATIOS_WAN_3,
1486
1563
  durations: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
1564
+ defaultDuration: 5,
1487
1565
  resolutions: ["480p", "720p", "1080p"],
1488
1566
  pricing: [
1489
1567
  { identifier: "wan-3", credits: 200, note: "default 5s 720p \u2014 see :Ns:res variants for exact" },
@@ -1509,6 +1587,7 @@ var VIDEO_MODELS = {
1509
1587
  features: ["end-frame", "audio", "reference-image"],
1510
1588
  aspectRatios: VIDEO_RATIOS_WAN_3,
1511
1589
  durations: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
1590
+ defaultDuration: 5,
1512
1591
  resolutions: ["480p", "720p", "1080p"],
1513
1592
  pricing: [
1514
1593
  { identifier: "wan-3-prime", credits: 320, note: "default 5s 720p \u2014 see :Ns:res variants for exact" },
@@ -1531,6 +1610,7 @@ var VIDEO_MODELS = {
1531
1610
  description: "Wan 2.6 image-to-video \u2014 5/10/15s at 720p/1080p.",
1532
1611
  useCases: ["motion", "narrative"],
1533
1612
  durations: [5, 10, 15],
1613
+ defaultDuration: 5,
1534
1614
  resolutions: ["720p", "1080p"],
1535
1615
  pricing: [
1536
1616
  { identifier: "wan-i2v", credits: 175, note: "5s 720p default" },
@@ -1550,6 +1630,7 @@ var VIDEO_MODELS = {
1550
1630
  useCases: ["cheap", "fast"],
1551
1631
  aspectRatios: VIDEO_RATIOS_HVS,
1552
1632
  durations: [5],
1633
+ defaultDuration: 5,
1553
1634
  resolutions: ["480p", "720p"],
1554
1635
  // Different KIE endpoints (i2v vs t2v) → different costs under
1555
1636
  // composite ids. Route picks endpoint based on whether image was supplied.
@@ -1570,6 +1651,7 @@ var VIDEO_MODELS = {
1570
1651
  description: "Wan 2.6 \u2014 text-to-video and video-to-video under a single id.",
1571
1652
  useCases: ["v2v", "t2v", "restyle"],
1572
1653
  durations: [5],
1654
+ defaultDuration: 5,
1573
1655
  resolutions: ["720p", "1080p"],
1574
1656
  pricing: [
1575
1657
  { identifier: "wan", credits: 175, note: "v2v 5s 720p" },
@@ -1645,6 +1727,7 @@ var VIDEO_MODELS = {
1645
1727
  description: "Wan 2.7 image-to-video \u2014 2\u201315s at 720p/1080p, supports start+end frame.",
1646
1728
  useCases: ["motion", "narrative"],
1647
1729
  durations: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1730
+ defaultDuration: 5,
1648
1731
  resolutions: ["720p", "1080p"],
1649
1732
  features: ["end-frame"],
1650
1733
  pricing: [
@@ -1662,6 +1745,7 @@ var VIDEO_MODELS = {
1662
1745
  useCases: ["motion", "narrative"],
1663
1746
  aspectRatios: VIDEO_RATIOS_HVS345,
1664
1747
  durations: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1748
+ defaultDuration: 5,
1665
1749
  resolutions: ["720p", "1080p"],
1666
1750
  pricing: [
1667
1751
  { identifier: "wan-2.7-t2v", credits: 188, note: "5s 720p default" }
@@ -1688,6 +1772,7 @@ var VIDEO_MODELS = {
1688
1772
  aspectRatios: ["16:9", "9:16"],
1689
1773
  resolutions: ["1080p", "2k", "4k"],
1690
1774
  durations: [6, 8, 10],
1775
+ defaultDuration: 6,
1691
1776
  pricing: [
1692
1777
  { identifier: "ltx-2.3-pro", credits: 240, note: "default 1080p 6s" },
1693
1778
  { identifier: "ltx-2.3-pro:1080p:6s", credits: 240 },
@@ -1719,6 +1804,7 @@ var VIDEO_MODELS = {
1719
1804
  // in credit-identifiers.ts is the per-band authority and snaps a 2k/4k
1720
1805
  // request back onto 6/8/10s, so the reservation is always a real tier).
1721
1806
  durations: [6, 8, 10, 12, 14, 16, 18, 20],
1807
+ defaultDuration: 6,
1722
1808
  pricing: [
1723
1809
  { identifier: "ltx-2.3-fast", credits: 180, note: "default 1080p 6s" },
1724
1810
  { identifier: "ltx-2.3-fast:1080p:6s", credits: 180 },
@@ -1750,6 +1836,7 @@ var VIDEO_MODELS = {
1750
1836
  useCases: ["motion", "creative"],
1751
1837
  aspectRatios: VIDEO_RATIOS_HAPPYHORSE_11,
1752
1838
  durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1839
+ defaultDuration: 5,
1753
1840
  resolutions: ["720p", "1080p"],
1754
1841
  pricing: [
1755
1842
  { identifier: "happyhorse", credits: 282, note: "5s 720p default \u2014 per-second: ~5.7 cr/s @720p, ~7.3 cr/s @1080p" }
@@ -1765,6 +1852,7 @@ var VIDEO_MODELS = {
1765
1852
  description: "HappyHorse 1.1 image-to-video \u2014 3\u201315s at 720p/1080p, aspect ratio inferred from input image, per-second pricing.",
1766
1853
  useCases: ["motion", "creative"],
1767
1854
  durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1855
+ defaultDuration: 5,
1768
1856
  resolutions: ["720p", "1080p"],
1769
1857
  pricing: [
1770
1858
  { identifier: "happyhorse-i2v", credits: 282, note: "5s 720p default \u2014 per-second: ~5.7 cr/s @720p, ~7.3 cr/s @1080p" }
@@ -1781,6 +1869,7 @@ var VIDEO_MODELS = {
1781
1869
  useCases: ["motion", "reference"],
1782
1870
  aspectRatios: VIDEO_RATIOS_HAPPYHORSE_11,
1783
1871
  durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1872
+ defaultDuration: 5,
1784
1873
  resolutions: ["720p", "1080p"],
1785
1874
  features: ["reference-image"],
1786
1875
  pricing: [
@@ -1814,6 +1903,7 @@ var VIDEO_MODELS = {
1814
1903
  features: ["end-frame"],
1815
1904
  aspectRatios: VIDEO_RATIOS_HVS,
1816
1905
  durations: [5, 10],
1906
+ defaultDuration: 5,
1817
1907
  resolutions: ["480p", "720p", "1080p"],
1818
1908
  pricing: [{ identifier: "bytedance-lite", credits: 57 }]
1819
1909
  },
@@ -1828,6 +1918,7 @@ var VIDEO_MODELS = {
1828
1918
  useCases: ["motion", "narrative"],
1829
1919
  aspectRatios: VIDEO_RATIOS_HVS,
1830
1920
  durations: [5, 10],
1921
+ defaultDuration: 5,
1831
1922
  resolutions: ["480p", "720p", "1080p"],
1832
1923
  pricing: [{ identifier: "bytedance-pro", credits: 175 }]
1833
1924
  },
@@ -1841,6 +1932,7 @@ var VIDEO_MODELS = {
1841
1932
  description: "Faster Bytedance Pro variant.",
1842
1933
  useCases: ["fast", "motion"],
1843
1934
  durations: [5, 10],
1935
+ defaultDuration: 5,
1844
1936
  resolutions: ["720p", "1080p"],
1845
1937
  pricing: [{ identifier: "bytedance-pro-fast", credits: 90 }]
1846
1938
  },
@@ -1860,6 +1952,7 @@ var VIDEO_MODELS = {
1860
1952
  description: "Runway Gen-3 routed through KIE. 5/10s at 720p/1080p.",
1861
1953
  useCases: ["motion", "narrative"],
1862
1954
  durations: [5, 10],
1955
+ defaultDuration: 5,
1863
1956
  resolutions: ["720p", "1080p"],
1864
1957
  pricing: [{ identifier: "runway-kie", credits: 30, note: "5s 720p" }]
1865
1958
  },
@@ -1910,6 +2003,7 @@ var VIDEO_MODELS = {
1910
2003
  description: "Extend ANY video: generates the continuation (audio included) and trim-stitches it into one seamless clip.",
1911
2004
  useCases: ["extend"],
1912
2005
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
2006
+ defaultDuration: 8,
1913
2007
  resolutions: ["480p", "720p", "1080p"],
1914
2008
  pricing: [
1915
2009
  { identifier: "seedance-2-extend", credits: 530, note: "default 8s 720p (ref-mode 50 + 3 stitch) \u2014 see :NsR variants" },
@@ -2289,7 +2383,8 @@ var TTS_LANGS_V3 = [
2289
2383
  "sw"
2290
2384
  ];
2291
2385
  var TTS_LEVERS_V2 = ["stability", "similarity", "style", "speed", "speakerBoost"];
2292
- var DIALOGUE_V4_MAX_CHARS = 5e3;
2386
+ var DIALOGUE_V4_MAX_CHARS = 1e4;
2387
+ var V4_TURBO_MAX_CHARS = 1e4;
2293
2388
  var AUDIO_MODELS = {
2294
2389
  // ── ElevenLabs TTS ──
2295
2390
  "elevenlabs-v3": {
@@ -2352,6 +2447,42 @@ var AUDIO_MODELS = {
2352
2447
  languages: TTS_LANGS_V3
2353
2448
  }
2354
2449
  },
2450
+ "elevenlabs-v4-turbo": {
2451
+ id: "elevenlabs-v4-turbo",
2452
+ kind: "audio",
2453
+ modes: ["tts"],
2454
+ family: "ElevenLabs",
2455
+ label: "ElevenLabs v4 Turbo",
2456
+ series: "ElevenLabs",
2457
+ description: "Faster, cheaper ElevenLabs v4 at lower fidelity \u2014 [audio tags], stability and similarity control, at Turbo's credit price. Prefer v4 when quality matters. Direct API.",
2458
+ useCases: ["tts", "voice-over", "narration", "expressive", "fast"],
2459
+ features: ["audio-tags", "voice-cloning"],
2460
+ // Flat per request at parity with Turbo v2.5 (what a run costs where length
2461
+ // pricing is off); per started 100 characters at Turbo's rate where it is on
2462
+ // (decided 2026-10-06).
2463
+ pricing: [
2464
+ { identifier: "elevenlabs-v4-turbo", credits: 15 },
2465
+ { identifier: "elevenlabs-v4-turbo:per-100-chars", credits: 2, note: SPEECH_UNIT_PRICE_NOTE }
2466
+ ],
2467
+ tts: {
2468
+ // Every value below was measured 2026-10-07 from live calls to eleven_v4_turbo.
2469
+ audioTags: true,
2470
+ // measured 2026-10-07: a tagged line → 200; Scribe hears no tag word spoken and lists [chuckles] as an audio event
2471
+ ssmlBreaks: false,
2472
+ levers: ["stability", "similarity"],
2473
+ // measured 2026-10-07: /v1/models can_use_style / can_use_speaker_boost both false, as v4; stability + similarity_boost → 200
2474
+ languageCode: true,
2475
+ // measured 2026-10-07: language_code "he" with Hebrew text → 200
2476
+ timestamps: true,
2477
+ // measured 2026-10-07: /with-timestamps answers 200 at the same character cost as the plain call
2478
+ stitching: true,
2479
+ // measured 2026-10-07: previous_text / next_text → 200, at the same character cost (context not billed)
2480
+ maxChars: V4_TURBO_MAX_CHARS,
2481
+ // The curated picker, the same 46 as v4 and v3 (the model lists 85; widening is its own change).
2482
+ languages: TTS_LANGS_V3
2483
+ // measured 2026-10-07: all 46 present in the model's 85-language list
2484
+ }
2485
+ },
2355
2486
  "elevenlabs-turbo": {
2356
2487
  id: "elevenlabs-turbo",
2357
2488
  kind: "audio",
@@ -3125,6 +3256,8 @@ var MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER = {
3125
3256
  // docs.kie.ai/market/google/nano-banana-2
3126
3257
  "nano-banana-2-lite": 2e4,
3127
3258
  // docs.kie.ai/market/google/nano-banana-2-lite
3259
+ "nano-banana-2-1": 2e4,
3260
+ // docs.kie.ai/market/google/nanobanana-2-1
3128
3261
  "nano-banana-pro": 2e4,
3129
3262
  // docs.kie.ai/market/google/pro-image-to-image
3130
3263
  "gpt-image-2-i2i": 2e4,
@@ -3161,7 +3294,9 @@ var MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER = {
3161
3294
  // verified == 5000 default (no entry needed): imagen4(-fast/-ultra), nano-banana,
3162
3295
  // nano-banana-edit, flux, flux-flex, gpt-image-2, ideogram-v3/-edit/-remix,
3163
3296
  // grok, qwen-i2i, seedream-5-pro, seedream-5-pro-i2i
3164
- // (docs.kie.ai/market/seedream/5-pro-text-to-image + 5-pro-image-to-image).
3297
+ // (docs.kie.ai/market/seedream/5-pro-text-to-image + 5-pro-image-to-image),
3298
+ // seedream-5-flash, seedream-5-flash-i2i (both "4–5000 characters";
3299
+ // docs.kie.ai/market/seedream/5-flash-text-to-image + 5-flash-image-to-image).
3165
3300
  // grok-i2i: doc states 390000 (78× its t2i sibling) — treated as a KIE schema
3166
3301
  // typo and left at the 5000 default per the sanity-cap decision.
3167
3302
  // UNVERIFIED (no limit stated in schema) → 5000 default: flux-kontext(-max)
@@ -3327,6 +3462,7 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
3327
3462
  "nano-banana-pro",
3328
3463
  "nano-banana-2",
3329
3464
  "nano-banana-2-lite",
3465
+ "nano-banana-2-1",
3330
3466
  // T2I providers that auto-route to their i2i sibling when refs are attached
3331
3467
  "gpt-image",
3332
3468
  "gpt-image-2",
@@ -3338,6 +3474,7 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
3338
3474
  "seedream",
3339
3475
  "seedream-5-lite",
3340
3476
  "seedream-5-pro",
3477
+ "seedream-5-flash",
3341
3478
  "flux",
3342
3479
  "flux-flex",
3343
3480
  // Image editing / image-to-image (reference = source image)
@@ -3358,6 +3495,7 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
3358
3495
  "seedream-edit",
3359
3496
  "seedream-5-lite-i2i",
3360
3497
  "seedream-5-pro-i2i",
3498
+ "seedream-5-flash-i2i",
3361
3499
  "grok-i2i",
3362
3500
  // Upscale / background ops (source acts as the reference)
3363
3501
  "recraft-remove-bg",
@@ -3384,6 +3522,7 @@ var T2I_TO_I2I_VARIANT = {
3384
3522
  "seedream": "seedream-edit",
3385
3523
  "seedream-5-lite": "seedream-5-lite-i2i",
3386
3524
  "seedream-5-pro": "seedream-5-pro-i2i",
3525
+ "seedream-5-flash": "seedream-5-flash-i2i",
3387
3526
  "flux": "flux-pro-i2i",
3388
3527
  "flux-flex": "flux-i2i"
3389
3528
  };
@@ -3394,6 +3533,7 @@ var REF_IMAGE_MAX_LIMITS = {
3394
3533
  "nano-banana-pro": 8,
3395
3534
  "nano-banana-2": 4,
3396
3535
  "nano-banana-2-lite": 10,
3536
+ "nano-banana-2-1": 10,
3397
3537
  "wan-2.7": 9,
3398
3538
  // grok-2 reference chain consumes exactly one image (segment-map input).
3399
3539
  "grok-2-i2i": 1,
@@ -3408,6 +3548,8 @@ var REF_IMAGE_MAX_LIMITS = {
3408
3548
  "seedream-edit": 16,
3409
3549
  "seedream-5-lite-i2i": 16,
3410
3550
  "seedream-5-pro-i2i": 16,
3551
+ // Flash takes at most 10 `image_urls` (docs.kie.ai/market/seedream/5-flash-image-to-image) — not the family's 16.
3552
+ "seedream-5-flash-i2i": 10,
3411
3553
  // Single-source i2i (one input image)
3412
3554
  "flux-kontext": 1,
3413
3555
  "flux-kontext-max": 1,
@@ -3444,6 +3586,7 @@ var VARIABLE_PRICING_MODELS = {
3444
3586
  "gpt-image-2-5-sunburst-i2i": "resolution",
3445
3587
  "nano-banana-pro": "resolution",
3446
3588
  "nano-banana-2": "resolution",
3589
+ "nano-banana-2-1": "resolution",
3447
3590
  "flux": "resolution",
3448
3591
  "flux-flex": "resolution",
3449
3592
  "flux-i2i": "resolution",
@@ -3465,6 +3608,7 @@ var HIGH_QUALITY_PROVIDERS = /* @__PURE__ */ new Set(["gpt-image", "gpt-image-i2
3465
3608
  var TWO_K_RESOLUTION_PROVIDERS = /* @__PURE__ */ new Set(["flux", "flux-pro-i2i", "flux-flex", "flux-i2i"]);
3466
3609
  var RESOLUTION_2K_4K_TIERED_PROVIDERS = /* @__PURE__ */ new Set([
3467
3610
  "nano-banana-2",
3611
+ "nano-banana-2-1",
3468
3612
  "gpt-image-2",
3469
3613
  "gpt-image-2-i2i",
3470
3614
  "gpt-image-2-5-flare",
@@ -3481,6 +3625,7 @@ var IMAGE_GEN_PROVIDERS = [
3481
3625
  "nano-banana-pro",
3482
3626
  "nano-banana-2",
3483
3627
  "nano-banana-2-lite",
3628
+ "nano-banana-2-1",
3484
3629
  "grok",
3485
3630
  "grok-2",
3486
3631
  "gpt-image",
@@ -3495,6 +3640,7 @@ var IMAGE_GEN_PROVIDERS = [
3495
3640
  "seedream",
3496
3641
  "seedream-5-lite",
3497
3642
  "seedream-5-pro",
3643
+ "seedream-5-flash",
3498
3644
  "flux-flex",
3499
3645
  "flux-kontext",
3500
3646
  "flux-kontext-max",
@@ -3510,6 +3656,7 @@ var IMAGE_I2I_PROVIDERS = [
3510
3656
  "nano-banana",
3511
3657
  "nano-banana-2",
3512
3658
  "nano-banana-2-lite",
3659
+ "nano-banana-2-1",
3513
3660
  "nano-banana-pro",
3514
3661
  "grok-i2i",
3515
3662
  "flux-i2i",
@@ -3526,6 +3673,7 @@ var IMAGE_I2I_PROVIDERS = [
3526
3673
  "seedream-edit",
3527
3674
  "seedream-5-lite-i2i",
3528
3675
  "seedream-5-pro-i2i",
3676
+ "seedream-5-flash-i2i",
3529
3677
  "flux-kontext",
3530
3678
  "flux-kontext-max",
3531
3679
  // Replicate Open (uncensored) — multi-image Kontext via Replicate
@@ -3820,6 +3968,7 @@ var MOTION_TRANSFER_PROVIDERS = [
3820
3968
  var TTS_PROVIDERS = [
3821
3969
  "elevenlabs-v3",
3822
3970
  "elevenlabs-v4",
3971
+ "elevenlabs-v4-turbo",
3823
3972
  "elevenlabs-turbo",
3824
3973
  "elevenlabs-multilingual",
3825
3974
  "elevenlabs"
@@ -3920,6 +4069,7 @@ var IMAGE_MASK_MODE = {
3920
4069
  "nano-banana-pro": "prompt",
3921
4070
  "nano-banana-2": "prompt",
3922
4071
  "nano-banana-2-lite": "prompt",
4072
+ "nano-banana-2-1": "prompt",
3923
4073
  "gpt-image": "prompt",
3924
4074
  "gpt-image-2": "prompt",
3925
4075
  "gpt-image-2-5-flare": "prompt",
@@ -3927,6 +4077,7 @@ var IMAGE_MASK_MODE = {
3927
4077
  "seedream": "prompt",
3928
4078
  "seedream-5-lite": "prompt",
3929
4079
  "seedream-5-pro": "prompt",
4080
+ "seedream-5-flash": "prompt",
3930
4081
  "qwen": "prompt",
3931
4082
  "flux-kontext": "prompt",
3932
4083
  "flux-kontext-max": "prompt",
@@ -4467,27 +4618,30 @@ var VIDEO_VARIABLE_PRICING = {
4467
4618
  "wan-3": "duration+resolution",
4468
4619
  "wan-3-prime": "duration+resolution"
4469
4620
  };
4470
- var PRICING_DEFAULT_DURATION_SEC = {
4471
- "minimax-h3": 6,
4472
- // KIE renders 8s when `duration` is omitted (kie/models.ts extraParams), and
4473
- // Seedance 2.5 prices one tier per second across 4–30s, so the 5s fallback
4474
- // billed a 5s tier against an 8s render — and under-reserved every
4475
- // reference-video run's output seconds by three (#1397).
4476
- "seedance-2-5": 8,
4477
- // Same shape: KIE renders 8s by default and the ladder is priced per second,
4478
- // so the 5s fallback billed a 5s tier against an 8s render (caught by the
4479
- // render-default ↔ priced-tier invariant in
4480
- // backend/src/providers/__tests__/pricing-default-duration-sync.test.ts).
4481
- "grok-imagine-video-1.5": 8
4482
- };
4621
+ var PRICING_DEFAULT_DURATION_SEC = Object.freeze(
4622
+ Object.fromEntries(
4623
+ Object.values(MODEL_CATALOG).filter((e) => e.kind === "video" && typeof e.defaultDuration === "number").map((e) => [e.id, e.defaultDuration])
4624
+ )
4625
+ );
4626
+ function snapToNearestDuration(requested, allowed) {
4627
+ if (!allowed || allowed.length === 0) return requested;
4628
+ if (allowed.includes(requested)) return requested;
4629
+ return allowed.reduce((best, d) => Math.abs(d - requested) < Math.abs(best - requested) ? d : best);
4630
+ }
4631
+ function videoDefaultDurationSec(provider) {
4632
+ const entry = MODEL_CATALOG[provider];
4633
+ if (typeof entry?.defaultDuration === "number") return entry.defaultDuration;
4634
+ const shortest = entry?.durations?.length ? Math.min(...entry.durations) : void 0;
4635
+ return shortest ?? 5;
4636
+ }
4483
4637
  function pricedOutputDurationSec(provider, requested) {
4484
- const fallback = PRICING_DEFAULT_DURATION_SEC[provider] ?? 5;
4638
+ const fallback = videoDefaultDurationSec(provider);
4485
4639
  const parsed = typeof requested === "string" ? parseInt(requested, 10) : requested;
4486
4640
  if (parsed === void 0 || Number.isNaN(parsed)) return fallback;
4487
4641
  if (parsed <= 0) {
4488
4642
  return isAutoVideoDuration(parsed) && supportsAutoVideoDuration(provider) ? maxVideoDurationSec(provider) ?? fallback : fallback;
4489
4643
  }
4490
- return parsed;
4644
+ return snapToNearestDuration(parsed, MODEL_CATALOG[provider]?.durations);
4491
4645
  }
4492
4646
  function supportsAutoVideoDuration(provider) {
4493
4647
  return !!provider && MODEL_CATALOG[provider]?.autoDuration === true;
@@ -5398,7 +5552,6 @@ var T2V_CREDIT_OVERRIDES = {
5398
5552
  "wan-turbo": "wan-turbo-t2v"
5399
5553
  // T2V wan-turbo 720p = (I2V wan-turbo 480p = 40 cr)
5400
5554
  };
5401
- var GEMINI_OMNI_DURATIONS = [4, 6, 8, 10];
5402
5555
  var LTX_DURATION_TIERS = {
5403
5556
  "ltx-2.3-pro": { "1080p": [6, 8, 10], "2k": [6, 8, 10], "4k": [6, 8, 10] },
5404
5557
  "ltx-2.3-fast": { "1080p": [6, 8, 10, 12, 14, 16, 18, 20], "2k": [6, 8, 10], "4k": [6, 8, 10] }
@@ -5408,9 +5561,7 @@ function ltxPricedTier(provider, resolution, duration) {
5408
5561
  if (!bands) return void 0;
5409
5562
  const band2 = bands[String(resolution)] ? String(resolution) : "1080p";
5410
5563
  const allowed = bands[band2];
5411
- const raw = typeof duration === "string" ? parseInt(duration, 10) : duration ?? allowed[0];
5412
- const want = Number.isNaN(raw) ? allowed[0] : raw;
5413
- const dur = allowed.reduce((b, a) => Math.abs(a - want) < Math.abs(b - want) ? a : b);
5564
+ const dur = snapToNearestDuration(pricedOutputDurationSec(provider, duration), allowed);
5414
5565
  return { band: band2, duration: dur };
5415
5566
  }
5416
5567
  function buildVideoCreditModelIdentifier(provider, duration, sound, nodeType, mode, resolution, hasVideoRef) {
@@ -5434,8 +5585,7 @@ function buildVideoCreditModelIdentifier(provider, duration, sound, nodeType, mo
5434
5585
  if (hasVideoRef) {
5435
5586
  return resolution === "4k" ? `${effectiveProvider}:4k:vref` : `${effectiveProvider}:vref`;
5436
5587
  }
5437
- const raw = parseInt(String(duration ?? 8), 10);
5438
- const d = Number.isNaN(raw) ? 8 : GEMINI_OMNI_DURATIONS.reduce((b, a) => Math.abs(a - raw) < Math.abs(b - raw) ? a : b);
5588
+ const d = pricedOutputDurationSec(effectiveProvider, duration);
5439
5589
  return resolution === "4k" ? `${effectiveProvider}:4k:${d}` : `${effectiveProvider}:${d}`;
5440
5590
  }
5441
5591
  const ltxTier = ltxPricedTier(effectiveProvider, resolution, duration);
@@ -5494,17 +5644,20 @@ function pricedVideoSelection(opts) {
5494
5644
  const adjustments = [];
5495
5645
  const ltx = ltxPricedTier(opts.provider, opts.resolution, opts.duration);
5496
5646
  const resolution = opts.resolution ?? (ltx ? ltx.band : PRICING_DEFAULT_RESOLUTION[opts.provider]);
5497
- if (!ltx) return { resolution, adjustments };
5498
5647
  const requested = typeof opts.duration === "string" ? parseInt(opts.duration, 10) : opts.duration;
5499
- if (requested !== void 0 && !Number.isNaN(requested) && requested !== ltx.duration) {
5648
+ const asked = requested !== void 0 && !Number.isNaN(requested);
5649
+ const lengthPriced = !!ltx || DURATION_PRICED_PROVIDERS.has(opts.provider) || isGeminiOmniProvider(opts.provider);
5650
+ if (!lengthPriced || !ltx && asked && requested <= 0) return { resolution, adjustments };
5651
+ const duration = ltx ? ltx.duration : pricedOutputDurationSec(opts.provider, opts.duration);
5652
+ if (asked && requested !== duration) {
5500
5653
  adjustments.push({
5501
5654
  field: "duration",
5502
5655
  from: requested,
5503
- to: ltx.duration,
5504
- reason: `LTX renders ${ltx.band} in ${ltx.duration}s steps \u2014 using ${ltx.duration}s instead of ${requested}s.`
5656
+ to: duration,
5657
+ reason: ltx ? `LTX renders ${ltx.band} in ${ltx.duration}s steps \u2014 using ${ltx.duration}s instead of ${requested}s.` : `${opts.provider} renders ${duration}s clips at the nearest length it offers \u2014 using ${duration}s instead of ${requested}s.`
5505
5658
  });
5506
5659
  }
5507
- return { resolution, duration: ltx.duration, adjustments };
5660
+ return { resolution, duration, adjustments };
5508
5661
  }
5509
5662
  function buildMotionCreditModelIdentifier(provider, resolution, videoDuration) {
5510
5663
  if (provider === "wan-animate-move" || provider === "wan-animate-replace") {
@@ -5540,6 +5693,9 @@ function speedRampCreditId(quality) {
5540
5693
  function applyEdlCreditId(quality) {
5541
5694
  return quality === "proxy" ? "apply-edl:proxy" : "apply-edl";
5542
5695
  }
5696
+ function speakerViewCreditId(quality) {
5697
+ return quality === "proxy" ? "speaker-view:proxy" : "speaker-view";
5698
+ }
5543
5699
  function sunoCreditType(model, operation) {
5544
5700
  if (!SUNO_VERSION_PRICED_OPERATIONS.includes(operation)) {
5545
5701
  return operation;
@@ -5937,6 +6093,9 @@ var VIDEO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
5937
6093
  // doesn't reject face-swap → video-consumer edges that the orchestrator
5938
6094
  // would happily route at runtime.
5939
6095
  "face-swap",
6096
+ // Speaker View (C3.2): an EDL rendered with its speakers framed — one VIDEO
6097
+ // out (no audio-only render). Registered in RENDER_NODE_TYPES as well.
6098
+ "speaker-view",
5940
6099
  "video-retake",
5941
6100
  // video-sfx: adds an SFX track to a video → emits a video URL. Belongs here so
5942
6101
  // canvas handle validation accepts video-sfx → video-consumer edges and the
@@ -6203,6 +6362,17 @@ var RENDER_NODE_TYPES = Object.freeze({
6203
6362
  ownerOnlyListing: true,
6204
6363
  latestBatch: true,
6205
6364
  jsonKind: "transcript"
6365
+ }),
6366
+ // Speaker View (C3.2): video only; its `json` is the EDL as it drew it (the
6367
+ // turns split, the layouts written), so a player maps the output clock
6368
+ // through THAT, and Add Captions never takes it for a Transcript.
6369
+ "speaker-view": descriptor({
6370
+ mediumOf: () => "video",
6371
+ creditId: (quality) => speakerViewCreditId(quality),
6372
+ clockMapFrom: "output-json",
6373
+ ownerOnlyListing: true,
6374
+ latestBatch: true,
6375
+ jsonKind: "edl"
6206
6376
  })
6207
6377
  });
6208
6378
  var RENDER_NODE_TYPE_IDS = Object.freeze(Object.keys(RENDER_NODE_TYPES));
@@ -6222,6 +6392,190 @@ var OWNER_ONLY_LISTING_RENDER_TYPES = Object.freeze(
6222
6392
  RENDER_NODE_TYPE_IDS.filter((t2) => RENDER_NODE_TYPES[t2].ownerOnlyListing)
6223
6393
  );
6224
6394
 
6395
+ // src/video-link.ts
6396
+ var SOCIAL_VIDEO_HOSTS = [
6397
+ "youtube.com",
6398
+ "youtu.be",
6399
+ "tiktok.com",
6400
+ "instagram.com",
6401
+ "twitter.com",
6402
+ "x.com",
6403
+ "facebook.com",
6404
+ "fb.watch",
6405
+ "fb.com"
6406
+ ];
6407
+ var YOUTUBE_HOSTS = ["youtube.com", "youtu.be"];
6408
+ var INSTAGRAM_HOSTS = ["instagram.com"];
6409
+ var TIKTOK_HOSTS = ["tiktok.com"];
6410
+ var TWITTER_HOSTS = ["twitter.com", "x.com"];
6411
+ var FACEBOOK_HOSTS = ["facebook.com", "fb.watch", "fb.com"];
6412
+ function hostnameMatchesAllowlist(hostname, domains) {
6413
+ const h = hostname.toLowerCase().replace(/\.$/, "");
6414
+ return domains.some((d) => {
6415
+ const dom = d.toLowerCase();
6416
+ return h === dom || h.endsWith("." + dom);
6417
+ });
6418
+ }
6419
+ function hasUrlParserHazard(url) {
6420
+ for (let i = 0; i < url.length; i++) {
6421
+ const code = url.charCodeAt(i);
6422
+ if (code === 92 || code <= 31 || code === 127) return true;
6423
+ }
6424
+ return false;
6425
+ }
6426
+ function isSocialVideoUrl(url, domains = SOCIAL_VIDEO_HOSTS) {
6427
+ if (hasUrlParserHazard(url)) return false;
6428
+ try {
6429
+ const parsed = new URL(url);
6430
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return false;
6431
+ return hostnameMatchesAllowlist(parsed.hostname, domains);
6432
+ } catch {
6433
+ return false;
6434
+ }
6435
+ }
6436
+ function detectVideoLinkPlatform(url) {
6437
+ if (isSocialVideoUrl(url, YOUTUBE_HOSTS)) return "youtube";
6438
+ if (isSocialVideoUrl(url, FACEBOOK_HOSTS)) return "facebook";
6439
+ if (isSocialVideoUrl(url, TIKTOK_HOSTS)) return "tiktok";
6440
+ if (isSocialVideoUrl(url, INSTAGRAM_HOSTS)) return "instagram";
6441
+ if (isSocialVideoUrl(url, TWITTER_HOSTS)) return "twitter";
6442
+ return "unknown";
6443
+ }
6444
+ var VIDEO_LINK_TOLERANT_CONSUMER_TYPES = /* @__PURE__ */ new Set([
6445
+ "suno-cover",
6446
+ "transcribe",
6447
+ "dubbing",
6448
+ "content-recipe"
6449
+ ]);
6450
+ var VIDEO_LINK_AUDIO_CONSUMER_TYPES = /* @__PURE__ */ new Set(["suno-cover", "transcribe"]);
6451
+ function videoLinkNeedOf(consumerTypes) {
6452
+ let audio = false;
6453
+ for (const type of consumerTypes) {
6454
+ if (!VIDEO_LINK_TOLERANT_CONSUMER_TYPES.has(type)) return "file";
6455
+ if (VIDEO_LINK_AUDIO_CONSUMER_TYPES.has(type)) audio = true;
6456
+ }
6457
+ return audio ? "audio" : "none";
6458
+ }
6459
+ function videoLinkRunNeeds(scopeIds, nodes, edges) {
6460
+ const byId = new Map(nodes.map((n) => [n.id, n]));
6461
+ const isSkipped = (id) => byId.get(id)?.data?.skipped === true;
6462
+ const sourcesOf = /* @__PURE__ */ new Map();
6463
+ for (const edge of edges) {
6464
+ const list = sourcesOf.get(edge.target);
6465
+ if (list) list.push(edge.source);
6466
+ else sourcesOf.set(edge.target, [edge.source]);
6467
+ }
6468
+ const inRun = /* @__PURE__ */ new Set();
6469
+ const queue = (scopeIds ?? nodes.map((n) => n.id)).filter((id) => !isSkipped(id));
6470
+ for (const id of queue) inRun.add(id);
6471
+ while (queue.length > 0) {
6472
+ const current = queue.pop();
6473
+ for (const source of sourcesOf.get(current) ?? []) {
6474
+ if (inRun.has(source)) continue;
6475
+ inRun.add(source);
6476
+ queue.push(source);
6477
+ }
6478
+ }
6479
+ const consumers = /* @__PURE__ */ new Map();
6480
+ for (const edge of edges) {
6481
+ if (byId.get(edge.source)?.type !== "youtube-video" || !inRun.has(edge.target)) continue;
6482
+ const list = consumers.get(edge.source);
6483
+ const type = byId.get(edge.target)?.type ?? "";
6484
+ if (list) list.push(type);
6485
+ else consumers.set(edge.source, [type]);
6486
+ }
6487
+ const needs = /* @__PURE__ */ new Map();
6488
+ for (const [id, types] of consumers) needs.set(id, videoLinkNeedOf(types));
6489
+ return needs;
6490
+ }
6491
+ function trimmed(value) {
6492
+ if (typeof value !== "string") return void 0;
6493
+ const t2 = value.trim();
6494
+ return t2 === "" ? void 0 : t2;
6495
+ }
6496
+ function videoLinkDownloadedFile(data) {
6497
+ const file = trimmed(data.downloadedVideoUrl);
6498
+ if (!file) return void 0;
6499
+ const from = trimmed(data.downloadedFromUrl);
6500
+ if (from && from !== trimmed(data.youtubeUrl)) return void 0;
6501
+ return file;
6502
+ }
6503
+ function resolveVideoLinkOutput(data) {
6504
+ return videoLinkDownloadedFile(data) ?? trimmed(data.youtubeUrl);
6505
+ }
6506
+ function videoLinkPageUrl(data) {
6507
+ return trimmed(data.youtubeUrl);
6508
+ }
6509
+ function videoLinkNeedsDownload(data) {
6510
+ const url = trimmed(data.youtubeUrl);
6511
+ if (!url || !isSocialVideoUrl(url)) return false;
6512
+ return videoLinkDownloadedFile(data) === void 0;
6513
+ }
6514
+ var DIRECT_VIDEO_EXTENSIONS = [".mp4", ".webm", ".mov", ".avi"];
6515
+ function isDirectVideoFileUrl(url) {
6516
+ if (hasUrlParserHazard(url)) return false;
6517
+ try {
6518
+ const parsed = new URL(url);
6519
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return false;
6520
+ const path = parsed.pathname.toLowerCase();
6521
+ return DIRECT_VIDEO_EXTENSIONS.some((ext) => path.endsWith(ext));
6522
+ } catch {
6523
+ return false;
6524
+ }
6525
+ }
6526
+ var AUTO_DOWNLOAD_MAX_SEC = 240;
6527
+ var YOUTUBE_MAX_HEIGHT = 1080;
6528
+ var MAX_VIDEO_LINK_INPUT_CHARS = 2048;
6529
+ function videoLinkInputProblem(value) {
6530
+ if (value === void 0 || value === null) return "empty";
6531
+ if (typeof value !== "string") return "invalid";
6532
+ const link = value.trim();
6533
+ if (link === "") return "empty";
6534
+ if (link.length > MAX_VIDEO_LINK_INPUT_CHARS) return "invalid";
6535
+ return isSocialVideoUrl(link) || isHttpLink(link) ? null : "invalid";
6536
+ }
6537
+ function isHttpLink(link) {
6538
+ if (hasUrlParserHazard(link)) return false;
6539
+ try {
6540
+ const parsed = new URL(link);
6541
+ return (parsed.protocol === "http:" || parsed.protocol === "https:") && parsed.hostname !== "";
6542
+ } catch {
6543
+ return false;
6544
+ }
6545
+ }
6546
+ var VIDEO_LINK_DERIVED_FIELDS = [
6547
+ "videoId",
6548
+ "title",
6549
+ "thumbnailUrl",
6550
+ "downloadedVideoUrl",
6551
+ "downloadedThumbnailUrl",
6552
+ "downloadedFromUrl",
6553
+ "downloadedSection",
6554
+ "downloadStatus",
6555
+ "downloadError",
6556
+ "downloadErrorCode",
6557
+ "downloadId",
6558
+ "downloadIdUrl",
6559
+ "downloadMode",
6560
+ "downloadAllowSilent",
6561
+ "downloadPercent",
6562
+ "downloadPhase",
6563
+ "sectionStartSec",
6564
+ "sectionEndSec",
6565
+ "needsRangeChoice",
6566
+ "videoDurationSec",
6567
+ "downloadedAudioUrl",
6568
+ "audioDownloadStatus",
6569
+ "audioDownloadError"
6570
+ ];
6571
+ function dropStaleVideoLinkFields(data, incoming) {
6572
+ if (!("youtubeUrl" in incoming)) return data;
6573
+ if (trimmed(incoming.youtubeUrl) === trimmed(data.youtubeUrl)) return data;
6574
+ const out = { ...data };
6575
+ for (const key of VIDEO_LINK_DERIVED_FIELDS) delete out[key];
6576
+ return out;
6577
+ }
6578
+
6225
6579
  // src/presentation-utils.ts
6226
6580
  var INPUT_NODE_TYPES = /* @__PURE__ */ new Set([
6227
6581
  "text-prompt",
@@ -6244,7 +6598,8 @@ var INPUT_NODE_TYPES = /* @__PURE__ */ new Set([
6244
6598
  "atmosphere",
6245
6599
  "action-fx",
6246
6600
  "temporal",
6247
- "reference-audio"
6601
+ "reference-audio",
6602
+ "youtube-video"
6248
6603
  ]);
6249
6604
  var ALWAYS_EXCLUDED_TYPES = /* @__PURE__ */ new Set([
6250
6605
  "sticky-note",
@@ -6462,6 +6817,8 @@ var INPUT_FIELD_MAP = {
6462
6817
  "upload-video": { key: "url", type: "video-url" },
6463
6818
  "upload-audio": { key: "url", type: "audio-url" },
6464
6819
  "reference-audio": { key: "extractedAudioUrl", type: "audio-url" },
6820
+ // A LINK, not an upload (rule: `videoLinkInputProblem`, video-link.ts); still a `video-url` media input.
6821
+ "youtube-video": { key: "youtubeUrl", type: "video-url" },
6465
6822
  // --- Classic parameters ---
6466
6823
  "provider": { key: "provider", type: "select" },
6467
6824
  "style-guide": { key: "text", type: "text" },
@@ -6533,7 +6890,9 @@ var MEDIA_INPUT_FIELD_TYPES = /* @__PURE__ */ new Set([
6533
6890
  "audio-url"
6534
6891
  ]);
6535
6892
  function mergeNodeInputOverrides(nodeType, data, overrides) {
6536
- const merged = { ...data, ...canonicalizeOverrideKeys(nodeType, overrides) };
6893
+ const incoming = canonicalizeOverrideKeys(nodeType, overrides);
6894
+ const base = nodeType === "youtube-video" ? dropStaleVideoLinkFields(data, incoming) : data;
6895
+ const merged = { ...base, ...incoming };
6537
6896
  const schema = nodeType ? INPUT_FIELD_MAP[nodeType] : void 0;
6538
6897
  if (schema && MEDIA_INPUT_FIELD_TYPES.has(schema.type) && schema.key in overrides && overrides[schema.key] !== data[schema.key] && !("metadata" in overrides)) {
6539
6898
  delete merged.metadata;
@@ -6835,7 +7194,10 @@ var LLM_MODELS = [
6835
7194
  structuredOutputMode: "anthropic-tool",
6836
7195
  supportsImages: true,
6837
7196
  maxOutputTokens: 8192,
6838
- directFallbackModel: "claude-haiku-4-5-20251001"
7197
+ directFallbackModel: "claude-haiku-4-5-20251001",
7198
+ // KIE-first since 2026-10-08 (a call is priced on the lane it runs on);
7199
+ // KIE served it plain and with a tool on its streaming wire that day.
7200
+ preferKie: true
6839
7201
  },
6840
7202
  {
6841
7203
  id: "claude-sonnet-4.6",
@@ -6849,7 +7211,12 @@ var LLM_MODELS = [
6849
7211
  supportsImages: true,
6850
7212
  maxOutputTokens: 16384,
6851
7213
  directFallbackModel: "claude-sonnet-4-6",
6852
- reasoningEfforts: ["low", "medium", "high", "max"]
7214
+ // KIE-first since 2026-10-08 (a call is priced on the lane it runs on);
7215
+ // KIE served it plain and with a tool on its streaming wire that day.
7216
+ preferKie: true,
7217
+ reasoningEfforts: ["low", "medium", "high", "max"],
7218
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
7219
+ effortRequiresDirect: true
6853
7220
  },
6854
7221
  {
6855
7222
  id: "gpt-5.2",
@@ -6888,14 +7255,14 @@ var LLM_MODELS = [
6888
7255
  // text such as a name badge), which is exactly what video-analysis casts
6889
7256
  // identities from — so adding an entry here would silently move analysis to
6890
7257
  // the shallower lane. Don't. Full comparison lives with the analysis engine.
6891
- // The ONE Gemini model routed direct-first. It is the premium/low-volume
6892
- // tier (video-analysis `pro`, no LLM_FEATURE_DEFAULTS entry), so the ~4×
6893
- // list-price premium lands on the smallest call volume — and it is where
6894
- // the direct lane's capability wins actually matter: real `thinkingLevel`
6895
- // control, native media ingestion, and a `responseJsonSchema` that honours
6896
- // `additionalProperties` (KIE's `response_format` silently DROPS
7258
+ // KIE-first since 2026-10-08 (decided: a call is priced on the lane it runs
7259
+ // on, so the base premium price buys the KIE lane; the direct lane is
7260
+ // Advanced mode, billed `premium-direct`). It was the one direct-first
7261
+ // Gemini before. What the direct lane buys, now behind Advanced: real
7262
+ // `thinkingLevel` control, native media ingestion, and a `responseJsonSchema`
7263
+ // that honours `additionalProperties` (KIE's `response_format` silently DROPS
6897
7264
  // record/map-shaped fields — see the z.record rule in backend/CLAUDE.md).
6898
- preferDirect: true,
7265
+ // Video-analysis is unaffected: it pins `requireLane: "direct"` itself.
6899
7266
  // Reasons with no thinking param sent on both lanes — the proxied endpoint
6900
7267
  // DEFAULTS to "high" (above), and the direct lane reasons harder still.
6901
7268
  // Floored at its own 16384: its KIE fallback is not known to take more.
@@ -6919,6 +7286,8 @@ var LLM_MODELS = [
6919
7286
  maxOutputTokens: 16384,
6920
7287
  directFallbackModel: "claude-opus-4-7",
6921
7288
  reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
7289
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
7290
+ effortRequiresDirect: true,
6922
7291
  supportsTemperature: false,
6923
7292
  preferKie: true
6924
7293
  },
@@ -7068,10 +7437,76 @@ var LLM_MODELS = [
7068
7437
  // why this is per-model and not a lane-wide flag.
7069
7438
  kieCollapseStream: true
7070
7439
  },
7440
+ // ── GPT-6 Luna / Sol / 6.1 Sol ────────────────────────────────────────────
7441
+ // Same KIE endpoint and dialect as gpt-6-astra (codex/v1/responses; the doc
7442
+ // pages differ only in the model name). Live-probed 2026-10-08, per model:
7443
+ // `text.format` json_schema ENFORCED (echo `strict: true`, schema-valid
7444
+ // reply), `temperature: 0.2` echoed back as 1 → silently ignored, no
7445
+ // reasoning param → echo "medium" (reasons by default), and data-URI vision.
7446
+ // Unlike astra, the NON-stream lane served them reliably — luna 10/10 and sol
7447
+ // 10/10, 6.1 sol 8/8 at levels other than `none` (incl. 4 long structured
7448
+ // calls each, 500–1,500 output tokens) — so none of them is collapsed:
7449
+ // `credits_consumed` stays the real provider charge.
7450
+ // Their ladder is WIDER than astra's doc-enum one: `none` and `max` were each
7451
+ // sent and echoed back by the endpoint (6.1 sol excepted below).
7452
+ {
7453
+ id: "gpt-6-luna",
7454
+ displayName: "GPT-6 Luna",
7455
+ desc: "Fastest GPT-6, high-volume workloads",
7456
+ tier: "economy",
7457
+ kieFormat: "responses",
7458
+ kieSlugOrModel: "gpt-6-luna",
7459
+ vendor: "openai",
7460
+ structuredOutputMode: "responses-json-schema",
7461
+ supportsImages: true,
7462
+ maxOutputTokens: 16384,
7463
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
7464
+ supportsTemperature: false,
7465
+ thinkingDefaultOn: true
7466
+ },
7467
+ {
7468
+ id: "gpt-6-sol",
7469
+ displayName: "GPT-6 Sol",
7470
+ desc: "Strong GPT-6, deep reasoning at lower cost",
7471
+ // Premium by decision (2026-10-08), not by unit cost — "Sol" is the
7472
+ // deep-reasoning rung of the family, and gpt-5.6-sol bills premium too.
7473
+ tier: "premium",
7474
+ kieFormat: "responses",
7475
+ kieSlugOrModel: "gpt-6-sol",
7476
+ vendor: "openai",
7477
+ structuredOutputMode: "responses-json-schema",
7478
+ supportsImages: true,
7479
+ maxOutputTokens: 16384,
7480
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
7481
+ supportsTemperature: false,
7482
+ thinkingDefaultOn: true
7483
+ },
7484
+ {
7485
+ id: "gpt-6.1-sol",
7486
+ displayName: "GPT-6.1 Sol",
7487
+ // Measured slow: 30–76 s for 500–1,100 output tokens (2026-10-08), roughly
7488
+ // twice gpt-6-sol on the same request — say so where the picker shows it.
7489
+ desc: "Newest GPT-6 Sol, thorough but slower",
7490
+ tier: "premium",
7491
+ kieFormat: "responses",
7492
+ kieSlugOrModel: "gpt-6-1-sol",
7493
+ vendor: "openai",
7494
+ structuredOutputMode: "responses-json-schema",
7495
+ supportsImages: true,
7496
+ maxOutputTokens: 16384,
7497
+ // NO `none`: every probe at `reasoning.effort: none` failed (502, a 120 s
7498
+ // timeout, 502, 429 — 0/4, 2026-10-08) while every other level answered,
7499
+ // and the same request at `none` succeeded on luna and sol. Clamping maps a
7500
+ // `none` request to nothing sent (Auto) rather than to a level that fails.
7501
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
7502
+ supportsTemperature: false,
7503
+ thinkingDefaultOn: true
7504
+ },
7071
7505
  {
7072
7506
  id: "grok-4.6",
7073
7507
  displayName: "Grok 4.6",
7074
- desc: "xAI flagship, strong reasoning",
7508
+ // Demoted 2026-10-08 when grok-4.7 registered — the flagship copy moved up.
7509
+ desc: "Previous Grok, strong reasoning",
7075
7510
  tier: "standard",
7076
7511
  kieFormat: "responses",
7077
7512
  // KIE serves Grok on the responses dialect under its own family path —
@@ -7097,10 +7532,35 @@ var LLM_MODELS = [
7097
7532
  // call needs output headroom, not just xhigh.
7098
7533
  thinkingDefaultOn: true
7099
7534
  },
7535
+ {
7536
+ id: "grok-4.7",
7537
+ displayName: "Grok 4.7",
7538
+ desc: "xAI flagship, strong reasoning",
7539
+ tier: "standard",
7540
+ kieFormat: "responses",
7541
+ // Same grok/v1/responses family path and wire as grok-4.6 (the KIE doc
7542
+ // pages differ only in the model name). Live-probed 2026-10-08: non-stream
7543
+ // 6/6, `text.format` json_schema enforced, data-URI vision, SSE deltas.
7544
+ kieSlugOrModel: "grok-4-7",
7545
+ vendor: "xai",
7546
+ structuredOutputMode: "responses-json-schema",
7547
+ supportsImages: true,
7548
+ maxOutputTokens: 16384,
7549
+ // 4.6's ladder. `none` is NOT honoured: the endpoint echoed it back as
7550
+ // "minimal" and still reasoned (33 of 35 output tokens), so offering it
7551
+ // would promise a lever the wire overrides.
7552
+ reasoningEfforts: ["low", "medium", "high", "xhigh"],
7553
+ // `temperature: 0.2` → echo stayed at the 0.7 default: ignored.
7554
+ supportsTemperature: false,
7555
+ // "Capital of France" with no reasoning param spent 310 of 311 output
7556
+ // tokens reasoning.
7557
+ thinkingDefaultOn: true
7558
+ },
7100
7559
  {
7101
7560
  id: "claude-sonnet-5",
7102
7561
  displayName: "Claude Sonnet 5",
7103
- desc: "Near-Opus quality at Sonnet cost",
7562
+ // Demoted 2026-10-08 when claude-sonnet-5.5 registered.
7563
+ desc: "Previous Sonnet, near-Opus quality",
7104
7564
  tier: "standard",
7105
7565
  kieFormat: "messages",
7106
7566
  kieSlugOrModel: "claude-sonnet-5",
@@ -7110,9 +7570,43 @@ var LLM_MODELS = [
7110
7570
  maxOutputTokens: 16384,
7111
7571
  directFallbackModel: "claude-sonnet-5",
7112
7572
  reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
7573
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
7574
+ effortRequiresDirect: true,
7113
7575
  supportsTemperature: false,
7114
7576
  preferKie: true
7115
7577
  },
7578
+ {
7579
+ id: "claude-sonnet-5.5",
7580
+ displayName: "Claude Sonnet 5.5",
7581
+ desc: "Latest Sonnet, near-Opus quality at Sonnet cost",
7582
+ tier: "standard",
7583
+ kieFormat: "messages",
7584
+ // KIE serves it on the Claude-native messages dialect under its plain id
7585
+ // (docs.kie.ai/market/claude/claude-sonnet-5-5.md — the page is
7586
+ // claude-opus-5's with the model name swapped). Live-probed 2026-10-08 on
7587
+ // the streaming wire: plain, effort, and forced/auto+strict tool calls all
7588
+ // answered.
7589
+ kieSlugOrModel: "claude-sonnet-5-5",
7590
+ vendor: "anthropic",
7591
+ structuredOutputMode: "anthropic-tool",
7592
+ // Anthropic 400s a forced tool_choice on this model. KIE's proxy happened
7593
+ // to accept one in the probe, but the direct lane is where every
7594
+ // effort-bearing and every streamed structured call goes.
7595
+ supportsForcedToolChoice: false,
7596
+ conversationBoundThinking: true,
7597
+ supportsImages: true,
7598
+ maxOutputTokens: 16384,
7599
+ directFallbackModel: "claude-sonnet-5-5",
7600
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
7601
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
7602
+ effortRequiresDirect: true,
7603
+ // Anthropic rejects non-default sampling values on this model (KIE's proxy
7604
+ // accepted temperature: 0.2 in the probe; the direct lane is the contract).
7605
+ supportsTemperature: false,
7606
+ preferKie: true,
7607
+ // Adaptive thinking runs when no thinking param is sent (vendor default).
7608
+ thinkingDefaultOn: true
7609
+ },
7116
7610
  {
7117
7611
  id: "claude-opus-4.8",
7118
7612
  displayName: "Claude Opus 4.8",
@@ -7126,13 +7620,16 @@ var LLM_MODELS = [
7126
7620
  maxOutputTokens: 16384,
7127
7621
  directFallbackModel: "claude-opus-4-8",
7128
7622
  reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
7623
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
7624
+ effortRequiresDirect: true,
7129
7625
  supportsTemperature: false,
7130
7626
  preferKie: true
7131
7627
  },
7132
7628
  {
7133
7629
  id: "claude-opus-5",
7134
7630
  displayName: "Claude Opus 5",
7135
- desc: "Latest Opus, deepest agentic reasoning",
7631
+ // Demoted 2026-10-08 when claude-opus-5.5 registered.
7632
+ desc: "Previous Opus, deep agentic reasoning",
7136
7633
  tier: "premium",
7137
7634
  kieFormat: "messages",
7138
7635
  // KIE serves Opus 5 on the Claude-native messages dialect under the plain
@@ -7145,12 +7642,44 @@ var LLM_MODELS = [
7145
7642
  maxOutputTokens: 16384,
7146
7643
  directFallbackModel: "claude-opus-5",
7147
7644
  reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
7645
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
7646
+ effortRequiresDirect: true,
7148
7647
  supportsTemperature: false,
7149
7648
  preferKie: true,
7150
7649
  // Opus 5 reasons with NO thinking param sent (vendor default flipped from
7151
7650
  // Opus 4.8/4.7) — so every call needs output headroom, not just xhigh/max.
7152
7651
  thinkingDefaultOn: true
7153
7652
  },
7653
+ {
7654
+ id: "claude-opus-5.5",
7655
+ displayName: "Claude Opus 5.5",
7656
+ // Positioned as Fable-class (decided 2026-10-08: offered wherever Fable is).
7657
+ desc: "Latest Opus, frontier-class reasoning",
7658
+ tier: "premium",
7659
+ kieFormat: "messages",
7660
+ // KIE plain id on the messages dialect (docs.kie.ai/market/claude/
7661
+ // claude-opus-5-5 — claude-opus-5's page with the name swapped).
7662
+ // Live-probed 2026-10-08 on the streaming wire (plain + effort); the KIE
7663
+ // Claude lane was erroring for claude-opus-5 too during the tool probes.
7664
+ kieSlugOrModel: "claude-opus-5-5",
7665
+ vendor: "anthropic",
7666
+ structuredOutputMode: "anthropic-tool",
7667
+ // Forced tool_choice is a 400 on this model (vendor docs) — see the field.
7668
+ supportsForcedToolChoice: false,
7669
+ conversationBoundThinking: true,
7670
+ supportsImages: true,
7671
+ maxOutputTokens: 16384,
7672
+ directFallbackModel: "claude-opus-5-5",
7673
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
7674
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
7675
+ effortRequiresDirect: true,
7676
+ supportsTemperature: false,
7677
+ preferKie: true,
7678
+ // Thinking cannot be turned off on this model at all (`disabled` is a 400
7679
+ // at every effort); with no effort sent it runs adaptive at the vendor's
7680
+ // `medium` default. Nothing on our wire sends `disabled`.
7681
+ thinkingDefaultOn: true
7682
+ },
7154
7683
  {
7155
7684
  id: "claude-fable-5",
7156
7685
  displayName: "Claude Fable 5",
@@ -7164,24 +7693,78 @@ var LLM_MODELS = [
7164
7693
  maxOutputTokens: 16384,
7165
7694
  directFallbackModel: "claude-fable-5",
7166
7695
  reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
7696
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
7697
+ effortRequiresDirect: true,
7167
7698
  supportsTemperature: false,
7168
7699
  preferKie: true
7169
- }
7170
- ];
7171
- var LLM_MODEL_IDS = LLM_MODELS.map((m) => m.id);
7172
- var STRUCTURED_VISION_MODELS = LLM_MODELS.filter(
7173
- (m) => m.supportsImages && m.structuredOutputMode != null
7174
- );
7175
- var LLM_VENDOR_ORDER = ["anthropic", "google", "openai", "xai"];
7176
- var LLM_VENDOR_LABELS = {
7177
- anthropic: "Anthropic",
7178
- google: "Google",
7179
- openai: "OpenAI",
7180
- xai: "xAI"
7181
- };
7182
- var TIER_RANK = { economy: 0, standard: 1, premium: 2 };
7183
- function groupLlmModelsByVendor(models = LLM_MODELS) {
7184
- const groups = [];
7700
+ },
7701
+ // ── Moonshot / DeepSeek ───────────────────────────────────────────────────
7702
+ // Both on KIE's THIRD responses family path, openai/v1/responses (llm-client
7703
+ // derives it from `vendor`). KIE labels both pages "Chat only — not adapted
7704
+ // for agent use": fine for single (structured) completions, so neither may
7705
+ // back a tool-loop feature.
7706
+ {
7707
+ id: "kimi-k3",
7708
+ displayName: "Kimi K3",
7709
+ desc: "Moonshot flagship, 1M context, careful reasoning",
7710
+ tier: "premium",
7711
+ kieFormat: "responses",
7712
+ kieSlugOrModel: "kimi-k3",
7713
+ vendor: "moonshot",
7714
+ // Live-probed 2026-10-08: `text.format` json_schema is ENFORCED — asked to
7715
+ // answer "no json here" in plain prose, it returned schema-shaped JSON.
7716
+ structuredOutputMode: "responses-json-schema",
7717
+ supportsImages: true,
7718
+ maxOutputTokens: 16384,
7719
+ // KIE's documented enum. The endpoint accepted xhigh/none without error but
7720
+ // never echoes an effort back, so nothing beyond the doc is verifiable.
7721
+ reasoningEfforts: ["low", "medium", "high"],
7722
+ // The doc lists no `temperature` field at all.
7723
+ supportsTemperature: false,
7724
+ // "Reasons by default" per KIE's doc (its usage reports no reasoning-token
7725
+ // split, so this is the doc's word, not a measurement).
7726
+ thinkingDefaultOn: true
7727
+ },
7728
+ {
7729
+ id: "deepseek-v4.1-flash",
7730
+ displayName: "DeepSeek V4.1 Flash",
7731
+ desc: "Very cheap and fast, solid reasoning",
7732
+ tier: "economy",
7733
+ kieFormat: "responses",
7734
+ kieSlugOrModel: "deepseek-v4-1-flash",
7735
+ vendor: "deepseek",
7736
+ // Live-probed 2026-10-08: json_schema echoed `strict: true` and enforced.
7737
+ structuredOutputMode: "responses-json-schema",
7738
+ supportsImages: true,
7739
+ // ADVISORY ONLY: KIE documents `max_output_tokens` as "not supported … no
7740
+ // effect" on this model (a probe sending it was accepted and ignored), so
7741
+ // neither this cap nor the reasoning floor binds its output length, and the
7742
+ // `incomplete` cap-stop signal cannot fire from our own cap.
7743
+ maxOutputTokens: 16384,
7744
+ // The endpoint takes none/minimal/low/medium/high/xhigh/max; each of none,
7745
+ // low and xhigh was echoed back. `minimal` is not in our ladder.
7746
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
7747
+ // Documented "not supported … no effect".
7748
+ supportsTemperature: false,
7749
+ thinkingDefaultOn: true
7750
+ }
7751
+ ];
7752
+ var LLM_MODEL_IDS = LLM_MODELS.map((m) => m.id);
7753
+ var STRUCTURED_VISION_MODELS = LLM_MODELS.filter(
7754
+ (m) => m.supportsImages && m.structuredOutputMode != null
7755
+ );
7756
+ var LLM_VENDOR_ORDER = ["anthropic", "deepseek", "google", "moonshot", "openai", "xai"];
7757
+ var LLM_VENDOR_LABELS = {
7758
+ anthropic: "Anthropic",
7759
+ deepseek: "DeepSeek",
7760
+ google: "Google",
7761
+ moonshot: "Moonshot AI",
7762
+ openai: "OpenAI",
7763
+ xai: "xAI"
7764
+ };
7765
+ var TIER_RANK = { economy: 0, standard: 1, premium: 2 };
7766
+ function groupLlmModelsByVendor(models = LLM_MODELS) {
7767
+ const groups = [];
7185
7768
  for (const vendor of LLM_VENDOR_ORDER) {
7186
7769
  const members = models.filter((m) => m.vendor === vendor).sort((a, b) => TIER_RANK[a.tier] - TIER_RANK[b.tier]);
7187
7770
  if (members.length > 0) groups.push({ vendor, label: LLM_VENDOR_LABELS[vendor], models: members });
@@ -7210,7 +7793,9 @@ var LLM_FEATURE_DEFAULTS = {
7210
7793
  // runs once per returned ad — volume, not depth. Must stay an image-capable
7211
7794
  // structured-output model (STRUCTURED_VISION_MODELS); a registry test pins it.
7212
7795
  "meta-ads-analysis": "gemini-3.6-flash",
7213
- "describe-to-picker": "claude-opus-5",
7796
+ // Moved from claude-opus-5 on 2026-10-08 (decided: Opus 5.5 takes the Opus 5
7797
+ // defaults). Still an image-capable structured model — a registry test pins it.
7798
+ "describe-to-picker": "claude-opus-5.5",
7214
7799
  "qa-check": "gemini-3.6-flash",
7215
7800
  "generate-script": "gemini-3.6-flash",
7216
7801
  "translate": "gemini-3.6-flash",
@@ -7253,11 +7838,21 @@ var LLM_MODALITY_CAPS = {
7253
7838
  "gpt-5.6-sol": { image: true, video: false, audio: false },
7254
7839
  // KIE's GPT-6 doc lists text + image + file inputs only — no video, no audio.
7255
7840
  "gpt-6-astra": { image: true, video: false, audio: false },
7841
+ // Same KIE doc as astra: text + image + file inputs only.
7842
+ "gpt-6-luna": { image: true, video: false, audio: false },
7843
+ "gpt-6-sol": { image: true, video: false, audio: false },
7844
+ "gpt-6.1-sol": { image: true, video: false, audio: false },
7256
7845
  "grok-4.6": { image: true, video: false, audio: false },
7846
+ "grok-4.7": { image: true, video: false, audio: false },
7257
7847
  "claude-sonnet-5": { image: true, video: false, audio: false },
7848
+ "claude-sonnet-5.5": { image: true, video: false, audio: false },
7258
7849
  "claude-opus-4.8": { image: true, video: false, audio: false },
7259
7850
  "claude-opus-5": { image: true, video: false, audio: false },
7260
- "claude-fable-5": { image: true, video: false, audio: false }
7851
+ "claude-opus-5.5": { image: true, video: false, audio: false },
7852
+ "claude-fable-5": { image: true, video: false, audio: false },
7853
+ // KIE documents text + image input only for both.
7854
+ "kimi-k3": { image: true, video: false, audio: false },
7855
+ "deepseek-v4.1-flash": { image: true, video: false, audio: false }
7261
7856
  };
7262
7857
  function getLlmModalityCaps(modelId) {
7263
7858
  if (!modelId) return { image: true, video: false, audio: false };
@@ -7328,17 +7923,34 @@ function bumpTier(tier) {
7328
7923
  return tier;
7329
7924
  }
7330
7925
  function supportsAdvancedMode(modelId) {
7331
- return Boolean(modelId && getLlmModel(modelId)?.directGeminiModel);
7926
+ const model = modelId ? getLlmModel(modelId) : void 0;
7927
+ return Boolean(model?.directGeminiModel || model?.directFallbackModel);
7928
+ }
7929
+ var ADVANCED_MODE_UNAVAILABLE_REASON = "Advanced mode is available on Gemini and Claude models \u2014 switch the model to enable it.";
7930
+ function llmServesDirect(modelId, reasoningEffort, advancedMode) {
7931
+ if (!supportsAdvancedMode(modelId)) return false;
7932
+ if (advancedMode) return true;
7933
+ return Boolean(
7934
+ getLlmModel(modelId)?.effortRequiresDirect && effectiveReasoningEffort(modelId, reasoningEffort) !== void 0
7935
+ );
7936
+ }
7937
+ var LLM_CREDIT_RUNGS = ["economy", "standard", "premium", "premium-direct"];
7938
+ function llmCreditIdForRung(feature, rung) {
7939
+ return rung === "standard" ? feature : `${feature}:${rung}`;
7940
+ }
7941
+ function llmTierCreditIds(feature) {
7942
+ return LLM_CREDIT_RUNGS.map((rung) => llmCreditIdForRung(feature, rung));
7332
7943
  }
7333
- var ADVANCED_MODE_UNAVAILABLE_REASON = "Advanced mode is available on Gemini models \u2014 switch the model to enable it.";
7334
7944
  function buildLlmCreditIdentifier(feature, modelId, reasoningEffort, advancedMode) {
7335
7945
  if (!modelId) return feature;
7336
7946
  let tier = getLlmTier(modelId);
7337
7947
  const eff = effectiveReasoningEffort(modelId, reasoningEffort);
7338
7948
  if (eff !== void 0 && EFFORT_TIER_BUMP.has(eff)) tier = bumpTier(tier);
7339
- if (advancedMode && supportsAdvancedMode(modelId)) tier = bumpTier(tier);
7340
- if (tier === "standard") return feature;
7341
- return `${feature}:${tier}`;
7949
+ const rung = llmServesDirect(modelId, reasoningEffort, advancedMode) ? bumpToDirectRung(tier) : tier;
7950
+ return llmCreditIdForRung(feature, rung);
7951
+ }
7952
+ function bumpToDirectRung(tier) {
7953
+ return tier === "premium" ? "premium-direct" : bumpTier(tier);
7342
7954
  }
7343
7955
  function resolveLlmCreditId(feature, body) {
7344
7956
  const b = body;
@@ -9010,8 +9622,8 @@ var NON_PROMPT_TEXT_LANES = {
9010
9622
  negative: "*",
9011
9623
  "system-prompt": "*",
9012
9624
  script: ["ai-avatar"],
9013
- transcript: ["add-captions", "apply-edl", "edit-plan", "camera-switch"],
9014
- edl: ["apply-edl", "camera-switch"],
9625
+ transcript: ["add-captions", "apply-edl", "edit-plan", "camera-switch", "speaker-view"],
9626
+ edl: ["apply-edl", "camera-switch", "speaker-view"],
9015
9627
  silence: ["edit-plan"],
9016
9628
  offsets: ["edit-plan"],
9017
9629
  qrText: ["image-overlay"],
@@ -10103,6 +10715,7 @@ var QUALITY_MAP = {
10103
10715
  // Image gen — resolution-style (1K/2K/4K)
10104
10716
  "nano-banana-pro": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
10105
10717
  "nano-banana-2": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
10718
+ "nano-banana-2-1": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
10106
10719
  "flux": { field: "resolution", values: { low: "1K", mid: "2K", high: "2K" } },
10107
10720
  "flux-flex": { field: "resolution", values: { low: "1K", mid: "2K", high: "2K" } },
10108
10721
  "flux-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "2K" } },
@@ -10122,6 +10735,9 @@ var QUALITY_MAP = {
10122
10735
  "seedream-5-lite-i2i": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
10123
10736
  "seedream-5-pro": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
10124
10737
  "seedream-5-pro-i2i": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
10738
+ // Seedream 5 Flash's lever is size (sent as KIE `size`), flat-priced — resolution-style.
10739
+ "seedream-5-flash": { field: "resolution", values: { low: "1K", mid: "2K", high: "2K" } },
10740
+ "seedream-5-flash-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "2K" } },
10125
10741
  // Video gen — resolution-style (720p/1080p)
10126
10742
  "veo3": { field: "resolution", values: { low: "720p", mid: "1080p", high: "1080p" } },
10127
10743
  "veo3.1": { field: "resolution", values: { low: "720p", mid: "1080p", high: "1080p" } },
@@ -10190,6 +10806,30 @@ function deriveLinkedFields(nodeType, value) {
10190
10806
  return {};
10191
10807
  }
10192
10808
 
10809
+ // src/image-model-roles.ts
10810
+ var IMAGE_MODEL_ROLE_DEFAULTS = {
10811
+ character: "gpt-image-2",
10812
+ general: "gpt-image-2",
10813
+ anchor: "gpt-image-2",
10814
+ edit: "gpt-image-2-5-flare-i2i"
10815
+ };
10816
+ var IMAGE_MODEL_RATIO_FALLBACKS = {
10817
+ character: ["gpt-image-2-5-sunburst", "nano-banana-pro"],
10818
+ general: ["gpt-image-2-5-sunburst", "nano-banana-pro"],
10819
+ anchor: ["gpt-image-2-5-sunburst", "nano-banana-pro"],
10820
+ edit: ["gpt-image-2-5-sunburst-i2i", "nano-banana-pro"]
10821
+ };
10822
+ function imageModelDrawsRatio(modelId, aspectRatio) {
10823
+ if (!aspectRatio) return true;
10824
+ const ratios = MODEL_CATALOG[modelId]?.aspectRatios;
10825
+ return ratios === void 0 || ratios.includes(aspectRatio);
10826
+ }
10827
+ function defaultImageModel(role, aspectRatio) {
10828
+ const primary = IMAGE_MODEL_ROLE_DEFAULTS[role];
10829
+ if (imageModelDrawsRatio(primary, aspectRatio)) return primary;
10830
+ return IMAGE_MODEL_RATIO_FALLBACKS[role].find((id) => imageModelDrawsRatio(id, aspectRatio)) ?? primary;
10831
+ }
10832
+
10193
10833
  // src/settings-input.ts
10194
10834
  var SETTINGS_INPUT_HANDLE = "settings";
10195
10835
  var SETTINGS_SOURCE_FIELDS = {
@@ -10228,7 +10868,7 @@ var SETTINGS_CONSUMERS = {
10228
10868
  models: IMAGE_GEN_PROVIDERS,
10229
10869
  // The node's own default (NODE_DEFINITIONS) — only used to fit a wired
10230
10870
  // ratio when the node names no model.
10231
- defaultModel: "nano-banana-pro",
10871
+ defaultModel: IMAGE_MODEL_ROLE_DEFAULTS.general,
10232
10872
  modelList: "providers"
10233
10873
  }
10234
10874
  };
@@ -10593,6 +11233,83 @@ function nodeFeedsAnything(nodes, edges, nodeId) {
10593
11233
  return (buildFeedMaps(nodes, edges).children.get(nodeId) ?? []).length > 0;
10594
11234
  }
10595
11235
 
11236
+ // src/json-kinds.ts
11237
+ var JSON_OUTPUT_KINDS = Object.freeze({
11238
+ // Edit Plan: the plan on `edl` — a Tighten EDL, a clip set (`Edl[]`) or a chapter list.
11239
+ "edit-plan": { primary: "edl", pips: { edl: "edl" } },
11240
+ // Transcribe: its json is the normalized Transcript (its `text` pip is plain text, no kind).
11241
+ transcribe: { primary: "json", pips: { json: "transcript" } },
11242
+ // Camera Switch: the switched edit and the renamed (still a Transcript) transcript.
11243
+ "camera-switch": { primary: "edl", pips: { edl: "edl", transcript: "transcript" } },
11244
+ // Text to Dialogue: the Transcript built from the model's own word timings (its default read is the audio).
11245
+ "text-to-dialogue": { pips: { json: "transcript" } },
11246
+ // ── JSON that is neither a Transcript nor an EDL (decided 2026-10-08) ──
11247
+ // Forced Alignment: `{ alignment: [{ word, start, end }] }` in seconds — a word list, not a Transcript.
11248
+ "forced-alignment": { primary: "data", pips: { data: "other" } },
11249
+ // Video Analysis / Video Audit: the canonical analysis result (an audit IS an analysis).
11250
+ "video-analysis": { primary: "json", pips: { json: "other" } },
11251
+ "video-audit": { primary: "json", pips: { json: "other" } },
11252
+ // Silence Detect: `{ version, ranges, durationMs }`. Audio Sync: `{ version, reference, offsets, notes }`.
11253
+ "silence-detect": { primary: "json", pips: { json: "other" } },
11254
+ "audio-sync": { primary: "json", pips: { json: "other" } },
11255
+ // Scrapers and searches: the scraped page / ad array / post list.
11256
+ "web-scrape": { primary: "json", pips: { json: "other" } },
11257
+ "meta-ads-scrape": { primary: "json", pips: { json: "other" } },
11258
+ "instagram-scrape": { primary: "json", pips: { json: "other" } },
11259
+ "social-search": { primary: "json", pips: { json: "other" } },
11260
+ "telegram-channel-feed": { primary: "json", pips: { json: "other" } },
11261
+ // Content Recipe: the recipe's structured result.
11262
+ "content-recipe": { primary: "json", pips: { json: "other" } },
11263
+ // Collections and libraries: the stored rows, whatever the user keeps in them.
11264
+ "collection-read": { primary: "json", pips: { json: "other" } },
11265
+ "collection-write": { primary: "json", pips: { json: "other" } },
11266
+ "inspiration-read": { primary: "json", pips: { json: "other" } },
11267
+ "competitor-read": { primary: "json", pips: { json: "other" } },
11268
+ // Describe to Picker: the picker values read off an image.
11269
+ "describe-to-picker": { primary: "picker-json", pips: { "picker-json": "other" } }
11270
+ });
11271
+ var RENDER_JSON_PIP = "json";
11272
+ var JSON_INPUT_KINDS = Object.freeze({
11273
+ transcript: "transcript",
11274
+ edl: "edl"
11275
+ });
11276
+ var own = (table, key) => Object.hasOwn(table, key) ? table[key] : void 0;
11277
+ function declaredJsonOutput(nodeType, sourceHandle, renders = RENDER_NODE_TYPES) {
11278
+ if (typeof nodeType !== "string") return void 0;
11279
+ const render = own(renders, nodeType);
11280
+ if (render) return (sourceHandle ?? RENDER_JSON_PIP) === RENDER_JSON_PIP ? render.jsonKind : void 0;
11281
+ const outputs = own(JSON_OUTPUT_KINDS, nodeType);
11282
+ if (!outputs) return void 0;
11283
+ const pip = sourceHandle ?? outputs.primary;
11284
+ return typeof pip === "string" ? own(outputs.pips, pip) : void 0;
11285
+ }
11286
+ function declaredJsonOutputRows() {
11287
+ return Object.entries(JSON_OUTPUT_KINDS).flatMap(
11288
+ ([type, o]) => Object.entries(o.pips).map(([pip, kind]) => [type, pip, kind])
11289
+ );
11290
+ }
11291
+ function jsonOutputKind(nodeType, sourceHandle, renders = RENDER_NODE_TYPES) {
11292
+ const declared = declaredJsonOutput(nodeType, sourceHandle, renders);
11293
+ return declared === "other" ? void 0 : declared;
11294
+ }
11295
+ function jsonInputKind(_nodeType, targetHandle) {
11296
+ return typeof targetHandle === "string" ? own(JSON_INPUT_KINDS, targetHandle) : void 0;
11297
+ }
11298
+ function jsonKindMismatch(sourceType, sourceHandle, targetType, targetHandle, renders = RENDER_NODE_TYPES) {
11299
+ const input = jsonInputKind(targetType, targetHandle);
11300
+ if (!input) return null;
11301
+ const output = jsonOutputKind(sourceType, sourceHandle, renders);
11302
+ return output && output !== input ? { output, input } : null;
11303
+ }
11304
+ function jsonKindMismatchMessage(mismatch, labels = {}) {
11305
+ const source = labels.sourceLabel ?? "This output";
11306
+ const target = labels.targetLabel ?? "this node";
11307
+ if (mismatch.output === "transcript") {
11308
+ return `${source} outputs a transcript, not an edit list (EDL), so it cannot feed the EDL input of ${target}. Wire an Edit Plan's or Camera Switch's edl there instead.`;
11309
+ }
11310
+ return `${source} outputs an edit list (EDL), not a transcript, so it cannot feed the Transcript input of ${target}. Wire a Transcribe node's json (or Apply EDL's or Camera Switch's transcript) there instead.`;
11311
+ }
11312
+
10596
11313
  // src/preview-gate.ts
10597
11314
  var PREVIEW_RENDER_NODE_TYPES = new Set(RENDER_NODE_TYPE_IDS);
10598
11315
  var PREVIEW_REVIEW_REQUIRED = "preview_review_required";
@@ -11231,8 +11948,8 @@ function metaAdsScrapeWireSources(data, upstream) {
11231
11948
  const upstreamText = typeof upstream === "string" ? upstream : void 0;
11232
11949
  switch (metaAdsNodeMode(data.mode)) {
11233
11950
  case "pages": {
11234
- const own = splitMetaAdsPageUrls(data.pageUrls);
11235
- return { mode: "pages", pageUrls: own.length > 0 ? own : splitMetaAdsPageUrls(upstreamText) };
11951
+ const own2 = splitMetaAdsPageUrls(data.pageUrls);
11952
+ return { mode: "pages", pageUrls: own2.length > 0 ? own2 : splitMetaAdsPageUrls(upstreamText) };
11236
11953
  }
11237
11954
  case "advertiser": {
11238
11955
  const picks = metaAdsAdvertisersFrom(data.advertisers);
@@ -11241,8 +11958,8 @@ function metaAdsScrapeWireSources(data, upstream) {
11241
11958
  return { mode: "pages", pageUrls: [], advertiserNames: names };
11242
11959
  }
11243
11960
  default: {
11244
- const own = typeof data.query === "string" ? data.query : "";
11245
- return { mode: "search", query: own || upstreamText };
11961
+ const own2 = typeof data.query === "string" ? data.query : "";
11962
+ return { mode: "search", query: own2 || upstreamText };
11246
11963
  }
11247
11964
  }
11248
11965
  }
@@ -11628,6 +12345,21 @@ function normalizeSavedPostTags(tags) {
11628
12345
  return Array.from(new Set(clean2)).slice(0, SAVED_POST_MAX_TAGS);
11629
12346
  }
11630
12347
 
12348
+ // src/social-post-readers.ts
12349
+ var INSPIRATION_READ_NODE_TYPE = "inspiration-read";
12350
+ var COMPETITOR_READ_NODE_TYPE = "competitor-read";
12351
+ var SOCIAL_POST_READER_NODE_TYPES = /* @__PURE__ */ new Set([INSPIRATION_READ_NODE_TYPE, COMPETITOR_READ_NODE_TYPE]);
12352
+ function isSocialPostReaderNodeType(type) {
12353
+ return typeof type === "string" && SOCIAL_POST_READER_NODE_TYPES.has(type);
12354
+ }
12355
+ var SOCIAL_READ_LIMIT_MAX = 100;
12356
+ var SOCIAL_READ_DEFAULT_LIMIT = 20;
12357
+ var SOCIAL_READ_WINDOW_HOURS_MAX = 720;
12358
+ var SOCIAL_READ_WINDOW_DAYS_MAX = 365;
12359
+ var SOCIAL_READ_PERIODS = ["window", "day"];
12360
+ var COMPETITOR_READ_ROLES = ["own", "about", "all"];
12361
+ var SOCIAL_READ_DAY_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
12362
+
11631
12363
  // src/collections.ts
11632
12364
  var COLLECTION_NAME_MAX = 80;
11633
12365
  var COLLECTION_DESCRIPTION_MAX = 500;
@@ -11928,7 +12660,7 @@ function buildConditionVariables(targetNodeId, edges, nodes, extractOutput) {
11928
12660
  if (edge.targetHandle !== VARIABLES_HANDLE_ID) continue;
11929
12661
  const src = nodes.find((n) => n.id === edge.source);
11930
12662
  if (!src) continue;
11931
- const output = extractOutput(src);
12663
+ const output = extractOutput(src)?.trim();
11932
12664
  if (output === void 0 || output === "") continue;
11933
12665
  const label = src.data.label || src.type || src.id;
11934
12666
  pairs.push({ label, output });
@@ -14622,6 +15354,8 @@ var TransitionTypeSchema = zod.z.enum([
14622
15354
  "match_cut",
14623
15355
  "overlap"
14624
15356
  ]);
15357
+ var sceneRenderStateRegistry = zod.z.registry();
15358
+ var RENDER_STATE = { render_state: true };
14625
15359
  var ShotSpecSchema = zod.z.object({
14626
15360
  shot_id: zod.z.string().regex(/^shot_\d{2,3}$/, "shot_id must be shot_NN or shot_NNN"),
14627
15361
  camera: zod.z.object({
@@ -14714,23 +15448,23 @@ var ShotSpecSchema = zod.z.object({
14714
15448
  // Phase 1D.1 Method 7 — set true when the user accepts a MatchCutCritic
14715
15449
  // 'break' verdict for this shot's pair. Stage 6 reads this to know the
14716
15450
  // break is resolved and the scene can advance to Stage 7.
14717
- accepted_match_cut_break: zod.z.boolean().optional(),
15451
+ accepted_match_cut_break: zod.z.boolean().optional().register(sceneRenderStateRegistry, RENDER_STATE),
14718
15452
  // ─── Phase 1C.2 — dialogue + editor cut metadata ───────────────────────────
14719
15453
  // All optional; planning-time ShotSpec carries none of these. Populated by
14720
15454
  // the Editor LLM (Stage 7) and the silent-cut-preview sub-gate handler.
14721
15455
  // True when `dialogue_line` is non-null AND the speech generator produced
14722
15456
  // an audio track. The Editor LLM uses this to gate cut-in / cut-out into
14723
15457
  // the dialogue_no_cut_zone (Method 5.13.1 — never trim a syllable).
14724
- has_dialogue: zod.z.boolean().default(false),
15458
+ has_dialogue: zod.z.boolean().default(false).register(sceneRenderStateRegistry, RENDER_STATE),
14725
15459
  // Measured length of the per-shot speech audio (Stage 7 step 4 writes this).
14726
15460
  // Separate from `duration_seconds` (the planning intent) — the actual
14727
15461
  // recording can run longer/shorter than the spec.
14728
- actual_audio_duration_sec: zod.z.number().optional(),
15462
+ actual_audio_duration_sec: zod.z.number().optional().register(sceneRenderStateRegistry, RENDER_STATE),
14729
15463
  // Inclusive [start, end] window (seconds, relative to the shot's video clip)
14730
15464
  // during which the Editor LLM MUST NOT cut. Computed from
14731
15465
  // `actual_audio_duration_sec` + small padding by the Editor LLM stage.
14732
15466
  // null when has_dialogue=false (no zone to protect).
14733
- dialogue_no_cut_zone: zod.z.object({ start: zod.z.number(), end: zod.z.number() }).nullable().optional(),
15467
+ dialogue_no_cut_zone: zod.z.object({ start: zod.z.number(), end: zod.z.number() }).nullable().optional().register(sceneRenderStateRegistry, RENDER_STATE),
14734
15468
  // Editor LLM output (Phase 1C.2). Populated by the Editor LLM stage; the
14735
15469
  // silent-cut-preview sub-gate may patch it via user-applied overrides.
14736
15470
  // Mirrors the editor_decisions audit row shape (migration 135).
@@ -14740,7 +15474,7 @@ var ShotSpecSchema = zod.z.object({
14740
15474
  transition_to_next: TransitionTypeSchema,
14741
15475
  transition_duration_sec: zod.z.number().min(0).max(2).optional(),
14742
15476
  beat_snap_seconds: zod.z.number().nullable().optional()
14743
- }).optional()
15477
+ }).optional().register(sceneRenderStateRegistry, RENDER_STATE)
14744
15478
  });
14745
15479
  var AssetRefSchema = zod.z.object({
14746
15480
  asset_id: zod.z.string().uuid(),
@@ -14828,13 +15562,18 @@ zod.z.enum(PIPELINE_MODEL_STAGES);
14828
15562
  var PIPELINE_PINNABLE_IMAGE_MODELS = [
14829
15563
  "nano-banana",
14830
15564
  "nano-banana-pro",
14831
- "nano-banana-2",
15565
+ "nano-banana-2-1",
14832
15566
  "flux",
14833
15567
  "gpt-image",
14834
15568
  "gpt-image-2",
14835
15569
  "gpt-image-2-5-flare",
14836
15570
  "gpt-image-2-5-sunburst"
14837
15571
  ];
15572
+ var PIPELINE_LEGACY_PINNED_IMAGE_MODELS = ["nano-banana-2"];
15573
+ var PIPELINE_ACCEPTED_IMAGE_MODELS = [
15574
+ ...PIPELINE_PINNABLE_IMAGE_MODELS,
15575
+ ...PIPELINE_LEGACY_PINNED_IMAGE_MODELS
15576
+ ];
14838
15577
  var PIPELINE_PINNABLE_VIDEO_MODELS = [
14839
15578
  "kling-turbo",
14840
15579
  "kling",
@@ -14859,7 +15598,7 @@ var PIPELINE_PINNABLE_SCRIPT_LLMS = [
14859
15598
  "claude-opus-4-7",
14860
15599
  "claude-opus-5"
14861
15600
  ];
14862
- var ImageModelEnum = zod.z.enum(PIPELINE_PINNABLE_IMAGE_MODELS);
15601
+ var ImageModelEnum = zod.z.enum(PIPELINE_ACCEPTED_IMAGE_MODELS);
14863
15602
  var VideoModelEnum = zod.z.enum(PIPELINE_PINNABLE_VIDEO_MODELS);
14864
15603
  var ScriptLlmEnum = zod.z.enum(PIPELINE_PINNABLE_SCRIPT_LLMS);
14865
15604
  var StageModelsSchema = zod.z.object({
@@ -16462,6 +17201,114 @@ function clipNotesFrom(meta, single) {
16462
17201
  }));
16463
17202
  }
16464
17203
 
17204
+ // src/entity-node-fields.ts
17205
+ var ENTITY_NODE_KINDS = ["character", "object", "creature", "location"];
17206
+ var ENTITY_DB_ID_FIELD = {
17207
+ character: "characterDbId",
17208
+ object: "objectDbId",
17209
+ creature: "creatureDbId",
17210
+ location: "locationDbId"
17211
+ };
17212
+ var ENTITY_NAME_FIELD = {
17213
+ character: "characterName",
17214
+ object: "objectName",
17215
+ creature: "creatureName",
17216
+ location: "locationName"
17217
+ };
17218
+ var ENTITY_TABLE = {
17219
+ character: "characters",
17220
+ object: "objects",
17221
+ creature: "creatures",
17222
+ location: "locations"
17223
+ };
17224
+ var ENTITY_BUCKET_FIELDS = {
17225
+ character: [
17226
+ ["expressions", "expressions"],
17227
+ ["poses", "poses"],
17228
+ ["motions", "motions"],
17229
+ ["angles", "angles"],
17230
+ ["body_angles", "bodyAngles"],
17231
+ ["lighting_variations", "lightingVariations"],
17232
+ ["outfit_variations", "outfitVariations"],
17233
+ ["detail_closeups", "detailCloseups"],
17234
+ ["sheets", "sheets"]
17235
+ ],
17236
+ object: [
17237
+ ["angles", "angles"],
17238
+ ["materials", "materials"],
17239
+ ["variations", "variations"],
17240
+ ["motion_clips", "motionClips"],
17241
+ ["detail_closeups", "detailCloseups"],
17242
+ ["sheets", "sheets"]
17243
+ ],
17244
+ creature: [
17245
+ ["angles", "angles"],
17246
+ ["poses", "poses"],
17247
+ ["variations", "variations"],
17248
+ ["motion_clips", "motionClips"],
17249
+ ["detail_closeups", "detailCloseups"],
17250
+ ["sheets", "sheets"]
17251
+ ],
17252
+ location: [
17253
+ ["time_of_day", "timeOfDay"],
17254
+ ["weather", "weather"],
17255
+ ["angles", "angles"],
17256
+ ["lighting", "lighting"],
17257
+ ["seasons", "seasons"],
17258
+ ["atmosphere_motions", "atmosphereMotions"],
17259
+ ["detail_closeups", "detailCloseups"],
17260
+ ["sheets", "sheets"]
17261
+ ]
17262
+ };
17263
+ var ENTITY_SCALAR_FIELDS = [
17264
+ ["name", "__name"],
17265
+ // routed to the kind's own name field by the caller
17266
+ ["description", "description"],
17267
+ ["canonical_description", "canonicalDescription"],
17268
+ ["source_image_url", "sourceImageUrl"]
17269
+ ];
17270
+ var ENTITY_KIND_SCALAR_FIELDS = {
17271
+ character: [],
17272
+ object: [["style_lock", "styleLock"]],
17273
+ creature: [["style_lock", "styleLock"]],
17274
+ location: [["style_lock", "styleLock"]]
17275
+ };
17276
+ function entityHydrationColumns(kind) {
17277
+ return [
17278
+ "id",
17279
+ ...entityScalarFields(kind).map(([column]) => column),
17280
+ ...ENTITY_BUCKET_FIELDS[kind].map(([column]) => column)
17281
+ ];
17282
+ }
17283
+ function entityScalarFields(kind) {
17284
+ return [...ENTITY_SCALAR_FIELDS, ...ENTITY_KIND_SCALAR_FIELDS[kind]];
17285
+ }
17286
+
17287
+ // src/lone-media-url.ts
17288
+ var IMAGE_FILE_RE = /\.(png|jpe?g|gif|webp)$/i;
17289
+ var VIDEO_FILE_RE = /\.(mp4|mov|webm|m4v)$/i;
17290
+ function loneMediaUrlKind(value) {
17291
+ const s = value.trim();
17292
+ if (s.length === 0 || /[\s,]/.test(s) || !/^https?:\/\//i.test(s)) return null;
17293
+ let pathname;
17294
+ try {
17295
+ pathname = new URL(s).pathname;
17296
+ } catch {
17297
+ return null;
17298
+ }
17299
+ if (IMAGE_FILE_RE.test(pathname)) return "image";
17300
+ if (VIDEO_FILE_RE.test(pathname)) return "video";
17301
+ return null;
17302
+ }
17303
+ var MESSAGE_TRIGGER_TYPES = /* @__PURE__ */ new Set(["telegram-trigger", "telegram-account-trigger"]);
17304
+ function isLoneMediaLinkSource(nodeType) {
17305
+ if (!nodeType) return false;
17306
+ if (IMAGE_PRODUCER_TYPES.has(nodeType) || VIDEO_PRODUCER_TYPES.has(nodeType) || AUDIO_PRODUCER_TYPES.has(nodeType)) return false;
17307
+ if (DYNAMIC_PRODUCER_TYPES.has(nodeType) || MESSAGE_TRIGGER_TYPES.has(nodeType)) return false;
17308
+ if (ENTITY_NODE_KINDS.includes(nodeType) || nodeType === "face") return false;
17309
+ return true;
17310
+ }
17311
+
16465
17312
  // src/suno-track-sources.ts
16466
17313
  var SUNO_TRACK_SOURCE_TYPES = /* @__PURE__ */ new Set([
16467
17314
  "suno-generate",
@@ -16475,83 +17322,64 @@ var SUNO_TRACK_SOURCE_TYPES = /* @__PURE__ */ new Set([
16475
17322
  "suno-upload-extend"
16476
17323
  ]);
16477
17324
 
16478
- // src/video-link.ts
16479
- var SOCIAL_VIDEO_HOSTS = [
16480
- "youtube.com",
16481
- "youtu.be",
16482
- "tiktok.com",
16483
- "instagram.com",
16484
- "twitter.com",
16485
- "x.com",
16486
- "facebook.com",
16487
- "fb.watch",
16488
- "fb.com"
16489
- ];
16490
- var YOUTUBE_HOSTS = ["youtube.com", "youtu.be"];
16491
- var INSTAGRAM_HOSTS = ["instagram.com"];
16492
- var TIKTOK_HOSTS = ["tiktok.com"];
16493
- var TWITTER_HOSTS = ["twitter.com", "x.com"];
16494
- var FACEBOOK_HOSTS = ["facebook.com", "fb.watch", "fb.com"];
16495
- function hostnameMatchesAllowlist(hostname, domains) {
16496
- const h = hostname.toLowerCase().replace(/\.$/, "");
16497
- return domains.some((d) => {
16498
- const dom = d.toLowerCase();
16499
- return h === dom || h.endsWith("." + dom);
16500
- });
16501
- }
16502
- function hasUrlParserHazard(url) {
16503
- for (let i = 0; i < url.length; i++) {
16504
- const code = url.charCodeAt(i);
16505
- if (code === 92 || code <= 31 || code === 127) return true;
16506
- }
16507
- return false;
16508
- }
16509
- function isSocialVideoUrl(url, domains = SOCIAL_VIDEO_HOSTS) {
16510
- if (hasUrlParserHazard(url)) return false;
16511
- try {
16512
- const parsed = new URL(url);
16513
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return false;
16514
- return hostnameMatchesAllowlist(parsed.hostname, domains);
16515
- } catch {
17325
+ // src/private-host.ts
17326
+ function isPrivateOrReservedIP(ip) {
17327
+ const v4 = ip.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
17328
+ if (v4) {
17329
+ const a = Number(v4[1]);
17330
+ const b = Number(v4[2]);
17331
+ if (a === 0) return true;
17332
+ if (a === 127) return true;
17333
+ if (a === 10) return true;
17334
+ if (a === 172 && b >= 16 && b <= 31) return true;
17335
+ if (a === 192 && b === 168) return true;
17336
+ if (a === 169 && b === 254) return true;
17337
+ if (a === 100 && b >= 64 && b <= 127) return true;
17338
+ if (a === 198 && (b === 18 || b === 19)) return true;
17339
+ if (a >= 224) return true;
16516
17340
  return false;
16517
17341
  }
17342
+ const lower = ip.toLowerCase();
17343
+ if (lower === "::" || lower === "::1") return true;
17344
+ if (lower.startsWith("fe80:") || lower.startsWith("fe80::")) return true;
17345
+ if (/^f[cd]/.test(lower)) return true;
17346
+ if (lower.startsWith("ff")) return true;
17347
+ if (lower.startsWith("::ffff:")) {
17348
+ const tail = lower.slice(7);
17349
+ if (tail.includes(".")) {
17350
+ return isPrivateOrReservedIP(tail);
17351
+ }
17352
+ const parts = tail.split(":");
17353
+ if (parts.length === 2) {
17354
+ const hi = parseInt(parts[0] || "0", 16);
17355
+ const lo = parseInt(parts[1] || "0", 16);
17356
+ if (Number.isFinite(hi) && Number.isFinite(lo)) {
17357
+ const ipv4 = `${hi >> 8 & 255}.${hi & 255}.${lo >> 8 & 255}.${lo & 255}`;
17358
+ return isPrivateOrReservedIP(ipv4);
17359
+ }
17360
+ }
17361
+ return true;
17362
+ }
17363
+ if (lower.startsWith("::") && lower !== "::" && lower !== "::1") {
17364
+ const tail = lower.slice(2);
17365
+ if (/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(tail)) {
17366
+ return isPrivateOrReservedIP(tail);
17367
+ }
17368
+ const parts = tail.split(":");
17369
+ if (parts.length === 2 && /^[0-9a-f]{1,4}$/.test(parts[0]) && /^[0-9a-f]{1,4}$/.test(parts[1])) {
17370
+ const hi = parseInt(parts[0], 16);
17371
+ const lo = parseInt(parts[1], 16);
17372
+ if (Number.isFinite(hi) && Number.isFinite(lo)) {
17373
+ return isPrivateOrReservedIP(`${hi >> 8 & 255}.${hi & 255}.${lo >> 8 & 255}.${lo & 255}`);
17374
+ }
17375
+ }
17376
+ }
17377
+ return false;
16518
17378
  }
16519
- function detectVideoLinkPlatform(url) {
16520
- if (isSocialVideoUrl(url, YOUTUBE_HOSTS)) return "youtube";
16521
- if (isSocialVideoUrl(url, FACEBOOK_HOSTS)) return "facebook";
16522
- if (isSocialVideoUrl(url, TIKTOK_HOSTS)) return "tiktok";
16523
- if (isSocialVideoUrl(url, INSTAGRAM_HOSTS)) return "instagram";
16524
- if (isSocialVideoUrl(url, TWITTER_HOSTS)) return "twitter";
16525
- return "unknown";
16526
- }
16527
- var VIDEO_LINK_TOLERANT_CONSUMER_TYPES = /* @__PURE__ */ new Set([
16528
- "suno-cover",
16529
- "transcribe",
16530
- "dubbing",
16531
- "content-recipe"
16532
- ]);
16533
- function trimmed(value) {
16534
- if (typeof value !== "string") return void 0;
16535
- const t2 = value.trim();
16536
- return t2 === "" ? void 0 : t2;
16537
- }
16538
- function videoLinkDownloadedFile(data) {
16539
- const file = trimmed(data.downloadedVideoUrl);
16540
- if (!file) return void 0;
16541
- const from = trimmed(data.downloadedFromUrl);
16542
- if (from && from !== trimmed(data.youtubeUrl)) return void 0;
16543
- return file;
16544
- }
16545
- function resolveVideoLinkOutput(data) {
16546
- return videoLinkDownloadedFile(data) ?? trimmed(data.youtubeUrl);
16547
- }
16548
- function videoLinkPageUrl(data) {
16549
- return trimmed(data.youtubeUrl);
16550
- }
16551
- function videoLinkNeedsDownload(data) {
16552
- const url = trimmed(data.youtubeUrl);
16553
- if (!url || !isSocialVideoUrl(url)) return false;
16554
- return videoLinkDownloadedFile(data) === void 0;
17379
+ function isLocalOrPrivateHostname(hostname) {
17380
+ const host = hostname.toLowerCase().replace(/^\[|\]$/g, "").replace(/\.$/, "");
17381
+ if (host === "localhost" || host.endsWith(".localhost")) return true;
17382
+ return isPrivateOrReservedIP(host);
16555
17383
  }
16556
17384
 
16557
17385
  // src/voice-changer-models.ts
@@ -17819,8 +18647,8 @@ var isSlot = (v) => typeof v === "number" && Number.isInteger(v) && v >= 1;
17819
18647
  var isIndex = (v) => typeof v === "number" && Number.isInteger(v) && v >= 0;
17820
18648
  function videoOverlayRenderOrder(layers) {
17821
18649
  return layers.map((l, i) => {
17822
- const own = isSlot(l?.planLayer) ? l.planLayer - 1 - PLAN_LAYER_Z_BASE : isSlot(l?.slot) ? l.slot - 1 : isIndex(l?.index) ? l.index : i;
17823
- return { i, z: typeof l?.zIndex === "number" && Number.isFinite(l.zIndex) ? l.zIndex : own };
18650
+ const own2 = isSlot(l?.planLayer) ? l.planLayer - 1 - PLAN_LAYER_Z_BASE : isSlot(l?.slot) ? l.slot - 1 : isIndex(l?.index) ? l.index : i;
18651
+ return { i, z: typeof l?.zIndex === "number" && Number.isFinite(l.zIndex) ? l.zIndex : own2 };
17824
18652
  }).sort((a, b) => a.z - b.z || a.i - b.i).map((e) => e.i);
17825
18653
  }
17826
18654
  var evenFloor = (n) => Math.max(2, Math.floor(n / 2) * 2);
@@ -17970,8 +18798,8 @@ function assembleVideoOverlayRequest(input) {
17970
18798
  for (let i = 0; i < slots; i++) {
17971
18799
  const raw = asLayer(stored[i]);
17972
18800
  const wiredUrl = wired[i];
17973
- const own = raw?.imageUrl;
17974
- const image = typeof wiredUrl === "string" && wiredUrl.length > 0 ? wiredUrl : typeof own === "string" && own.length > 0 ? own : void 0;
18801
+ const own2 = raw?.imageUrl;
18802
+ const image = typeof wiredUrl === "string" && wiredUrl.length > 0 ? wiredUrl : typeof own2 === "string" && own2.length > 0 ? own2 : void 0;
17975
18803
  if (!image) continue;
17976
18804
  layers.push(expandVideoOverlayLayer({ ...raw ?? {}, imageUrl: image, slot: i + 1 }));
17977
18805
  }
@@ -17987,8 +18815,8 @@ function assembleVideoOverlayRequest(input) {
17987
18815
  const plan = parseVideoOverlayLayerPlan(input.planLayers);
17988
18816
  if ("error" in plan) return { videoUrl: input.videoUrl, layers, ...rest, planError: plan.error };
17989
18817
  const planned = expandVideoOverlayPresets(plan.layers).map((l, i) => {
17990
- const { slot: _slot, ...own } = l;
17991
- return { ...own, planLayer: i + 1 };
18818
+ const { slot: _slot, ...own2 } = l;
18819
+ return { ...own2, planLayer: i + 1 };
17992
18820
  });
17993
18821
  return { videoUrl: input.videoUrl, layers: [...planned, ...layers], ...rest };
17994
18822
  }
@@ -17998,8 +18826,8 @@ function videoOverlaySlotSources(layers, wiredImageUrls) {
17998
18826
  return Array.from({ length: Math.max(stored.length, wired.length) }, (_, i) => {
17999
18827
  const w = wired[i];
18000
18828
  if (typeof w === "string" && w.length > 0) return w;
18001
- const own = asLayer(stored[i])?.imageUrl;
18002
- return typeof own === "string" && own.length > 0 ? own : void 0;
18829
+ const own2 = asLayer(stored[i])?.imageUrl;
18830
+ return typeof own2 === "string" && own2.length > 0 ? own2 : void 0;
18003
18831
  });
18004
18832
  }
18005
18833
  function canonicalValue(v) {
@@ -18699,12 +19527,15 @@ var CONTENT_RECIPE_IDEAS_CREDIT_IDS = [
18699
19527
  "content-recipe:economy",
18700
19528
  "content-recipe",
18701
19529
  "content-recipe:premium",
19530
+ "content-recipe:premium-direct",
18702
19531
  "content-ideas:economy",
18703
19532
  "content-ideas",
18704
19533
  "content-ideas:premium",
19534
+ "content-ideas:premium-direct",
18705
19535
  "content-ideas:10:economy",
18706
19536
  "content-ideas:10",
18707
- "content-ideas:10:premium"
19537
+ "content-ideas:10:premium",
19538
+ "content-ideas:10:premium-direct"
18708
19539
  ];
18709
19540
 
18710
19541
  // src/smart-cut-windows.ts
@@ -18806,89 +19637,6 @@ var OrgSettingsSchema = PresetSettingsSchema.partial().extend({
18806
19637
  /** Per-org relabelling of the kind vocabulary (./vocabulary.ts). */
18807
19638
  vocabulary_overrides: zod.z.record(zod.z.string(), zod.z.string()).optional()
18808
19639
  });
18809
-
18810
- // src/entity-node-fields.ts
18811
- var ENTITY_NODE_KINDS = ["character", "object", "creature", "location"];
18812
- var ENTITY_DB_ID_FIELD = {
18813
- character: "characterDbId",
18814
- object: "objectDbId",
18815
- creature: "creatureDbId",
18816
- location: "locationDbId"
18817
- };
18818
- var ENTITY_NAME_FIELD = {
18819
- character: "characterName",
18820
- object: "objectName",
18821
- creature: "creatureName",
18822
- location: "locationName"
18823
- };
18824
- var ENTITY_TABLE = {
18825
- character: "characters",
18826
- object: "objects",
18827
- creature: "creatures",
18828
- location: "locations"
18829
- };
18830
- var ENTITY_BUCKET_FIELDS = {
18831
- character: [
18832
- ["expressions", "expressions"],
18833
- ["poses", "poses"],
18834
- ["motions", "motions"],
18835
- ["angles", "angles"],
18836
- ["body_angles", "bodyAngles"],
18837
- ["lighting_variations", "lightingVariations"],
18838
- ["outfit_variations", "outfitVariations"],
18839
- ["detail_closeups", "detailCloseups"],
18840
- ["sheets", "sheets"]
18841
- ],
18842
- object: [
18843
- ["angles", "angles"],
18844
- ["materials", "materials"],
18845
- ["variations", "variations"],
18846
- ["motion_clips", "motionClips"],
18847
- ["detail_closeups", "detailCloseups"],
18848
- ["sheets", "sheets"]
18849
- ],
18850
- creature: [
18851
- ["angles", "angles"],
18852
- ["poses", "poses"],
18853
- ["variations", "variations"],
18854
- ["motion_clips", "motionClips"],
18855
- ["detail_closeups", "detailCloseups"],
18856
- ["sheets", "sheets"]
18857
- ],
18858
- location: [
18859
- ["time_of_day", "timeOfDay"],
18860
- ["weather", "weather"],
18861
- ["angles", "angles"],
18862
- ["lighting", "lighting"],
18863
- ["seasons", "seasons"],
18864
- ["atmosphere_motions", "atmosphereMotions"],
18865
- ["detail_closeups", "detailCloseups"],
18866
- ["sheets", "sheets"]
18867
- ]
18868
- };
18869
- var ENTITY_SCALAR_FIELDS = [
18870
- ["name", "__name"],
18871
- // routed to the kind's own name field by the caller
18872
- ["description", "description"],
18873
- ["canonical_description", "canonicalDescription"],
18874
- ["source_image_url", "sourceImageUrl"]
18875
- ];
18876
- var ENTITY_KIND_SCALAR_FIELDS = {
18877
- character: [],
18878
- object: [["style_lock", "styleLock"]],
18879
- creature: [["style_lock", "styleLock"]],
18880
- location: [["style_lock", "styleLock"]]
18881
- };
18882
- function entityHydrationColumns(kind) {
18883
- return [
18884
- "id",
18885
- ...entityScalarFields(kind).map(([column]) => column),
18886
- ...ENTITY_BUCKET_FIELDS[kind].map(([column]) => column)
18887
- ];
18888
- }
18889
- function entityScalarFields(kind) {
18890
- return [...ENTITY_SCALAR_FIELDS, ...ENTITY_KIND_SCALAR_FIELDS[kind]];
18891
- }
18892
19640
  var SCENE3D_PLAN_TYPE = "3d-scene";
18893
19641
  var SCENE3D_SCHEMA_VERSION = 1;
18894
19642
  var SCENE3D_DEFAULT_FPS = 24;
@@ -22603,7 +23351,35 @@ function editPlanBucketMinutes(durationSec) {
22603
23351
  return EDIT_PLAN_BUCKET_MINUTES[EDIT_PLAN_BUCKET_MINUTES.length - 1];
22604
23352
  }
22605
23353
  function buildEditPlanCreditId(mode, tier, durationSec) {
22606
- return `edit-plan:${mode}:${tier}:${editPlanBucketMinutes(durationSec)}m`;
23354
+ return editPlanMinutesCreditId(mode, tier, editPlanBucketMinutes(durationSec));
23355
+ }
23356
+ function editPlanStartedMinutes(durationSec) {
23357
+ const secs = typeof durationSec === "number" && Number.isFinite(durationSec) ? durationSec : EDIT_PLAN_MAX_MINUTES * 60;
23358
+ return Math.min(EDIT_PLAN_MAX_MINUTES, Math.max(1, Math.ceil(secs / 60)));
23359
+ }
23360
+ function editPlanMinutesCreditId(mode, tier, minutes) {
23361
+ return `edit-plan:${mode}:${tier}:${minutes}m`;
23362
+ }
23363
+ function editPlanReserveCreditId(mode, tier, durationSec, perMinute) {
23364
+ return perMinute ? editPlanMinutesCreditId(mode, tier, editPlanStartedMinutes(durationSec)) : buildEditPlanCreditId(mode, tier, durationSec);
23365
+ }
23366
+ function editPlanRateCreditId(mode, tier) {
23367
+ return `edit-plan:${mode}:${tier}:per-minute`;
23368
+ }
23369
+ function editPlanFlatCreditId(mode, tier) {
23370
+ return `edit-plan:${mode}:${tier}:flat`;
23371
+ }
23372
+ function parseEditPlanMinutesCreditId(id) {
23373
+ const m = /^edit-plan:([a-z]+):([a-z]+):(\d+)m$/.exec(id);
23374
+ if (!m) return void 0;
23375
+ const mode = parseEditPlanMode(m[1]);
23376
+ const tier = EDIT_PLAN_TIERS.includes(m[2]) ? m[2] : void 0;
23377
+ const minutes = Number(m[3]);
23378
+ if (!mode || !tier || !Number.isInteger(minutes) || minutes < 1 || minutes > EDIT_PLAN_MAX_MINUTES) return void 0;
23379
+ return { mode, tier, minutes };
23380
+ }
23381
+ function editPlanMinutesBaseCredits(flat, rate, minutes) {
23382
+ return Math.max(1, Math.ceil(flat + rate * minutes));
22607
23383
  }
22608
23384
  function asEditPlanMode(v) {
22609
23385
  return parseEditPlanMode(v) ?? "tighten";
@@ -22840,8 +23616,8 @@ function savedRenderOutput(data) {
22840
23616
  const selected = results[index] ?? results[0];
22841
23617
  const selectedUrl = str5(selected?.url);
22842
23618
  if (selectedUrl) return itemOf(selectedUrl, medium, selected);
22843
- const own = str5(data[MEDIUM_FIELD[medium]]);
22844
- if (own) return { url: own, medium };
23619
+ const own2 = str5(data[MEDIUM_FIELD[medium]]);
23620
+ if (own2) return { url: own2, medium };
22845
23621
  const other = medium === "video" ? "audio" : "video";
22846
23622
  const otherUrl = str5(data[MEDIUM_FIELD[other]]);
22847
23623
  return otherUrl ? { url: otherUrl, medium: other } : void 0;
@@ -23400,6 +24176,7 @@ exports.AUDIO_FX_PRESET_SET = AUDIO_FX_PRESET_SET;
23400
24176
  exports.AUDIO_FX_REVERB_PRESETS = AUDIO_FX_REVERB_PRESETS;
23401
24177
  exports.AUDIO_PRODUCER_TYPES = AUDIO_PRODUCER_TYPES;
23402
24178
  exports.AUDIO_SYNC_MIN_CONFIDENCE = AUDIO_SYNC_MIN_CONFIDENCE;
24179
+ exports.AUTO_DOWNLOAD_MAX_SEC = AUTO_DOWNLOAD_MAX_SEC;
23403
24180
  exports.AddBRollResultSchema = AddBRollResultSchema;
23404
24181
  exports.AnchorSceneStyleResultSchema = AnchorSceneStyleResultSchema;
23405
24182
  exports.AnimateSubGateSchema = AnimateSubGateSchema;
@@ -23483,6 +24260,8 @@ exports.COMPETITORS_MAX = COMPETITORS_MAX;
23483
24260
  exports.COMPETITOR_ABOUT_PLATFORMS = COMPETITOR_ABOUT_PLATFORMS;
23484
24261
  exports.COMPETITOR_ACCOUNT_KEYS = COMPETITOR_ACCOUNT_KEYS;
23485
24262
  exports.COMPETITOR_DEFAULT_ABOUT_PLATFORMS = COMPETITOR_DEFAULT_ABOUT_PLATFORMS;
24263
+ exports.COMPETITOR_READ_NODE_TYPE = COMPETITOR_READ_NODE_TYPE;
24264
+ exports.COMPETITOR_READ_ROLES = COMPETITOR_READ_ROLES;
23486
24265
  exports.COMPETITOR_SCAN_CREDIT_COSTS = COMPETITOR_SCAN_CREDIT_COSTS;
23487
24266
  exports.COMPETITOR_SCAN_MAX_SEARCHES = COMPETITOR_SCAN_MAX_SEARCHES;
23488
24267
  exports.COMPETITOR_SCAN_NODE_TYPE = COMPETITOR_SCAN_NODE_TYPE;
@@ -23547,6 +24326,7 @@ exports.DEFAULT_VOICE_CHANGER_MODEL = DEFAULT_VOICE_CHANGER_MODEL;
23547
24326
  exports.DEFAULT_VOICE_DESIGN_MODEL = DEFAULT_VOICE_DESIGN_MODEL;
23548
24327
  exports.DETAIL_VARIANTS = DETAIL_VARIANTS;
23549
24328
  exports.DIALOGUE_PROVIDERS = DIALOGUE_PROVIDERS;
24329
+ exports.DIRECT_VIDEO_EXTENSIONS = DIRECT_VIDEO_EXTENSIONS;
23550
24330
  exports.DURATION_PRICED_PROVIDERS = DURATION_PRICED_PROVIDERS;
23551
24331
  exports.DYNAMIC_HANDLE_NODE_TYPES = DYNAMIC_HANDLE_NODE_TYPES;
23552
24332
  exports.DYNAMIC_PRODUCER_TYPES = DYNAMIC_PRODUCER_TYPES;
@@ -23644,6 +24424,8 @@ exports.IMAGE_EDIT_PROVIDERS = IMAGE_EDIT_PROVIDERS;
23644
24424
  exports.IMAGE_GEN_PROVIDERS = IMAGE_GEN_PROVIDERS;
23645
24425
  exports.IMAGE_I2I_PROVIDERS = IMAGE_I2I_PROVIDERS;
23646
24426
  exports.IMAGE_MASK_MODE = IMAGE_MASK_MODE;
24427
+ exports.IMAGE_MODEL_RATIO_FALLBACKS = IMAGE_MODEL_RATIO_FALLBACKS;
24428
+ exports.IMAGE_MODEL_ROLE_DEFAULTS = IMAGE_MODEL_ROLE_DEFAULTS;
23647
24429
  exports.IMAGE_OVERLAY_BASE_CREDITS = IMAGE_OVERLAY_BASE_CREDITS;
23648
24430
  exports.IMAGE_OVERLAY_VARIANT_CREDITS = IMAGE_OVERLAY_VARIANT_CREDITS;
23649
24431
  exports.IMAGE_PRODUCER_TYPES = IMAGE_PRODUCER_TYPES;
@@ -23653,6 +24435,7 @@ exports.IMAGE_TO_VIDEO_PROVIDERS = IMAGE_TO_VIDEO_PROVIDERS;
23653
24435
  exports.INPUT_FIELD_EXTRA_KEYS = INPUT_FIELD_EXTRA_KEYS;
23654
24436
  exports.INPUT_FIELD_MAP = INPUT_FIELD_MAP2;
23655
24437
  exports.INPUT_NODE_TYPES = INPUT_NODE_TYPES;
24438
+ exports.INSPIRATION_READ_NODE_TYPE = INSPIRATION_READ_NODE_TYPE;
23656
24439
  exports.INSTAGRAM_ANALYSIS_CREDIT_ID = INSTAGRAM_ANALYSIS_CREDIT_ID;
23657
24440
  exports.INSTAGRAM_CAROUSEL_MAX_ITEMS = INSTAGRAM_CAROUSEL_MAX_ITEMS;
23658
24441
  exports.INSTAGRAM_CAROUSEL_MIN_ITEMS = INSTAGRAM_CAROUSEL_MIN_ITEMS;
@@ -23685,6 +24468,7 @@ exports.LEGACY_TEMPLATE_CATEGORIES = LEGACY_TEMPLATE_CATEGORIES;
23685
24468
  exports.LIP_SYNC_DURATION_BUCKETS = LIP_SYNC_DURATION_BUCKETS;
23686
24469
  exports.LIP_SYNC_MAX_AUDIO_SECONDS = LIP_SYNC_MAX_AUDIO_SECONDS;
23687
24470
  exports.LIP_SYNC_PROVIDERS = LIP_SYNC_PROVIDERS;
24471
+ exports.LLM_CREDIT_RUNGS = LLM_CREDIT_RUNGS;
23688
24472
  exports.LLM_FEATURE_DEFAULTS = LLM_FEATURE_DEFAULTS;
23689
24473
  exports.LLM_MODALITY_CAPS = LLM_MODALITY_CAPS;
23690
24474
  exports.LLM_MODELS = LLM_MODELS;
@@ -23720,6 +24504,7 @@ exports.MAX_LOCATION_VARIANTS = MAX_LOCATION_VARIANTS;
23720
24504
  exports.MAX_NEGATIVE_PROMPT_CHARS_BY_PROVIDER = MAX_NEGATIVE_PROMPT_CHARS_BY_PROVIDER;
23721
24505
  exports.MAX_PANELS_PER_SHEET = MAX_PANELS_PER_SHEET;
23722
24506
  exports.MAX_TTS_CHARS_BY_PROVIDER = MAX_TTS_CHARS_BY_PROVIDER;
24507
+ exports.MAX_VIDEO_LINK_INPUT_CHARS = MAX_VIDEO_LINK_INPUT_CHARS;
23723
24508
  exports.MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER = MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER;
23724
24509
  exports.MEMBER_STATUSES = MEMBER_STATUSES;
23725
24510
  exports.META_ADS_ADVERTISER_MAX_RESULTS = META_ADS_ADVERTISER_MAX_RESULTS;
@@ -23810,9 +24595,11 @@ exports.PASSTHROUGH_TYPES = PASSTHROUGH_TYPES;
23810
24595
  exports.PAYG_RETENTION_DAYS = PAYG_RETENTION_DAYS;
23811
24596
  exports.PER_FORMAT_DURATION_BOUNDS = PER_FORMAT_DURATION_BOUNDS;
23812
24597
  exports.PICKER_TO_COMBINE_TRANSITION = PICKER_TO_COMBINE_TRANSITION;
24598
+ exports.PIPELINE_ACCEPTED_IMAGE_MODELS = PIPELINE_ACCEPTED_IMAGE_MODELS;
23813
24599
  exports.PIPELINE_ACTIVATION_MODES = PIPELINE_ACTIVATION_MODES;
23814
24600
  exports.PIPELINE_FORMATS = PIPELINE_FORMATS;
23815
24601
  exports.PIPELINE_HARD_TIMEOUT_MS = PIPELINE_HARD_TIMEOUT_MS;
24602
+ exports.PIPELINE_LEGACY_PINNED_IMAGE_MODELS = PIPELINE_LEGACY_PINNED_IMAGE_MODELS;
23816
24603
  exports.PIPELINE_MODEL_STAGES = PIPELINE_MODEL_STAGES;
23817
24604
  exports.PIPELINE_MODES = PIPELINE_MODES;
23818
24605
  exports.PIPELINE_OUTPUT_RESOLUTIONS = PIPELINE_OUTPUT_RESOLUTIONS;
@@ -23997,7 +24784,14 @@ exports.SMART_CUT_WINDOW_MAX = SMART_CUT_WINDOW_MAX;
23997
24784
  exports.SMART_CUT_WINDOW_MIN = SMART_CUT_WINDOW_MIN;
23998
24785
  exports.SOCIAL_PLATFORMS = SOCIAL_PLATFORMS;
23999
24786
  exports.SOCIAL_POST_NODE_TYPES = SOCIAL_POST_NODE_TYPES;
24787
+ exports.SOCIAL_POST_READER_NODE_TYPES = SOCIAL_POST_READER_NODE_TYPES;
24000
24788
  exports.SOCIAL_POST_VIDEO_LINK_MARGIN_MS = SOCIAL_POST_VIDEO_LINK_MARGIN_MS;
24789
+ exports.SOCIAL_READ_DAY_PATTERN = SOCIAL_READ_DAY_PATTERN;
24790
+ exports.SOCIAL_READ_DEFAULT_LIMIT = SOCIAL_READ_DEFAULT_LIMIT;
24791
+ exports.SOCIAL_READ_LIMIT_MAX = SOCIAL_READ_LIMIT_MAX;
24792
+ exports.SOCIAL_READ_PERIODS = SOCIAL_READ_PERIODS;
24793
+ exports.SOCIAL_READ_WINDOW_DAYS_MAX = SOCIAL_READ_WINDOW_DAYS_MAX;
24794
+ exports.SOCIAL_READ_WINDOW_HOURS_MAX = SOCIAL_READ_WINDOW_HOURS_MAX;
24001
24795
  exports.SOCIAL_SEARCH_COUNTS = SOCIAL_SEARCH_COUNTS;
24002
24796
  exports.SOCIAL_SEARCH_CREDITS_PER_PAGE = SOCIAL_SEARCH_CREDITS_PER_PAGE;
24003
24797
  exports.SOCIAL_SEARCH_CREDIT_COSTS = SOCIAL_SEARCH_CREDIT_COSTS;
@@ -24169,6 +24963,8 @@ exports.VIDEO_DURATION_TIERS = VIDEO_DURATION_TIERS;
24169
24963
  exports.VIDEO_GEN_COLLAPSED_T2V_IDS = VIDEO_GEN_COLLAPSED_T2V_IDS;
24170
24964
  exports.VIDEO_GEN_PROVIDERS = VIDEO_GEN_PROVIDERS;
24171
24965
  exports.VIDEO_INPUT_LIP_SYNC_PROVIDERS = VIDEO_INPUT_LIP_SYNC_PROVIDERS;
24966
+ exports.VIDEO_LINK_AUDIO_CONSUMER_TYPES = VIDEO_LINK_AUDIO_CONSUMER_TYPES;
24967
+ exports.VIDEO_LINK_DERIVED_FIELDS = VIDEO_LINK_DERIVED_FIELDS;
24172
24968
  exports.VIDEO_LINK_TOLERANT_CONSUMER_TYPES = VIDEO_LINK_TOLERANT_CONSUMER_TYPES;
24173
24969
  exports.VIDEO_MODEL_CAPS = VIDEO_MODEL_CAPS;
24174
24970
  exports.VIDEO_MODE_ALIASES = VIDEO_MODE_ALIASES;
@@ -24226,6 +25022,7 @@ exports.WORKSPACE_HEADER_LOWER = WORKSPACE_HEADER_LOWER;
24226
25022
  exports.WORKSPACE_ROLES = WORKSPACE_ROLES;
24227
25023
  exports.WorkspaceSettingsSchema = WorkspaceSettingsSchema;
24228
25024
  exports.YOUTUBE_HOSTS = YOUTUBE_HOSTS;
25025
+ exports.YOUTUBE_MAX_HEIGHT = YOUTUBE_MAX_HEIGHT;
24229
25026
  exports.adCreativeAnalysisFrom = adCreativeAnalysisFrom;
24230
25027
  exports.adviceFamilyOf = adviceFamilyOf;
24231
25028
  exports.aggregateByType = aggregateByType;
@@ -24349,9 +25146,12 @@ exports.countEmptyInputSkips = countEmptyInputSkips;
24349
25146
  exports.countRefModalityEdges = countRefModalityEdges;
24350
25147
  exports.creditRangesAll = creditRangesAll;
24351
25148
  exports.creditsToUsd = creditsToUsd;
25149
+ exports.declaredJsonOutput = declaredJsonOutput;
25150
+ exports.declaredJsonOutputRows = declaredJsonOutputRows;
24352
25151
  exports.decodeProviderItem = decodeProviderItem;
24353
25152
  exports.defaultCarriedFraction = defaultCarriedFraction;
24354
25153
  exports.defaultEdgeOutputMode = defaultEdgeOutputMode;
25154
+ exports.defaultImageModel = defaultImageModel;
24355
25155
  exports.defaultResolutionFor = defaultResolutionFor;
24356
25156
  exports.defaultRoleForSource = defaultRoleForSource;
24357
25157
  exports.defaultSpeakerMap = defaultSpeakerMap;
@@ -24370,14 +25170,21 @@ exports.dialogueHasLever = dialogueHasLever;
24370
25170
  exports.dialogueProviderOf = dialogueProviderOf;
24371
25171
  exports.dialogueStabilityAccepted = dialogueStabilityAccepted;
24372
25172
  exports.dialogueSupportsTimestamps = dialogueSupportsTimestamps;
25173
+ exports.dropStaleVideoLinkFields = dropStaleVideoLinkFields;
24373
25174
  exports.dropUnknownBindings = dropUnknownBindings;
24374
25175
  exports.dropUnknownSpeakers = dropUnknownSpeakers;
24375
25176
  exports.durationsByMode = durationsByMode;
24376
25177
  exports.editPlanBasis = editPlanBasis;
24377
25178
  exports.editPlanBucketMinutes = editPlanBucketMinutes;
25179
+ exports.editPlanFlatCreditId = editPlanFlatCreditId;
25180
+ exports.editPlanMinutesBaseCredits = editPlanMinutesBaseCredits;
25181
+ exports.editPlanMinutesCreditId = editPlanMinutesCreditId;
25182
+ exports.editPlanRateCreditId = editPlanRateCreditId;
25183
+ exports.editPlanReserveCreditId = editPlanReserveCreditId;
24378
25184
  exports.editPlanResultPatch = editPlanResultPatch;
24379
25185
  exports.editPlanSavedOutput = editPlanSavedOutput;
24380
25186
  exports.editPlanSourceDurationSec = editPlanSourceDurationSec;
25187
+ exports.editPlanStartedMinutes = editPlanStartedMinutes;
24381
25188
  exports.editPlanTranscriptOrigin = editPlanTranscriptOrigin;
24382
25189
  exports.edlDurationMs = edlDurationMs;
24383
25190
  exports.edlSegmentOutputStarts = edlSegmentOutputStarts;
@@ -24501,6 +25308,7 @@ exports.hostnameMatchesAllowlist = hostnameMatchesAllowlist;
24501
25308
  exports.humanizeSlotSid = humanizeSlotSid;
24502
25309
  exports.imageMentionSlug = imageMentionSlug;
24503
25310
  exports.imageMentionSlugForRef = imageMentionSlugForRef;
25311
+ exports.imageModelDrawsRatio = imageModelDrawsRatio;
24504
25312
  exports.imageOverlayBillableVariants = imageOverlayBillableVariants;
24505
25313
  exports.imageOverlayCredits = imageOverlayCredits;
24506
25314
  exports.imageReferenceLimit = imageReferenceLimit;
@@ -24523,6 +25331,7 @@ exports.isCollectionUrl = isCollectionUrl;
24523
25331
  exports.isCompetitorAboutPlatform = isCompetitorAboutPlatform;
24524
25332
  exports.isCronExpression = isCronExpression;
24525
25333
  exports.isDefaultSelectorConfig = isDefaultSelectorConfig;
25334
+ exports.isDirectVideoFileUrl = isDirectVideoFileUrl;
24526
25335
  exports.isEdlTargetAspect = isEdlTargetAspect;
24527
25336
  exports.isExpandedClone = isExpandedClone;
24528
25337
  exports.isFacebookPageUrl = isFacebookPageUrl;
@@ -24539,7 +25348,9 @@ exports.isKineticCaptionStyle = isKineticCaptionStyle;
24539
25348
  exports.isKnownScene3DEngine = isKnownScene3DEngine;
24540
25349
  exports.isKnownSpeakerEmphasisStyle = isKnownSpeakerEmphasisStyle;
24541
25350
  exports.isLegacySunoModel = isLegacySunoModel;
25351
+ exports.isLocalOrPrivateHostname = isLocalOrPrivateHostname;
24542
25352
  exports.isLocationUsageMode = isLocationUsageMode;
25353
+ exports.isLoneMediaLinkSource = isLoneMediaLinkSource;
24543
25354
  exports.isMeasurableCard = isMeasurableCard;
24544
25355
  exports.isMetaAdsFormat = isMetaAdsFormat;
24545
25356
  exports.isMetaAdsPlatform = isMetaAdsPlatform;
@@ -24551,6 +25362,7 @@ exports.isObjectAspectRatio = isObjectAspectRatio;
24551
25362
  exports.isOversizedScene = isOversizedScene;
24552
25363
  exports.isPaygRetentionActive = isPaygRetentionActive;
24553
25364
  exports.isPerSecondLipSyncProvider = isPerSecondLipSyncProvider;
25365
+ exports.isPrivateOrReservedIP = isPrivateOrReservedIP;
24554
25366
  exports.isPro3DRenderJobOutput = isPro3DRenderJobOutput;
24555
25367
  exports.isPro3DRenderQuote = isPro3DRenderQuote;
24556
25368
  exports.isPro3DRenderRenderOnly = isPro3DRenderRenderOnly;
@@ -24572,6 +25384,7 @@ exports.isSettingsHintEdge = isSettingsHintEdge;
24572
25384
  exports.isSettingsHintSource = isSettingsHintSource;
24573
25385
  exports.isSettingsSourceType = isSettingsSourceType;
24574
25386
  exports.isSocialPost = isSocialPost;
25387
+ exports.isSocialPostReaderNodeType = isSocialPostReaderNodeType;
24575
25388
  exports.isSocialSearchPickFrozen = isSocialSearchPickFrozen;
24576
25389
  exports.isSocialVideoUrl = isSocialVideoUrl;
24577
25390
  exports.isTelegramAccountTriggerNamedHandle = isTelegramAccountTriggerNamedHandle;
@@ -24586,6 +25399,10 @@ exports.isVideoOverlayCorner = isVideoOverlayCorner;
24586
25399
  exports.isVideoOverlayOutputAspect = isVideoOverlayOutputAspect;
24587
25400
  exports.isVideoOverlayPresetId = isVideoOverlayPresetId;
24588
25401
  exports.isWan3Provider = isWan3Provider;
25402
+ exports.jsonInputKind = jsonInputKind;
25403
+ exports.jsonKindMismatch = jsonKindMismatch;
25404
+ exports.jsonKindMismatchMessage = jsonKindMismatchMessage;
25405
+ exports.jsonOutputKind = jsonOutputKind;
24589
25406
  exports.jsonResultToList = jsonResultToList;
24590
25407
  exports.knownEntitySlugsFromRefs = knownEntitySlugsFromRefs;
24591
25408
  exports.knownImageSlugsFromRefs = knownImageSlugsFromRefs;
@@ -24595,12 +25412,16 @@ exports.listModels = listModels;
24595
25412
  exports.listResultsServeHandle = listResultsServeHandle;
24596
25413
  exports.listSlotSids = listSlotSids;
24597
25414
  exports.liveRowColumn = liveRowColumn;
25415
+ exports.llmCreditIdForRung = llmCreditIdForRung;
24598
25416
  exports.llmRouteDefaults = llmRouteDefaults;
25417
+ exports.llmServesDirect = llmServesDirect;
25418
+ exports.llmTierCreditIds = llmTierCreditIds;
24599
25419
  exports.localMinuteKey = localMinuteKey;
24600
25420
  exports.localTimeIn = localTimeIn;
24601
25421
  exports.locationMentionSlug = locationMentionSlug;
24602
25422
  exports.locationReferencePhotoKindLabel = locationReferencePhotoKindLabel;
24603
25423
  exports.locationUsageModeLabel = locationUsageModeLabel;
25424
+ exports.loneMediaUrlKind = loneMediaUrlKind;
24604
25425
  exports.ltxExtendDurationSec = ltxExtendDurationSec;
24605
25426
  exports.ltxRetakeDurationSec = ltxRetakeDurationSec;
24606
25427
  exports.mapAspectRatio = mapAspectRatio;
@@ -24679,6 +25500,7 @@ exports.parseAspectToken = parseAspectToken;
24679
25500
  exports.parseAttributedDialogue = parseAttributedDialogue;
24680
25501
  exports.parseCaptionPlan = parseCaptionPlan;
24681
25502
  exports.parseCharacterMentionToken = parseCharacterMentionToken;
25503
+ exports.parseEditPlanMinutesCreditId = parseEditPlanMinutesCreditId;
24682
25504
  exports.parseEditPlanMode = parseEditPlanMode;
24683
25505
  exports.parseEntityMentionToken = parseEntityMentionToken;
24684
25506
  exports.parseGroupHandle = parseGroupHandle;
@@ -24901,6 +25723,7 @@ exports.scene3DV2OverrideInputSchema = scene3DV2OverrideInputSchema;
24901
25723
  exports.scene3DV2ResourceUsage = scene3DV2ResourceUsage;
24902
25724
  exports.scene3DVersionTokenSchema = scene3DVersionTokenSchema;
24903
25725
  exports.scene3DZodIssues = scene3DZodIssues;
25726
+ exports.sceneRenderStateRegistry = sceneRenderStateRegistry;
24904
25727
  exports.scheduleMatchesAt = scheduleMatchesAt;
24905
25728
  exports.scheduleOccurrences = scheduleOccurrences;
24906
25729
  exports.searchModelVariants = searchModelVariants;
@@ -24924,6 +25747,7 @@ exports.signedLinkExpiresAt = signedLinkExpiresAt;
24924
25747
  exports.sizeVec3Schema = sizeVec3Schema;
24925
25748
  exports.slotVariationSchema = slotVariationSchema;
24926
25749
  exports.snapToModelDuration = snapToModelDuration;
25750
+ exports.snapToNearestDuration = snapToNearestDuration;
24927
25751
  exports.socialPostDigestLine = socialPostDigestLine;
24928
25752
  exports.socialPostsDigest = socialPostsDigest;
24929
25753
  exports.socialPostsFrom = socialPostsFrom;
@@ -24949,6 +25773,7 @@ exports.speakerLayoutAllows = speakerLayoutAllows;
24949
25773
  exports.speakerPresentationWarnings = speakerPresentationWarnings;
24950
25774
  exports.speakerSwitchOverlaps = speakerSwitchOverlaps;
24951
25775
  exports.speakerTurns = speakerTurns;
25776
+ exports.speakerViewCreditId = speakerViewCreditId;
24952
25777
  exports.speechCredits = speechCredits;
24953
25778
  exports.speechPriceUnits = speechPriceUnits;
24954
25779
  exports.speechUnitCreditId = speechUnitCreditId;
@@ -25046,9 +25871,13 @@ exports.videoCharacterRefUnits = videoCharacterRefUnits;
25046
25871
  exports.videoCharacterVoiceCap = videoCharacterVoiceCap;
25047
25872
  exports.videoCharacterVoiceKey = videoCharacterVoiceKey;
25048
25873
  exports.videoCharacterVoiceProblem = videoCharacterVoiceProblem;
25874
+ exports.videoDefaultDurationSec = videoDefaultDurationSec;
25049
25875
  exports.videoLinkDownloadedFile = videoLinkDownloadedFile;
25876
+ exports.videoLinkInputProblem = videoLinkInputProblem;
25877
+ exports.videoLinkNeedOf = videoLinkNeedOf;
25050
25878
  exports.videoLinkNeedsDownload = videoLinkNeedsDownload;
25051
25879
  exports.videoLinkPageUrl = videoLinkPageUrl;
25880
+ exports.videoLinkRunNeeds = videoLinkRunNeeds;
25052
25881
  exports.videoModelCanSpeakDialogue = videoModelCanSpeakDialogue;
25053
25882
  exports.videoModelSupportsAudio = videoModelSupportsAudio;
25054
25883
  exports.videoNegativeSuffix = videoNegativeSuffix;