@nodaro/shared 3.67.0 → 3.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/{chunk-JTYCJ5OL.cjs → chunk-4XR66IWF.cjs} +51 -13
  2. package/dist/chunk-4XR66IWF.cjs.map +1 -0
  3. package/dist/{chunk-6FQBKI2A.cjs → chunk-6JSYNKFL.cjs} +4 -4
  4. package/dist/{chunk-6FQBKI2A.cjs.map → chunk-6JSYNKFL.cjs.map} +1 -1
  5. package/dist/{chunk-23IKLMRL.cjs → chunk-BCY3A62O.cjs} +4 -4
  6. package/dist/{chunk-23IKLMRL.cjs.map → chunk-BCY3A62O.cjs.map} +1 -1
  7. package/dist/{chunk-RVQW623D.js → chunk-BHL7TAQO.js} +43 -12
  8. package/dist/chunk-BHL7TAQO.js.map +1 -0
  9. package/dist/{chunk-CLAKSLXF.js → chunk-E3PU7YC6.js} +3 -3
  10. package/dist/{chunk-CLAKSLXF.js.map → chunk-E3PU7YC6.js.map} +1 -1
  11. package/dist/{chunk-ALRXY4QH.cjs → chunk-N7ZJD4CK.cjs} +6 -2
  12. package/dist/chunk-N7ZJD4CK.cjs.map +1 -0
  13. package/dist/{chunk-O2QOBA6Q.js → chunk-NPGP6FMU.js} +43 -3
  14. package/dist/chunk-NPGP6FMU.js.map +1 -0
  15. package/dist/chunk-NWNRATS3.js +13 -0
  16. package/dist/chunk-NWNRATS3.js.map +1 -0
  17. package/dist/{chunk-ZQ2BHOFH.cjs → chunk-Q2LEJXLZ.cjs} +6 -6
  18. package/dist/{chunk-ZQ2BHOFH.cjs.map → chunk-Q2LEJXLZ.cjs.map} +1 -1
  19. package/dist/{chunk-O6TBB4IF.cjs → chunk-TZWXZDSX.cjs} +48 -2
  20. package/dist/chunk-TZWXZDSX.cjs.map +1 -0
  21. package/dist/{chunk-CFTXW3ZL.js → chunk-UVUHVY7F.js} +3 -3
  22. package/dist/{chunk-CFTXW3ZL.js.map → chunk-UVUHVY7F.js.map} +1 -1
  23. package/dist/{chunk-GTBW2KAY.js → chunk-XNJDAW3M.js} +3 -3
  24. package/dist/{chunk-GTBW2KAY.js.map → chunk-XNJDAW3M.js.map} +1 -1
  25. package/dist/entries/credits.cjs +192 -164
  26. package/dist/entries/credits.d.cts +82 -5
  27. package/dist/entries/credits.d.ts +82 -5
  28. package/dist/entries/credits.js +2 -2
  29. package/dist/entries/media.cjs +111 -107
  30. package/dist/entries/media.d.cts +17 -2
  31. package/dist/entries/media.d.ts +17 -2
  32. package/dist/entries/media.js +3 -3
  33. package/dist/entries/models.cjs +82 -82
  34. package/dist/entries/models.js +3 -3
  35. package/dist/entries/runtime-config.cjs +53 -29
  36. package/dist/entries/runtime-config.d.cts +53 -1
  37. package/dist/entries/runtime-config.d.ts +53 -1
  38. package/dist/entries/runtime-config.js +1 -1
  39. package/dist/entries/types.d.cts +12 -5
  40. package/dist/entries/types.d.ts +12 -5
  41. package/dist/index.cjs +435 -379
  42. package/dist/index.d.cts +3 -3
  43. package/dist/index.d.ts +3 -3
  44. package/dist/index.js +6 -6
  45. package/package.json +1 -1
  46. package/src/__tests__/add-captions-nemotron-pricing.test.ts +13 -1
  47. package/src/__tests__/fixtures/measured-input-quote-parity.json +1816 -1
  48. package/src/__tests__/fixtures/planned-length-quote-parity.json +55 -10
  49. package/src/__tests__/fixtures/video-utility-quote-parity.json +834 -38
  50. package/src/__tests__/nemotron-transcribe-pricing.test.ts +32 -0
  51. package/src/__tests__/runtime-config-lists.test.ts +92 -0
  52. package/src/catalog-projection.ts +12 -5
  53. package/src/credit-estimators/add-captions-nemotron.ts +11 -1
  54. package/src/credit-estimators/index.ts +6 -1
  55. package/src/credit-estimators/nemotron-transcribe.ts +35 -3
  56. package/src/credit-estimators/pitch-tempo.ts +14 -0
  57. package/src/credit-estimators/video-sfx.ts +15 -0
  58. package/src/credit-estimators/video-utils.ts +48 -12
  59. package/src/entries/credits.ts +1 -0
  60. package/src/entries/runtime-config.ts +10 -1
  61. package/src/lip-sync-pricing.ts +15 -0
  62. package/src/priced-clip-seconds.ts +19 -1
  63. package/src/runtime-config/lists.ts +87 -0
  64. package/src/runtime-config/worlds.ts +10 -0
  65. package/dist/chunk-ALRXY4QH.cjs.map +0 -1
  66. package/dist/chunk-JTYCJ5OL.cjs.map +0 -1
  67. package/dist/chunk-O2QOBA6Q.js.map +0 -1
  68. package/dist/chunk-O6TBB4IF.cjs.map +0 -1
  69. package/dist/chunk-RVQW623D.js.map +0 -1
  70. package/dist/chunk-SMOO5FAH.js +0 -10
  71. package/dist/chunk-SMOO5FAH.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "$comment": "Mask Composite's and Video Overlay's quote before a run when what reaches them is made by another node — read by BOTH estimates over the same graphs, through the one measured walk (`measuredWireLengthSec`, @nodaro/render-rules): the editor's (frontend maskCompositePricingUnits / videoOverlayPricingUnits — the node's pill, its Run button, the confirm and the workflow badge) and the server's workflow estimate (CreditsService.estimateWorkflowCreditsAt, the composite's own line). Each case wires its sources into the step `c` (an edge with no `target` goes into `c`), which is a Mask Composite with default settings, or a Video Overlay with one stored video layer (so it quotes on its video row) and the case's `video` wire as its base. `expectedUnits` holds the 5-second units both quote, for two run sets (and, where a case gives `partial`, a third: exactly its `runSet`, passed as the editor's run set and the server's `runNodeIds`): `whole` (the editor's whole-run badge and confirm, which pass every executable node, frozen ones included; the server's estimate with no run set, which leaves frozen nodes out) and `alone` (the step's own Run and its pill on the editor; a server run of only `c`). Mask Composite's cap is 60 units (300 s), Video Overlay's 12 (60 s). A video made in the run is read at its planned length plus each step's slack once for every clip a node makes on the way (0.1 s on Mask Composite, which charges the container; 1/24 s on Video Overlay, which charges the video stream) — a step that only passes its input on adds none; a node that does not run hands on its take, at the length recorded with it.",
