@clipwright/core 0.60.0 → 0.62.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 (596) hide show
  1. package/dist/account-actors.d.ts +0 -43
  2. package/dist/account-actors.js +0 -55
  3. package/dist/account.d.ts +0 -6
  4. package/dist/account.js +0 -18
  5. package/dist/actor-bounds.d.ts +0 -5
  6. package/dist/actor-bounds.js +0 -6
  7. package/dist/actor-qualities.d.ts +0 -3
  8. package/dist/actor-qualities.js +0 -4
  9. package/dist/actors.d.ts +0 -16
  10. package/dist/actors.js +0 -21
  11. package/dist/ad-guide.d.ts +27 -0
  12. package/dist/ad-guide.js +7 -2
  13. package/dist/ad-ids.d.ts +3 -0
  14. package/dist/ad-ids.js +4 -0
  15. package/dist/ad-pause-trim.d.ts +0 -5
  16. package/dist/ad-pause-trim.js +0 -8
  17. package/dist/ads.d.ts +145 -0
  18. package/dist/ads.js +56 -0
  19. package/dist/api-failure.d.ts +6 -44
  20. package/dist/api-failure.js +16 -67
  21. package/dist/aspect.d.ts +0 -29
  22. package/dist/aspect.js +1 -34
  23. package/dist/asset-identity.d.ts +0 -2
  24. package/dist/asset-identity.js +0 -3
  25. package/dist/assets.d.ts +0 -34
  26. package/dist/assets.js +0 -42
  27. package/dist/billing-terms.d.ts +0 -3
  28. package/dist/billing-terms.js +0 -4
  29. package/dist/brand-styles.d.ts +0 -6
  30. package/dist/brand-styles.js +0 -13
  31. package/dist/broll-policy.js +0 -1
  32. package/dist/canvas-fit.d.ts +0 -2
  33. package/dist/canvas-fit.js +0 -4
  34. package/dist/caption-funnel.d.ts +0 -2
  35. package/dist/caption-funnel.js +0 -15
  36. package/dist/caption-geometry.d.ts +0 -6
  37. package/dist/caption-geometry.js +0 -10
  38. package/dist/caption-language.d.ts +0 -3
  39. package/dist/caption-language.js +0 -6
  40. package/dist/contract-dispositions.d.ts +0 -61
  41. package/dist/contract-dispositions.js +3 -96
  42. package/dist/contracts/v1/workflow-brief.d.ts +57 -3
  43. package/dist/contracts/v1/workflow-brief.js +0 -13
  44. package/dist/contracts/v1/workflow-catalog.d.ts +114 -0
  45. package/dist/contracts/v1/workflow-catalog.js +0 -3
  46. package/dist/contracts/v1/workflow-client.d.ts +114 -0
  47. package/dist/contracts/v1/workflow-client.js +0 -1
  48. package/dist/contracts/v1/workflow-dto.js +0 -1
  49. package/dist/contracts/v1/workflow-evidence.js +0 -1
  50. package/dist/contracts/v1/workflow-execution.d.ts +0 -1
  51. package/dist/contracts/v1/workflow-execution.js +0 -4
  52. package/dist/contracts/v1/workflow-next.d.ts +0 -2
  53. package/dist/contracts/v1/workflow-next.js +0 -3
  54. package/dist/contracts/v1/workflow-plan.d.ts +171 -0
  55. package/dist/contracts/v1/workflow-plan.js +0 -1
  56. package/dist/contracts/v1/workflow-primitives.d.ts +0 -1
  57. package/dist/contracts/v1/workflow-primitives.js +0 -2
  58. package/dist/contracts/v1/workflow-run-read.d.ts +0 -1
  59. package/dist/contracts/v1/workflow-run-read.js +0 -3
  60. package/dist/creator-profile.d.ts +0 -30
  61. package/dist/creator-profile.js +0 -45
  62. package/dist/default-actor.js +0 -2
  63. package/dist/design.d.ts +0 -17
  64. package/dist/design.js +0 -18
  65. package/dist/diy-next.d.ts +18 -0
  66. package/dist/diy-next.js +13 -0
  67. package/dist/edit-billing.d.ts +0 -6
  68. package/dist/edit-billing.js +0 -10
  69. package/dist/edit-candidate.d.ts +0 -6
  70. package/dist/edit-candidate.js +0 -9
  71. package/dist/edit-document.d.ts +0 -12
  72. package/dist/edit-document.js +0 -15
  73. package/dist/edit-faceless.d.ts +0 -3
  74. package/dist/edit-faceless.js +0 -4
  75. package/dist/edit-long-form.d.ts +0 -13
  76. package/dist/edit-long-form.js +0 -17
  77. package/dist/edit-music.d.ts +397 -0
  78. package/dist/edit-music.js +77 -0
  79. package/dist/edit-operations.d.ts +0 -1
  80. package/dist/edit-operations.js +0 -2
  81. package/dist/edit-primitives.d.ts +0 -3
  82. package/dist/edit-primitives.js +0 -5
  83. package/dist/edit-revision.d.ts +0 -4
  84. package/dist/edit-revision.js +0 -6
  85. package/dist/edit-rules.d.ts +0 -3
  86. package/dist/edit-rules.js +0 -9
  87. package/dist/edit-shots.d.ts +45 -5
  88. package/dist/edit-shots.js +7 -11
  89. package/dist/edit-validate.d.ts +0 -10
  90. package/dist/edit-validate.js +0 -14
  91. package/dist/edit.js +0 -3
  92. package/dist/endpoint-notes.d.ts +0 -2
  93. package/dist/endpoint-notes.js +0 -3
  94. package/dist/endpoints.d.ts +0 -11
  95. package/dist/endpoints.js +11 -21
  96. package/dist/errors.d.ts +29 -43
  97. package/dist/errors.js +18 -54
  98. package/dist/explainer-fit.d.ts +0 -7
  99. package/dist/explainer-fit.js +0 -10
  100. package/dist/face-billing.d.ts +0 -9
  101. package/dist/face-billing.js +0 -23
  102. package/dist/face-delivery.d.ts +0 -1
  103. package/dist/face-delivery.js +0 -2
  104. package/dist/faceless-action-shots.d.ts +0 -8
  105. package/dist/faceless-action-shots.js +0 -8
  106. package/dist/faceless-customer-anchors.d.ts +0 -1
  107. package/dist/faceless-customer-anchors.js +0 -2
  108. package/dist/faceless-cut-style.js +0 -1
  109. package/dist/faceless-direction-summary.d.ts +0 -2
  110. package/dist/faceless-direction-summary.js +0 -3
  111. package/dist/faceless-image-placement.d.ts +0 -2
  112. package/dist/faceless-image-placement.js +0 -3
  113. package/dist/faceless-image-qualification.js +0 -2
  114. package/dist/faceless-media-record.d.ts +0 -6
  115. package/dist/faceless-media-record.js +0 -11
  116. package/dist/faceless-price.d.ts +0 -45
  117. package/dist/faceless-price.js +0 -64
  118. package/dist/faceless-public-plan.d.ts +0 -13
  119. package/dist/faceless-public-plan.js +0 -11
  120. package/dist/faceless-public.d.ts +0 -26
  121. package/dist/faceless-public.js +0 -59
  122. package/dist/faceless-short-61.js +0 -1
  123. package/dist/faceless-storyboard-timing.js +0 -1
  124. package/dist/faceless-storyboard-v2-plan.js +0 -1
  125. package/dist/faceless-storyboard-v2-timing.d.ts +0 -4
  126. package/dist/faceless-storyboard-v2-timing.js +0 -3
  127. package/dist/faceless-storyboard-v2.js +0 -1
  128. package/dist/faceless-storyboard.js +0 -1
  129. package/dist/faceless-voices.d.ts +0 -16
  130. package/dist/faceless-voices.js +0 -18
  131. package/dist/feedback.d.ts +0 -4
  132. package/dist/feedback.js +0 -5
  133. package/dist/film-directions.d.ts +0 -2
  134. package/dist/film-directions.js +0 -7
  135. package/dist/film-drafts.d.ts +0 -8
  136. package/dist/film-drafts.js +0 -19
  137. package/dist/film-guide.d.ts +0 -3
  138. package/dist/film-guide.js +0 -6
  139. package/dist/film-styles.d.ts +0 -5
  140. package/dist/film-styles.js +0 -8
  141. package/dist/generation-shot.d.ts +0 -5
  142. package/dist/generation-shot.js +0 -8
  143. package/dist/generations-output.d.ts +0 -2
  144. package/dist/generations-output.js +0 -5
  145. package/dist/generations.d.ts +0 -22
  146. package/dist/generations.js +21 -44
  147. package/dist/idempotency.d.ts +1 -21
  148. package/dist/idempotency.js +8 -29
  149. package/dist/index.d.ts +4 -0
  150. package/dist/index.js +4 -28
  151. package/dist/live-shot-kinds.d.ts +16 -25
  152. package/dist/live-shot-kinds.js +12 -28
  153. package/dist/long-form-pricing.d.ts +0 -5
  154. package/dist/long-form-pricing.js +0 -6
  155. package/dist/long-form-profile.d.ts +0 -3
  156. package/dist/long-form-profile.js +0 -4
  157. package/dist/long-form-revision.d.ts +0 -9
  158. package/dist/long-form-revision.js +0 -11
  159. package/dist/markdown-quote.d.ts +0 -2
  160. package/dist/markdown-quote.js +0 -3
  161. package/dist/mascots.d.ts +0 -5
  162. package/dist/mascots.js +0 -10
  163. package/dist/max-credits.d.ts +0 -1
  164. package/dist/max-credits.js +0 -2
  165. package/dist/mcp-ugc-descriptions.d.ts +0 -2
  166. package/dist/mcp-ugc-descriptions.js +1 -6
  167. package/dist/media-timebase.d.ts +0 -2
  168. package/dist/media-timebase.js +0 -6
  169. package/dist/motion-styles.d.ts +0 -8
  170. package/dist/motion-styles.js +0 -11
  171. package/dist/moves.d.ts +0 -7
  172. package/dist/moves.js +0 -9
  173. package/dist/music.d.ts +0 -5
  174. package/dist/music.js +0 -8
  175. package/dist/naming.d.ts +0 -3
  176. package/dist/naming.js +0 -19
  177. package/dist/openapi.d.ts +0 -13
  178. package/dist/openapi.js +9 -11
  179. package/dist/output-provenance.d.ts +0 -4
  180. package/dist/output-provenance.js +0 -5
  181. package/dist/own-agent-price.d.ts +21 -22
  182. package/dist/own-agent-price.js +34 -25
  183. package/dist/own-agent-runs.d.ts +351 -11
  184. package/dist/own-agent-runs.js +144 -24
  185. package/dist/pacing.d.ts +3 -15
  186. package/dist/pacing.js +18 -18
  187. package/dist/parts-pricing.d.ts +0 -28
  188. package/dist/parts-pricing.js +0 -32
  189. package/dist/post-text.d.ts +0 -2
  190. package/dist/post-text.js +0 -4
  191. package/dist/presenter-beats.d.ts +0 -10
  192. package/dist/presenter-beats.js +0 -14
  193. package/dist/presenter-matte.d.ts +0 -7
  194. package/dist/presenter-matte.js +0 -9
  195. package/dist/presenter-takes.d.ts +0 -3
  196. package/dist/presenter-takes.js +0 -8
  197. package/dist/prices.d.ts +2 -8
  198. package/dist/prices.js +13 -23
  199. package/dist/public-endpoints.d.ts +0 -11
  200. package/dist/public-endpoints.js +0 -14
  201. package/dist/public-responses.d.ts +0 -2
  202. package/dist/public-responses.js +0 -3
  203. package/dist/rate-limit.d.ts +0 -24
  204. package/dist/rate-limit.js +0 -29
  205. package/dist/reference-analysis.d.ts +57 -34
  206. package/dist/reference-analysis.js +0 -69
  207. package/dist/reference-bring.d.ts +33 -0
  208. package/dist/reference-bring.js +28 -0
  209. package/dist/reference-display.d.ts +0 -3
  210. package/dist/reference-display.js +37 -4
  211. package/dist/reference-kinds.d.ts +0 -4
  212. package/dist/reference-kinds.js +0 -6
  213. package/dist/reference-lyrics.d.ts +0 -6
  214. package/dist/reference-lyrics.js +0 -6
  215. package/dist/reference-profile.d.ts +270 -39
  216. package/dist/reference-profile.js +64 -50
  217. package/dist/reference-staging.d.ts +0 -10
  218. package/dist/reference-staging.js +0 -14
  219. package/dist/reference-text-spans.d.ts +0 -4
  220. package/dist/reference-text-spans.js +0 -7
  221. package/dist/reference-voice-over.d.ts +0 -6
  222. package/dist/reference-voice-over.js +0 -7
  223. package/dist/reference-voice.d.ts +0 -7
  224. package/dist/reference-voice.js +0 -12
  225. package/dist/render-backend.d.ts +0 -30
  226. package/dist/render-backend.js +0 -5
  227. package/dist/resolved-timeline.d.ts +0 -4
  228. package/dist/resolved-timeline.js +1 -31
  229. package/dist/run-media.d.ts +0 -1
  230. package/dist/run-media.js +0 -2
  231. package/dist/run-preflight.d.ts +0 -4
  232. package/dist/run-preflight.js +0 -11
  233. package/dist/run-static-warnings.d.ts +0 -8
  234. package/dist/run-static-warnings.js +0 -38
  235. package/dist/runs.d.ts +0 -32
  236. package/dist/runs.js +0 -50
  237. package/dist/scene-bible.d.ts +15 -7
  238. package/dist/scene-bible.js +15 -10
  239. package/dist/scene-graph.d.ts +0 -12
  240. package/dist/scene-graph.js +0 -24
  241. package/dist/scene-place.d.ts +0 -25
  242. package/dist/scene-place.js +0 -24
  243. package/dist/scene-proposal.d.ts +0 -3
  244. package/dist/scene-proposal.js +0 -9
  245. package/dist/script-integrity.d.ts +0 -6
  246. package/dist/script-integrity.js +0 -8
  247. package/dist/script-voice.d.ts +0 -7
  248. package/dist/script-voice.js +0 -16
  249. package/dist/semantic-inserts.d.ts +0 -7
  250. package/dist/semantic-inserts.js +0 -10
  251. package/dist/skill-theme-explainer.js +0 -5
  252. package/dist/skill-theme.d.ts +0 -13
  253. package/dist/skill-theme.js +0 -25
  254. package/dist/skills.d.ts +22 -86
  255. package/dist/skills.js +21 -167
  256. package/dist/speech-rhythm-contract.js +0 -1
  257. package/dist/speech-rhythm.d.ts +0 -4
  258. package/dist/speech-rhythm.js +0 -2
  259. package/dist/templates/backdrop.d.ts +0 -3
  260. package/dist/templates/backdrop.js +0 -5
  261. package/dist/templates/callout.d.ts +0 -4
  262. package/dist/templates/callout.js +0 -6
  263. package/dist/templates/chart.d.ts +0 -4
  264. package/dist/templates/chart.js +0 -6
  265. package/dist/templates/chat-window.d.ts +0 -8
  266. package/dist/templates/chat-window.js +0 -10
  267. package/dist/templates/checklist.d.ts +0 -3
  268. package/dist/templates/checklist.js +0 -6
  269. package/dist/templates/comment-cta.d.ts +0 -14
  270. package/dist/templates/comment-cta.js +0 -19
  271. package/dist/templates/compare.d.ts +0 -6
  272. package/dist/templates/compare.js +0 -7
  273. package/dist/templates/cover-story.d.ts +0 -1
  274. package/dist/templates/cover-story.js +0 -3
  275. package/dist/templates/end-card.d.ts +0 -2
  276. package/dist/templates/end-card.js +0 -3
  277. package/dist/templates/hand-title.d.ts +0 -5
  278. package/dist/templates/hand-title.js +0 -9
  279. package/dist/templates/index.d.ts +0 -57
  280. package/dist/templates/index.js +0 -60
  281. package/dist/templates/lower-third.d.ts +0 -4
  282. package/dist/templates/lower-third.js +0 -5
  283. package/dist/templates/notification.d.ts +0 -6
  284. package/dist/templates/notification.js +0 -7
  285. package/dist/templates/phone-call.d.ts +0 -2
  286. package/dist/templates/phone-call.js +0 -6
  287. package/dist/templates/phone-screen.d.ts +0 -5
  288. package/dist/templates/phone-screen.js +0 -7
  289. package/dist/templates/pointer-chips.d.ts +0 -4
  290. package/dist/templates/pointer-chips.js +0 -6
  291. package/dist/templates/progress.d.ts +0 -3
  292. package/dist/templates/progress.js +0 -5
  293. package/dist/templates/quote.d.ts +0 -3
  294. package/dist/templates/quote.js +0 -4
  295. package/dist/templates/race.d.ts +0 -5
  296. package/dist/templates/race.js +0 -7
  297. package/dist/templates/rating.d.ts +0 -3
  298. package/dist/templates/rating.js +0 -5
  299. package/dist/templates/series-frame.d.ts +0 -16
  300. package/dist/templates/series-frame.js +0 -19
  301. package/dist/templates/size.d.ts +0 -7
  302. package/dist/templates/size.js +0 -8
  303. package/dist/templates/slot.d.ts +0 -2
  304. package/dist/templates/slot.js +0 -2
  305. package/dist/templates/sounds.d.ts +24 -12
  306. package/dist/templates/sounds.js +2 -16
  307. package/dist/templates/stat.d.ts +0 -3
  308. package/dist/templates/stat.js +0 -5
  309. package/dist/templates/tag.d.ts +0 -3
  310. package/dist/templates/tag.js +0 -5
  311. package/dist/templates/terminal.d.ts +0 -6
  312. package/dist/templates/terminal.js +0 -8
  313. package/dist/templates/theme.d.ts +0 -7
  314. package/dist/templates/theme.js +0 -9
  315. package/dist/templates/title-card.d.ts +0 -3
  316. package/dist/templates/title-card.js +0 -5
  317. package/dist/templates/video-grid.d.ts +0 -5
  318. package/dist/templates/video-grid.js +0 -8
  319. package/dist/templates/word-fill.d.ts +0 -3
  320. package/dist/templates/word-fill.js +0 -4
  321. package/dist/templates/word-title.d.ts +0 -2
  322. package/dist/templates/word-title.js +0 -4
  323. package/dist/trend-niches.d.ts +0 -11
  324. package/dist/trend-niches.js +0 -16
  325. package/dist/trend-search.d.ts +0 -66
  326. package/dist/trend-search.js +0 -70
  327. package/dist/tts-backend.d.ts +0 -19
  328. package/dist/tts-backend.js +0 -7
  329. package/dist/ugc-call.d.ts +0 -16
  330. package/dist/ugc-call.js +0 -21
  331. package/dist/ugc-delivery.d.ts +0 -2
  332. package/dist/ugc-delivery.js +0 -4
  333. package/dist/ugc-framing.d.ts +0 -4
  334. package/dist/ugc-framing.js +0 -6
  335. package/dist/ugc-interview.d.ts +0 -18
  336. package/dist/ugc-interview.js +0 -24
  337. package/dist/ugc-layers.d.ts +0 -39
  338. package/dist/ugc-layers.js +0 -39
  339. package/dist/ugc-scenes.d.ts +0 -2
  340. package/dist/ugc-scenes.js +0 -5
  341. package/dist/ugc-video-media.d.ts +0 -5
  342. package/dist/ugc-video-media.js +0 -7
  343. package/dist/uploads.d.ts +0 -14
  344. package/dist/uploads.js +0 -17
  345. package/dist/vendor-response.d.ts +0 -19
  346. package/dist/vendor-response.js +0 -22
  347. package/dist/video-size.d.ts +0 -4
  348. package/dist/video-size.js +0 -7
  349. package/dist/voice-admission.d.ts +0 -11
  350. package/dist/voice-admission.js +0 -13
  351. package/dist/voice-catalog-data.d.ts +0 -2
  352. package/dist/voice-catalog-data.js +0 -3
  353. package/dist/voice-catalog.d.ts +0 -6
  354. package/dist/voice-catalog.js +0 -8
  355. package/dist/voice-listing.d.ts +0 -6
  356. package/dist/voice-listing.js +0 -14
  357. package/dist/voice-pace.d.ts +0 -4
  358. package/dist/voice-pace.js +0 -7
  359. package/dist/voice-preview-approval.js +0 -1
  360. package/dist/voices.d.ts +4 -69
  361. package/dist/voices.js +3 -88
  362. package/dist/workflows/catalog.d.ts +0 -2
  363. package/dist/workflows/catalog.js +0 -4
  364. package/dist/workflows/film-directions.d.ts +0 -3
  365. package/dist/workflows/film-directions.js +0 -4
  366. package/dist/workflows/index.js +0 -1
  367. package/dist/workflows/methods/faceless-explainer.d.ts +31 -0
  368. package/dist/workflows/methods/faceless-explainer.js +0 -1
  369. package/dist/workflows/methods/kinetic-launch.d.ts +62 -1
  370. package/dist/workflows/methods/kinetic-launch.js +0 -2
  371. package/dist/workflows/methods/product-image-story.d.ts +31 -0
  372. package/dist/workflows/methods/product-image-story.js +0 -1
  373. package/dist/workflows/methods/reference-remake.d.ts +31 -0
  374. package/dist/workflows/methods/reference-remake.js +0 -1
  375. package/dist/workflows/methods/shared.d.ts +31 -1
  376. package/dist/workflows/methods/shared.js +0 -3
  377. package/dist/workflows/methods/ugc-faq-answer.d.ts +31 -0
  378. package/dist/workflows/methods/ugc-faq-answer.js +0 -1
  379. package/dist/workflows/methods/ugc-product-intro.d.ts +31 -0
  380. package/dist/workflows/methods/ugc-product-intro.js +0 -1
  381. package/dist/workflows/methods/website-proof-demo.d.ts +62 -1
  382. package/dist/workflows/methods/website-proof-demo.js +0 -2
  383. package/dist/workflows/motion-director.d.ts +0 -11
  384. package/dist/workflows/motion-director.js +0 -11
  385. package/dist/workflows/product-references.js +0 -1
  386. package/dist/workflows/reference-remake.d.ts +114 -17
  387. package/dist/workflows/reference-remake.js +0 -167
  388. package/dist/workflows/remake-chooser.d.ts +0 -6
  389. package/dist/workflows/remake-chooser.js +0 -4
  390. package/dist/workflows/remake-motion.d.ts +0 -16
  391. package/dist/workflows/remake-motion.js +0 -19
  392. package/dist/workflows/validate.d.ts +0 -1
  393. package/dist/workflows/validate.js +0 -5
  394. package/dist/workflows.js +0 -1
  395. package/package.json +1 -1
  396. package/dist/account-actors.js.map +0 -1
  397. package/dist/account.js.map +0 -1
  398. package/dist/actor-bounds.js.map +0 -1
  399. package/dist/actor-qualities.js.map +0 -1
  400. package/dist/actors.js.map +0 -1
  401. package/dist/ad-guide.js.map +0 -1
  402. package/dist/ad-pause-trim.js.map +0 -1
  403. package/dist/api-failure.js.map +0 -1
  404. package/dist/aspect.js.map +0 -1
  405. package/dist/asset-identity.js.map +0 -1
  406. package/dist/assets.js.map +0 -1
  407. package/dist/billing-terms.js.map +0 -1
  408. package/dist/brand-styles.js.map +0 -1
  409. package/dist/broll-policy.js.map +0 -1
  410. package/dist/canvas-fit.js.map +0 -1
  411. package/dist/caption-funnel.js.map +0 -1
  412. package/dist/caption-geometry.js.map +0 -1
  413. package/dist/caption-language.js.map +0 -1
  414. package/dist/contract-dispositions.js.map +0 -1
  415. package/dist/contracts/v1/workflow-brief.js.map +0 -1
  416. package/dist/contracts/v1/workflow-catalog.js.map +0 -1
  417. package/dist/contracts/v1/workflow-client.js.map +0 -1
  418. package/dist/contracts/v1/workflow-dto.js.map +0 -1
  419. package/dist/contracts/v1/workflow-evidence.js.map +0 -1
  420. package/dist/contracts/v1/workflow-execution.js.map +0 -1
  421. package/dist/contracts/v1/workflow-next.js.map +0 -1
  422. package/dist/contracts/v1/workflow-plan.js.map +0 -1
  423. package/dist/contracts/v1/workflow-primitives.js.map +0 -1
  424. package/dist/contracts/v1/workflow-run-read.js.map +0 -1
  425. package/dist/creator-profile.js.map +0 -1
  426. package/dist/default-actor.js.map +0 -1
  427. package/dist/design.js.map +0 -1
  428. package/dist/edit-billing.js.map +0 -1
  429. package/dist/edit-candidate.js.map +0 -1
  430. package/dist/edit-document.js.map +0 -1
  431. package/dist/edit-faceless.js.map +0 -1
  432. package/dist/edit-long-form.js.map +0 -1
  433. package/dist/edit-operations.js.map +0 -1
  434. package/dist/edit-primitives.js.map +0 -1
  435. package/dist/edit-revision.js.map +0 -1
  436. package/dist/edit-rules.js.map +0 -1
  437. package/dist/edit-shots.js.map +0 -1
  438. package/dist/edit-validate.js.map +0 -1
  439. package/dist/edit.js.map +0 -1
  440. package/dist/endpoint-notes.js.map +0 -1
  441. package/dist/endpoints.js.map +0 -1
  442. package/dist/errors.js.map +0 -1
  443. package/dist/explainer-fit.js.map +0 -1
  444. package/dist/face-billing.js.map +0 -1
  445. package/dist/face-delivery.js.map +0 -1
  446. package/dist/faceless-action-shots.js.map +0 -1
  447. package/dist/faceless-customer-anchors.js.map +0 -1
  448. package/dist/faceless-cut-style.js.map +0 -1
  449. package/dist/faceless-direction-summary.js.map +0 -1
  450. package/dist/faceless-image-placement.js.map +0 -1
  451. package/dist/faceless-image-qualification.js.map +0 -1
  452. package/dist/faceless-media-record.js.map +0 -1
  453. package/dist/faceless-price.js.map +0 -1
  454. package/dist/faceless-public-plan.js.map +0 -1
  455. package/dist/faceless-public.js.map +0 -1
  456. package/dist/faceless-short-61.js.map +0 -1
  457. package/dist/faceless-storyboard-timing.js.map +0 -1
  458. package/dist/faceless-storyboard-v2-plan.js.map +0 -1
  459. package/dist/faceless-storyboard-v2-timing.js.map +0 -1
  460. package/dist/faceless-storyboard-v2.js.map +0 -1
  461. package/dist/faceless-storyboard.js.map +0 -1
  462. package/dist/faceless-voices.js.map +0 -1
  463. package/dist/feedback.js.map +0 -1
  464. package/dist/film-directions.js.map +0 -1
  465. package/dist/film-drafts.js.map +0 -1
  466. package/dist/film-guide.js.map +0 -1
  467. package/dist/film-styles.js.map +0 -1
  468. package/dist/generation-shot.js.map +0 -1
  469. package/dist/generations-output.js.map +0 -1
  470. package/dist/generations.js.map +0 -1
  471. package/dist/idempotency.js.map +0 -1
  472. package/dist/index.js.map +0 -1
  473. package/dist/live-shot-kinds.js.map +0 -1
  474. package/dist/long-form-pricing.js.map +0 -1
  475. package/dist/long-form-profile.js.map +0 -1
  476. package/dist/long-form-revision.js.map +0 -1
  477. package/dist/markdown-quote.js.map +0 -1
  478. package/dist/mascots.js.map +0 -1
  479. package/dist/max-credits.js.map +0 -1
  480. package/dist/mcp-ugc-descriptions.js.map +0 -1
  481. package/dist/media-timebase.js.map +0 -1
  482. package/dist/motion-styles.js.map +0 -1
  483. package/dist/moves.js.map +0 -1
  484. package/dist/music.js.map +0 -1
  485. package/dist/naming.js.map +0 -1
  486. package/dist/openapi.js.map +0 -1
  487. package/dist/output-provenance.js.map +0 -1
  488. package/dist/own-agent-price.js.map +0 -1
  489. package/dist/own-agent-runs.js.map +0 -1
  490. package/dist/pacing.js.map +0 -1
  491. package/dist/parts-pricing.js.map +0 -1
  492. package/dist/post-text.js.map +0 -1
  493. package/dist/presenter-beats.js.map +0 -1
  494. package/dist/presenter-matte.js.map +0 -1
  495. package/dist/presenter-takes.js.map +0 -1
  496. package/dist/prices.js.map +0 -1
  497. package/dist/public-endpoints.js.map +0 -1
  498. package/dist/public-responses.js.map +0 -1
  499. package/dist/rate-limit.js.map +0 -1
  500. package/dist/reference-analysis.js.map +0 -1
  501. package/dist/reference-display.js.map +0 -1
  502. package/dist/reference-kinds.js.map +0 -1
  503. package/dist/reference-lyrics.js.map +0 -1
  504. package/dist/reference-profile.js.map +0 -1
  505. package/dist/reference-staging.js.map +0 -1
  506. package/dist/reference-text-spans.js.map +0 -1
  507. package/dist/reference-voice-over.js.map +0 -1
  508. package/dist/reference-voice.js.map +0 -1
  509. package/dist/render-backend.js.map +0 -1
  510. package/dist/resolved-timeline.js.map +0 -1
  511. package/dist/run-media.js.map +0 -1
  512. package/dist/run-preflight.js.map +0 -1
  513. package/dist/run-static-warnings.js.map +0 -1
  514. package/dist/runs.js.map +0 -1
  515. package/dist/scene-bible.js.map +0 -1
  516. package/dist/scene-graph.js.map +0 -1
  517. package/dist/scene-place.js.map +0 -1
  518. package/dist/scene-proposal.js.map +0 -1
  519. package/dist/script-integrity.js.map +0 -1
  520. package/dist/script-voice.js.map +0 -1
  521. package/dist/semantic-inserts.js.map +0 -1
  522. package/dist/skill-theme-explainer.js.map +0 -1
  523. package/dist/skill-theme.js.map +0 -1
  524. package/dist/skills.js.map +0 -1
  525. package/dist/speech-rhythm-contract.js.map +0 -1
  526. package/dist/speech-rhythm.js.map +0 -1
  527. package/dist/templates/backdrop.js.map +0 -1
  528. package/dist/templates/callout.js.map +0 -1
  529. package/dist/templates/chart.js.map +0 -1
  530. package/dist/templates/chat-window.js.map +0 -1
  531. package/dist/templates/checklist.js.map +0 -1
  532. package/dist/templates/comment-cta.js.map +0 -1
  533. package/dist/templates/compare.js.map +0 -1
  534. package/dist/templates/cover-story.js.map +0 -1
  535. package/dist/templates/end-card.js.map +0 -1
  536. package/dist/templates/hand-title.js.map +0 -1
  537. package/dist/templates/index.js.map +0 -1
  538. package/dist/templates/lower-third.js.map +0 -1
  539. package/dist/templates/notification.js.map +0 -1
  540. package/dist/templates/phone-call.js.map +0 -1
  541. package/dist/templates/phone-screen.js.map +0 -1
  542. package/dist/templates/pointer-chips.js.map +0 -1
  543. package/dist/templates/progress.js.map +0 -1
  544. package/dist/templates/quote.js.map +0 -1
  545. package/dist/templates/race.js.map +0 -1
  546. package/dist/templates/rating.js.map +0 -1
  547. package/dist/templates/series-frame.js.map +0 -1
  548. package/dist/templates/size.js.map +0 -1
  549. package/dist/templates/slot.js.map +0 -1
  550. package/dist/templates/sounds.js.map +0 -1
  551. package/dist/templates/stat.js.map +0 -1
  552. package/dist/templates/tag.js.map +0 -1
  553. package/dist/templates/terminal.js.map +0 -1
  554. package/dist/templates/theme.js.map +0 -1
  555. package/dist/templates/title-card.js.map +0 -1
  556. package/dist/templates/video-grid.js.map +0 -1
  557. package/dist/templates/word-fill.js.map +0 -1
  558. package/dist/templates/word-title.js.map +0 -1
  559. package/dist/trend-niches.js.map +0 -1
  560. package/dist/trend-search.js.map +0 -1
  561. package/dist/tts-backend.js.map +0 -1
  562. package/dist/ugc-call.js.map +0 -1
  563. package/dist/ugc-delivery.js.map +0 -1
  564. package/dist/ugc-framing.js.map +0 -1
  565. package/dist/ugc-interview.js.map +0 -1
  566. package/dist/ugc-layers.js.map +0 -1
  567. package/dist/ugc-scenes.js.map +0 -1
  568. package/dist/ugc-video-media.js.map +0 -1
  569. package/dist/uploads.js.map +0 -1
  570. package/dist/vendor-response.js.map +0 -1
  571. package/dist/video-size.js.map +0 -1
  572. package/dist/voice-admission.js.map +0 -1
  573. package/dist/voice-catalog-data.js.map +0 -1
  574. package/dist/voice-catalog.js.map +0 -1
  575. package/dist/voice-listing.js.map +0 -1
  576. package/dist/voice-pace.js.map +0 -1
  577. package/dist/voice-preview-approval.js.map +0 -1
  578. package/dist/voices.js.map +0 -1
  579. package/dist/workflows/catalog.js.map +0 -1
  580. package/dist/workflows/film-directions.js.map +0 -1
  581. package/dist/workflows/index.js.map +0 -1
  582. package/dist/workflows/methods/faceless-explainer.js.map +0 -1
  583. package/dist/workflows/methods/kinetic-launch.js.map +0 -1
  584. package/dist/workflows/methods/product-image-story.js.map +0 -1
  585. package/dist/workflows/methods/reference-remake.js.map +0 -1
  586. package/dist/workflows/methods/shared.js.map +0 -1
  587. package/dist/workflows/methods/ugc-faq-answer.js.map +0 -1
  588. package/dist/workflows/methods/ugc-product-intro.js.map +0 -1
  589. package/dist/workflows/methods/website-proof-demo.js.map +0 -1
  590. package/dist/workflows/motion-director.js.map +0 -1
  591. package/dist/workflows/product-references.js.map +0 -1
  592. package/dist/workflows/reference-remake.js.map +0 -1
  593. package/dist/workflows/remake-chooser.js.map +0 -1
  594. package/dist/workflows/remake-motion.js.map +0 -1
  595. package/dist/workflows/validate.js.map +0 -1
  596. package/dist/workflows.js.map +0 -1
