@nodaro/shared 3.35.0 → 3.37.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-RUKFN3LJ.cjs → chunk-33QG2DOW.cjs} +6 -6
- package/dist/{chunk-RUKFN3LJ.cjs.map → chunk-33QG2DOW.cjs.map} +1 -1
- package/dist/{chunk-FKQJYMCO.js → chunk-4XI6B4RU.js} +25 -13
- package/dist/chunk-4XI6B4RU.js.map +1 -0
- package/dist/{chunk-XS7FI4JA.js → chunk-5OED47LE.js} +3 -3
- package/dist/{chunk-XS7FI4JA.js.map → chunk-5OED47LE.js.map} +1 -1
- package/dist/{chunk-GZH2SIOF.cjs → chunk-5PCI6M44.cjs} +18 -6
- package/dist/chunk-5PCI6M44.cjs.map +1 -0
- package/dist/chunk-6Q4BS6AR.js +158 -0
- package/dist/chunk-6Q4BS6AR.js.map +1 -0
- package/dist/{chunk-IRUPCNW2.cjs → chunk-6Y66YM4M.cjs} +46 -46
- package/dist/{chunk-IRUPCNW2.cjs.map → chunk-6Y66YM4M.cjs.map} +1 -1
- package/dist/{chunk-F4ZT5X2S.cjs → chunk-75ZMA34U.cjs} +11 -11
- package/dist/{chunk-F4ZT5X2S.cjs.map → chunk-75ZMA34U.cjs.map} +1 -1
- package/dist/{chunk-5VNBQ4QK.cjs → chunk-7Q75OZBL.cjs} +16 -16
- package/dist/{chunk-5VNBQ4QK.cjs.map → chunk-7Q75OZBL.cjs.map} +1 -1
- package/dist/{chunk-ETXUOETU.js → chunk-7QITUDRT.js} +5 -5
- package/dist/{chunk-ETXUOETU.js.map → chunk-7QITUDRT.js.map} +1 -1
- package/dist/{chunk-2QWNPYDG.js → chunk-AZBIXGM5.js} +3 -3
- package/dist/{chunk-2QWNPYDG.js.map → chunk-AZBIXGM5.js.map} +1 -1
- package/dist/{chunk-A5Z3IMSJ.cjs → chunk-BYP62B7F.cjs} +6 -6
- package/dist/{chunk-A5Z3IMSJ.cjs.map → chunk-BYP62B7F.cjs.map} +1 -1
- package/dist/{chunk-GRIMIJJ3.js → chunk-CMH2ACOX.js} +3 -3
- package/dist/{chunk-GRIMIJJ3.js.map → chunk-CMH2ACOX.js.map} +1 -1
- package/dist/{chunk-TCBHVIMD.js → chunk-CQJYKSXF.js} +18 -6
- package/dist/chunk-CQJYKSXF.js.map +1 -0
- package/dist/chunk-DBD4BCGH.cjs +169 -0
- package/dist/chunk-DBD4BCGH.cjs.map +1 -0
- package/dist/{chunk-NWXB4F6D.cjs → chunk-DE3PEIIP.cjs} +21 -21
- package/dist/{chunk-NWXB4F6D.cjs.map → chunk-DE3PEIIP.cjs.map} +1 -1
- package/dist/{chunk-IJNQYMN7.js → chunk-DKTRVOU5.js} +4 -4
- package/dist/{chunk-IJNQYMN7.js.map → chunk-DKTRVOU5.js.map} +1 -1
- package/dist/{chunk-XE5PE54B.cjs → chunk-ENFBA33M.cjs} +27 -27
- package/dist/{chunk-XE5PE54B.cjs.map → chunk-ENFBA33M.cjs.map} +1 -1
- package/dist/{chunk-BBLE4UTG.cjs → chunk-GLON7ANZ.cjs} +48 -15
- package/dist/chunk-GLON7ANZ.cjs.map +1 -0
- package/dist/{chunk-XJOBMAWW.js → chunk-GW54ANCH.js} +3 -3
- package/dist/{chunk-XJOBMAWW.js.map → chunk-GW54ANCH.js.map} +1 -1
- package/dist/{chunk-3YG3MYDE.cjs → chunk-HABDAHZR.cjs} +21 -21
- package/dist/{chunk-3YG3MYDE.cjs.map → chunk-HABDAHZR.cjs.map} +1 -1
- package/dist/{chunk-JSGIEF6Z.cjs → chunk-HSJU5KNR.cjs} +6 -3
- package/dist/chunk-HSJU5KNR.cjs.map +1 -0
- package/dist/{chunk-Q4ZXDDWA.js → chunk-IIGKJYWL.js} +3 -3
- package/dist/{chunk-Q4ZXDDWA.js.map → chunk-IIGKJYWL.js.map} +1 -1
- package/dist/{chunk-YD3JA36S.cjs → chunk-JABZNRXL.cjs} +4 -4
- package/dist/{chunk-YD3JA36S.cjs.map → chunk-JABZNRXL.cjs.map} +1 -1
- package/dist/{chunk-72IFMNJE.cjs → chunk-JLKZEKQ3.cjs} +71 -54
- package/dist/chunk-JLKZEKQ3.cjs.map +1 -0
- package/dist/{chunk-GVHBHUFV.js → chunk-JMUHMLJP.js} +5 -5
- package/dist/{chunk-GVHBHUFV.js.map → chunk-JMUHMLJP.js.map} +1 -1
- package/dist/{chunk-5ZCXWA7J.cjs → chunk-KOP7UTQR.cjs} +15 -2
- package/dist/chunk-KOP7UTQR.cjs.map +1 -0
- package/dist/{chunk-2HVFF5SS.js → chunk-L6HS52BV.js} +3 -3
- package/dist/{chunk-2HVFF5SS.js.map → chunk-L6HS52BV.js.map} +1 -1
- package/dist/{chunk-V3N56Z2S.cjs → chunk-M6JHRWVY.cjs} +27 -12
- package/dist/chunk-M6JHRWVY.cjs.map +1 -0
- package/dist/{chunk-AGEZY4LL.cjs → chunk-MSDECC3A.cjs} +42 -42
- package/dist/{chunk-AGEZY4LL.cjs.map → chunk-MSDECC3A.cjs.map} +1 -1
- package/dist/{chunk-B7WJJHJS.cjs → chunk-MSIIC6MY.cjs} +4 -4
- package/dist/{chunk-B7WJJHJS.cjs.map → chunk-MSIIC6MY.cjs.map} +1 -1
- package/dist/{chunk-AWWOQH46.cjs → chunk-NARVPCWW.cjs} +6 -6
- package/dist/{chunk-AWWOQH46.cjs.map → chunk-NARVPCWW.cjs.map} +1 -1
- package/dist/{chunk-RRI5YBUK.js → chunk-QXTCIJP5.js} +3 -3
- package/dist/{chunk-RRI5YBUK.js.map → chunk-QXTCIJP5.js.map} +1 -1
- package/dist/{chunk-ANOQWAMU.js → chunk-R6B2UDFR.js} +35 -5
- package/dist/chunk-R6B2UDFR.js.map +1 -0
- package/dist/{chunk-ZXBSARZX.js → chunk-SPP6HQMM.js} +4 -4
- package/dist/{chunk-ZXBSARZX.js.map → chunk-SPP6HQMM.js.map} +1 -1
- package/dist/{chunk-MUA5L25B.js → chunk-VRLRPGO7.js} +3 -3
- package/dist/{chunk-MUA5L25B.js.map → chunk-VRLRPGO7.js.map} +1 -1
- package/dist/{chunk-QIIG2QDP.cjs → chunk-VRUN5TG2.cjs} +8 -8
- package/dist/{chunk-QIIG2QDP.cjs.map → chunk-VRUN5TG2.cjs.map} +1 -1
- package/dist/{chunk-QXW6O56Z.js → chunk-W4GABGRD.js} +4 -4
- package/dist/{chunk-QXW6O56Z.js.map → chunk-W4GABGRD.js.map} +1 -1
- package/dist/{chunk-MEN7VLQ5.js → chunk-WD6AJ533.js} +5 -5
- package/dist/{chunk-MEN7VLQ5.js.map → chunk-WD6AJ533.js.map} +1 -1
- package/dist/{chunk-XNISPHTZ.js → chunk-WPT5ZTA2.js} +6 -3
- package/dist/chunk-WPT5ZTA2.js.map +1 -0
- package/dist/{chunk-LJMNCSDG.js → chunk-XA53RUSD.js} +27 -11
- package/dist/chunk-XA53RUSD.js.map +1 -0
- package/dist/chunk-XJ3HJSO5.cjs +25 -0
- package/dist/{chunk-YYODFQEU.cjs.map → chunk-XJ3HJSO5.cjs.map} +1 -1
- package/dist/{chunk-PVVO23LZ.js → chunk-YHCG3HOR.js} +3 -3
- package/dist/{chunk-PVVO23LZ.js.map → chunk-YHCG3HOR.js.map} +1 -1
- package/dist/{chunk-24ZKPE33.cjs → chunk-YNJ44IAL.cjs} +5 -5
- package/dist/{chunk-24ZKPE33.cjs.map → chunk-YNJ44IAL.cjs.map} +1 -1
- package/dist/{chunk-GHBXS5RT.cjs → chunk-YSEM7JDE.cjs} +4 -4
- package/dist/{chunk-GHBXS5RT.cjs.map → chunk-YSEM7JDE.cjs.map} +1 -1
- package/dist/{chunk-W36WCZS2.js → chunk-YVKUCBY2.js} +6 -6
- package/dist/{chunk-W36WCZS2.js.map → chunk-YVKUCBY2.js.map} +1 -1
- package/dist/{chunk-GKJRNIP4.js → chunk-ZG4XSEZV.js} +15 -2
- package/dist/chunk-ZG4XSEZV.js.map +1 -0
- package/dist/entries/apps.cjs +43 -43
- package/dist/entries/apps.js +8 -8
- package/dist/entries/credits.cjs +153 -153
- package/dist/entries/credits.d.cts +1 -1
- package/dist/entries/credits.d.ts +1 -1
- package/dist/entries/credits.js +8 -8
- package/dist/entries/llm-models.cjs +60 -48
- package/dist/entries/llm-models.d.cts +45 -14
- package/dist/entries/llm-models.d.ts +45 -14
- package/dist/entries/llm-models.js +1 -1
- package/dist/entries/model-catalog.cjs +66 -66
- 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 +267 -226
- package/dist/entries/models.d.cts +58 -2
- package/dist/entries/models.d.ts +58 -2
- package/dist/entries/models.js +6 -5
- package/dist/entries/nodes.cjs +212 -207
- package/dist/entries/nodes.d.cts +20 -3
- package/dist/entries/nodes.d.ts +20 -3
- package/dist/entries/nodes.js +11 -10
- package/dist/entries/pipeline.cjs +149 -149
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/social.cjs +174 -174
- package/dist/entries/social.js +2 -2
- 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.js +4 -4
- package/dist/entries/workflow.cjs +157 -144
- package/dist/entries/workflow.d.cts +49 -1
- package/dist/entries/workflow.d.ts +49 -1
- package/dist/entries/workflow.js +4 -3
- package/dist/index.cjs +1435 -1366
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +23 -22
- package/dist/{model-catalog-VIHGmQL2.d.ts → model-catalog-I48SvalA.d.cts} +3 -0
- package/dist/{model-catalog-VIHGmQL2.d.cts → model-catalog-I48SvalA.d.ts} +3 -0
- package/package.json +1 -1
- package/src/__tests__/llm-models.test.ts +61 -18
- package/src/__tests__/node-preset-extract.test.ts +10 -0
- package/src/__tests__/node-runtime-keys.test.ts +21 -2
- package/src/__tests__/render-output.test.ts +64 -0
- package/src/__tests__/schedule-retry.test.ts +35 -0
- package/src/__tests__/suno-separate.test.ts +78 -0
- package/src/__tests__/video-catalog-totality.test.ts +15 -1
- package/src/entries/llm-models.ts +3 -0
- package/src/entries/models.ts +19 -0
- package/src/entries/workflow.ts +6 -0
- package/src/generated/unit-contracts.ts +8 -2
- package/src/llm-models.ts +63 -23
- package/src/model-catalog.ts +13 -0
- package/src/node-preset-extract.ts +4 -0
- package/src/node-runtime-keys.ts +7 -0
- package/src/render-output.ts +36 -1
- package/src/schedule-retry.ts +71 -0
- package/src/suno-separate.ts +210 -0
- package/dist/chunk-5ZCXWA7J.cjs.map +0 -1
- package/dist/chunk-72IFMNJE.cjs.map +0 -1
- package/dist/chunk-ANOQWAMU.js.map +0 -1
- package/dist/chunk-BBLE4UTG.cjs.map +0 -1
- package/dist/chunk-FKQJYMCO.js.map +0 -1
- package/dist/chunk-GKJRNIP4.js.map +0 -1
- package/dist/chunk-GZH2SIOF.cjs.map +0 -1
- package/dist/chunk-JSGIEF6Z.cjs.map +0 -1
- package/dist/chunk-LJMNCSDG.js.map +0 -1
- package/dist/chunk-TCBHVIMD.js.map +0 -1
- package/dist/chunk-V3N56Z2S.cjs.map +0 -1
- package/dist/chunk-XNISPHTZ.js.map +0 -1
- package/dist/chunk-YYODFQEU.cjs +0 -25
|
@@ -3,6 +3,9 @@ import {
|
|
|
3
3
|
LLM_MODEL_IDS,
|
|
4
4
|
LLM_FEATURE_DEFAULTS,
|
|
5
5
|
DESCRIBE_TO_PICKER_FALLBACK_MODEL,
|
|
6
|
+
DESCRIBE_TO_PICKER_MODELS,
|
|
7
|
+
DESCRIBE_TO_PICKER_WITHHELD_MODELS,
|
|
8
|
+
LLM_STRUCTURED_WITHHELD_MODELS,
|
|
6
9
|
LLM_FEATURE_DEFAULT_EFFORTS,
|
|
7
10
|
defaultReasoningEffort,
|
|
8
11
|
STRUCTURED_VISION_MODELS,
|
|
@@ -475,11 +478,16 @@ describe("LLM_FEATURE_DEFAULTS", () => {
|
|
|
475
478
|
}
|
|
476
479
|
})
|
|
477
480
|
|
|
478
|
-
it('"describe-to-picker" defaults to "
|
|
479
|
-
expect(LLM_FEATURE_DEFAULTS["describe-to-picker"]).toBe("
|
|
480
|
-
expect(getLlmTier(LLM_FEATURE_DEFAULTS["describe-to-picker"])).toBe("
|
|
481
|
-
// The default MUST be an accepted analyzer model (vision + structured output).
|
|
482
|
-
expect(
|
|
481
|
+
it('"describe-to-picker" defaults to "gemini-3.8-flash" (economy vision; decided 2026-10-20 from a production cost audit)', () => {
|
|
482
|
+
expect(LLM_FEATURE_DEFAULTS["describe-to-picker"]).toBe("gemini-3.8-flash")
|
|
483
|
+
expect(getLlmTier(LLM_FEATURE_DEFAULTS["describe-to-picker"])).toBe("economy")
|
|
484
|
+
// The default MUST be an accepted analyzer model (vision + structured output, offered by the node).
|
|
485
|
+
expect(DESCRIBE_TO_PICKER_MODELS.map((m) => m.id)).toContain("gemini-3.8-flash")
|
|
486
|
+
// And it bills the cheapest rung on the aggregator: no effort, no direct lane.
|
|
487
|
+
const effort = defaultReasoningEffort("describe-to-picker", undefined)
|
|
488
|
+
expect(effort).toBeUndefined()
|
|
489
|
+
expect(llmServesDirect("gemini-3.8-flash", effort)).toBe(false)
|
|
490
|
+
expect(buildLlmCreditIdentifier("describe-to-picker", "gemini-3.8-flash", effort)).toBe("describe-to-picker:economy")
|
|
483
491
|
})
|
|
484
492
|
|
|
485
493
|
it("the describe-to-picker fallback is an accepted analyzer from another vendor, billed on the cheapest rung", () => {
|
|
@@ -521,19 +529,24 @@ describe("LLM_FEATURE_DEFAULTS", () => {
|
|
|
521
529
|
// defaultReasoningEffort — a feature's default effort rides its default model
|
|
522
530
|
// ---------------------------------------------------------------------------
|
|
523
531
|
describe("defaultReasoningEffort", () => {
|
|
524
|
-
it('"describe-to-picker" runs at "high"
|
|
525
|
-
expect(
|
|
532
|
+
it('"describe-to-picker" on Claude Opus 5.5 runs at "high" when named (the 2026-10-09 recipe stays with the model)', () => {
|
|
533
|
+
expect(LLM_FEATURE_DEFAULT_EFFORTS["describe-to-picker"]).toEqual({ model: "claude-opus-5.5", effort: "high" })
|
|
526
534
|
expect(defaultReasoningEffort("describe-to-picker", "claude-opus-5.5")).toBe("high")
|
|
527
|
-
// An unset model in node data can be "" — the same "use the default" the
|
|
528
|
-
// `llmModel || LLM_FEATURE_DEFAULTS[…]` reads give it.
|
|
529
|
-
expect(defaultReasoningEffort("describe-to-picker", "")).toBe("high")
|
|
530
535
|
})
|
|
531
536
|
|
|
532
|
-
it("names the
|
|
537
|
+
it("names the recipe model by any of its accepted ids", () => {
|
|
533
538
|
// The dash alias getLlmModel resolves to the canonical claude-opus-5.5.
|
|
534
539
|
expect(defaultReasoningEffort("describe-to-picker", "claude-opus-5-5")).toBe("high")
|
|
535
540
|
})
|
|
536
541
|
|
|
542
|
+
it("the feature's default model, omitted or named, gets no effort: it is not the recipe's model (decided 2026-10-20)", () => {
|
|
543
|
+
expect(defaultReasoningEffort("describe-to-picker", undefined)).toBeUndefined()
|
|
544
|
+
// An unset model in node data can be "" — the same "use the default" the
|
|
545
|
+
// `llmModel || LLM_FEATURE_DEFAULTS[…]` reads give it.
|
|
546
|
+
expect(defaultReasoningEffort("describe-to-picker", "")).toBeUndefined()
|
|
547
|
+
expect(defaultReasoningEffort("describe-to-picker", LLM_FEATURE_DEFAULTS["describe-to-picker"])).toBeUndefined()
|
|
548
|
+
})
|
|
549
|
+
|
|
537
550
|
it("a caller who picked another model and no effort keeps that model's Auto", () => {
|
|
538
551
|
expect(defaultReasoningEffort("describe-to-picker", "gemini-3.8-flash")).toBeUndefined()
|
|
539
552
|
expect(defaultReasoningEffort("describe-to-picker", "claude-opus-5")).toBeUndefined()
|
|
@@ -545,24 +558,54 @@ describe("defaultReasoningEffort", () => {
|
|
|
545
558
|
expect(defaultReasoningEffort("no-such-feature", undefined)).toBeUndefined()
|
|
546
559
|
})
|
|
547
560
|
|
|
548
|
-
it("every declared
|
|
561
|
+
it("every declared recipe effort is a level its model offers, on the aggregator lane and direct, and that model is a registered one", () => {
|
|
549
562
|
// The effort pickers show this level as selected — one the model does not
|
|
550
563
|
// offer would leave them blank (and the quick strip's fail-safe snapping).
|
|
551
|
-
for (const [feature,
|
|
552
|
-
|
|
553
|
-
expect(availableReasoningEfforts(model), feature).toContain(effort)
|
|
554
|
-
expect(availableReasoningEfforts(model, true), feature).toContain(effort)
|
|
564
|
+
for (const [feature, recipe] of Object.entries(LLM_FEATURE_DEFAULT_EFFORTS)) {
|
|
565
|
+
expect(getLlmModel(recipe.model)?.id, feature).toBe(recipe.model)
|
|
566
|
+
expect(availableReasoningEfforts(recipe.model), feature).toContain(recipe.effort)
|
|
567
|
+
expect(availableReasoningEfforts(recipe.model, true), feature).toContain(recipe.effort)
|
|
555
568
|
}
|
|
556
569
|
})
|
|
557
570
|
|
|
558
|
-
it("
|
|
559
|
-
const model =
|
|
571
|
+
it("describe-to-picker on Opus 5.5 runs and bills direct: its effort only works on Anthropic's API", () => {
|
|
572
|
+
const model = LLM_FEATURE_DEFAULT_EFFORTS["describe-to-picker"]!.model
|
|
560
573
|
const effort = defaultReasoningEffort("describe-to-picker", model)
|
|
561
574
|
expect(llmServesDirect(model, effort)).toBe(true)
|
|
562
575
|
expect(buildLlmCreditIdentifier("describe-to-picker", model, effort)).toBe("describe-to-picker:premium-direct")
|
|
563
576
|
})
|
|
564
577
|
})
|
|
565
578
|
|
|
579
|
+
// ---------------------------------------------------------------------------
|
|
580
|
+
// DESCRIBE_TO_PICKER_MODELS — what the node offers and its route accepts
|
|
581
|
+
// ---------------------------------------------------------------------------
|
|
582
|
+
describe("DESCRIBE_TO_PICKER_MODELS", () => {
|
|
583
|
+
it("is the structured vision list minus the withheld models, and withholds Claude Fable 5 (decided 2026-10-20)", () => {
|
|
584
|
+
expect(DESCRIBE_TO_PICKER_WITHHELD_MODELS).toEqual(new Set(["claude-fable-5"]))
|
|
585
|
+
const ids = DESCRIBE_TO_PICKER_MODELS.map((m) => m.id)
|
|
586
|
+
expect(ids).not.toContain("claude-fable-5")
|
|
587
|
+
expect(ids.sort()).toEqual(
|
|
588
|
+
STRUCTURED_VISION_MODELS.map((m) => m.id).filter((id) => !DESCRIBE_TO_PICKER_WITHHELD_MODELS.has(id)).sort(),
|
|
589
|
+
)
|
|
590
|
+
})
|
|
591
|
+
|
|
592
|
+
it("every withheld id is a registered model (a typo would withhold nothing)", () => {
|
|
593
|
+
for (const id of DESCRIBE_TO_PICKER_WITHHELD_MODELS) expect(getLlmModel(id)?.id, id).toBe(id)
|
|
594
|
+
})
|
|
595
|
+
|
|
596
|
+
it("the other legend-sized structured reads (text-to-picker, llm-structured) withhold the same models", () => {
|
|
597
|
+
expect(LLM_STRUCTURED_WITHHELD_MODELS).toBe(DESCRIBE_TO_PICKER_WITHHELD_MODELS)
|
|
598
|
+
expect(LLM_STRUCTURED_WITHHELD_MODELS.has("claude-fable-5")).toBe(true)
|
|
599
|
+
})
|
|
600
|
+
|
|
601
|
+
it("offers the default, the fallback and the Opus 5.5 recipe model", () => {
|
|
602
|
+
const ids = DESCRIBE_TO_PICKER_MODELS.map((m) => m.id)
|
|
603
|
+
expect(ids).toContain(LLM_FEATURE_DEFAULTS["describe-to-picker"])
|
|
604
|
+
expect(ids).toContain(DESCRIBE_TO_PICKER_FALLBACK_MODEL)
|
|
605
|
+
expect(ids).toContain(LLM_FEATURE_DEFAULT_EFFORTS["describe-to-picker"]!.model)
|
|
606
|
+
})
|
|
607
|
+
})
|
|
608
|
+
|
|
566
609
|
// ---------------------------------------------------------------------------
|
|
567
610
|
// motionGraphicsFeature
|
|
568
611
|
// ---------------------------------------------------------------------------
|
|
@@ -140,6 +140,16 @@ describe("an audio-locked use-case node's memory is never a preset setting", ()
|
|
|
140
140
|
expect(tighten).not.toHaveProperty("settingsBeforeAudio")
|
|
141
141
|
expect(PRESET_EXCLUDED_KEYS.has("settingsBeforeAudio")).toBe(true)
|
|
142
142
|
})
|
|
143
|
+
|
|
144
|
+
it("a preset saved from a use-case node carries neither its recordings order (this node's wiring) nor its last run's cameras report", () => {
|
|
145
|
+
const tighten = extractPresetData({
|
|
146
|
+
label: "T", output: "video", cameras: { wide: 2 }, mediaOrder: ["cam-a", "cam-b"],
|
|
147
|
+
useCaseCameras: { speakers: [{ speaker: "speaker_0", ordinal: 1, camera: 2, marginDb: 7 }], syncNotes: [], mapNotes: [] },
|
|
148
|
+
}, "tighten-episode")
|
|
149
|
+
expect(tighten).toEqual({ output: "video", cameras: { wide: 2 } })
|
|
150
|
+
expect(PRESET_EXCLUDED_KEYS.has("mediaOrder")).toBe(true)
|
|
151
|
+
expect(PRESET_EXCLUDED_KEYS.has("useCaseCameras")).toBe(true)
|
|
152
|
+
})
|
|
143
153
|
})
|
|
144
154
|
|
|
145
155
|
describe("PRESET_EXCLUDED_KEYS ⊇ PRESET_APPLY_CLEAR_KEYS", () => {
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
isExecutionDataKey,
|
|
9
9
|
stripTransientRuntimeData,
|
|
10
10
|
} from "../index.js"
|
|
11
|
+
import { SUNO_SEPARATE_RESULT_FIELDS } from "../suno-separate.js"
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* TRANSIENT_RUNTIME_KEYS = run-state that must neither mark the workflow
|
|
@@ -119,13 +120,31 @@ describe("EXECUTION_DATA_KEYS", () => {
|
|
|
119
120
|
expect(isExecutionDataKey("candidates", "ugc-clip")).toBe(false)
|
|
120
121
|
})
|
|
121
122
|
|
|
122
|
-
it("files only UGC types'
|
|
123
|
+
it("files only UGC types' and Suno Separate's own names: Video Overlay's results stay as every other surface reads them", () => {
|
|
123
124
|
// Presets capture them, Reset clears them, exports and the Copilot keep them — as on any node.
|
|
124
125
|
for (const key of ["durationSec", "width", "height", "warnings", "resultCompositionKey"]) {
|
|
125
126
|
expect(isExecutionDataKey(key, "video-overlay"), key).toBe(false)
|
|
126
127
|
}
|
|
127
128
|
expect(executionDataKeysOf("video-overlay")).toBe(EXECUTION_DATA_KEYS)
|
|
128
|
-
for (const type of Object.keys(NODE_TYPE_EXECUTION_DATA_KEYS)) expect(type, type).toMatch(/^ugc
|
|
129
|
+
for (const type of Object.keys(NODE_TYPE_EXECUTION_DATA_KEYS)) expect(type, type).toMatch(/^(ugc-|suno-separate$)/)
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
it("files every Suno Separate result field and run fact as that type's run result: never undo, preset or template state", () => {
|
|
133
|
+
for (const key of [...SUNO_SEPARATE_RESULT_FIELDS, "engineUsed", "sunoRefused", "fallbackReason", "separateType"]) {
|
|
134
|
+
expect(isExecutionDataKey(key, "suno-separate"), key).toBe(true)
|
|
135
|
+
expect(TRANSIENT_RUNTIME_KEYS.has(key), `${key} must stay persisted`).toBe(false)
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
it("never files Suno Separate's settings as run state, nor its result names on another node", () => {
|
|
140
|
+
// stemName is the instrument SETTING (the run only echoes it back).
|
|
141
|
+
for (const key of ["stemName", "type", "fallbackToDemucs", "taskId", "audioId", "label"]) {
|
|
142
|
+
expect(isExecutionDataKey(key, "suno-separate"), key).toBe(false)
|
|
143
|
+
}
|
|
144
|
+
for (const key of ["vocalUrl", "isolatedUrl", "engineUsed"]) {
|
|
145
|
+
expect(isExecutionDataKey(key, "audio-separation"), key).toBe(false)
|
|
146
|
+
expect(isExecutionDataKey(key, undefined), key).toBe(false)
|
|
147
|
+
}
|
|
129
148
|
})
|
|
130
149
|
|
|
131
150
|
it("a type's own keys come with every global one, as a set", () => {
|
|
@@ -5,6 +5,8 @@ import {
|
|
|
5
5
|
edlSpanKey,
|
|
6
6
|
planClipKeyAt,
|
|
7
7
|
renderClipKey,
|
|
8
|
+
renderLoneRow,
|
|
9
|
+
renderPlanBasis,
|
|
8
10
|
renderPlanClipKey,
|
|
9
11
|
renderPlanNodeId,
|
|
10
12
|
renderPlanPath,
|
|
@@ -390,3 +392,65 @@ describe("renderPlanClipKey — the clip a row reads is picked by every selector
|
|
|
390
392
|
})
|
|
391
393
|
})
|
|
392
394
|
})
|
|
395
|
+
|
|
396
|
+
describe("renderLoneRow — a render run once behind a Camera Switch with one delivered row (decided 2026-10-20)", () => {
|
|
397
|
+
const span = (inMs: number, outMs: number, title: string) =>
|
|
398
|
+
JSON.stringify({ version: 1, clock: "master", sources: [], segments: [{ id: `s${inMs}`, inMs, outMs }], meta: { title } })
|
|
399
|
+
const PLAN = [span(0, 1000, "one"), span(2000, 3000, "two"), span(4000, 5000, "three")]
|
|
400
|
+
const nodes = [
|
|
401
|
+
{ id: "plan", type: "edit-plan" },
|
|
402
|
+
{ id: "tp-send", type: "teleport-send" },
|
|
403
|
+
{ id: "tp-recv", type: "teleport-receive" },
|
|
404
|
+
{ id: "switch", type: "camera-switch" },
|
|
405
|
+
{ id: "render", type: "speaker-view" },
|
|
406
|
+
]
|
|
407
|
+
const viaSwitch = [
|
|
408
|
+
{ source: "plan", sourceHandle: "edl", target: "switch", targetHandle: "edl" },
|
|
409
|
+
{ source: "switch", sourceHandle: "edl", target: "render", targetHandle: "edl" },
|
|
410
|
+
]
|
|
411
|
+
const batchOf = (batch: readonly unknown[] | undefined) => (n: { id: string }) => (n.id === "switch" ? batch : PLAN)
|
|
412
|
+
const planList = () => PLAN
|
|
413
|
+
const ran: ReadonlySet<string> = new Set(["switch", "render"])
|
|
414
|
+
|
|
415
|
+
it("the switch's one delivered row is the row: the clip key and the plan basis are that clip's", () => {
|
|
416
|
+
const row = renderLoneRow("render", nodes, viaSwitch, batchOf(["", "", "switched-3"]))
|
|
417
|
+
expect(row).toBe(2)
|
|
418
|
+
expect(renderPlanClipKey("render", nodes, viaSwitch, planList, row)).toBe("4000-5000")
|
|
419
|
+
expect(renderPlanBasis("render", nodes, viaSwitch, planList, row, ran)).toBe(renderPlanBasis("render", nodes, viaSwitch, planList, 2, ran))
|
|
420
|
+
// Without it the render reads the plan's three clips and names none.
|
|
421
|
+
expect(renderPlanClipKey("render", nodes, viaSwitch, planList, undefined)).toBeUndefined()
|
|
422
|
+
expect(renderPlanBasis("render", nodes, viaSwitch, planList, undefined, ran)).toBeUndefined()
|
|
423
|
+
// `null` is a hole too, and a teleport between the switch and the render changes nothing.
|
|
424
|
+
expect(renderLoneRow("render", nodes, viaSwitch, batchOf([null, "switched-2", null]))).toBe(1)
|
|
425
|
+
const teleported = [
|
|
426
|
+
viaSwitch[0]!,
|
|
427
|
+
{ source: "switch", sourceHandle: "edl", target: "tp-send", targetHandle: "in" },
|
|
428
|
+
{ source: "tp-send", target: "tp-recv" },
|
|
429
|
+
{ source: "tp-recv", target: "render", targetHandle: "edl" },
|
|
430
|
+
]
|
|
431
|
+
expect(renderLoneRow("render", nodes, teleported, batchOf(["", "switched-2", ""]))).toBe(1)
|
|
432
|
+
})
|
|
433
|
+
|
|
434
|
+
it("the row is in the switch's KEPT-clip row space: a clip dropped from the plan has no switch row", () => {
|
|
435
|
+
const holed = () => [PLAN[0], "", PLAN[2]]
|
|
436
|
+
// Two kept clips, so the switch ran twice; its second row (plan clip 3) delivered.
|
|
437
|
+
const row = renderLoneRow("render", nodes, viaSwitch, () => ["", "switched-3"])
|
|
438
|
+
expect(row).toBe(1)
|
|
439
|
+
expect(renderPlanClipKey("render", nodes, viaSwitch, holed, row)).toBe("4000-5000")
|
|
440
|
+
})
|
|
441
|
+
|
|
442
|
+
it("names no row when the batch has several delivered rows, none, or no batch at all", () => {
|
|
443
|
+
expect(renderLoneRow("render", nodes, viaSwitch, batchOf(["a", "", "c"]))).toBeUndefined()
|
|
444
|
+
expect(renderLoneRow("render", nodes, viaSwitch, batchOf(["", "", ""]))).toBeUndefined()
|
|
445
|
+
expect(renderLoneRow("render", nodes, viaSwitch, batchOf(undefined))).toBeUndefined()
|
|
446
|
+
})
|
|
447
|
+
|
|
448
|
+
it("names no row for a render wired straight to its plan (a one-recording pack), a Selected wire, or a selector on the render's wire", () => {
|
|
449
|
+
const direct = [{ source: "plan", sourceHandle: "edl", target: "render", targetHandle: "edl" }]
|
|
450
|
+
expect(renderLoneRow("render", nodes, direct, () => ["", "", PLAN[2]])).toBeUndefined()
|
|
451
|
+
const selected = [viaSwitch[0]!, { ...viaSwitch[1]!, data: { outputMode: "last" } }]
|
|
452
|
+
expect(renderLoneRow("render", nodes, selected, batchOf(["", "", "switched-3"]))).toBeUndefined()
|
|
453
|
+
const picked = [viaSwitch[0]!, { ...viaSwitch[1]!, data: { selectorMode: "list", listExpression: "3" } }]
|
|
454
|
+
expect(renderLoneRow("render", nodes, picked, batchOf(["", "", "switched-3"]))).toBeUndefined()
|
|
455
|
+
})
|
|
456
|
+
})
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import { SCHEDULE_RETRY_DEFAULTS, SCHEDULE_RETRY_LIMITS, normalizeScheduleRetry } from "../schedule-retry.js"
|
|
3
|
+
|
|
4
|
+
describe("normalizeScheduleRetry — the node's retry policy as the server runs it", () => {
|
|
5
|
+
it("absent, null or not an object is the feature off", () => {
|
|
6
|
+
expect(normalizeScheduleRetry(undefined)).toBeNull()
|
|
7
|
+
expect(normalizeScheduleRetry(null)).toBeNull()
|
|
8
|
+
expect(normalizeScheduleRetry(true)).toBeNull()
|
|
9
|
+
expect(normalizeScheduleRetry("30")).toBeNull()
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
it("an empty object is the defaults: 30 minutes, 3 attempts, cheap lanes only", () => {
|
|
13
|
+
expect(normalizeScheduleRetry({})).toEqual(SCHEDULE_RETRY_DEFAULTS)
|
|
14
|
+
expect(SCHEDULE_RETRY_DEFAULTS).toEqual({ afterMinutes: 30, maxAttempts: 3, cheapLanesOnly: true })
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
it("keeps in-range values, reads a numeric string, and clamps the rest into range", () => {
|
|
18
|
+
expect(normalizeScheduleRetry({ afterMinutes: 90, maxAttempts: 2, cheapLanesOnly: false })).toEqual({ afterMinutes: 90, maxAttempts: 2, cheapLanesOnly: false })
|
|
19
|
+
expect(normalizeScheduleRetry({ afterMinutes: "45", maxAttempts: "1" })).toMatchObject({ afterMinutes: 45, maxAttempts: 1 })
|
|
20
|
+
expect(normalizeScheduleRetry({ afterMinutes: 1, maxAttempts: 9 })).toMatchObject({
|
|
21
|
+
afterMinutes: SCHEDULE_RETRY_LIMITS.afterMinutes[0],
|
|
22
|
+
maxAttempts: SCHEDULE_RETRY_LIMITS.maxAttempts[1],
|
|
23
|
+
})
|
|
24
|
+
expect(normalizeScheduleRetry({ afterMinutes: 100000, maxAttempts: 0 })).toMatchObject({
|
|
25
|
+
afterMinutes: SCHEDULE_RETRY_LIMITS.afterMinutes[1],
|
|
26
|
+
maxAttempts: SCHEDULE_RETRY_LIMITS.maxAttempts[0],
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it("cheap lanes only is off only when said so — a missing or truthy flag keeps it on", () => {
|
|
31
|
+
expect(normalizeScheduleRetry({ cheapLanesOnly: false })?.cheapLanesOnly).toBe(false)
|
|
32
|
+
expect(normalizeScheduleRetry({ cheapLanesOnly: "false" })?.cheapLanesOnly).toBe(true)
|
|
33
|
+
expect(normalizeScheduleRetry({ cheapLanesOnly: undefined })?.cheapLanesOnly).toBe(true)
|
|
34
|
+
})
|
|
35
|
+
})
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import {
|
|
3
|
+
SUNO_SEPARATE_TYPES,
|
|
4
|
+
SUNO_STEM_NAMES,
|
|
5
|
+
DEFAULT_SUNO_STEM_NAME,
|
|
6
|
+
SUNO_SEPARATE_STEM_FIELDS,
|
|
7
|
+
SUNO_SEPARATE_TAKE_FIELDS,
|
|
8
|
+
SUNO_SEPARATE_RESULT_FIELDS,
|
|
9
|
+
SUNO_SEPARATE_META_FIELDS,
|
|
10
|
+
sunoSeparateCreditId,
|
|
11
|
+
sunoSeparateHandleUrl,
|
|
12
|
+
sunoSeparatePrimaryUrl,
|
|
13
|
+
} from "../entries/models.js"
|
|
14
|
+
|
|
15
|
+
describe("sunoSeparateCreditId", () => {
|
|
16
|
+
it.each([
|
|
17
|
+
["separate_vocal", "suno-separate"], ["split_stem", "suno-separate-stem"],
|
|
18
|
+
["split_stem_advanced", "suno-separate-single"], [undefined, "suno-separate"], ["junk", "suno-separate"],
|
|
19
|
+
])("%s → %s", (t, id) => expect(sunoSeparateCreditId(t)).toBe(id))
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
it("SUNO_STEM_NAMES is KIE's 98-value enum", () => {
|
|
23
|
+
expect(SUNO_STEM_NAMES).toHaveLength(98)
|
|
24
|
+
expect(new Set(SUNO_STEM_NAMES).size).toBe(98)
|
|
25
|
+
expect(SUNO_STEM_NAMES[0]).toBe("Lead Vocal")
|
|
26
|
+
expect(SUNO_STEM_NAMES[SUNO_STEM_NAMES.length - 1]).toBe("Didgeridoo")
|
|
27
|
+
expect(SUNO_STEM_NAMES).toContain("808")
|
|
28
|
+
expect(SUNO_STEM_NAMES).toContain(DEFAULT_SUNO_STEM_NAME)
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it("the three separation modes", () => {
|
|
32
|
+
expect(SUNO_SEPARATE_TYPES).toEqual(["separate_vocal", "split_stem", "split_stem_advanced"])
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
it("result-field lists", () => {
|
|
36
|
+
expect(SUNO_SEPARATE_STEM_FIELDS).toEqual([
|
|
37
|
+
"vocalUrl", "instrumentalUrl", "backingVocalsUrl", "drumsUrl",
|
|
38
|
+
"bassUrl", "guitarUrl", "pianoUrl", "keyboardUrl",
|
|
39
|
+
"percussionUrl", "stringsUrl", "synthUrl", "fxUrl",
|
|
40
|
+
"brassUrl", "woodwindsUrl", "otherUrl",
|
|
41
|
+
])
|
|
42
|
+
expect(SUNO_SEPARATE_TAKE_FIELDS).toEqual(["isolatedUrl", "withoutUrl", "isolated2Url", "without2Url"])
|
|
43
|
+
expect(SUNO_SEPARATE_RESULT_FIELDS).toEqual([...SUNO_SEPARATE_STEM_FIELDS, ...SUNO_SEPARATE_TAKE_FIELDS])
|
|
44
|
+
expect(SUNO_SEPARATE_META_FIELDS).toEqual(["separateType", "stemName", "engineUsed", "sunoRefused", "fallbackReason"])
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
describe("sunoSeparateHandleUrl", () => {
|
|
48
|
+
const legacy = { audioUrl: "A" }
|
|
49
|
+
const vocalOnly = { audioUrl: "V", vocalUrl: "V" }
|
|
50
|
+
const stems = { audioUrl: "V", vocalUrl: "V", drumsUrl: "D" }
|
|
51
|
+
const single = { audioUrl: "I", isolatedUrl: "I", withoutUrl: "W", isolated2Url: "I2" }
|
|
52
|
+
it("legacy shape (no per-field urls) still routes audioUrl", () => {
|
|
53
|
+
expect(sunoSeparateHandleUrl(legacy, "vocals")).toBe("A")
|
|
54
|
+
expect(sunoSeparateHandleUrl(legacy, "instrumental")).toBe("A")
|
|
55
|
+
})
|
|
56
|
+
it("a stem that did not come back is empty", () => {
|
|
57
|
+
expect(sunoSeparateHandleUrl(stems, "instrumental")).toBeUndefined()
|
|
58
|
+
expect(sunoSeparateHandleUrl(vocalOnly, "instrumental")).toBeUndefined()
|
|
59
|
+
})
|
|
60
|
+
it("one-instrument mode", () => {
|
|
61
|
+
expect(sunoSeparateHandleUrl(single, "vocals")).toBeUndefined()
|
|
62
|
+
expect(sunoSeparateHandleUrl(single, "instrumental")).toBeUndefined()
|
|
63
|
+
expect(sunoSeparateHandleUrl(single, "isolated")).toBe("I")
|
|
64
|
+
expect(sunoSeparateHandleUrl(single, "without")).toBe("W")
|
|
65
|
+
})
|
|
66
|
+
it("legacy handle spellings", () => {
|
|
67
|
+
expect(sunoSeparateHandleUrl(stems, "vocal-out")).toBe("V")
|
|
68
|
+
expect(sunoSeparateHandleUrl({ ...stems, instrumentalUrl: "N" }, "instrumental-out")).toBe("N")
|
|
69
|
+
})
|
|
70
|
+
it("no handle → primary", () => expect(sunoSeparateHandleUrl(single, null)).toBe("I"))
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
it("sunoSeparatePrimaryUrl", () => {
|
|
74
|
+
expect(sunoSeparatePrimaryUrl({ vocalUrl: "V", instrumentalUrl: "N" })).toBe("V")
|
|
75
|
+
expect(sunoSeparatePrimaryUrl({ instrumentalUrl: "N" })).toBe("N")
|
|
76
|
+
expect(sunoSeparatePrimaryUrl({ isolatedUrl: "I", withoutUrl: "W" })).toBe("I")
|
|
77
|
+
expect(sunoSeparatePrimaryUrl({ drumsUrl: "D" })).toBe("D")
|
|
78
|
+
})
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
aspectRatioOptionsByKind,
|
|
6
6
|
durationsByMode,
|
|
7
7
|
} from "../model-catalog.js"
|
|
8
|
-
import { VIDEO_GEN_PROVIDERS } from "../model-constants.js"
|
|
8
|
+
import { VIDEO_GEN_PROVIDERS, VIDEO_TO_VIDEO_PROVIDERS } from "../model-constants.js"
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Every video model a user can pick must have a catalog entry. The catalog is
|
|
@@ -42,6 +42,20 @@ describe("MODEL_CATALOG covers every generatable video provider", () => {
|
|
|
42
42
|
})
|
|
43
43
|
})
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Every /v1/video-to-video model is listed too, as a "v2v" video entry —
|
|
47
|
+
* `/v1/models` and MCP `list_models` read only the catalog, so a model outside
|
|
48
|
+
* it is one no client can offer (luma-modify was, until 2026-10-19).
|
|
49
|
+
*/
|
|
50
|
+
describe("MODEL_CATALOG covers every video-to-video provider", () => {
|
|
51
|
+
it.each([...VIDEO_TO_VIDEO_PROVIDERS])("%s has a v2v video entry", (p) => {
|
|
52
|
+
const entry = MODEL_CATALOG[p]
|
|
53
|
+
expect(entry, `Add a MODEL_CATALOG entry for ${p}`).toBeDefined()
|
|
54
|
+
expect(entry!.kind).toBe("video")
|
|
55
|
+
expect(entry!.modes).toContain("v2v")
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
|
|
45
59
|
/**
|
|
46
60
|
* Deleting the LTX hand-splices in frontend/model-options.ts (Task 7 step 5)
|
|
47
61
|
* hands resolution/aspect/duration option rendering to these catalog-derived
|
|
@@ -34,6 +34,9 @@ export {
|
|
|
34
34
|
resolveVideoAnalysisModel,
|
|
35
35
|
LLM_FEATURE_DEFAULTS,
|
|
36
36
|
DESCRIBE_TO_PICKER_FALLBACK_MODEL,
|
|
37
|
+
DESCRIBE_TO_PICKER_MODELS,
|
|
38
|
+
DESCRIBE_TO_PICKER_WITHHELD_MODELS,
|
|
39
|
+
LLM_STRUCTURED_WITHHELD_MODELS,
|
|
37
40
|
LLM_FEATURE_DEFAULT_EFFORTS,
|
|
38
41
|
defaultReasoningEffort,
|
|
39
42
|
LLM_MODALITY_CAPS,
|
package/src/entries/models.ts
CHANGED
|
@@ -281,6 +281,25 @@ export {
|
|
|
281
281
|
export * from "../provider-directive-defaults.js"
|
|
282
282
|
export * from "../lora-routing.js"
|
|
283
283
|
export { SUNO_TRACK_SOURCE_TYPES } from "../suno-track-sources.js"
|
|
284
|
+
// Suno Separate's public contract: modes, stem names, each mode's credit id, result + handle fields.
|
|
285
|
+
export {
|
|
286
|
+
SUNO_SEPARATE_TYPES,
|
|
287
|
+
SUNO_STEM_NAMES,
|
|
288
|
+
DEFAULT_SUNO_STEM_NAME,
|
|
289
|
+
sunoSeparateCreditId,
|
|
290
|
+
SUNO_SEPARATE_STEM_FIELDS,
|
|
291
|
+
SUNO_SEPARATE_TAKE_FIELDS,
|
|
292
|
+
SUNO_SEPARATE_RESULT_FIELDS,
|
|
293
|
+
SUNO_SEPARATE_META_FIELDS,
|
|
294
|
+
sunoSeparateHandleUrl,
|
|
295
|
+
sunoSeparatePrimaryUrl,
|
|
296
|
+
} from "../suno-separate.js"
|
|
297
|
+
export type {
|
|
298
|
+
SunoSeparateType,
|
|
299
|
+
SunoStemName,
|
|
300
|
+
SunoSeparateStemField,
|
|
301
|
+
SunoSeparateResultField,
|
|
302
|
+
} from "../suno-separate.js"
|
|
284
303
|
export {
|
|
285
304
|
VOICE_CHANGER_MODELS,
|
|
286
305
|
VOICE_CHANGER_MODEL_IDS,
|
package/src/entries/workflow.ts
CHANGED
|
@@ -133,6 +133,12 @@ export {
|
|
|
133
133
|
type ScheduleSpec,
|
|
134
134
|
type LocalTime,
|
|
135
135
|
} from "../schedule-rules.js"
|
|
136
|
+
export {
|
|
137
|
+
SCHEDULE_RETRY_LIMITS,
|
|
138
|
+
SCHEDULE_RETRY_DEFAULTS,
|
|
139
|
+
normalizeScheduleRetry,
|
|
140
|
+
type ScheduleRetry,
|
|
141
|
+
} from "../schedule-retry.js"
|
|
136
142
|
export { VARIABLES_HANDLE_ID, buildConditionVariables } from "../condition-variables.js"
|
|
137
143
|
export { extractAllGeneratedResults, extractGeneratedJsonAsList, spreadJsonArrayIfSingleton } from "../generated-results.js"
|
|
138
144
|
export { resolveFieldMappings, resolveLocationFields, type FieldEdgeSource } from "../resolve-field-mappings.js"
|
|
@@ -10,6 +10,7 @@ export const UNIT_CONTRACTS: ReadonlyArray<readonly [type: string, producer: "au
|
|
|
10
10
|
["tighten-episode", "dynamic"], // unit:tighten-episode
|
|
11
11
|
["episode-trailer", "video"], // unit:episode-trailer
|
|
12
12
|
["clip-pack", "dynamic"], // unit:clip-pack
|
|
13
|
+
["speaker-layout", "video"], // unit:speaker-layout
|
|
13
14
|
["remove-audio", "video"], // unit:remove-audio
|
|
14
15
|
["gif-to-video", "video"], // unit:gif-to-video
|
|
15
16
|
]
|
|
@@ -20,6 +21,7 @@ export const UNIT_USE_CASE_TYPES = [
|
|
|
20
21
|
"episode-chapters", // unit:episode-chapters
|
|
21
22
|
"episode-trailer", // unit:episode-trailer
|
|
22
23
|
"clip-pack", // unit:clip-pack
|
|
24
|
+
"speaker-layout", // unit:speaker-layout
|
|
23
25
|
] as const
|
|
24
26
|
|
|
25
27
|
// What each JSON (look) output pip carries (contract.jsonPips) — json-kinds.ts composes these.
|
|
@@ -28,13 +30,16 @@ export const UNIT_JSON_PIPS: ReadonlyArray<readonly [type: string, pips: Readonl
|
|
|
28
30
|
["episode-chapters", { "json": "other" }], // unit:episode-chapters
|
|
29
31
|
["episode-trailer", { "json": "edl" }], // unit:episode-trailer
|
|
30
32
|
["clip-pack", { "json": "edl" }], // unit:clip-pack
|
|
33
|
+
["speaker-layout", { "json": "edl" }], // unit:speaker-layout
|
|
31
34
|
["speaker-map", { "edl": "edl", "json": "other" }], // unit:speaker-map
|
|
32
35
|
]
|
|
33
36
|
|
|
34
37
|
// Input pips that are never a prompt lane (contract.nonPromptInputs) — fan-out-rows.ts composes these.
|
|
35
38
|
export const UNIT_NON_PROMPT_INPUTS: ReadonlyArray<readonly [type: string, handles: ReadonlyArray<string>]> = [
|
|
36
|
-
["tighten-episode", ["music"]], // unit:tighten-episode
|
|
37
|
-
["episode-trailer", ["introCard"]], // unit:episode-trailer
|
|
39
|
+
["tighten-episode", ["music", "masterAudio"]], // unit:tighten-episode
|
|
40
|
+
["episode-trailer", ["introCard", "masterAudio"]], // unit:episode-trailer
|
|
41
|
+
["clip-pack", ["masterAudio"]], // unit:clip-pack
|
|
42
|
+
["speaker-layout", ["masterAudio"]], // unit:speaker-layout
|
|
38
43
|
]
|
|
39
44
|
|
|
40
45
|
// Use-case units whose review-on run ends at a Preview that holds what follows (contract.reviewHold) — preview-gate.ts.
|
|
@@ -42,6 +47,7 @@ export const UNIT_REVIEW_HOLDS: ReadonlyArray<string> = [
|
|
|
42
47
|
"tighten-episode", // unit:tighten-episode
|
|
43
48
|
"episode-trailer", // unit:episode-trailer
|
|
44
49
|
"clip-pack", // unit:clip-pack
|
|
50
|
+
"speaker-layout", // unit:speaker-layout
|
|
45
51
|
]
|
|
46
52
|
|
|
47
53
|
// How a published app shows each unit's result where the producer sets do not decide it (contract.presents) — presentation-utils.ts.
|
package/src/llm-models.ts
CHANGED
|
@@ -1062,6 +1062,37 @@ export const STRUCTURED_VISION_MODELS = LLM_MODELS.filter(
|
|
|
1062
1062
|
(m) => m.supportsImages && m.structuredOutputMode != null,
|
|
1063
1063
|
)
|
|
1064
1064
|
|
|
1065
|
+
/**
|
|
1066
|
+
* Models {@link STRUCTURED_VISION_MODELS} carries that describe-to-picker does
|
|
1067
|
+
* NOT offer. Its analyzer prompt is a rendered catalog legend — tens of
|
|
1068
|
+
* thousands of input tokens per read — and on these models a single read
|
|
1069
|
+
* costs far above what any of the node's credit rungs covers (production cost
|
|
1070
|
+
* audit, 2026-10-20; the basis is in backend/src/ee/billing/credits.ts).
|
|
1071
|
+
* Withheld from this feature only: the scrapers' per-post analysis reads a
|
|
1072
|
+
* frame and a caption, not a legend, and keeps the whole list.
|
|
1073
|
+
*/
|
|
1074
|
+
export const DESCRIBE_TO_PICKER_WITHHELD_MODELS: ReadonlySet<string> = new Set(["claude-fable-5"])
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* The same models, withheld from the other legend-sized structured reads for
|
|
1078
|
+
* the same reason: `POST /v1/text-to-picker` (describe-to-picker's text twin,
|
|
1079
|
+
* whose default run analyzes every picker's legend) and `POST /v1/llm/structured`
|
|
1080
|
+
* (a caller's own legend-sized system prompt). One set, so a model withheld
|
|
1081
|
+
* from one read of that size is withheld from all of them.
|
|
1082
|
+
*/
|
|
1083
|
+
export const LLM_STRUCTURED_WITHHELD_MODELS: ReadonlySet<string> = DESCRIBE_TO_PICKER_WITHHELD_MODELS
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* The models describe-to-picker offers and accepts: the structured vision
|
|
1087
|
+
* models minus {@link DESCRIBE_TO_PICKER_WITHHELD_MODELS}. The ONE list the
|
|
1088
|
+
* route gate, the config panel and the quick strip read, so a model the route
|
|
1089
|
+
* refuses is never offered and a saved node naming one is snapped to the
|
|
1090
|
+
* default (the route answers it with a `validation_error`).
|
|
1091
|
+
*/
|
|
1092
|
+
export const DESCRIBE_TO_PICKER_MODELS = STRUCTURED_VISION_MODELS.filter(
|
|
1093
|
+
(m) => !DESCRIBE_TO_PICKER_WITHHELD_MODELS.has(m.id),
|
|
1094
|
+
)
|
|
1095
|
+
|
|
1065
1096
|
/**
|
|
1066
1097
|
* Vendor presentation order + labels for model pickers. Every LlmVendor MUST
|
|
1067
1098
|
* appear in the order list (guarded by a registry test) so a new vendor can't
|
|
@@ -1177,9 +1208,14 @@ export const LLM_FEATURE_DEFAULTS: Record<LlmFeature, string> = {
|
|
|
1177
1208
|
// runs once per returned ad — volume, not depth. Must stay an image-capable
|
|
1178
1209
|
// structured-output model (STRUCTURED_VISION_MODELS); a registry test pins it.
|
|
1179
1210
|
"meta-ads-analysis": "gemini-3.6-flash",
|
|
1180
|
-
//
|
|
1181
|
-
//
|
|
1182
|
-
|
|
1211
|
+
// Economy by decision (2026-10-20, from a production cost audit): the
|
|
1212
|
+
// analyzer's legend-sized prompt made the former default, Opus 5.5 at high
|
|
1213
|
+
// on Anthropic's own API, the platform's most expensive read per run. Gemini
|
|
1214
|
+
// 3.8 Flash reads it on the aggregator at the cheapest rung; Opus 5.5 at
|
|
1215
|
+
// high stays available by choice (LLM_FEATURE_DEFAULT_EFFORTS). Still an
|
|
1216
|
+
// image-capable structured model (DESCRIBE_TO_PICKER_MODELS) — a registry
|
|
1217
|
+
// test pins it.
|
|
1218
|
+
"describe-to-picker": "gemini-3.8-flash",
|
|
1183
1219
|
"qa-check": "gemini-3.6-flash",
|
|
1184
1220
|
"generate-script": "gemini-3.6-flash",
|
|
1185
1221
|
"translate": "gemini-3.6-flash",
|
|
@@ -1209,39 +1245,43 @@ export const LLM_FEATURE_DEFAULTS: Record<LlmFeature, string> = {
|
|
|
1209
1245
|
export const DESCRIBE_TO_PICKER_FALLBACK_MODEL = "gemini-3.8-flash"
|
|
1210
1246
|
|
|
1211
1247
|
/**
|
|
1212
|
-
* Feature → the reasoning effort
|
|
1213
|
-
* sends none. Read it through
|
|
1214
|
-
*
|
|
1215
|
-
*
|
|
1248
|
+
* Feature → ONE model with a recipe: the reasoning effort it runs at on that
|
|
1249
|
+
* feature when the caller sends none. Read it through
|
|
1250
|
+
* {@link defaultReasoningEffort}, never directly: the effort belongs to that
|
|
1251
|
+
* model, so a call on any other model — the feature's default included, when
|
|
1252
|
+
* it is a different model — must not pick it up.
|
|
1216
1253
|
*/
|
|
1217
|
-
export const LLM_FEATURE_DEFAULT_EFFORTS: Partial<Record<LlmFeature, LlmReasoningEffort>> = {
|
|
1254
|
+
export const LLM_FEATURE_DEFAULT_EFFORTS: Partial<Record<LlmFeature, { model: string; effort: LlmReasoningEffort }>> = {
|
|
1218
1255
|
// Decided 2026-10-09 from the picker bake-off v2: Opus 5.5 at `high` read
|
|
1219
1256
|
// 4/4 portraits with the most attributes per image, ~9 s a read. Its effort
|
|
1220
|
-
// only takes effect on Anthropic's own API (`effortRequiresDirect`), so
|
|
1221
|
-
//
|
|
1222
|
-
|
|
1257
|
+
// only takes effect on Anthropic's own API (`effortRequiresDirect`), so a
|
|
1258
|
+
// read on it runs direct — and bills as such (`llmServesDirect`). It was the
|
|
1259
|
+
// feature's default model until 2026-10-20 (see LLM_FEATURE_DEFAULTS); the
|
|
1260
|
+
// recipe stays with the model, so choosing Opus 5.5 still reads at high.
|
|
1261
|
+
"describe-to-picker": { model: "claude-opus-5.5", effort: "high" },
|
|
1223
1262
|
}
|
|
1224
1263
|
|
|
1225
1264
|
/**
|
|
1226
1265
|
* The reasoning effort a `feature` call runs at when the caller sends none:
|
|
1227
|
-
* the
|
|
1228
|
-
*
|
|
1229
|
-
* (`undefined` / `""`)
|
|
1230
|
-
*
|
|
1266
|
+
* the recipe effort ({@link LLM_FEATURE_DEFAULT_EFFORTS}), but ONLY while the
|
|
1267
|
+
* call runs on the recipe's model — named, or reached because the model was
|
|
1268
|
+
* omitted (`undefined` / `""`) and it is the feature's default. A caller on
|
|
1269
|
+
* any other model with no effort gets `undefined`: that model's Auto.
|
|
1231
1270
|
*
|
|
1232
|
-
* WHY only on
|
|
1233
|
-
*
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1271
|
+
* WHY only on that model: the effort is part of that model's recipe, not a
|
|
1272
|
+
* feature policy. Forcing `high` on a Gemini or GPT call that never asked for
|
|
1273
|
+
* it would change the timing of every existing workflow that picked one (and,
|
|
1274
|
+
* on a Claude model, its lane and its bill) — which is also why the feature's
|
|
1275
|
+
* default model gets it only when it IS the recipe's model.
|
|
1236
1276
|
*
|
|
1237
1277
|
* The one place the route, the node's credit badge and its effort pickers
|
|
1238
1278
|
* read, so what runs, what is billed and what is shown cannot disagree.
|
|
1239
1279
|
*/
|
|
1240
1280
|
export function defaultReasoningEffort(feature: string, modelId?: string): LlmReasoningEffort | undefined {
|
|
1241
|
-
const
|
|
1242
|
-
if (!
|
|
1243
|
-
|
|
1244
|
-
return getLlmModel(
|
|
1281
|
+
const recipe = LLM_FEATURE_DEFAULT_EFFORTS[feature as LlmFeature]
|
|
1282
|
+
if (!recipe) return undefined
|
|
1283
|
+
const effective = modelId || LLM_FEATURE_DEFAULTS[feature as LlmFeature]
|
|
1284
|
+
return getLlmModel(effective)?.id === recipe.model ? recipe.effort : undefined
|
|
1245
1285
|
}
|
|
1246
1286
|
|
|
1247
1287
|
/**
|