2
+ "$comment": "Mask Composite's and Video Overlay's quote before a run when what reaches them is made by another node — read by BOTH estimates over the same graphs, through the one measured walk (`measuredWireLengthSec`, @nodaro/render-rules): the editor's (frontend maskCompositePricingUnits / videoOverlayPricingUnits — the node's pill, its Run button, the confirm and the workflow badge) and the server's workflow estimate (CreditsService.estimateWorkflowCreditsAt, the composite's own line). Each case wires its sources into the step `c` (an edge with no `target` goes into `c`), which is a Mask Composite with default settings, or a Video Overlay with one stored video layer (so it quotes on its video row) and the case's `video` wire as its base. `expectedUnits` holds the 5-second units both quote, for two run sets (and, where a case gives `partial`, a third: exactly its `runSet`, passed as the editor's run set and the server's `runNodeIds`): `whole` (the editor's whole-run badge and confirm, which pass every executable node, frozen ones included; the server's estimate with no run set, which leaves frozen nodes out) and `alone` (the step's own Run and its pill on the editor; a server run of only `c`). Mask Composite's cap is 60 units (300 s), Video Overlay's 12 (60 s). A video made in the run is read at its planned length plus each step's slack once for every clip a node makes on the way (0.1 s on Mask Composite, which charges the container; 1/24 s on Video Overlay, which charges the video stream; a quarter second on both after a PixVerse V6 extension, whose file runs further past its planned length, picture and sound; after a Dubbing or an Audio Isolation a quarter second on Mask Composite only, since a dub keeps its input's video stream exactly and Video Overlay charges the stream) — a step that only passes its input on adds none; a node that does not run hands on its take, at the length recorded with it.",
3
3
  "cases": [
4
4
  {
5
5
  "name": "1. Generate Video on Kling 4.0 set to 5 s, never run: 5 s planned, plus the slack",
@@ -354,7 +354,7 @@
354
354
  }
355
355
  },