@@ -1,5 +1,8 @@
1
1
  import { z } from "zod";
2
2
  import { assetId } from "./asset-identity.js";
3
+ import { adId, adSlotId } from "./ad-ids.js";
4
+ import { diyBlocked, diyNext } from "./diy-next.js";
5
+ import { editMusic } from "./edit-music.js";
3
6
  import { EXPLAINER_MAX_PRODUCT_PICTURES, facelessCustomerSceneImage, qualifiedImageUrl } from "./faceless-public.js";
4
7
  import { FACELESS_VOICE_NAMES } from "./faceless-voices.js";
5
8
  import { filmDraftId } from "./film-drafts.js";
@@ -7,8 +10,6 @@ import { MASCOT_POSES } from "./mascots.js";
7
10
  import { maxCreditsField } from "./max-credits.js";
8
11
  import { OWN_AGENT_SKILLS, OWN_FREE_STILLS, OWN_FREE_STILLS_WINDOW_HOURS, OWN_STILLS_MAX_PER_CALL, OWN_STILLS_SINGLE_MAX, OWN_VOICE_MAX_SECONDS } from "./own-agent-price.js";
9
12
  import { runId } from "./runs.js";
10
- // The paid runs of the «own agent» mode (#1291 F2): stills of a draft revision, a voice with word timings, the film's render, a hero saved as
11
- // a mascot. Each is quoted first, holds its ceiling at admission, is charged by what it delivered; its status lives in `/v1/runs/{id}`.
12
13
  export const FILM_STILLS_QUOTE_PATH = "/v1/film-stills/quote";
