@nodaro/shared 3.32.0 → 3.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VWGNPMJZ.cjs → chunk-24ZKPE33.cjs} +5 -5
- package/dist/{chunk-VWGNPMJZ.cjs.map → chunk-24ZKPE33.cjs.map} +1 -1
- package/dist/{chunk-CK3GK34R.js → chunk-2HIDE3QV.js} +9 -3
- package/dist/chunk-2HIDE3QV.js.map +1 -0
- package/dist/{chunk-WDIBOWAA.js → chunk-2HVFF5SS.js} +6 -6
- package/dist/chunk-2HVFF5SS.js.map +1 -0
- package/dist/{chunk-KHCBJ7KD.js → chunk-2QWNPYDG.js} +3 -3
- package/dist/{chunk-KHCBJ7KD.js.map → chunk-2QWNPYDG.js.map} +1 -1
- package/dist/{chunk-J6KHW2E5.cjs → chunk-3YG3MYDE.cjs} +153 -24
- package/dist/chunk-3YG3MYDE.cjs.map +1 -0
- package/dist/{chunk-ULXI7A6Q.cjs → chunk-5VNBQ4QK.cjs} +16 -16
- package/dist/{chunk-ULXI7A6Q.cjs.map → chunk-5VNBQ4QK.cjs.map} +1 -1
- package/dist/{chunk-5AUSSJIM.cjs → chunk-5ZCXWA7J.cjs} +232 -15
- package/dist/chunk-5ZCXWA7J.cjs.map +1 -0
- package/dist/{chunk-Z2OL5AJD.cjs → chunk-6F6GGX2W.cjs} +4 -3
- package/dist/chunk-6F6GGX2W.cjs.map +1 -0
- package/dist/{chunk-E2TGXG6X.cjs → chunk-72IFMNJE.cjs} +80 -52
- package/dist/chunk-72IFMNJE.cjs.map +1 -0
- package/dist/{chunk-NB72XWXQ.cjs → chunk-A5Z3IMSJ.cjs} +6 -6
- package/dist/{chunk-NB72XWXQ.cjs.map → chunk-A5Z3IMSJ.cjs.map} +1 -1
- package/dist/{chunk-NT6IJH4L.cjs → chunk-AGEZY4LL.cjs} +66 -47
- package/dist/chunk-AGEZY4LL.cjs.map +1 -0
- package/dist/{chunk-3CUFITU7.js → chunk-ANOQWAMU.js} +88 -54
- package/dist/chunk-ANOQWAMU.js.map +1 -0
- package/dist/{chunk-PRYE7AZQ.cjs → chunk-AWWOQH46.cjs} +7 -7
- package/dist/chunk-AWWOQH46.cjs.map +1 -0
- package/dist/{chunk-QELDJGDK.cjs → chunk-B7WJJHJS.cjs} +7 -4
- package/dist/chunk-B7WJJHJS.cjs.map +1 -0
- package/dist/{chunk-AVQK77G6.cjs → chunk-BBLE4UTG.cjs} +88 -54
- package/dist/chunk-BBLE4UTG.cjs.map +1 -0
- package/dist/{chunk-HGC5JNVA.cjs → chunk-BVVKMQKR.cjs} +9 -2
- package/dist/chunk-BVVKMQKR.cjs.map +1 -0
- package/dist/{chunk-YYV35XOS.js → chunk-C4R7BTBQ.js} +4 -3
- package/dist/chunk-C4R7BTBQ.js.map +1 -0
- package/dist/{chunk-AROWPFO2.js → chunk-ETXUOETU.js} +29 -36
- package/dist/chunk-ETXUOETU.js.map +1 -0
- package/dist/{chunk-S5DMKUWK.cjs → chunk-F4ZT5X2S.cjs} +11 -11
- package/dist/{chunk-S5DMKUWK.cjs.map → chunk-F4ZT5X2S.cjs.map} +1 -1
- package/dist/{chunk-YBPBK5KI.js → chunk-FKQJYMCO.js} +97 -23
- package/dist/chunk-FKQJYMCO.js.map +1 -0
- package/dist/{chunk-ZDFHA2EC.js → chunk-FVKCNAEQ.js} +51 -7
- package/dist/chunk-FVKCNAEQ.js.map +1 -0
- package/dist/{chunk-JSNV5O2F.cjs → chunk-GHBXS5RT.cjs} +4 -4
- package/dist/{chunk-JSNV5O2F.cjs.map → chunk-GHBXS5RT.cjs.map} +1 -1
- package/dist/{chunk-C57NEO3X.js → chunk-GKJRNIP4.js} +230 -16
- package/dist/chunk-GKJRNIP4.js.map +1 -0
- package/dist/{chunk-QNGNOU4Z.js → chunk-GRIMIJJ3.js} +3 -3
- package/dist/{chunk-QNGNOU4Z.js.map → chunk-GRIMIJJ3.js.map} +1 -1
- package/dist/{chunk-IEBZHTPE.js → chunk-GVHBHUFV.js} +34 -16
- package/dist/chunk-GVHBHUFV.js.map +1 -0
- package/dist/chunk-GZH2SIOF.cjs +99 -0
- package/dist/chunk-GZH2SIOF.cjs.map +1 -0
- package/dist/{chunk-YHRG7UOC.js → chunk-IJNQYMN7.js} +4 -4
- package/dist/{chunk-YHRG7UOC.js.map → chunk-IJNQYMN7.js.map} +1 -1
- package/dist/{chunk-JX5YZ4DH.cjs → chunk-IRUPCNW2.cjs} +49 -46
- package/dist/chunk-IRUPCNW2.cjs.map +1 -0
- package/dist/{chunk-JL4C5VJ7.cjs → chunk-J65CAOUV.cjs} +14 -2
- package/dist/chunk-J65CAOUV.cjs.map +1 -0
- package/dist/{chunk-ISJDAFKS.js → chunk-LJMNCSDG.js} +38 -15
- package/dist/chunk-LJMNCSDG.js.map +1 -0
- package/dist/{chunk-ZT77RY6R.js → chunk-MEN7VLQ5.js} +8 -5
- package/dist/chunk-MEN7VLQ5.js.map +1 -0
- package/dist/{chunk-VIWSWVAW.js → chunk-MUA5L25B.js} +125 -12
- package/dist/chunk-MUA5L25B.js.map +1 -0
- package/dist/{chunk-6IJOPRZP.cjs → chunk-NWXB4F6D.cjs} +21 -21
- package/dist/{chunk-6IJOPRZP.cjs.map → chunk-NWXB4F6D.cjs.map} +1 -1
- package/dist/{chunk-PQHS255G.js → chunk-OHSIVNJO.js} +3 -3
- package/dist/chunk-OHSIVNJO.js.map +1 -0
- package/dist/{chunk-LKAIXWK3.js → chunk-PVVO23LZ.js} +3 -3
- package/dist/{chunk-LKAIXWK3.js.map → chunk-PVVO23LZ.js.map} +1 -1
- package/dist/{chunk-XAMC4S53.js → chunk-Q4ZXDDWA.js} +3 -3
- package/dist/{chunk-XAMC4S53.js.map → chunk-Q4ZXDDWA.js.map} +1 -1
- package/dist/{chunk-EK362Q45.cjs → chunk-QIIG2QDP.cjs} +8 -8
- package/dist/{chunk-EK362Q45.cjs.map → chunk-QIIG2QDP.cjs.map} +1 -1
- package/dist/{chunk-Q4CDQ2KO.js → chunk-QXW6O56Z.js} +6 -6
- package/dist/chunk-QXW6O56Z.js.map +1 -0
- package/dist/{chunk-5PC6JBGJ.cjs → chunk-R2VF5NQG.cjs} +3 -3
- package/dist/chunk-R2VF5NQG.cjs.map +1 -0
- package/dist/{chunk-6DKDOWBL.js → chunk-RRI5YBUK.js} +6 -3
- package/dist/{chunk-QELDJGDK.cjs.map → chunk-RRI5YBUK.js.map} +1 -1
- package/dist/{chunk-RJL7RCEM.cjs → chunk-RUKFN3LJ.cjs} +6 -6
- package/dist/chunk-RUKFN3LJ.cjs.map +1 -0
- package/dist/chunk-TCBHVIMD.js +89 -0
- package/dist/chunk-TCBHVIMD.js.map +1 -0
- package/dist/{chunk-SES6GDBQ.cjs → chunk-UJJUX6NW.cjs} +59 -8
- package/dist/chunk-UJJUX6NW.cjs.map +1 -0
- package/dist/{chunk-ZRL2UFTH.cjs → chunk-V3N56Z2S.cjs} +101 -22
- package/dist/chunk-V3N56Z2S.cjs.map +1 -0
- package/dist/{chunk-Z4AZW6FY.js → chunk-W36WCZS2.js} +6 -6
- package/dist/{chunk-Z4AZW6FY.js.map → chunk-W36WCZS2.js.map} +1 -1
- package/dist/{chunk-M36G6SRP.js → chunk-WXNQMJ67.js} +14 -3
- package/dist/chunk-WXNQMJ67.js.map +1 -0
- package/dist/{chunk-O7PUQLJ3.cjs → chunk-XE5PE54B.cjs} +33 -40
- package/dist/chunk-XE5PE54B.cjs.map +1 -0
- package/dist/{chunk-LPW3XNC2.js → chunk-XJOBMAWW.js} +3 -3
- package/dist/{chunk-LPW3XNC2.js.map → chunk-XJOBMAWW.js.map} +1 -1
- package/dist/{chunk-5U7VLG43.js → chunk-XS7FI4JA.js} +3 -3
- package/dist/chunk-XS7FI4JA.js.map +1 -0
- package/dist/{chunk-O5MP52U2.cjs → chunk-YD3JA36S.cjs} +4 -4
- package/dist/{chunk-O5MP52U2.cjs.map → chunk-YD3JA36S.cjs.map} +1 -1
- package/dist/chunk-YYODFQEU.cjs +25 -0
- package/dist/chunk-YYODFQEU.cjs.map +1 -0
- package/dist/{chunk-RN3RMBJZ.js → chunk-ZXBSARZX.js} +4 -4
- package/dist/{chunk-RN3RMBJZ.js.map → chunk-ZXBSARZX.js.map} +1 -1
- package/dist/entries/apps.cjs +43 -42
- package/dist/entries/apps.d.cts +11 -2
- package/dist/entries/apps.d.ts +11 -2
- package/dist/entries/apps.js +8 -7
- package/dist/entries/catalogs.d.cts +1 -1
- package/dist/entries/catalogs.d.ts +1 -1
- package/dist/entries/credits.cjs +156 -152
- package/dist/entries/credits.d.cts +41 -10
- package/dist/entries/credits.d.ts +41 -10
- package/dist/entries/credits.js +8 -8
- package/dist/entries/edl.cjs +130 -102
- package/dist/entries/edl.d.cts +74 -3
- package/dist/entries/edl.d.ts +74 -3
- package/dist/entries/edl.js +2 -2
- package/dist/entries/entities.cjs +126 -122
- package/dist/entries/entities.d.cts +2 -2
- package/dist/entries/entities.d.ts +2 -2
- package/dist/entries/entities.js +1 -1
- package/dist/entries/i18n.cjs +11 -11
- package/dist/entries/i18n.d.cts +2 -2
- package/dist/entries/i18n.d.ts +2 -2
- package/dist/entries/i18n.js +1 -1
- package/dist/entries/llm-models.cjs +63 -43
- package/dist/entries/llm-models.d.cts +71 -4
- package/dist/entries/llm-models.d.ts +71 -4
- package/dist/entries/llm-models.js +1 -1
- package/dist/entries/media.cjs +45 -41
- package/dist/entries/media.d.cts +39 -1
- package/dist/entries/media.d.ts +39 -1
- package/dist/entries/media.js +1 -1
- package/dist/entries/model-catalog.cjs +75 -63
- package/dist/entries/model-catalog.d.cts +2 -2
- package/dist/entries/model-catalog.d.ts +2 -2
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +274 -210
- package/dist/entries/models.d.cts +3 -3
- package/dist/entries/models.d.ts +3 -3
- package/dist/entries/models.js +5 -5
- package/dist/entries/nodes.cjs +222 -201
- package/dist/entries/nodes.d.cts +48 -8
- package/dist/entries/nodes.d.ts +48 -8
- package/dist/entries/nodes.js +10 -9
- package/dist/entries/pipeline.cjs +149 -149
- package/dist/entries/pipeline.d.cts +12 -8
- package/dist/entries/pipeline.d.ts +12 -8
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/social.cjs +174 -174
- package/dist/entries/social.d.cts +13 -5
- package/dist/entries/social.d.ts +13 -5
- package/dist/entries/social.js +2 -2
- package/dist/entries/types.d.cts +1 -1
- package/dist/entries/types.d.ts +1 -1
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +115 -115
- package/dist/entries/video.d.cts +4 -3
- package/dist/entries/video.d.ts +4 -3
- package/dist/entries/video.js +4 -4
- package/dist/entries/workflow.cjs +96 -95
- package/dist/entries/workflow.d.cts +19 -20
- package/dist/entries/workflow.d.ts +19 -20
- package/dist/entries/workflow.js +2 -1
- package/dist/index.cjs +1720 -1563
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +26 -25
- package/dist/{model-catalog-flJYaa-g.d.ts → model-catalog-VIHGmQL2.d.cts} +113 -1
- package/dist/{model-catalog-flJYaa-g.d.cts → model-catalog-VIHGmQL2.d.ts} +113 -1
- package/dist/{presentation-utils-BIqiCzSA.d.cts → presentation-utils-A4i92SYo.d.cts} +3 -1
- package/dist/{presentation-utils-BdiObtwq.d.ts → presentation-utils-DjdPtM9k.d.ts} +3 -1
- package/dist/{scene-node-types-DjenYFLO.d.ts → scene-node-types-Cvbtf-0a.d.cts} +147 -6
- package/dist/{scene-node-types-DjenYFLO.d.cts → scene-node-types-Cvbtf-0a.d.ts} +147 -6
- package/dist/{types-DffyGSy5.d.ts → types-CU6SQnMS.d.cts} +0 -5
- package/dist/{types-DffyGSy5.d.cts → types-CU6SQnMS.d.ts} +0 -5
- package/dist/{types-BRlFPEru.d.cts → types-DzUBR7yr.d.cts} +8 -1
- package/dist/{types-BRlFPEru.d.ts → types-DzUBR7yr.d.ts} +8 -1
- package/package.json +1 -1
- package/src/__tests__/camera-switch-contract.test.ts +33 -1
- package/src/__tests__/character-mention-slug.test.ts +0 -8
- package/src/__tests__/effective-tier.test.ts +3 -14
- package/src/__tests__/fixtures/camera-switch-speaker-map-parity.json +178 -0
- package/src/__tests__/fixtures/root-exports.baseline.json +21 -0
- package/src/__tests__/fixtures/speaker-map-camera-ids.json +26 -0
- package/src/__tests__/gvp-supported-providers.test.ts +1 -0
- package/src/__tests__/i18n-locale-completeness.test.ts +38 -3
- package/src/__tests__/llm-models.test.ts +200 -20
- package/src/__tests__/model-makers.test.ts +76 -0
- package/src/__tests__/node-preset-extract.test.ts +10 -0
- package/src/__tests__/presentation-utils.test.ts +15 -0
- package/src/__tests__/preview-gate-use-case.test.ts +16 -1
- package/src/__tests__/private-host.test.ts +53 -0
- package/src/__tests__/producer-types.test.ts +19 -0
- package/src/__tests__/run-continuation.test.ts +4 -1
- package/src/__tests__/speaker-map-contract.test.ts +48 -0
- package/src/__tests__/unit-contract-compose.test.ts +129 -0
- package/src/__tests__/unit-contracts.test.ts +134 -0
- package/src/__tests__/use-case-types.test.ts +33 -0
- package/src/__tests__/video-collapse-parity.test.ts +10 -0
- package/src/__tests__/video-frame-slot.test.ts +85 -0
- package/src/__tests__/video-mode-aliases.test.ts +1 -0
- package/src/__tests__/video-reference-only.test.ts +117 -0
- package/src/__tests__/vidu-q4-catalog.test.ts +230 -0
- package/src/camera-switch-contract.ts +36 -2
- package/src/component-types.ts +9 -0
- package/src/credit-identifiers.ts +81 -23
- package/src/entity-asset-types.ts +13 -0
- package/src/entries/credits.ts +1 -0
- package/src/entries/edl.ts +2 -0
- package/src/entries/llm-models.ts +5 -0
- package/src/entries/media.ts +1 -0
- package/src/entries/model-catalog.ts +6 -0
- package/src/entries/models.ts +25 -0
- package/src/entries/nodes.ts +5 -1
- package/src/fan-out-rows.ts +36 -3
- package/src/generate-mask.ts +40 -0
- package/src/generated/unit-contracts.ts +58 -0
- package/src/i18n/types.ts +13 -2
- package/src/json-kinds.ts +24 -4
- package/src/llm-models.ts +184 -31
- package/src/meta-ads-scrape.ts +16 -8
- package/src/model-catalog.ts +285 -13
- package/src/model-constants.ts +260 -5
- package/src/node-default-mappings.ts +3 -0
- package/src/node-preset-extract.ts +8 -0
- package/src/pipeline-types.ts +3 -0
- package/src/presentation-utils.ts +19 -12
- package/src/preview-gate.ts +4 -2
- package/src/private-host.ts +89 -59
- package/src/producer-types.ts +19 -19
- package/src/run-continuation.ts +26 -4
- package/src/speaker-layouts.ts +8 -3
- package/src/speaker-map-contract.ts +77 -0
- package/src/unit-contract-compose.ts +55 -0
- package/src/use-case-types.ts +19 -0
- package/src/video-ui-defaults.ts +7 -5
- package/dist/chunk-3CUFITU7.js.map +0 -1
- package/dist/chunk-5AUSSJIM.cjs.map +0 -1
- package/dist/chunk-5PC6JBGJ.cjs.map +0 -1
- package/dist/chunk-5U7VLG43.js.map +0 -1
- package/dist/chunk-6DKDOWBL.js.map +0 -1
- package/dist/chunk-AROWPFO2.js.map +0 -1
- package/dist/chunk-AVQK77G6.cjs.map +0 -1
- package/dist/chunk-C57NEO3X.js.map +0 -1
- package/dist/chunk-CK3GK34R.js.map +0 -1
- package/dist/chunk-E2TGXG6X.cjs.map +0 -1
- package/dist/chunk-HGC5JNVA.cjs.map +0 -1
- package/dist/chunk-IEBZHTPE.js.map +0 -1
- package/dist/chunk-ISJDAFKS.js.map +0 -1
- package/dist/chunk-J6KHW2E5.cjs.map +0 -1
- package/dist/chunk-JL4C5VJ7.cjs.map +0 -1
- package/dist/chunk-JX5YZ4DH.cjs.map +0 -1
- package/dist/chunk-M36G6SRP.js.map +0 -1
- package/dist/chunk-NT6IJH4L.cjs.map +0 -1
- package/dist/chunk-O7PUQLJ3.cjs.map +0 -1
- package/dist/chunk-PQHS255G.js.map +0 -1
- package/dist/chunk-PRYE7AZQ.cjs.map +0 -1
- package/dist/chunk-Q4CDQ2KO.js.map +0 -1
- package/dist/chunk-RJL7RCEM.cjs.map +0 -1
- package/dist/chunk-SES6GDBQ.cjs.map +0 -1
- package/dist/chunk-VIWSWVAW.js.map +0 -1
- package/dist/chunk-WDIBOWAA.js.map +0 -1
- package/dist/chunk-WNG7HRVA.cjs +0 -25
- package/dist/chunk-WNG7HRVA.cjs.map +0 -1
- package/dist/chunk-YBPBK5KI.js.map +0 -1
- package/dist/chunk-YYV35XOS.js.map +0 -1
- package/dist/chunk-Z2OL5AJD.cjs.map +0 -1
- package/dist/chunk-ZDFHA2EC.js.map +0 -1
- package/dist/chunk-ZRL2UFTH.cjs.map +0 -1
- package/dist/chunk-ZT77RY6R.js.map +0 -1
- package/src/__tests__/__snapshots__/prompt-builder-segments.test.ts.snap +0 -65
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import { MODEL_CATALOG, MODEL_MAKERS, normalizeVideoRequestParams } from "../model-catalog.js"
|
|
3
|
+
import {
|
|
4
|
+
IMAGE_TO_VIDEO_PROVIDERS,
|
|
5
|
+
TEXT_TO_VIDEO_PROVIDERS,
|
|
6
|
+
VIDEO_REF_LIMITS_BY_PROVIDER,
|
|
7
|
+
VIDEO_PROVIDERS_REQUIRING_IMAGE,
|
|
8
|
+
getVideoAudioCapability,
|
|
9
|
+
defaultVideoAspectRatio,
|
|
10
|
+
getMaxVideoPromptChars,
|
|
11
|
+
VIDU_Q4_PROVIDERS,
|
|
12
|
+
isViduQ4Provider,
|
|
13
|
+
VIDU_Q4_DEFAULT_RESOLUTION,
|
|
14
|
+
normalizeViduQ4Resolution,
|
|
15
|
+
isWan3Provider,
|
|
16
|
+
isSeedance2Provider,
|
|
17
|
+
isMinimaxH3Provider,
|
|
18
|
+
DURATION_PRICED_PROVIDERS,
|
|
19
|
+
VIDEO_DURATION_TIERS,
|
|
20
|
+
RESOLUTION_DURATION_PRICING,
|
|
21
|
+
PRICING_DEFAULT_RESOLUTION,
|
|
22
|
+
NATIVE_ADAPTIVE_ASPECT,
|
|
23
|
+
VIDEO_REF_AUDIO_RULES,
|
|
24
|
+
checkRefAudioRules,
|
|
25
|
+
resolveVideoModeForInputs,
|
|
26
|
+
videoProviderFoldsLoneEndFrame,
|
|
27
|
+
GVP_EXTEND_PROVIDERS,
|
|
28
|
+
} from "../model-constants.js"
|
|
29
|
+
import { buildVideoCreditModelIdentifier, videoGenerationCreditId } from "../credit-identifiers.js"
|
|
30
|
+
import { uiDurationFill, uiResolutionFill } from "../video-ui-defaults.js"
|
|
31
|
+
|
|
32
|
+
const ID = "vidu-q4"
|
|
33
|
+
const DURATIONS_3_TO_16 = Array.from({ length: 14 }, (_, i) => i + 3)
|
|
34
|
+
const RESOLUTIONS = ["540p", "720p", "1080p", "2k", "4k"] as const
|
|
35
|
+
|
|
36
|
+
describe("vidu-q4 catalog", () => {
|
|
37
|
+
const entry = MODEL_CATALOG[ID]!
|
|
38
|
+
|
|
39
|
+
it("is ONE i2v-only id made by ShengShu (no t2v mode exists on KIE)", () => {
|
|
40
|
+
expect(entry.kind).toBe("video")
|
|
41
|
+
expect([...entry.modes]).toEqual(["i2v"])
|
|
42
|
+
expect(entry.label).toBe("Vidu Q4")
|
|
43
|
+
expect(entry.series).toBe("Vidu")
|
|
44
|
+
expect(entry.maker).toBe("shengshu")
|
|
45
|
+
expect(MODEL_MAKERS.shengshu.name).toBe("ShengShu")
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it("lists resolutions ASCENDING with lowercase 2k/4k; the 720p default is declared, not index 0", () => {
|
|
49
|
+
expect(entry.resolutions).toEqual([...RESOLUTIONS])
|
|
50
|
+
expect(PRICING_DEFAULT_RESOLUTION[ID]).toBe("720p")
|
|
51
|
+
expect(VIDU_Q4_DEFAULT_RESOLUTION).toBe("720p")
|
|
52
|
+
expect(entry.unlistedResolutionRendersAs).toBe("720p")
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
it("offers every integer second 3-16 with a 5s default", () => {
|
|
56
|
+
expect(entry.durations).toEqual(DURATIONS_3_TO_16)
|
|
57
|
+
expect(entry.defaultDuration).toBe(5)
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
it("carries the reference-to-video ratio enum and takes no seed", () => {
|
|
61
|
+
expect(entry.aspectRatios).toEqual(["16:9", "9:16", "1:1", "4:3", "3:4"])
|
|
62
|
+
expect(entry.noSeed).toBe(true)
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
it("declares audio + reference-image + reference-to-video, and NOT end-frame or video-reference", () => {
|
|
66
|
+
// reference-to-video: the reference endpoint runs from reference images
|
|
67
|
+
// alone (no start frame), so a references-only run is never image-gated.
|
|
68
|
+
expect([...(entry.features ?? [])].sort()).toEqual(["audio", "reference-image", "reference-to-video"])
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
describe("vidu-q4 capability sets", () => {
|
|
73
|
+
it("is in both route enums and image-gated on the t2v route", () => {
|
|
74
|
+
expect(IMAGE_TO_VIDEO_PROVIDERS as readonly string[]).toContain(ID)
|
|
75
|
+
expect(TEXT_TO_VIDEO_PROVIDERS as readonly string[]).toContain(ID)
|
|
76
|
+
expect(VIDEO_PROVIDERS_REQUIRING_IMAGE.has(ID)).toBe(true)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it("routes a start frame to image-to-video and a prompt-only run to the gated t2v lane", () => {
|
|
80
|
+
expect(resolveVideoModeForInputs(ID, { hasStartFrame: true, hasImageRefs: false })).toBe("image-to-video")
|
|
81
|
+
expect(resolveVideoModeForInputs(ID, { hasStartFrame: true, hasImageRefs: true })).toBe("image-to-video")
|
|
82
|
+
expect(resolveVideoModeForInputs(ID, { hasStartFrame: false, hasImageRefs: false })).toBe("text-to-video")
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
it("has no home for a lone end frame (no fold into the references)", () => {
|
|
86
|
+
expect(videoProviderFoldsLoneEndFrame(ID)).toBe(false)
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
it("carries 15 reference images and 3 reference audio clips, no reference videos", () => {
|
|
90
|
+
expect(VIDEO_REF_LIMITS_BY_PROVIDER[ID]).toEqual({ images: 15, audio: 3 })
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
it("audio: ambient behind the model's own `audio` boolean, default on, not cost-affecting", () => {
|
|
94
|
+
expect(getVideoAudioCapability(ID)).toEqual({ mode: "ambient", field: "audio", defaultOn: true })
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
it("keeps the historical 16:9 aspect default (no adaptive token on its enum)", () => {
|
|
98
|
+
expect(defaultVideoAspectRatio(ID)).toBe("16:9")
|
|
99
|
+
expect(NATIVE_ADAPTIVE_ASPECT[ID]).toBeUndefined()
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
it("prompt cap is the documented 20000 chars", () => {
|
|
103
|
+
expect(getMaxVideoPromptChars(ID)).toBe(20000)
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
it("is a family of its own", () => {
|
|
107
|
+
expect([...VIDU_Q4_PROVIDERS]).toEqual([ID])
|
|
108
|
+
expect(isViduQ4Provider(ID)).toBe(true)
|
|
109
|
+
expect(isViduQ4Provider("vidu")).toBe(false)
|
|
110
|
+
expect(isViduQ4Provider(undefined)).toBe(false)
|
|
111
|
+
expect(isWan3Provider(ID) || isSeedance2Provider(ID) || isMinimaxH3Provider(ID)).toBe(false)
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
it("renders keyframes only in generate-video-pro (no video-reference feature)", () => {
|
|
115
|
+
expect(GVP_EXTEND_PROVIDERS as readonly string[]).not.toContain(ID)
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
it("fills the 720p / 5s defaults rather than the ladder's first rung", () => {
|
|
119
|
+
expect(uiResolutionFill(ID)).toBe("720p")
|
|
120
|
+
expect(uiDurationFill(ID)).toBe(5)
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
describe("normalizeViduQ4Resolution", () => {
|
|
125
|
+
it("keeps every supported tier, case-insensitively, in the lowercase wire spelling", () => {
|
|
126
|
+
for (const r of RESOLUTIONS) {
|
|
127
|
+
expect(normalizeViduQ4Resolution(r)).toBe(r)
|
|
128
|
+
expect(normalizeViduQ4Resolution(r.toUpperCase())).toBe(r)
|
|
129
|
+
}
|
|
130
|
+
expect(normalizeViduQ4Resolution(" 2K ")).toBe("2k")
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
it("collapses undefined / garbage / an off-menu tier to the 720p default", () => {
|
|
134
|
+
for (const v of [undefined, "", "480p", "8k", "nonsense"]) {
|
|
135
|
+
expect(normalizeViduQ4Resolution(v)).toBe("720p")
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
it("the catalog funnel canonicalises an uppercase 2K/4K to the lowercase band", () => {
|
|
140
|
+
expect(normalizeVideoRequestParams(ID, { resolution: "4K" }).resolution).toBe("4k")
|
|
141
|
+
expect(normalizeVideoRequestParams(ID, { resolution: "2K" }).resolution).toBe("2k")
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
describe("vidu-q4 credit identifier", () => {
|
|
146
|
+
it("is duration-priced with one tier per allowed second 3-16", () => {
|
|
147
|
+
expect(DURATION_PRICED_PROVIDERS.has(ID)).toBe(true)
|
|
148
|
+
expect(VIDEO_DURATION_TIERS[ID]!.map((t) => t.maxSeconds)).toEqual(DURATIONS_3_TO_16)
|
|
149
|
+
expect(RESOLUTION_DURATION_PRICING[ID]).toEqual([...RESOLUTIONS])
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
it("emits exactly one composite per (duration, resolution) pair — 70 distinct ids", () => {
|
|
153
|
+
const ids = new Set<string>()
|
|
154
|
+
for (const d of DURATIONS_3_TO_16) {
|
|
155
|
+
for (const r of RESOLUTIONS) {
|
|
156
|
+
const id = buildVideoCreditModelIdentifier(ID, d, undefined, "image-to-video", undefined, r)
|
|
157
|
+
expect(id).toBe(`${ID}:${d}s:${r}`)
|
|
158
|
+
ids.add(id)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
expect(ids.size).toBe(70)
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
it("prices an OMITTED resolution and duration at the declared 5s 720p default", () => {
|
|
165
|
+
expect(buildVideoCreditModelIdentifier(ID, undefined, undefined, "image-to-video")).toBe("vidu-q4:5s:720p")
|
|
166
|
+
expect(videoGenerationCreditId({ provider: ID })).toBe("vidu-q4:5s:720p")
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
it("bills the tier it RENDERS for every spelling, and 720p for anything unknown", () => {
|
|
170
|
+
expect(buildVideoCreditModelIdentifier(ID, 8, undefined, "image-to-video", undefined, "4K")).toBe("vidu-q4:8s:4k")
|
|
171
|
+
expect(buildVideoCreditModelIdentifier(ID, 8, undefined, "image-to-video", undefined, "480p")).toBe("vidu-q4:8s:720p")
|
|
172
|
+
expect(buildVideoCreditModelIdentifier(ID, 8, undefined, "image-to-video", undefined, "nonsense")).toBe("vidu-q4:8s:720p")
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
it("has no audio and no reference dimension — one ladder for both endpoints", () => {
|
|
176
|
+
const plain = buildVideoCreditModelIdentifier(ID, 6, undefined, "image-to-video", undefined, "1080p")
|
|
177
|
+
expect(buildVideoCreditModelIdentifier(ID, 6, true, "image-to-video", undefined, "1080p")).toBe(plain)
|
|
178
|
+
expect(buildVideoCreditModelIdentifier(ID, 6, false, "image-to-video", undefined, "1080p")).toBe(plain)
|
|
179
|
+
expect(buildVideoCreditModelIdentifier(ID, 6, undefined, "image-to-video", undefined, "1080p", true)).toBe(plain)
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
it("snaps an off-menu duration into a seeded tier", () => {
|
|
183
|
+
expect(buildVideoCreditModelIdentifier(ID, 2, undefined, "image-to-video", undefined, "720p")).toBe("vidu-q4:3s:720p")
|
|
184
|
+
expect(buildVideoCreditModelIdentifier(ID, 40, undefined, "image-to-video", undefined, "720p")).toBe("vidu-q4:16s:720p")
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
it("every catalog pricing row is an id the builder can emit (or the bare default)", () => {
|
|
188
|
+
const emittable = new Set<string>([ID])
|
|
189
|
+
for (const d of DURATIONS_3_TO_16) for (const r of RESOLUTIONS) emittable.add(`${ID}:${d}s:${r}`)
|
|
190
|
+
for (const row of MODEL_CATALOG[ID]!.pricing) expect(emittable.has(row.identifier), row.identifier).toBe(true)
|
|
191
|
+
})
|
|
192
|
+
})
|
|
193
|
+
|
|
194
|
+
describe("vidu-q4 reference-audio rules", () => {
|
|
195
|
+
it("declares MP3-only clips of 3-12 seconds", () => {
|
|
196
|
+
expect(VIDEO_REF_AUDIO_RULES[ID]).toEqual({ formats: ["mp3"], minSec: 3, maxSec: 12 })
|
|
197
|
+
})
|
|
198
|
+
|
|
199
|
+
it("accepts MP3 clips inside the window", () => {
|
|
200
|
+
expect(checkRefAudioRules(ID, [{ formatNames: ["mp3"], durationSec: 3 }, { formatNames: ["mp3"], durationSec: 12 }])).toEqual({ ok: true })
|
|
201
|
+
})
|
|
202
|
+
|
|
203
|
+
it("refuses a non-MP3 clip with the format code", () => {
|
|
204
|
+
const r = checkRefAudioRules(ID, [{ formatNames: ["mp3"], durationSec: 5 }, { formatNames: ["wav"], durationSec: 5 }])
|
|
205
|
+
expect(r.ok).toBe(false)
|
|
206
|
+
if (!r.ok) {
|
|
207
|
+
expect(r.code).toBe("audio_format_unsupported")
|
|
208
|
+
expect(r.message).toContain("Reference audio 2")
|
|
209
|
+
expect(r.message).toContain("MP3")
|
|
210
|
+
}
|
|
211
|
+
const m4a = checkRefAudioRules(ID, [{ formatNames: ["mov", "mp4", "m4a", "3gp", "3g2", "mj2"], durationSec: 5 }])
|
|
212
|
+
expect(m4a.ok).toBe(false)
|
|
213
|
+
})
|
|
214
|
+
|
|
215
|
+
it("refuses a clip outside 3-12 seconds", () => {
|
|
216
|
+
const short = checkRefAudioRules(ID, [{ formatNames: ["mp3"], durationSec: 2.5 }])
|
|
217
|
+
expect(short.ok === false && short.code).toBe("audio_too_short")
|
|
218
|
+
const long = checkRefAudioRules(ID, [{ formatNames: ["mp3"], durationSec: 12.4 }])
|
|
219
|
+
expect(long.ok === false && long.code).toBe("audio_too_long")
|
|
220
|
+
})
|
|
221
|
+
|
|
222
|
+
it("ignores whatever a probe could not read — a blip never blocks a run", () => {
|
|
223
|
+
expect(checkRefAudioRules(ID, [{}, { durationSec: Number.NaN }, { formatNames: [] }])).toEqual({ ok: true })
|
|
224
|
+
})
|
|
225
|
+
|
|
226
|
+
it("is a no-op for a provider with no declared rule", () => {
|
|
227
|
+
expect(checkRefAudioRules("wan-3", [{ formatNames: ["wav"], durationSec: 1 }])).toEqual({ ok: true })
|
|
228
|
+
expect(checkRefAudioRules(undefined, [{ formatNames: ["wav"] }])).toEqual({ ok: true })
|
|
229
|
+
})
|
|
230
|
+
})
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* and pre-fill the speaker table. Pure, no I/O.
|
|
6
6
|
*/
|
|
7
7
|
import { normalizeTranscript } from "./edl.js"
|
|
8
|
+
import { speakerMapByOrdinal, speakerMapResultOf } from "./speaker-map-contract.js"
|
|
8
9
|
|
|
9
10
|
/** The settings and their decided defaults (the plugin holds its own copy, D13). */
|
|
10
11
|
export const CAMERA_SWITCH_DEFAULTS = Object.freeze({
|
|
@@ -135,6 +136,10 @@ export function defaultSpeakerMap(
|
|
|
135
136
|
* settings and the same pre-filled speaker table. */
|
|
136
137
|
export interface CameraSwitchNodeSettings {
|
|
137
138
|
readonly speakerMap?: Readonly<Record<string, string>>
|
|
139
|
+
/** Who is on which camera by ordinal — "1" the first voice heard → a camera
|
|
140
|
+
* SOURCE id, "" none; what a use-case node's override writes (decided
|
|
141
|
+
* 2026-10-17). A label in `speakerMap` beats it. */
|
|
142
|
+
readonly speakerMapByOrder?: Readonly<Record<string, string>>
|
|
138
143
|
readonly speakerNames?: Readonly<Record<string, string>>
|
|
139
144
|
readonly minShotMs?: number
|
|
140
145
|
readonly leadMs?: number
|
|
@@ -142,10 +147,40 @@ export interface CameraSwitchNodeSettings {
|
|
|
142
147
|
readonly wideEvery?: number
|
|
143
148
|
readonly layoutHints?: boolean
|
|
144
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Who is on which camera — the ONE merge of the speaker table's layers
|
|
152
|
+
* (decided 2026-10-17). Per speaker, the first that names them wins: an
|
|
153
|
+
* explicit label in `speakerMap`, the ordinal override `speakerMapByOrder`, a
|
|
154
|
+
* wired Speaker Map result, then the order default (`defaultSpeakerMap`).
|
|
155
|
+
* Each layer above the default is passed as `existing`, so its "" (no camera
|
|
156
|
+
* of their own) is SENT as "" and is never re-filled by the order default; an
|
|
157
|
+
* explicit entry that is not a string is ignored, so it never hides a layer
|
|
158
|
+
* below it. `cameraSwitchSettingsPayload` sends this; the config panel's
|
|
159
|
+
* "What the run will use" shows this — never a second copy of the order.
|
|
160
|
+
*/
|
|
161
|
+
export function cameraSwitchSpeakerMap(
|
|
162
|
+
data: Pick<CameraSwitchNodeSettings, "speakerMap" | "speakerMapByOrder">,
|
|
163
|
+
edl: unknown,
|
|
164
|
+
transcript: unknown,
|
|
165
|
+
wired?: { readonly speakerMap?: unknown },
|
|
166
|
+
): Record<string, string> {
|
|
167
|
+
const labels = transcriptSpeakerLabels(transcript)
|
|
168
|
+
const explicit = data.speakerMap && typeof data.speakerMap === "object" && !Array.isArray(data.speakerMap)
|
|
169
|
+
? Object.fromEntries(Object.entries(data.speakerMap).filter(([, camera]) => typeof camera === "string"))
|
|
170
|
+
: {}
|
|
171
|
+
const existing = {
|
|
172
|
+
...(speakerMapResultOf(wired?.speakerMap)?.speakerMap ?? {}),
|
|
173
|
+
...speakerMapByOrdinal(labels, data.speakerMapByOrder),
|
|
174
|
+
...explicit,
|
|
175
|
+
}
|
|
176
|
+
return defaultSpeakerMap(labels, cameraSwitchCameras(edl).map((c) => c.id), existing)
|
|
177
|
+
}
|
|
178
|
+
|
|
145
179
|
export function cameraSwitchSettingsPayload(
|
|
146
180
|
data: CameraSwitchNodeSettings,
|
|
147
181
|
edl: unknown,
|
|
148
182
|
transcript: unknown,
|
|
183
|
+
wired?: { readonly speakerMap?: unknown },
|
|
149
184
|
): {
|
|
150
185
|
speakerMap: Record<string, string>
|
|
151
186
|
speakerNames: Record<string, string>
|
|
@@ -155,9 +190,8 @@ export function cameraSwitchSettingsPayload(
|
|
|
155
190
|
wideEvery?: number
|
|
156
191
|
layoutHints: boolean
|
|
157
192
|
} {
|
|
158
|
-
const existing = data.speakerMap && typeof data.speakerMap === "object" ? data.speakerMap : {}
|
|
159
193
|
const out: ReturnType<typeof cameraSwitchSettingsPayload> = {
|
|
160
|
-
speakerMap:
|
|
194
|
+
speakerMap: cameraSwitchSpeakerMap(data, edl, transcript, wired),
|
|
161
195
|
speakerNames: cleanSpeakerNames(data.speakerNames),
|
|
162
196
|
layoutHints: data.layoutHints === true,
|
|
163
197
|
}
|
package/src/component-types.ts
CHANGED
|
@@ -18,6 +18,15 @@ export interface ExposedSetting {
|
|
|
18
18
|
/** Full option list with labels for select fields (preferred over allowedValues). */
|
|
19
19
|
options?: Array<{ value: string; label: string }>
|
|
20
20
|
defaultValue: unknown
|
|
21
|
+
/**
|
|
22
|
+
* Set when the setting is one of the node's quick settings (the editor's bottom-bar levers): the node type,
|
|
23
|
+
* so the consuming workflow can render the same control, and the node's own lever values its choices depend
|
|
24
|
+
* on (its model, Draft, …), so the control offers what that model takes. Never prompts or results.
|
|
25
|
+
*/
|
|
26
|
+
quick?: {
|
|
27
|
+
nodeType: string
|
|
28
|
+
context?: Record<string, string | number | boolean>
|
|
29
|
+
}
|
|
21
30
|
}
|
|
22
31
|
|
|
23
32
|
export interface ComponentMetadata {
|
|
@@ -24,14 +24,16 @@ import {
|
|
|
24
24
|
isMinimaxH3Provider,
|
|
25
25
|
isGeminiOmniProvider,
|
|
26
26
|
isWan3Provider,
|
|
27
|
+
isViduQ4Provider,
|
|
27
28
|
normalizeMinimaxH3Resolution,
|
|
28
29
|
normalizeWan3Resolution,
|
|
30
|
+
normalizeViduQ4Resolution,
|
|
29
31
|
getVideoAudioCapability,
|
|
30
32
|
} from "./model-constants.js"
|
|
31
33
|
import { isFlux2Model, FLUX2_RES_MP, type Flux2Model } from "./flux2-pricing.js"
|
|
32
34
|
import { VIDEO_DURATION_AUTO } from "./video-duration-auto.js"
|
|
33
35
|
import { uiResolutionFill } from "./video-ui-defaults.js"
|
|
34
|
-
import { MODEL_CATALOG, autoAspectNeedsSourceImage, normalizeModelInput, defaultResolutionFor, type ModelInputAdjustment, type SourceImageSize } from "./model-catalog.js"
|
|
36
|
+
import { MODEL_CATALOG, autoAspectNeedsSourceImage, normalizeModelInput, normalizeVideoRequestParams, defaultResolutionFor, type ModelInputAdjustment, type SourceImageSize } from "./model-catalog.js"
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
39
|
* The megapixel tier a Flux 2 credit identifier is keyed on, for ANY incoming
|
|
@@ -335,6 +337,18 @@ function ltxPricedTier(
|
|
|
335
337
|
return { band, duration: dur }
|
|
336
338
|
}
|
|
337
339
|
|
|
340
|
+
/**
|
|
341
|
+
* The resolution a provider whose runner NORMALIZES the lever actually renders,
|
|
342
|
+
* in the lowercase spelling of its credit composites — billing collapses
|
|
343
|
+
* through the very normalizer the runner sends, so render == billed for every
|
|
344
|
+
* spelling. `undefined` passes through untouched for every other provider.
|
|
345
|
+
*/
|
|
346
|
+
function wireNormalizedResolution(provider: string, resolution: string | undefined): string | undefined {
|
|
347
|
+
if (isWan3Provider(provider)) return normalizeWan3Resolution(resolution).toLowerCase()
|
|
348
|
+
if (isViduQ4Provider(provider)) return normalizeViduQ4Resolution(resolution)
|
|
349
|
+
return resolution
|
|
350
|
+
}
|
|
351
|
+
|
|
338
352
|
export function buildVideoCreditModelIdentifier(
|
|
339
353
|
provider: string,
|
|
340
354
|
duration?: number | string,
|
|
@@ -476,12 +490,11 @@ export function buildVideoCreditModelIdentifier(
|
|
|
476
490
|
// the 720p row, a shortfall `commit_credits` (refund-only) can never collect.
|
|
477
491
|
// Collapsing through the SAME normalizer the runner uses makes render == billed
|
|
478
492
|
// by construction for every spelling, including garbage (→ the declared 720p).
|
|
479
|
-
// Scoped to the
|
|
480
|
-
// members pass `resolution` to
|
|
481
|
-
//
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
: resolution
|
|
493
|
+
// Scoped to the families whose runner normalizes on purpose (Wan 3.0, Vidu
|
|
494
|
+
// Q4): the other RESOLUTION_DURATION_PRICING members pass `resolution` to
|
|
495
|
+
// their wire verbatim, so case-folding their billing without probing their
|
|
496
|
+
// wire would reprice live models.
|
|
497
|
+
const requested = wireNormalizedResolution(effectiveProvider, resolution)
|
|
485
498
|
const res = requested && resTiers.includes(requested) ? requested : fallback
|
|
486
499
|
identifier += `:${res}`
|
|
487
500
|
}
|
|
@@ -499,6 +512,50 @@ export function buildVideoCreditModelIdentifier(
|
|
|
499
512
|
return identifier
|
|
500
513
|
}
|
|
501
514
|
|
|
515
|
+
/**
|
|
516
|
+
* The credit identifier a video GENERATION node is quoted at — Generate Video
|
|
517
|
+
* (and the legacy Image/Text to Video nodes) and the Video to Video Seedance
|
|
518
|
+
* edit lane, on every surface that quotes one: the node's cost pill, the
|
|
519
|
+
* editor's run estimate, the prompt modal and the backend pre-run estimator.
|
|
520
|
+
*
|
|
521
|
+
* It applies the request levers the run applies BEFORE it prices
|
|
522
|
+
* (payload-builder's `resolveVideoRequestNorm`): the model's UI resolution fill
|
|
523
|
+
* when the node names none (`uiResolutionFill` — what the run sends), then the
|
|
524
|
+
* catalog normalizer `normalizeVideoRequestParams`, which also owns the Seedance
|
|
525
|
+
* Draft rule (a draft is priced AND sent at 480p whatever resolution came with
|
|
526
|
+
* it). Without that, a node with no resolution was quoted at the identifier's
|
|
527
|
+
* own default band (720p on Seedance 2.5) while the run sent and reserved 480p.
|
|
528
|
+
*
|
|
529
|
+
* `hasVideoRef` must come from the GRAPH (a wired reference-video edge, e.g.
|
|
530
|
+
* `countRefModalityEdges(edges, id, "video") > 0`), never node data: nothing
|
|
531
|
+
* writes `referenceVideoUrls` into a video node, so reading it there always
|
|
532
|
+
* quoted the plain ladder for a run that reserves on the `-ref` one.
|
|
533
|
+
*/
|
|
534
|
+
export function videoGenerationCreditId(args: {
|
|
535
|
+
provider: string
|
|
536
|
+
duration?: number | string
|
|
537
|
+
sound?: boolean
|
|
538
|
+
nodeType?: "image-to-video" | "text-to-video"
|
|
539
|
+
mode?: string
|
|
540
|
+
resolution?: string
|
|
541
|
+
draft?: boolean
|
|
542
|
+
hasVideoRef?: boolean
|
|
543
|
+
}): string {
|
|
544
|
+
const { resolution } = normalizeVideoRequestParams(args.provider, {
|
|
545
|
+
resolution: args.resolution ?? uiResolutionFill(args.provider),
|
|
546
|
+
draft: args.draft === true,
|
|
547
|
+
})
|
|
548
|
+
return buildVideoCreditModelIdentifier(
|
|
549
|
+
args.provider,
|
|
550
|
+
args.duration,
|
|
551
|
+
args.sound,
|
|
552
|
+
args.nodeType ?? "image-to-video",
|
|
553
|
+
args.mode,
|
|
554
|
+
resolution,
|
|
555
|
+
args.hasVideoRef === true,
|
|
556
|
+
)
|
|
557
|
+
}
|
|
558
|
+
|
|
502
559
|
/**
|
|
503
560
|
* The credit identifier a Video to Video node's Seedance EDIT lane reserves
|
|
504
561
|
* under. Seedance has no v2v endpoint — the lane is a text-to-video job in edit
|
|
@@ -506,26 +563,27 @@ export function buildVideoCreditModelIdentifier(
|
|
|
506
563
|
* REFERENCE-VIDEO ladder at the model's LONGEST clip (Auto duration), and the
|
|
507
564
|
* measured settlement refunds down to what was actually delivered.
|
|
508
565
|
*
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
*
|
|
514
|
-
*
|
|
566
|
+
* A thin call into {@link videoGenerationCreditId}, so a Generate Video node
|
|
567
|
+
* making the same KIE call (Seedance, Auto, a wired reference video) is quoted
|
|
568
|
+
* the same id. FOUR surfaces must agree on it exactly: the orchestrator's
|
|
569
|
+
* reservation (payload-builder.ts), the backend pre-run estimator
|
|
570
|
+
* (ee/billing/credits.ts), the node's cost pill, and the frontend run-level
|
|
571
|
+
* estimate (config-panels/helpers.ts). A quote that disagrees with the reserve
|
|
572
|
+
* is the documented `price_not_configured` / blank-pill trap.
|
|
515
573
|
*
|
|
516
574
|
* `resolution` is the node's one `v2vResolution` field; when unset the model's
|
|
517
|
-
* own UI fill is priced, which is what the lane will send.
|
|
575
|
+
* own UI fill is priced, which is what the lane will send. `draft` is the
|
|
576
|
+
* node's Seedance Draft toggle (priced at 480p).
|
|
518
577
|
*/
|
|
519
|
-
export function seedanceVideoEditCreditId(provider: string, resolution?: string): string {
|
|
520
|
-
return
|
|
578
|
+
export function seedanceVideoEditCreditId(provider: string, resolution?: string, draft?: boolean): string {
|
|
579
|
+
return videoGenerationCreditId({
|
|
521
580
|
provider,
|
|
522
|
-
VIDEO_DURATION_AUTO,
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
)
|
|
581
|
+
duration: VIDEO_DURATION_AUTO,
|
|
582
|
+
nodeType: "text-to-video",
|
|
583
|
+
resolution,
|
|
584
|
+
draft,
|
|
585
|
+
hasVideoRef: true,
|
|
586
|
+
})
|
|
529
587
|
}
|
|
530
588
|
|
|
531
589
|
/** What the video credit identifier PRICES for a request, for the levers whose
|
|
@@ -74,6 +74,19 @@ export const CHARACTER_ATTACH_COLUMNS = [
|
|
|
74
74
|
] as const
|
|
75
75
|
export type CharacterAttachColumn = (typeof CHARACTER_ATTACH_COLUMNS)[number]
|
|
76
76
|
|
|
77
|
+
/**
|
|
78
|
+
* The narrower set `/v1/image-to-image`'s `attachToColumn` accepts (Character
|
|
79
|
+
* Studio refining an existing asset): the four refinable buckets. A subset of
|
|
80
|
+
* {@link CHARACTER_ATTACH_COLUMNS}, checked at compile time.
|
|
81
|
+
*/
|
|
82
|
+
export const IMAGE_TO_IMAGE_ATTACH_COLUMNS = [
|
|
83
|
+
"expressions",
|
|
84
|
+
"poses",
|
|
85
|
+
"angles",
|
|
86
|
+
"lighting_variations",
|
|
87
|
+
] as const satisfies readonly CharacterAttachColumn[]
|
|
88
|
+
export type ImageToImageAttachColumn = (typeof IMAGE_TO_IMAGE_ATTACH_COLUMNS)[number]
|
|
89
|
+
|
|
77
90
|
/**
|
|
78
91
|
* Canonical variant presets per character asset type — the SINGLE source of
|
|
79
92
|
* truth shared by the `generate-character-asset` route (Zod validation rejects a
|
package/src/entries/credits.ts
CHANGED
package/src/entries/edl.ts
CHANGED
|
@@ -37,6 +37,8 @@ export * from "../edl-multicam.js"
|
|
|
37
37
|
// Speaker tracks: the face-tracking result (box body + the node's descriptor) and its validators.
|
|
38
38
|
export * from "../speaker-tracks.js"
|
|
39
39
|
export * from "../camera-switch-contract.js"
|
|
40
|
+
// Speaker Map's result contract (which camera each speaker is on) and the override's ordinal keys.
|
|
41
|
+
export * from "../speaker-map-contract.js"
|
|
40
42
|
export * from "../edit-plan-contract.js"
|
|
41
43
|
// A person's review of an Edit Plan (`editedEdl`) and the one resolver that applies it.
|
|
42
44
|
export * from "../edit-plan-review.js"
|
|
@@ -13,6 +13,9 @@ export {
|
|
|
13
13
|
LLM_VENDOR_LABELS,
|
|
14
14
|
groupLlmModelsByVendor,
|
|
15
15
|
orderedLlmModels,
|
|
16
|
+
PICKABLE_LLM_MODELS,
|
|
17
|
+
pickableLlmModels,
|
|
18
|
+
isLlmModelRetired,
|
|
16
19
|
type LlmVendor,
|
|
17
20
|
type LlmModelGroup,
|
|
18
21
|
VIDEO_ANALYSIS_LLM_MODELS,
|
|
@@ -30,6 +33,7 @@ export {
|
|
|
30
33
|
isVideoAnalysisMixedTier,
|
|
31
34
|
resolveVideoAnalysisModel,
|
|
32
35
|
LLM_FEATURE_DEFAULTS,
|
|
36
|
+
DESCRIBE_TO_PICKER_FALLBACK_MODEL,
|
|
33
37
|
LLM_FEATURE_DEFAULT_EFFORTS,
|
|
34
38
|
defaultReasoningEffort,
|
|
35
39
|
LLM_MODALITY_CAPS,
|
|
@@ -39,6 +43,7 @@ export {
|
|
|
39
43
|
getLlmTier,
|
|
40
44
|
getLlmModalityCaps,
|
|
41
45
|
buildLlmCreditIdentifier,
|
|
46
|
+
llmCreditRung,
|
|
42
47
|
resolveLlmCreditId,
|
|
43
48
|
supportsAdvancedMode,
|
|
44
49
|
llmServesDirect,
|
package/src/entries/media.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type { LottieOverlayCatalogEntry } from "../lottie-overlay-catalog.js"
|
|
|
31
31
|
export * from "../audio-fx-presets.js"
|
|
32
32
|
export * from "../image-overlay-layers.js"
|
|
33
33
|
export * from "../video-mask.js"
|
|
34
|
+
export * from "../generate-mask.js"
|
|
34
35
|
export * from "../mask-composite.js"
|
|
35
36
|
export * from "../image-overlay-shapes.js"
|
|
36
37
|
export * from "../image-overlay-platforms.js"
|
|
@@ -13,6 +13,10 @@ export type { Flux2Model } from "../flux2-pricing.js"
|
|
|
13
13
|
export {
|
|
14
14
|
MODEL_CATALOG,
|
|
15
15
|
MODEL_RECOMMENDATIONS,
|
|
16
|
+
// The companies behind the models (`maker` on every entry; the wire's `maker`).
|
|
17
|
+
MODEL_MAKERS,
|
|
18
|
+
isModelMakerId,
|
|
19
|
+
modelMakerOf,
|
|
16
20
|
SPEECH_UNIT_PRICE_NOTE,
|
|
17
21
|
listModels,
|
|
18
22
|
groupByFamily,
|
|
@@ -48,6 +52,8 @@ export type {
|
|
|
48
52
|
NormalizedVideoRequest,
|
|
49
53
|
ModelCatalogEntry,
|
|
50
54
|
ModelKind,
|
|
55
|
+
ModelMaker,
|
|
56
|
+
ModelMakerId,
|
|
51
57
|
ModelMode,
|
|
52
58
|
ModelRecommendation,
|
|
53
59
|
ModelValidationIssue,
|
package/src/entries/models.ts
CHANGED
|
@@ -9,6 +9,10 @@ export {
|
|
|
9
9
|
CREDIT_BASE_USD,
|
|
10
10
|
IMAGE_PROMPT_MAX,
|
|
11
11
|
IMAGE_ASPECT_RATIO_VALUES,
|
|
12
|
+
IMAGE_RESOLUTION_VALUES,
|
|
13
|
+
IMAGE_QUALITY_VALUES,
|
|
14
|
+
IMAGE_RENDERING_SPEED_VALUES,
|
|
15
|
+
IMAGE_EDIT_TARGET_RESOLUTION_VALUES,
|
|
12
16
|
MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER,
|
|
13
17
|
getMaxImagePromptChars,
|
|
14
18
|
PROMPT_HARD_CEILING,
|
|
@@ -56,6 +60,7 @@ export {
|
|
|
56
60
|
IMAGE_I2I_PROVIDERS,
|
|
57
61
|
IMAGE_EDIT_PROVIDERS,
|
|
58
62
|
TASK_CHAINED_EDIT_PROVIDERS,
|
|
63
|
+
TASK_CHAINED_EDIT_PROVIDER_IDS,
|
|
59
64
|
IMAGE_TO_VIDEO_PROVIDERS,
|
|
60
65
|
TEXT_TO_VIDEO_PROVIDERS,
|
|
61
66
|
VIDEO_GEN_PROVIDERS,
|
|
@@ -131,6 +136,11 @@ export {
|
|
|
131
136
|
VIDEO_GEN_COLLAPSED_T2V_IDS,
|
|
132
137
|
resolveVideoProviderForMode,
|
|
133
138
|
resolveVideoModeForInputs,
|
|
139
|
+
videoProviderRunsFromReferences,
|
|
140
|
+
videoProviderReferenceSyntax,
|
|
141
|
+
videoProviderAppendsFrames,
|
|
142
|
+
videoProviderRefModeFrameSeats,
|
|
143
|
+
VIDEO_PROVIDERS_WITH_SEPARATE_FRAME_CHANNEL,
|
|
134
144
|
isSeedance2Provider,
|
|
135
145
|
MINIMAX_H3_PROVIDERS,
|
|
136
146
|
isMinimaxH3Provider,
|
|
@@ -140,6 +150,10 @@ export {
|
|
|
140
150
|
isWan3Provider,
|
|
141
151
|
WAN_3_DEFAULT_RESOLUTION,
|
|
142
152
|
normalizeWan3Resolution,
|
|
153
|
+
VIDU_Q4_PROVIDERS,
|
|
154
|
+
isViduQ4Provider,
|
|
155
|
+
VIDU_Q4_DEFAULT_RESOLUTION,
|
|
156
|
+
normalizeViduQ4Resolution,
|
|
143
157
|
GEMINI_OMNI_PROVIDERS,
|
|
144
158
|
isGeminiOmniProvider,
|
|
145
159
|
VIDEO_PROVIDERS_WITHOUT_DISPATCH,
|
|
@@ -170,6 +184,8 @@ export {
|
|
|
170
184
|
SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER,
|
|
171
185
|
seedance2AudioLimitSec,
|
|
172
186
|
findSeedance2AudioOverLimit,
|
|
187
|
+
VIDEO_REF_AUDIO_RULES,
|
|
188
|
+
checkRefAudioRules,
|
|
173
189
|
DEFAULT_VIDEO_PROVIDER,
|
|
174
190
|
DEFAULT_VIDEO_DURATION_SEC,
|
|
175
191
|
applyDefaultVideoSelection,
|
|
@@ -183,6 +199,11 @@ export {
|
|
|
183
199
|
} from "../model-constants.js"
|
|
184
200
|
export type {
|
|
185
201
|
ImageAspectRatio,
|
|
202
|
+
ImageResolution,
|
|
203
|
+
ImageQuality,
|
|
204
|
+
ImageRenderingSpeed,
|
|
205
|
+
ImageEditTargetResolution,
|
|
206
|
+
TaskChainedEditProvider,
|
|
186
207
|
ImageGenProvider,
|
|
187
208
|
ImageMaskMode,
|
|
188
209
|
ImageI2IProvider,
|
|
@@ -224,6 +245,10 @@ export type {
|
|
|
224
245
|
GvpAnchorChoice,
|
|
225
246
|
GvpAnchorWireMode,
|
|
226
247
|
RefVideoDurationLimit,
|
|
248
|
+
RefAudioRule,
|
|
249
|
+
RefAudioProbe,
|
|
250
|
+
RefAudioCheck,
|
|
251
|
+
VideoReferenceSyntax,
|
|
227
252
|
} from "../model-constants.js"
|
|
228
253
|
export { GEMINI_OMNI_VOICE_PRESETS, GEMINI_OMNI_VOICE_PRESET_IDS } from "../gemini-omni-voices.js"
|
|
229
254
|
export type { GeminiOmniVoicePreset, GeminiOmniVoicePresetId } from "../gemini-omni-voices.js"
|
package/src/entries/nodes.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@nodaro/shared/nodes` — Per-node-type rules: producer types, handle aliases, render nodes, JSON kinds, preview/render-final, settings inputs, node presets, collections.
|
|
2
|
+
* `@nodaro/shared/nodes` — Per-node-type rules: producer types, use-case node types, handle aliases, render nodes, JSON kinds, preview/render-final, settings inputs, node presets, collections.
|
|
3
3
|
*
|
|
4
4
|
* One of the package's subpath entries (see `src/index.ts`). The root
|
|
5
5
|
* re-exports every entry, so each name here is also importable from
|
|
@@ -99,6 +99,7 @@ export {
|
|
|
99
99
|
type SavedRenderQualityStamp,
|
|
100
100
|
type SavedRenderStampReader,
|
|
101
101
|
} from "../preview-gate.js"
|
|
102
|
+
export { USE_CASE_NODE_TYPES, isUseCaseNodeType, type UseCaseNodeType } from "../use-case-types.js"
|
|
102
103
|
export {
|
|
103
104
|
CONTINUATION_NOT_FOUND,
|
|
104
105
|
CONTINUATION_WORKFLOW_MISMATCH,
|
|
@@ -107,9 +108,12 @@ export {
|
|
|
107
108
|
CONTINUATION_SUBSET_REQUIRED,
|
|
108
109
|
CONTINUATION_NOT_FAILED,
|
|
109
110
|
CONTINUATION_SUPERSEDED,
|
|
111
|
+
CONTINUATION_PREVIEW_PENDING,
|
|
110
112
|
CONTINUATION_SETTLING,
|
|
111
113
|
RENDER_FINAL_ALREADY_RENDERED,
|
|
112
114
|
RENDER_FINAL_ALREADY_RENDERED_MESSAGE,
|
|
115
|
+
USE_CASE_NOTHING_KEPT,
|
|
116
|
+
USE_CASE_NOTHING_KEPT_MESSAGE,
|
|
113
117
|
RUN_CONTINUATION_CODES,
|
|
114
118
|
type RunContinuationCode,
|
|
115
119
|
} from "../run-continuation.js"
|