356
356
  {
357
- "name": "2d. A 10 s upload extended on PixVerse V6 set to 5 s: 15 s, plus the slack (as Seedance 2.5's 5 s)",
357
+ "name": "2d. A 10 s upload extended on PixVerse V6 set to 5 s: 15 s, plus a quarter second on both steps (a PixVerse V6 extension runs further past its length than Seedance 2.5's): 15.25 s, a unit past Video Overlay's 15 s",
358
358
  "nodes": [
359
359
  {
360
360
  "id": "u",
@@ -393,16 +393,16 @@
393
393
  "expectedUnits": {
394
394
  "whole": {
395
395
  "maskComposite": 4,
396
- "videoOverlay": 3
396
+ "videoOverlay": 4
397
397
  },
398
398
  "alone": {
399
399
  "maskComposite": 4,
400
- "videoOverlay": 3
400
+ "videoOverlay": 4
401
401
  }
402
402
  }
403
403
  },
404
404
  {
405
- "name": "2e. PixVerse V6 set to 40 s is held to its 15 s: a 10 s upload reads 25 s, plus the slack",
405
+ "name": "2e. PixVerse V6 set to 40 s is held to its 15 s: a 10 s upload reads 25 s, plus a quarter second: 25.25 s",
406
406
  "nodes": [
407
407
  {
408
408
  "id": "u",
@@ -441,16 +441,16 @@
441
441
  "expectedUnits": {
442
442
  "whole": {
443
443
  "maskComposite": 6,
444
- "videoOverlay": 5
444
+ "videoOverlay": 6
445
445
  },
446
446
  "alone": {
447
447
  "maskComposite": 6,
448
- "videoOverlay": 5
448
+ "videoOverlay": 6
449
449
  }
450
450
  }
451
451
  },
452
452
  {
453
- "name": "2f. PixVerse V6 with no length set adds its default 5 s: a 30 s upload reads 35 s, plus the slack",
453
+ "name": "2f. PixVerse V6 with no length set adds its default 5 s: a 30 s upload reads 35 s, plus a quarter second: 35.25 s",
454
454
  "nodes": [
455
455
  {
456
456
  "id": "u",
@@ -488,11 +488,11 @@
488
488
  "expectedUnits": {
489
489
  "whole": {
490
490
  "maskComposite": 8,
491
- "videoOverlay": 7
491
+ "videoOverlay": 8
492
492
  },
493
493
  "alone": {
494
494
  "maskComposite": 8,
495
- "videoOverlay": 7
495
+ "videoOverlay": 8
496
496
  }
497
497
  }
498
498
  },
@@ -633,6 +633,51 @@
633
633
  }
634
634
  }
635
635
  },
636
+ {
637
+ "name": "2j. A Dubbing of a 10 s video upload: its sound runs further past its input, its picture does not — Mask Composite (the container) reads 10.25 s, 3 units; Video Overlay (the video stream, which a dub keeps exactly) keeps its frame, 10.04 s, 2 units",
638
+ "nodes": [
639
+ {
640
+ "id": "u",
641
+ "type": "upload-video",
642
+ "data": {
643
+ "url": "https://cdn.example/u.mp4",
644
+ "generatedResults": [
645
+ {
646
+ "url": "https://cdn.example/u.mp4",
647
+ "duration": 10
648
+ }
649
+ ],
650
+ "activeResultIndex": 0
651
+ }
652
+ },
653
+ {
654
+ "id": "d",
655
+ "type": "dubbing",
656
+ "data": {}
657
+ }
658
+ ],
659
+ "edges": [
660
+ {
661
+ "source": "u",
662
+ "target": "d",
663
+ "targetHandle": "video"
664
+ },
665
+ {
666
+ "source": "d",
667
+ "targetHandle": "video"
668
+ }
669
+ ],
670
+ "expectedUnits": {
671
+ "whole": {
672
+ "maskComposite": 3,
673
+ "videoOverlay": 2
674
+ },
675
+ "alone": {
676
+ "maskComposite": 3,
677
+ "videoOverlay": 2
678
+ }
679
+ }
680
+ },
636
681
  {
637
682
  "name": "3. A generation with an old 5.042 s take, now set to 10 s: re-run, its 10 s; not run, the take it hands on",
638
683
  "nodes": [