13
14
  export const FILM_STILLS_PATH = "/v1/film-stills";
14
15
  export const FILM_VOICES_QUOTE_PATH = "/v1/film-voices/quote";
@@ -17,18 +18,19 @@ export const FILM_RENDERS_QUOTE_PATH = "/v1/film-renders/quote";
17
18
  export const FILM_RENDERS_PATH = "/v1/film-renders";
18
19
  export const FILM_HEROES_QUOTE_PATH = "/v1/film-heroes/quote";
19
20
  export const FILM_HEROES_PATH = "/v1/film-heroes";
21
+ export const FILM_EDITS_QUOTE_PATH = "/v1/film-edits/quote";
22
+ export const FILM_EDITS_PATH = "/v1/film-edits";
23
+ export const TAKE_FRAMES_QUOTE_PATH = "/v1/take-frames/quote";
24
+ export const TAKE_FRAMES_PATH = "/v1/take-frames";
25
+ export const TAKE_CHECKS_QUOTE_PATH = "/v1/take-checks/quote";
26
+ export const TAKE_CHECKS_PATH = "/v1/take-checks";
20
27
  export const FILM_RUN_PATH = "/v1/film-runs/:id";
21
28
  export const OWN_AGENT_FILM_TASK = "own-agent-film";
22
- /** The frame rate of a still's timeline (the SkillFilm composition's) and of the delivered film. */
23
29
  export const FILM_STILL_FPS = 30, FILM_RENDER_FPS = 25;
24
- /** A still asked by anchor shows the moment this long after it, so the anchor's entrance has played. */
25
30
  export const FILM_STILL_ANCHOR_LAG_SEC = 0.25;
26
- /** The film runs this long after the voice's last sound. */
27
31
  export const FILM_TAIL_SEC = 0.8;
28
- /** The slowest narration pace a voice is held at, characters a second, and the most characters one take speaks. */
29
32
  export const OWN_VOICE_SLOWEST_CHARS_PER_SECOND = 13, OWN_VOICE_MAX_CHARS = 1500;
30
33
  const anchor = z.string().regex(/^[A-Za-z_]\w{0,40}$/, "an anchor is an identifier");
31
- /** The customer's product pictures a run places (#1356): each run takes them, so the stills and the render read the same list. */
32
34
  const sceneImages = z.array(facelessCustomerSceneImage).max(EXPLAINER_MAX_PRODUCT_PICTURES).optional()
33
35
  .describe(`Up to ${EXPLAINER_MAX_PRODUCT_PICTURES} of your product pictures, p1 first: each on the script words its anchor names, placed by ` +
34
36
  "your code with <Product id=\"p1\"/> while those words are spoken. Send the same list to the stills and the render");
@@ -56,7 +58,127 @@ export const filmRenderInput = z.strictObject({
56
58
  scene_images: sceneImages,
57
59
  max_credits: maxCreditsField,
58
60
  });
59
- /** What a hero is drawn from, at least one: a character named by picture or words, else the meaning of the film's script. */
61
+ export const FILM_EDIT_WIDTH = 720, FILM_EDIT_HEIGHT = 1280, FILM_EDIT_FPS = 25;
62
+ export const FILM_EDIT_MAX_CLIPS = 24, FILM_EDIT_MAX_PIECES = 24, FILM_EDIT_MAX_CAPTIONS = 160, FILM_EDIT_MAX_HOLD_SEC = 3;
63
+ export const FILM_EDIT_CAPTION_POSITIONS = ["top", "middle", "bottom", "low"];
64
+ export const FILM_EDIT_CAPTION_STYLES = ["outline", "banner", "badge"];
65
+ export const FILM_EDIT_CAPTION_ALIGNS = ["center", "left"];
66
+ const editSecond = z.number().min(0).max(600);
67
+ const editClip = z.strictObject({
68
+ run_id: runId.optional().describe("A delivered generate_video run of this account"),
69
+ asset_id: assetId.optional().describe("Instead of run_id: a video asset of this account"),
70
+ from: editSecond.describe("The second of the clip the cut starts at"),
71
+ to: editSecond.describe("The second of the clip the cut ends at, after from"),
72
+ speed: z.number().min(0.5).max(2).default(1).describe("Play speed; the clip lasts (to - from) / speed in the edit. 1.2 lifts a slow beat"),
73
+ slot: adSlotId.optional().describe("With ad_id: the slot of the ad this clip fills; its take must have passed check_take in that slot"),
74
+ }).refine(clip => (clip.run_id === undefined) !== (clip.asset_id === undefined), "name the clip by run_id or by asset_id, one of them")
75
+ .refine(clip => clip.to > clip.from, "to must be after from");
76
+ const voicePiece = z.strictObject({
77
+ from: editSecond.describe("The second of the take the piece starts at (make_voice words give each word's start and end)"),
78
+ to: editSecond.describe("The second of the take the piece ends at, after from"),
79
+ at: editSecond.describe("The second of the edit the piece is heard from"),
80
+ }).refine(piece => piece.to > piece.from, "to must be after from");
81
+ const editCaption = z.strictObject({
82
+ text: z.string().trim().min(1).max(40).regex(/^[^\n{}\\]+$/, "one line, without braces or backslashes")
83
+ .describe("What the caption reads, as written: 2 to 4 words in capitals read best"),
84
+ start: editSecond.describe("The second of the edit it appears"),
85
+ end: editSecond.describe("The second of the edit it goes, after start"),
86
+ position: z.enum(FILM_EDIT_CAPTION_POSITIONS).default("bottom")
87
+ .describe("Where it sits; pick the one that keeps it off the product, its print, the working hands and the face"),
88
+ align: z.enum(FILM_EDIT_CAPTION_ALIGNS).default("center").describe("center, or left to sit at the frame's left edge"),
89
+ style: z.enum(FILM_EDIT_CAPTION_STYLES).default("outline")
90
+ .describe("outline: bold white with a dark outline; banner: a band across the frame that stays for its seconds; badge: the words on a filled box"),
91
+ color: z.string().regex(/^#[0-9a-fA-F]{6}$/, "a hex colour such as #F4EBD9").optional()
92
+ .describe("The fill of the boxed word, the badge or the banner, as #RRGGBB; omitted, white. The words take black or white, whichever reads"),
93
+ highlight: z.number().int().min(0).max(9).optional()
94
+ .describe("outline only: the place of the word drawn in a filled box (0 for the first), the word being spoken"),
95
+ }).refine(caption => caption.end > caption.start, "end must be after start")
96
+ .refine(caption => caption.highlight === undefined || caption.style === "outline", "highlight boxes a word of an outline caption only")
97
+ .refine(caption => caption.color === undefined || caption.style !== "outline" || caption.highlight !== undefined, "color fills a boxed word, a badge or a banner; an outline caption without highlight has none")
98
+ .refine(caption => caption.highlight === undefined || caption.highlight < caption.text.split(/\s+/).length, "highlight names a word the caption does not have");
99
+ export const filmEditInput = z.strictObject({
100
+ clips: z.array(editClip).min(1).max(FILM_EDIT_MAX_CLIPS)
101
+ .describe("The cut in order, each a window of one of your clips; they play back to back with hard cuts"),
102
+ voice: z.strictObject({
103
+ run_id: runId.describe("A delivered make_voice run of this account"),
104
+ at: editSecond.default(0.1).describe("Without pieces: the second of the edit the whole take starts at"),
105
+ pieces: z.array(voicePiece).min(1).max(FILM_EDIT_MAX_PIECES).optional()
106
+ .describe("Instead of the whole take: its sentences laid one by one, each on the second its picture starts; pieces may not overlap"),
107
+ }).optional().describe("The voice-over; without it the edit is silent"),
108
+ captions: z.array(editCaption).max(FILM_EDIT_MAX_CAPTIONS).default([])
109
+ .describe("Burned-in captions, each in its style: outline (default), banner or badge"),
110
+ hold: z.number().min(0).max(FILM_EDIT_MAX_HOLD_SEC).default(0)
111
+ .describe("Seconds the last frame is held at the end, for the packshot"),
112
+ music: editMusic.optional().describe("Music from at to the end: a library track (free) or one made for the cut (paid on delivery); " +
113
+ "under a voice it plays lower"),
114
+ ad_id: adId.optional().describe("The ad record this cut belongs to: every clip then names its slot, and a slot whose take has not passed " +
115
+ "check_take is refused before any credits"),
116
+ max_credits: maxCreditsField,
117
+ }).refine(edit => edit.ad_id !== undefined || edit.clips.every(clip => clip.slot === undefined), "a clip's slot needs ad_id")
118
+ .refine(edit => edit.ad_id === undefined || edit.clips.every(clip => clip.slot !== undefined), "with ad_id, every clip names its slot");
119
+ export const TAKE_FRAMES_COLUMNS = 8, TAKE_FRAMES_CELL_WIDTH = 240, TAKE_FRAMES_PER_SHEET = 24;
120
+ export const TAKE_FRAMES_MIN_FPS = 1, TAKE_FRAMES_MAX_FPS = 24, TAKE_FRAMES_DEFAULT_FPS = 8;
121
+ export const TAKE_CHECK_PROMPT_MAX_CHARS = 1500, TAKE_CHECK_MAX_MOVES = 5;
122
+ export const TAKE_MOTION_FORMATS = ["fashion", "product"];
123
+ export const TAKE_MOTION_TARGETS = {
124
+ fashion: { subject: 11, camera: 5 }, product: { subject: 1.5, camera: null }
125
+ };
126
+ export const TAKE_SHAKE_LIMIT = 4;
127
+ const takeSecond = z.number().min(0).max(600);
128
+ const takeSource = {
129
+ run_id: runId.optional().describe("The take: a delivered generate_video run of this account"),
130
+ asset_id: assetId.optional().describe("Instead of run_id: a video asset of this account"),
131
+ };
132
+ const oneTake = (take) => (take.run_id === undefined) !== (take.asset_id === undefined);
133
+ const ONE_TAKE = "name the take by run_id or by asset_id, one of them";
134
+ export const takeFramesInput = z.strictObject({
135
+ ...takeSource,
136
+ fps: z.number().int().min(TAKE_FRAMES_MIN_FPS).max(TAKE_FRAMES_MAX_FPS).default(TAKE_FRAMES_DEFAULT_FPS)
137
+ .describe("Frames a second: 8 to read the whole take, 12 to 24 on a contact"),
138
+ from: takeSecond.optional().describe("The second of the take the frames start at; omitted, its start"),
139
+ to: takeSecond.optional().describe("The second of the take the frames end at; omitted, its end"),
140
+ crop: z.strictObject({
141
+ x: z.number().min(0).max(0.95), y: z.number().min(0).max(0.95), w: z.number().min(0.05).max(1), h: z.number().min(0.05).max(1),
142
+ }).refine(c => c.x + c.w <= 1 + 1e-9 && c.y + c.h <= 1 + 1e-9, "the crop stays inside the frame: x + w and y + h at most 1").optional()
143
+ .describe("Only this part of the frame, enlarged: x, y from the top-left corner and w, h, each a share of the frame's width or height"),
144
+ max_credits: maxCreditsField,
145
+ }).refine(oneTake, ONE_TAKE).refine(v => v.from === undefined || v.to === undefined || v.to > v.from, "to must be after from");
146
+ export const takeCheckInput = z.strictObject({
147
+ ...takeSource,
148
+ direction: z.string().trim().min(1).max(TAKE_CHECK_PROMPT_MAX_CHARS)
149
+ .describe("What the take was asked to show: the shot's part of the prompt you made it with (its action and timeline), up to 1500 characters"),
150
+ product_image: qualifiedImageUrl.optional()
151
+ .describe("https picture of the product as it really is (your upload or a saved asset): the take's product is compared with it"),
152
+ moves: z.array(takeSecond).max(TAKE_CHECK_MAX_MOVES).optional()
153
+ .describe("Seconds of the take where a hand meets the product (a grip, a lid, a set-down): looked at first"),
154
+ ad_id: adId.optional().describe("With slot: the ad record the verdict joins, as a take of that slot"),
155
+ slot: adSlotId.optional().describe("With ad_id: the slot of the ad this take is for"),
156
+ format: z.enum(TAKE_MOTION_FORMATS).optional().describe("What the take's motion is measured against: fashion (people and clothes in " +
157
+ "motion: fashion, lifestyle, sport) or product (a product worked in the hands); omitted, product"),
158
+ max_credits: maxCreditsField,
159
+ }).refine(oneTake, ONE_TAKE).refine(v => (v.ad_id === undefined) === (v.slot === undefined), "ad_id and slot go together");
160
+ export const TAKE_DEFECT_LEVELS = ["asset", "action", "camera", "roll"];
161
+ const takeWindow = z.strictObject({ from: z.number().min(0), to: z.number().min(0) });
162
+ const motionNumbers = {
163
+ subject: z.number().nonnegative().describe("How much the subject moves once the camera's own move is taken out: mean change of brightness between frames, 0 to 255"),
164
+ camera: z.number().nonnegative().describe("How fast the camera travels on its smooth path, percent of the frame's width a second"),
165
+ jitter: z.number().nonnegative().describe("Camera shake: how far the camera strays from that smooth path, percent of the frame's width a step"),
166
+ };
167
+ export const takeMotionWindow = z.strictObject({ from: z.number().min(0), to: z.number().min(0), ...motionNumbers });
168
+ export const takeMotion = z.strictObject({
169
+ format: z.enum(TAKE_MOTION_FORMATS),
170
+ target: z.strictObject({ subject: z.number().nonnegative(), camera: z.number().nonnegative().nullable() }),
171
+ ...motionNumbers,
172
+ windows: z.array(takeMotionWindow),
173
+ finding: z.string().nullable().describe("too static for this format, with what to change; null when every window reaches the target"),
174
+ shake: z.string().nullable().describe("camera shake past the limit, with what to change; null when the camera is steady"),
175
+ });
176
+ export const takeCheckVerdict = z.strictObject({ duration_sec: z.number().positive(),
177
+ findings: z.array(z.strictObject({ code: z.string(), level: z.enum(TAKE_DEFECT_LEVELS), from: z.number().min(0), to: z.number().min(0),
178
+ whole_take: z.boolean(), why: z.string().nullable() })),
179
+ clean: z.array(takeWindow),
180
+ motion: takeMotion.optional() });
181
+ export const takeCheckPassed = (verdict) => verdict.clean.length > 0 && !verdict.findings.some(finding => finding.whole_take);
60
182
  export const FILM_HERO_SOURCE_FIELDS = ["character_reference", "character_details", "script", "voice_run_id"];
61
183
  export const filmHeroInput = z.strictObject({
62
184
  character_reference: qualifiedImageUrl.optional().describe("https image of the character the poses are drawn after: a public picture, your upload, a " +
@@ -70,39 +192,36 @@ export const filmHeroInput = z.strictObject({
70
192
  max_credits: maxCreditsField,
71
193
  }).refine(value => value.mascot_id !== undefined || FILM_HERO_SOURCE_FIELDS.some(field => value[field] !== undefined), "name the hero with character_reference or character_details, pass script or voice_run_id, or pass mascot_id")
72
194
  .refine(value => value.mascot_id === undefined || FILM_HERO_SOURCE_FIELDS.every(field => value[field] === undefined), `mascot_id completes a saved mascot and takes no other field: drop ${FILM_HERO_SOURCE_FIELDS.join(", ")}`);
73
- /** The seconds a take is held at before it is spoken: every character at the slowest pace, two seconds of lead and tail. */
74
195
  export function ownVoiceCeilingSeconds(text) {
75
196
  return Math.ceil(text.length / OWN_VOICE_SLOWEST_CHARS_PER_SECOND) + 2;
76
197
  }
77
- /** A film's frames on its voice: the take, then the tail, at the delivered rate. */
78
198
  export const ownFilmFrames = (voiceSeconds) => Math.ceil((voiceSeconds + FILM_TAIL_SEC) * FILM_RENDER_FPS);
79
- /** How long the film on a take runs, to the hundredth (#1376): the take's length is not the film's. */
80
199
  export const ownFilmSeconds = (voiceSeconds) => +(ownFilmFrames(voiceSeconds) / FILM_RENDER_FPS).toFixed(2);
81
200
  const filmSec = z.number().positive().describe("How long the film runs: the voice, then a short tail; say this length, not the voice's");
201
+ export const ownAgentQuoteLine = z.strictObject({ label: z.string().min(1), unit: z.enum(["film", "track"]), quantity: z.number().int().nonnegative(),
202
+ unit_credits: z.number().int().nonnegative(), credits: z.number().int().nonnegative() });
82
203
  export const ownAgentQuote = z.strictObject({
83
204
  skill: z.enum(OWN_AGENT_SKILLS),
84
- /** What admission holds: the most the run can be charged. */
85
205
  credits: z.number().int().nonnegative(),
86
- unit: z.enum(["still", "second", "film", "pose"]),
206
+ unit: z.enum(["still", "second", "film", "pose", "sheet", "check"]),
87
207
  units: z.number().int().nonnegative(),
88
- /** `film_render`: how long the film will run. */
89
208
  film_sec: filmSec.optional(),
90
- /** `film_stills`: how many of the asked stills are free, and the free stills the draft has left in the rolling day after them. */
91
209
  free_units: z.number().int().nonnegative().optional()
92
210
  .describe(`How many of the asked stills are free: the first ${OWN_FREE_STILLS} stills of a draft in any ${OWN_FREE_STILLS_WINDOW_HOURS} h are`),
93
211
  free_left: z.number().int().nonnegative().optional().describe("Free stills this draft has left in the rolling day after this call"),
212
+ frames: z.number().int().positive().optional(),
213
+ lines: z.array(ownAgentQuoteLine).optional(),
94
214
  warnings: z.array(z.string()),
215
+ next: diyNext.optional(),
95
216
  });
96
217
  export const filmStill = z.strictObject({
97
218
  at: z.union([z.string(), z.number()]),
98
219
  seconds: z.number(),
99
220
  frame: z.number().int().min(0),
100
221
  image_url: z.string().url(),
101
- /** What the layout probe found on this still: overlapping or clipped text, an empty slot, a name left on screen. */
102
222
  findings: z.array(z.string()),
103
223
  });
104
224
  export const filmWord = z.strictObject({ text: z.string(), start: z.number(), end: z.number() });
105
- /** One run of the mode as the agent reads it: the run's money and state, and what it delivered. */
106
225
  export const filmRun = z.strictObject({
107
226
  run_id: runId,
108
227
  skill: z.enum(OWN_AGENT_SKILLS),
@@ -111,21 +230,22 @@ export const filmRun = z.strictObject({
111
230
  credits_charged: z.number().int().nonnegative().nullable(),
112
231
  warnings: z.array(z.string()),
113
232
  error: z.string().nullable(),
114
- /** `film_stills`: the stills drawn, a tiled sheet when asked, and the gate's refusals as `file:line: reason`. */
115
233
  stills: z.strictObject({ frames: z.array(filmStill), sheet_url: z.string().url().nullable(), refusals: z.array(z.string()) }).optional(),
116
- /** `film_voice`: the take's length and its words, each with its start and end, and how long a film on it runs. */
117
234
  voice: z.strictObject({ duration_sec: z.number().positive(), film_sec: filmSec.optional(), words: z.array(filmWord), audio_url: z.string().url() }).optional(),
118
- /** `film_render`: the delivered film, and its frame as a thumbnail when one could be taken. */
119
235
  film: z.strictObject({ video_url: z.string().url(), duration_sec: z.number().positive(),
120
236
  thumbnail_url: z.string().url().nullable().default(null) }).optional(),
121
- /** `film_hero`: the saved mascot (pass `mascot_id` to create_film_draft), the poses it was published with, and those poses on one picture
122
- * to look at before stills. */
123
237
  hero: z.strictObject({ mascot_id: assetId, poses: z.array(z.enum(MASCOT_POSES)), character: z.string().nullable(),
124
238
  sheet_url: z.string().url().nullable().default(null) }).optional(),
239
+ take_frames: z.strictObject({ fps: z.number().int().positive(), frames: z.number().int().positive(),
240
+ sheets: z.array(z.strictObject({ image_url: z.string().url(), from: z.number().min(0), to: z.number().min(0), frames: z.number().int().positive() })),
241
+ shots: z.array(takeMotionWindow).optional()
242
+ .describe("The stretches between cuts and whips in these seconds, each with its subject motion, camera move and camera shake: a reference's energy, shot by shot") })
243
+ .optional(),
244
+ take_check: takeCheckVerdict.optional(),
245
+ next: diyNext.nullable().optional(),
246
+ blocked: diyBlocked.nullable().optional(),
125
247
  created_at: z.string(),
126
248
  finished_at: z.string().nullable(),
127
249
  });
128
250
  export const isOwnAgentSkill = (skill) => typeof skill === "string" && OWN_AGENT_SKILLS.includes(skill);
129
- /** A take longer than this is refused before money: its hold would pass the longest take the tariff prices. */
130
251
  export const OWN_VOICE_CEILING_LIMIT = OWN_VOICE_MAX_SECONDS;
131
- //# sourceMappingURL=own-agent-runs.js.map
package/dist/pacing.d.ts CHANGED
@@ -1,32 +1,20 @@
1
1
  import { type TtsModelId } from "./voices.js";
2
- /** Speech pacing: 2–4 words per second. */
3
2
  export declare const WORDS_PER_SECOND_MIN = 2;
4
3
  export declare const WORDS_PER_SECOND_MAX = 4;
5
4
  export declare function countWords(script: string): number;
6
- /** Average pace for duration ESTIMATES: two live ElevenLabs renders (Sarah), 74 words → 27.1 s and 32 words → 13.07 s. */
7
- /** The earlier 3 words/s missed by −18.9% against the ±15% gate. */
8
5
  export declare const ESTIMATE_WORDS_PER_SECOND = 2.6;
9
- /** Russian on eleven_v3 reads slower: 153 words in 66.13 s, 2.31 words/s (#164). */
10
- /** The speech-duration floor uses ESTIMATE_WORDS_PER_SECOND; only a measurement may raise it. */
11
6
  export declare const ESTIMATE_WORDS_PER_SECOND_CYRILLIC = 2.3;
12
- /** Cyrillic on eleven_v4: 153 words in 70.32 s, one take at Stability 0.5 (#452). */
13
7
  export declare const ESTIMATE_WORDS_PER_SECOND_CYRILLIC_V4 = 2.18;
14
- /** Cyrillic on gemini-3.8-flash-tts: 153 words in 71.04 s and 65.68 s, mean 2.24, rounded down (#453). */
15
8
  export declare const ESTIMATE_WORDS_PER_SECOND_CYRILLIC_GOOGLE = 2.2;
16
- /** Only make_ugc admission names the model; without it the script family alone sets the pace. */
17
9
  export declare function estimateWordsPerSecond(script: string, model?: TtsModelId): number;
18
- /** A language whose words are longer than English ones is paced by characters, not words: a Turkish word is a fifth longer, so words/s ran */
19
- /** its takes short. Delivered takes of Latin script read at 15.48 characters/s untrimmed (46 takes, median) and 16.95 trimmed (8). */
20
10
  export declare const ESTIMATE_CHARS_PER_SECOND_LATIN = 15.5;
21
- /** A take cut with pause_trim reads 9% faster: 16.95 against 15.48 characters/s. */
22
11
  export declare const PAUSE_TRIM_PACE_FACTOR = 1.09;
23
- /** The pace of a language against English, from the catalog sample of each (one sentence read by 10 voices, median characters/s over English's 15.1). */
24
12
  export declare const LATIN_LANGUAGE_PACE: Readonly<Record<string, number>>;
25
- /** What a make_ugc quote knows about the take: the named voice (catalog names start with their language, `tr_male_…`) and a pause_trim. */
26
13
  export type SpeechPace = {
27
14
  voice?: string | undefined;
28
15
  pauseTrim?: boolean;
29
16
  };
30
- /** An ESTIMATE from the script's pace, not a fact: the charge follows the measured duration. Given `pace`, a take cut with pause_trim */
31
- /** reads 9% faster and Latin script in a language measured above is timed by characters; any other take is timed by words as before. */
17
+ export declare const MEASURED_VOICE_CHARS_PER_WORD = 5.77;
18
+ export declare const SENTENCE_BREAK_SEC = 0.62;
19
+ export declare function sentenceBreaks(script: string): number;
32
20
  export declare function estimateDurationSec(script: string, model?: TtsModelId, pace?: SpeechPace): number;
package/dist/pacing.js CHANGED
@@ -1,26 +1,18 @@
1
- import { detectScriptFamily, GOOGLE_TTS_MODEL } from "./voices.js";
2
- /** Speech pacing: 2–4 words per second. */
1
+ import { isEnglishScript, measuredPaceOf, VOICE_PACE } from "./voice-pace.js";
2
+ import { DEFAULT_TTS_MODEL, detectScriptFamily, GOOGLE_TTS_MODEL } from "./voices.js";
3
3
  export const WORDS_PER_SECOND_MIN = 2;
4
4
  export const WORDS_PER_SECOND_MAX = 4;
5
5
  export function countWords(script) {
6
6
  return script.trim().split(/\s+/).filter(Boolean).length;
7
7
  }
8
- /** Average pace for duration ESTIMATES: two live ElevenLabs renders (Sarah), 74 words → 27.1 s and 32 words → 13.07 s. */
9
- /** The earlier 3 words/s missed by −18.9% against the ±15% gate. */
10
8
  export const ESTIMATE_WORDS_PER_SECOND = 2.6;
11
- /** Russian on eleven_v3 reads slower: 153 words in 66.13 s, 2.31 words/s (#164). */
12
- /** The speech-duration floor uses ESTIMATE_WORDS_PER_SECOND; only a measurement may raise it. */
13
9
  export const ESTIMATE_WORDS_PER_SECOND_CYRILLIC = 2.3;
14
- /** Cyrillic on eleven_v4: 153 words in 70.32 s, one take at Stability 0.5 (#452). */
15
10
  export const ESTIMATE_WORDS_PER_SECOND_CYRILLIC_V4 = 2.18;
16
- /** Cyrillic on gemini-3.8-flash-tts: 153 words in 71.04 s and 65.68 s, mean 2.24, rounded down (#453). */
17
11
  export const ESTIMATE_WORDS_PER_SECOND_CYRILLIC_GOOGLE = 2.2;
18
- /** Cyrillic pace for models with their own measurement; any other model reads at the script family's pace. */
19
12
  const CYRILLIC_WORDS_PER_SECOND_BY_MODEL = {
20
13
  eleven_v4: ESTIMATE_WORDS_PER_SECOND_CYRILLIC_V4,
21
14
  [GOOGLE_TTS_MODEL]: ESTIMATE_WORDS_PER_SECOND_CYRILLIC_GOOGLE,
22
15
  };
23
- /** Only make_ugc admission names the model; without it the script family alone sets the pace. */
24
16
  export function estimateWordsPerSecond(script, model) {
25
17
  if (detectScriptFamily(script) !== "cyrillic")
26
18
  return ESTIMATE_WORDS_PER_SECOND;
@@ -29,24 +21,33 @@ export function estimateWordsPerSecond(script, model) {
29
21
  : undefined;
30
22
  return measured ?? ESTIMATE_WORDS_PER_SECOND_CYRILLIC;
31
23
  }
32
- /** A language whose words are longer than English ones is paced by characters, not words: a Turkish word is a fifth longer, so words/s ran */
33
- /** its takes short. Delivered takes of Latin script read at 15.48 characters/s untrimmed (46 takes, median) and 16.95 trimmed (8). */
34
24
  export const ESTIMATE_CHARS_PER_SECOND_LATIN = 15.5;
35
- /** A take cut with pause_trim reads 9% faster: 16.95 against 15.48 characters/s. */
36
25
  export const PAUSE_TRIM_PACE_FACTOR = 1.09;
37
- /** The pace of a language against English, from the catalog sample of each (one sentence read by 10 voices, median characters/s over English's 15.1). */
38
26
  export const LATIN_LANGUAGE_PACE = {
39
27
  cs: 0.82, da: 0.97, de: 0.93, es: 0.91, fi: 0.89, fil: 0.8, fr: 1.08, hr: 0.87, hu: 0.93, id: 0.86, it: 1, ms: 0.92, nl: 1.01,
40
28
  no: 0.91, pl: 0.9, pt: 0.92, ro: 0.84, sk: 0.9, sv: 0.91, tr: 0.86, vi: 1.05,
41
29
  };
42
- /** The catalog language of a voice named in a pace and measured in LATIN_LANGUAGE_PACE; English and unknown voices have none. */
43
30
  const measuredLanguageOf = (voice) => {
44
31
  const language = voice === undefined ? undefined : /^([a-z]{2,3})_/.exec(voice)?.[1];
45
32
  return language !== undefined && Object.hasOwn(LATIN_LANGUAGE_PACE, language) ? language : undefined;
46
33
  };
47
- /** An ESTIMATE from the script's pace, not a fact: the charge follows the measured duration. Given `pace`, a take cut with pause_trim */
48
- /** reads 9% faster and Latin script in a language measured above is timed by characters; any other take is timed by words as before. */
34
+ export const MEASURED_VOICE_CHARS_PER_WORD = 5.77;
35
+ export const SENTENCE_BREAK_SEC = 0.62;
36
+ export function sentenceBreaks(script) {
37
+ const sentences = script.trim().split(/(?<=[.!?])\s+/).filter(Boolean);
38
+ return sentences.slice(0, -1).filter(sentence => countWords(sentence) >= 2).length;
39
+ }
40
+ function measuredVoiceSec(script, model, pace) {
41
+ const measured = pace?.pauseTrim ? measuredPaceOf(pace.voice) : undefined;
42
+ if (!measured || (model ?? DEFAULT_TTS_MODEL) !== VOICE_PACE.model || !isEnglishScript(script, detectScriptFamily(script) === "latin"))
43
+ return undefined;
44
+ const chars = Array.from(script.replace(/\s+/g, " ").trim()).length;
45
+ return Math.max(1, Math.ceil(chars / (measured.words_per_second * MEASURED_VOICE_CHARS_PER_WORD) + SENTENCE_BREAK_SEC * sentenceBreaks(script) - 1e-9));
46
+ }
49
47
  export function estimateDurationSec(script, model, pace) {
48
+ const voiced = measuredVoiceSec(script, model, pace);
49
+ if (voiced !== undefined)
50
+ return voiced;
50
51
  const trim = pace?.pauseTrim ? PAUSE_TRIM_PACE_FACTOR : 1;
51
52
  const language = measuredLanguageOf(pace?.voice);
52
53
  if (language !== undefined && detectScriptFamily(script) === "latin") {
@@ -54,4 +55,3 @@ export function estimateDurationSec(script, model, pace) {
54
55
  }
55
56
  return Math.max(1, Math.round(countWords(script) / (estimateWordsPerSecond(script, model) * trim)));
56
57
  }
57
- //# sourceMappingURL=pacing.js.map
@@ -2,42 +2,24 @@ import { z } from "zod";
2
2
  import { type FaceBillingInterval, type PartsFaceTariff, type PresenterEngine, type ShotEngine, type TakeEngine } from "./face-billing.js";
3
3
  import type { Resolution } from "./skills.js";
4
4
  export declare const PARTS_PRICING_VERSION = "parts-v2";
5
- /** Credits per second a presenter is in the video, covered or not, by the engine that rendered the take. */
6
5
  export declare const PRESENTER_CREDITS_PER_SECOND: Readonly<Record<PresenterEngine, number>>;
7
- /** Voice and render, per second of the finished video. */
8
6
  export declare const PRODUCTION_CREDITS_PER_SECOND = 1;
9
- /** A call scene's live avatar: one HeyGen photo avatar of the still, per still in the delivered video. */
10
7
  export declare const LIVE_AVATAR_STILL_CREDITS = 400;
11
- /** The least a delivered video costs. */
12
8
  export declare const DELIVERED_VIDEO_MINIMUM_CREDITS = 50;
13
- /** A graphic made for the run (#1107), per scene drawn in the delivered video. */
14
9
  export declare const SCENE_CREDITS = 25;
15
10
  export declare const PRESENTER_ENGINE_LABELS: Readonly<Record<PresenterEngine, string>>;
16
11
  type MethodShotEngine = "shot_omni" | "shot_seedance" | "shot_omni_no_text" | "shot_seedance_no_text";
17
- /** A method ad's live-shot second by model and by the video's resolution (#1539 C4). A shot with no text in frame costs less at 720p; */
18
- /** at 1080p it costs as one with text. */
19
12
  export declare const METHOD_SHOT_CREDITS_PER_SECOND: Readonly<Record<Exclude<Resolution, "4k">, Readonly<Record<MethodShotEngine, number>>>>;
20
- /** Credits per second of a live shot (#1103), by the shot kind's engine: the actor speaking while acting, and acting under voice-over; */
21
- /** a silent shot on Gemini Omni 1.2 (#1535); the method ad's at 720p, its resolution (#1539 C4). */
22
13
  export declare const SHOT_CREDITS_PER_SECOND: Readonly<Record<ShotEngine, number>>;
23
14
  export declare const SHOT_ENGINE_LABELS: Readonly<Record<ShotEngine, string>>;
24
- /** The long-form run's tariff, frozen at admission like long-form-v1 before it. */
25
15
  export declare const PARTS_FACE_TARIFF: PartsFaceTariff;
26
- /** parts-v3 (#1535): parts-v2 and the Omni live-shot second. Runs admitted on it keep it; new ones with an Omni shot go on parts-v4. */
27
16
  export declare const PARTS_OMNI_PRICING_VERSION = "parts-v3";
28
17
  export declare const PARTS_OMNI_FACE_TARIFF: PartsFaceTariff;
29
- /** parts-v4 (#1539 C4): parts-v3 with the method ad's four live-shot seconds at the video's resolution, frozen with the run. */
30
18
  export declare const PARTS_METHOD_PRICING_VERSION = "parts-v4";
31
19
  export declare function partsMethodFaceTariff(resolution: Resolution): PartsFaceTariff;
32
- /** The tariff a long-form run is admitted on: a run with an Omni shot on the one that prices Omni and Seedance seconds at its resolution. */
33
20
  export declare const partsFaceTariffFor: (omni: boolean, resolution: Resolution) => PartsFaceTariff;
34
- /** One pre-production (#1539 C4): its stills and storyboard, charged once a still is published, also when the video is never ordered. */
35
- /** A repeat on the same pictures costs nothing. */
36
21
  export declare const PRE_PRODUCTION_CREDITS = 270;
37
- /** The face tariffs new runs are admitted on, as a LIST: public text walks it, so another tariff cannot ship silently. parts-v3 joins it */
38
- /** once the Omni shot is sold to every account. */
39
22
  export declare const FACE_BILLING_TARIFFS: readonly PartsFaceTariff[];
40
- /** A short run's tariff: one take, so the presenter is in every second of the video. Its failures keep the short run's outcomes. */
41
23
  export declare const durationPartsTariffSchema: z.ZodReadonly<z.ZodObject<{
42
24
  version: z.ZodLiteral<1>;
43
25
  pricingVersion: z.ZodString;
@@ -50,7 +32,6 @@ export declare const durationPartsTariffSchema: z.ZodReadonly<z.ZodObject<{
50
32
  }, z.core.$strict>>;
51
33
  export type DurationPartsTariff = z.infer<typeof durationPartsTariffSchema>;
52
34
  export declare const PARTS_DURATION_TARIFF: DurationPartsTariff;
53
- /** One line of an itemized price: what was counted, how many, at what rate, and the product. */
54
35
  export declare const partsLineSchema: z.ZodObject<{
55
36
  label: z.ZodString;
56
37
  unit: z.ZodEnum<{
@@ -66,32 +47,23 @@ export declare const partsLineSchema: z.ZodObject<{
66
47
  credits: z.ZodNumber;
67
48
  }, z.core.$strict>;
68
49
  export type PartsLine = z.infer<typeof partsLineSchema>;
69
- /** The quote's and the bill's line for the scenes made for a run: asked for on a quote, drawn on a bill. */
70
50
  export declare function sceneLine(scenes: number, credits?: number): PartsLine;
71
51
  export interface PartsCharge {
72
52
  lines: PartsLine[];
73
- /** The lines added up, before the minimum. */
74
53
  usageCredits: number;
75
54
  credits: number;
76
55
  minimumApplied: boolean;
77
- /** Presenter frames over all engines, an overlap counted once. */
78
56
  faceFrames: number;
79
57
  billableFaceSeconds: number;
80
58
  }
81
59
  export interface PartsMeasure {
82
- /** Each engine's presenter intervals: a take's whole slot, covered or not; a live shot's under its shot engine. */
83
60
  presenter: Partial<Record<TakeEngine, readonly FaceBillingInterval[]>>;
84
61
  outputFrames: number;
85
62
  fps: number;
86
63
  liveAvatarStills: number;
87
64
  }
88
- /** A long-form video's price under a parts tariff: each engine's presenter seconds rounded up once over the video, every */
89
- /** second of the video, each witnessed still; the minimum when delivered. Failure policy is settlement's, not this function's. */
90
65
  export declare function calculatePartsCharge(measure: PartsMeasure, tariffInput: PartsFaceTariff, delivered: boolean): PartsCharge;
91
- /** A short video's price: the presenter is in every second of its one take. Rounding is the legacy rule: whole seconds, at least one. */
92
- /** `heldSec` is the still the video holds past its take (#1452): production seconds, never the presenter's, since it is no vendor work. */
93
66
  export declare function calculateDurationPartsCharge(durationSec: number, engine: PresenterEngine, tariffInput: DurationPartsTariff, delivered: boolean, heldSec?: number): PartsCharge;
94
- /** What a delivered parts-tariff video records about its price. */
95
67
  export declare const partsBillingSummarySchema: z.ZodReadonly<z.ZodObject<{
96
68
  pricingVersion: z.ZodString;
97
69
  lines: z.ZodArray<z.ZodObject<{
@@ -1,30 +1,19 @@
1
1
  import { z } from "zod";
2
2
  import { identifier, partsFaceTariffSchema, presenterRatesSchema, PRESENTER_ENGINES, SHOT_ENGINES, } from "./face-billing.js";
3
3
  import { unionFaceFrames } from "./long-form-pricing.js";
4
- // Parts prices: one tariff for short and long make_ugc.
5
- // parts-v2: the HeyGen second 12 → 9; parts-v1, long-form-v1 and 30 a second stay with their snapshots.
6
4
  export const PARTS_PRICING_VERSION = "parts-v2";
7
- /** Credits per second a presenter is in the video, covered or not, by the engine that rendered the take. */
8
5
  export const PRESENTER_CREDITS_PER_SECOND = Object.freeze({ heygen: 9, omnihuman: 22 });
9
- /** Voice and render, per second of the finished video. */
10
6
  export const PRODUCTION_CREDITS_PER_SECOND = 1;
11
- /** A call scene's live avatar: one HeyGen photo avatar of the still, per still in the delivered video. */
12
7
  export const LIVE_AVATAR_STILL_CREDITS = 400;
13
- /** The least a delivered video costs. */
14
8
  export const DELIVERED_VIDEO_MINIMUM_CREDITS = 50;
15
- /** A graphic made for the run (#1107), per scene drawn in the delivered video. */
16
9
  export const SCENE_CREDITS = 25;
17
10
  export const PRESENTER_ENGINE_LABELS = Object.freeze({
18
11
  heygen: "presenter, HeyGen Avatar IV", omnihuman: "presenter, OmniHuman 2.0",
19
12
  });
20
- /** A method ad's live-shot second by model and by the video's resolution (#1539 C4). A shot with no text in frame costs less at 720p; */
21
- /** at 1080p it costs as one with text. */
22
13
  export const METHOD_SHOT_CREDITS_PER_SECOND = Object.freeze({
23
14
  "720p": Object.freeze({ shot_omni: 20, shot_omni_no_text: 12, shot_seedance: 89, shot_seedance_no_text: 42 }),
24
15
  "1080p": Object.freeze({ shot_omni: 20, shot_omni_no_text: 20, shot_seedance: 217, shot_seedance_no_text: 217 }),
25
16
  });
26
- /** Credits per second of a live shot (#1103), by the shot kind's engine: the actor speaking while acting, and acting under voice-over; */
27
- /** a silent shot on Gemini Omni 1.2 (#1535); the method ad's at 720p, its resolution (#1539 C4). */
28
17
  export const SHOT_CREDITS_PER_SECOND = Object.freeze({ shot_talking_action: 30, shot_action: 30,
29
18
  ...METHOD_SHOT_CREDITS_PER_SECOND["720p"] });
30
19
  export const SHOT_ENGINE_LABELS = Object.freeze({
@@ -33,36 +22,26 @@ export const SHOT_ENGINE_LABELS = Object.freeze({
33
22
  shot_omni_no_text: "live shot, Gemini Omni 1.2, no text in frame", shot_seedance_no_text: "live shot, Seedance 2.5, no text in frame",
34
23
  });
35
24
  const TAKE_ENGINE_LABELS = { ...PRESENTER_ENGINE_LABELS, ...SHOT_ENGINE_LABELS };
36
- /** The long-form run's tariff, frozen at admission like long-form-v1 before it. */
37
25
  export const PARTS_FACE_TARIFF = Object.freeze({
38
26
  version: 3, pricingVersion: PARTS_PRICING_VERSION, presenterCreditsPerSecond: PRESENTER_CREDITS_PER_SECOND,
39
27
  shotCreditsPerSecond: Object.freeze({ shot_talking_action: SHOT_CREDITS_PER_SECOND.shot_talking_action, shot_action: SHOT_CREDITS_PER_SECOND.shot_action }),
40
28
  productionCreditsPerSecond: PRODUCTION_CREDITS_PER_SECOND, liveAvatarStillCredits: LIVE_AVATAR_STILL_CREDITS,
41
29
  minimumCredits: DELIVERED_VIDEO_MINIMUM_CREDITS, rounding: "ceil_aggregate_seconds", failurePolicy: "verified_delivery_only",
42
30
  });
43
- /** parts-v3 (#1535): parts-v2 and the Omni live-shot second. Runs admitted on it keep it; new ones with an Omni shot go on parts-v4. */
44
31
  export const PARTS_OMNI_PRICING_VERSION = "parts-v3";
45
32
  export const PARTS_OMNI_FACE_TARIFF = Object.freeze({ ...PARTS_FACE_TARIFF, pricingVersion: PARTS_OMNI_PRICING_VERSION,
46
33
  shotCreditsPerSecond: Object.freeze({ shot_talking_action: SHOT_CREDITS_PER_SECOND.shot_talking_action,
47
34
  shot_action: SHOT_CREDITS_PER_SECOND.shot_action, shot_omni: SHOT_CREDITS_PER_SECOND.shot_omni }) });
48
- /** parts-v4 (#1539 C4): parts-v3 with the method ad's four live-shot seconds at the video's resolution, frozen with the run. */
49
35
  export const PARTS_METHOD_PRICING_VERSION = "parts-v4";
50
36
  export function partsMethodFaceTariff(resolution) {
51
- // make_ugc refuses 4k (#1189), so a 4k second has no price to freeze.
52
37
  if (resolution === "4k")
53
38
  throw new RangeError("no method shot second at 4k");
54
39
  return Object.freeze({ ...PARTS_OMNI_FACE_TARIFF, pricingVersion: PARTS_METHOD_PRICING_VERSION,
55
40
  shotCreditsPerSecond: Object.freeze({ ...PARTS_OMNI_FACE_TARIFF.shotCreditsPerSecond, ...METHOD_SHOT_CREDITS_PER_SECOND[resolution] }) });
56
41
  }
57
- /** The tariff a long-form run is admitted on: a run with an Omni shot on the one that prices Omni and Seedance seconds at its resolution. */
58
42
  export const partsFaceTariffFor = (omni, resolution) => (omni ? partsMethodFaceTariff(resolution) : PARTS_FACE_TARIFF);
59
- /** One pre-production (#1539 C4): its stills and storyboard, charged once a still is published, also when the video is never ordered. */
60
- /** A repeat on the same pictures costs nothing. */
61
43
  export const PRE_PRODUCTION_CREDITS = 270;
62
- /** The face tariffs new runs are admitted on, as a LIST: public text walks it, so another tariff cannot ship silently. parts-v3 joins it */
63
- /** once the Omni shot is sold to every account. */
64
44
  export const FACE_BILLING_TARIFFS = Object.freeze([PARTS_FACE_TARIFF]);
65
- /** A short run's tariff: one take, so the presenter is in every second of the video. Its failures keep the short run's outcomes. */
66
45
  export const durationPartsTariffSchema = z.object({
67
46
  version: z.literal(1),
68
47
  pricingVersion: identifier,
@@ -74,7 +53,6 @@ export const PARTS_DURATION_TARIFF = Object.freeze({
74
53
  version: 1, pricingVersion: PARTS_PRICING_VERSION, presenterCreditsPerSecond: PRESENTER_CREDITS_PER_SECOND,
75
54
  productionCreditsPerSecond: PRODUCTION_CREDITS_PER_SECOND, minimumCredits: DELIVERED_VIDEO_MINIMUM_CREDITS,
76
55
  });
77
- /** One line of an itemized price: what was counted, how many, at what rate, and the product. */
78
56
  export const partsLineSchema = z.object({
79
57
  label: z.string().min(1),
80
58
  unit: z.enum(["face_second", "second", "still", "track", "scene", "template"]),
@@ -82,14 +60,12 @@ export const partsLineSchema = z.object({
82
60
  unit_credits: z.number().int().nonnegative(),
83
61
  credits: z.number().int().nonnegative(),
84
62
  }).strict();
85
- /** The quote's and the bill's line for the scenes made for a run: asked for on a quote, drawn on a bill. */
86
63
  export function sceneLine(scenes, credits = SCENE_CREDITS) {
87
64
  return { label: "scenes made for the video", unit: "scene", quantity: scenes, unit_credits: credits, credits: scenes * credits };
88
65
  }
89
66
  const MAX_CREDITS = 2147483647n;
90
67
  function settle(lines, minimum, delivered, faceFrames, billableFaceSeconds) {
91
68
  const usage = lines.reduce((sum, line) => sum + BigInt(line.credits), 0n);
92
- // The minimum is per DELIVERED video: a failed run that still bills is charged its parts only.
93
69
  const minimumApplied = delivered && usage < BigInt(minimum);
94
70
  const credits = minimumApplied ? BigInt(minimum) : usage;
95
71
  if (credits > MAX_CREDITS)
@@ -103,8 +79,6 @@ function line(label, unit, quantity, unitCredits) {
103
79
  return { label, unit, quantity: Number(quantity), unit_credits: unitCredits, credits: Number(credits) };
104
80
  }
105
81
  const ceilSeconds = (frames, fps) => (frames + fps - 1n) / fps;
106
- /** A long-form video's price under a parts tariff: each engine's presenter seconds rounded up once over the video, every */
107
- /** second of the video, each witnessed still; the minimum when delivered. Failure policy is settlement's, not this function's. */
108
82
  export function calculatePartsCharge(measure, tariffInput, delivered) {
109
83
  const tariff = partsFaceTariffSchema.parse(tariffInput);
110
84
  const fps = BigInt(z.number().int().positive().max(Number.MAX_SAFE_INTEGER).parse(measure.fps));
@@ -118,7 +92,6 @@ export function calculatePartsCharge(measure, tariffInput, delivered) {
118
92
  continue;
119
93
  const rate = PRESENTER_ENGINES.includes(engine) ? tariff.presenterCreditsPerSecond[engine]
120
94
  : tariff.shotCreditsPerSecond?.[engine];
121
- // A snapshot admitted before live shots has no shot rate: such a take is never priced by a guess.
122
95
  if (rate === undefined)
123
96
  throw new RangeError(`the tariff has no rate for ${engine}`);
124
97
  const seconds = ceilSeconds(unionFaceFrames(intervals), fps);
@@ -131,8 +104,6 @@ export function calculatePartsCharge(measure, tariffInput, delivered) {
131
104
  const faceFrames = unionFaceFrames([...PRESENTER_ENGINES, ...SHOT_ENGINES].flatMap((engine) => [...(measure.presenter[engine] ?? [])]));
132
105
  return settle(lines, tariff.minimumCredits, delivered, Number(faceFrames), Number(billableFaceSeconds));
133
106
  }
134
- /** A short video's price: the presenter is in every second of its one take. Rounding is the legacy rule: whole seconds, at least one. */
135
- /** `heldSec` is the still the video holds past its take (#1452): production seconds, never the presenter's, since it is no vendor work. */
136
107
  export function calculateDurationPartsCharge(durationSec, engine, tariffInput, delivered, heldSec = 0) {
137
108
  const tariff = durationPartsTariffSchema.parse(tariffInput);
138
109
  if (!Number.isFinite(durationSec) || durationSec < 0)
@@ -140,13 +111,11 @@ export function calculateDurationPartsCharge(durationSec, engine, tariffInput, d
140
111
  if (!Number.isFinite(heldSec) || heldSec < 0 || heldSec > durationSec)
141
112
  throw new RangeError("the held still must lie within the video");
142
113
  const seconds = BigInt(Math.max(1, Math.ceil(durationSec)));
143
- // Rounded to the microsecond first: 9.4 − 2.4 is 7.000000000000001 in floating point and must not bill an eighth second.
144
114
  const take = heldSec === 0 ? seconds : BigInt(Math.max(1, Math.ceil(Number((durationSec - heldSec).toFixed(6)))));
145
115
  const lines = [line(PRESENTER_ENGINE_LABELS[engine], "face_second", take, tariff.presenterCreditsPerSecond[engine]),
146
116
  line("production (voice and render)", "second", seconds, tariff.productionCreditsPerSecond)];
147
117
  return settle(lines, tariff.minimumCredits, delivered, 0, Number(take));
148
118
  }
149
- /** What a delivered parts-tariff video records about its price. */
150
119
  export const partsBillingSummarySchema = z.object({
151
120
  pricingVersion: identifier,
152
121
  lines: z.array(partsLineSchema),
@@ -155,4 +124,3 @@ export const partsBillingSummarySchema = z.object({
155
124
  actualDurationSec: z.number().positive().max(Number.MAX_SAFE_INTEGER),
156
125
  finalCreditsCharged: z.number().int().nonnegative(),
157
126
  }).strict().readonly();
158
- //# sourceMappingURL=parts-pricing.js.map
@@ -1,6 +1,4 @@
1
1
  import { z } from "zod";
2
- /** The lines to publish with a delivered film: at most three lines and this many characters in all. */
3
2
  export declare const POST_TEXT_MAX_LINES = 3, POST_TEXT_MAX_CHARS = 500;
4
3
  export declare const postText: z.ZodString;
5
- /** The writer's lines as the run carries them: trimmed, blank lines dropped; undefined when they are not 1–3 lines of the script's alphabet. */
6
4
  export declare function postTextFor(raw: string, script: string): string | undefined;
package/dist/post-text.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { z } from "zod";
2
2
  import { captionLanguageOf } from "./caption-language.js";
3
- /** The lines to publish with a delivered film: at most three lines and this many characters in all. */
4
3
  export const POST_TEXT_MAX_LINES = 3, POST_TEXT_MAX_CHARS = 500;
5
4
  const lines = (text) => text.split("\n");
6
5
  const shaped = (text) => {
@@ -10,12 +9,9 @@ const shaped = (text) => {
10
9
  export const postText = z.string().min(1).max(POST_TEXT_MAX_CHARS)
11
10
  .refine(shaped, { message: `1–${POST_TEXT_MAX_LINES} non-empty lines` })
12
11
  .describe("1–3 lines to publish with the video, in its script's language, saying nothing the script does not; absent when none was written");
13
- /** Latin-alphabet languages read as one family: a caption without diacritics on a Polish film is still in its alphabet. */
14
12
  const family = (text) => { const language = captionLanguageOf(text); return ["en", "pl", "vi"].includes(language) ? "latin" : language; };
15
- /** The writer's lines as the run carries them: trimmed, blank lines dropped; undefined when they are not 1–3 lines of the script's alphabet. */
16
13
  export function postTextFor(raw, script) {
17
14
  const kept = lines(raw.replace(/\r\n?/g, "\n")).map(line => line.trim()).filter(Boolean).join("\n");
18
15
  const parsed = postText.safeParse(kept);
19
16
  return parsed.success && family(parsed.data) === family(script) ? parsed.data : undefined;
20
17
  }
21
- //# sourceMappingURL=post-text.js.map