@clipwright/core 0.59.0 → 0.61.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 (586) 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.js +0 -2
  12. package/dist/ad-pause-trim.d.ts +0 -5
  13. package/dist/ad-pause-trim.js +0 -8
  14. package/dist/api-failure.d.ts +0 -44
  15. package/dist/api-failure.js +0 -62
  16. package/dist/aspect.d.ts +0 -29
  17. package/dist/aspect.js +1 -34
  18. package/dist/asset-identity.d.ts +0 -2
  19. package/dist/asset-identity.js +0 -3
  20. package/dist/assets.d.ts +0 -34
  21. package/dist/assets.js +0 -42
  22. package/dist/billing-terms.d.ts +6 -3
  23. package/dist/billing-terms.js +0 -4
  24. package/dist/brand-styles.d.ts +0 -6
  25. package/dist/brand-styles.js +0 -13
  26. package/dist/broll-policy.js +0 -1
  27. package/dist/canvas-fit.d.ts +0 -2
  28. package/dist/canvas-fit.js +0 -4
  29. package/dist/caption-funnel.d.ts +0 -2
  30. package/dist/caption-funnel.js +0 -15
  31. package/dist/caption-geometry.d.ts +0 -6
  32. package/dist/caption-geometry.js +0 -10
  33. package/dist/caption-language.d.ts +0 -3
  34. package/dist/caption-language.js +0 -6
  35. package/dist/contract-dispositions.d.ts +0 -61
  36. package/dist/contract-dispositions.js +3 -96
  37. package/dist/contracts/v1/workflow-brief.d.ts +61 -3
  38. package/dist/contracts/v1/workflow-brief.js +0 -13
  39. package/dist/contracts/v1/workflow-catalog.d.ts +118 -0
  40. package/dist/contracts/v1/workflow-catalog.js +0 -3
  41. package/dist/contracts/v1/workflow-client.d.ts +116 -0
  42. package/dist/contracts/v1/workflow-client.js +0 -1
  43. package/dist/contracts/v1/workflow-dto.js +0 -1
  44. package/dist/contracts/v1/workflow-evidence.js +0 -1
  45. package/dist/contracts/v1/workflow-execution.d.ts +47 -1
  46. package/dist/contracts/v1/workflow-execution.js +0 -4
  47. package/dist/contracts/v1/workflow-next.d.ts +13 -2
  48. package/dist/contracts/v1/workflow-next.js +0 -3
  49. package/dist/contracts/v1/workflow-plan.d.ts +177 -0
  50. package/dist/contracts/v1/workflow-plan.js +0 -1
  51. package/dist/contracts/v1/workflow-primitives.d.ts +0 -1
  52. package/dist/contracts/v1/workflow-primitives.js +0 -2
  53. package/dist/contracts/v1/workflow-run-read.d.ts +15 -1
  54. package/dist/contracts/v1/workflow-run-read.js +0 -3
  55. package/dist/creator-profile.d.ts +0 -30
  56. package/dist/creator-profile.js +0 -45
  57. package/dist/default-actor.js +0 -2
  58. package/dist/design.d.ts +0 -17
  59. package/dist/design.js +0 -18
  60. package/dist/edit-billing.d.ts +0 -6
  61. package/dist/edit-billing.js +0 -10
  62. package/dist/edit-candidate.d.ts +0 -6
  63. package/dist/edit-candidate.js +0 -9
  64. package/dist/edit-document.d.ts +0 -12
  65. package/dist/edit-document.js +0 -15
  66. package/dist/edit-faceless.d.ts +0 -3
  67. package/dist/edit-faceless.js +0 -4
  68. package/dist/edit-long-form.d.ts +0 -13
  69. package/dist/edit-long-form.js +0 -17
  70. package/dist/edit-operations.d.ts +0 -1
  71. package/dist/edit-operations.js +0 -2
  72. package/dist/edit-primitives.d.ts +0 -3
  73. package/dist/edit-primitives.js +0 -5
  74. package/dist/edit-revision.d.ts +0 -4
  75. package/dist/edit-revision.js +0 -6
  76. package/dist/edit-rules.d.ts +0 -3
  77. package/dist/edit-rules.js +0 -9
  78. package/dist/edit-shots.d.ts +45 -5
  79. package/dist/edit-shots.js +7 -11
  80. package/dist/edit-validate.d.ts +0 -10
  81. package/dist/edit-validate.js +0 -14
  82. package/dist/edit.js +0 -3
  83. package/dist/endpoint-notes.d.ts +0 -2
  84. package/dist/endpoint-notes.js +0 -3
  85. package/dist/endpoints.d.ts +0 -11
  86. package/dist/endpoints.js +7 -21
  87. package/dist/errors.d.ts +0 -42
  88. package/dist/errors.js +0 -54
  89. package/dist/explainer-fit.d.ts +0 -7
  90. package/dist/explainer-fit.js +0 -10
  91. package/dist/face-billing.d.ts +29 -11
  92. package/dist/face-billing.js +6 -25
  93. package/dist/face-delivery.d.ts +0 -1
  94. package/dist/face-delivery.js +0 -2
  95. package/dist/faceless-action-shots.d.ts +0 -8
  96. package/dist/faceless-action-shots.js +0 -8
  97. package/dist/faceless-customer-anchors.d.ts +0 -1
  98. package/dist/faceless-customer-anchors.js +0 -2
  99. package/dist/faceless-cut-style.js +0 -1
  100. package/dist/faceless-direction-summary.d.ts +27 -0
  101. package/dist/faceless-direction-summary.js +8 -0
  102. package/dist/faceless-image-placement.d.ts +0 -2
  103. package/dist/faceless-image-placement.js +0 -3
  104. package/dist/faceless-image-qualification.js +0 -2
  105. package/dist/faceless-media-record.d.ts +0 -6
  106. package/dist/faceless-media-record.js +0 -11
  107. package/dist/faceless-price.d.ts +40 -35
  108. package/dist/faceless-price.js +35 -49
  109. package/dist/faceless-public-plan.d.ts +0 -13
  110. package/dist/faceless-public-plan.js +0 -11
  111. package/dist/faceless-public.d.ts +63 -22
  112. package/dist/faceless-public.js +23 -58
  113. package/dist/faceless-short-61.js +0 -1
  114. package/dist/faceless-storyboard-timing.js +0 -1
  115. package/dist/faceless-storyboard-v2-plan.js +0 -1
  116. package/dist/faceless-storyboard-v2-timing.d.ts +0 -4
  117. package/dist/faceless-storyboard-v2-timing.js +0 -3
  118. package/dist/faceless-storyboard-v2.js +0 -1
  119. package/dist/faceless-storyboard.js +0 -1
  120. package/dist/faceless-voices.d.ts +0 -16
  121. package/dist/faceless-voices.js +0 -18
  122. package/dist/feedback.d.ts +0 -4
  123. package/dist/feedback.js +0 -5
  124. package/dist/film-directions.d.ts +0 -2
  125. package/dist/film-directions.js +0 -7
  126. package/dist/film-drafts.d.ts +0 -8
  127. package/dist/film-drafts.js +0 -19
  128. package/dist/film-guide.d.ts +0 -3
  129. package/dist/film-guide.js +0 -6
  130. package/dist/film-styles.d.ts +0 -5
  131. package/dist/film-styles.js +0 -8
  132. package/dist/generation-shot.d.ts +0 -5
  133. package/dist/generation-shot.js +0 -8
  134. package/dist/generations-output.d.ts +0 -2
  135. package/dist/generations-output.js +0 -5
  136. package/dist/generations.d.ts +0 -22
  137. package/dist/generations.js +21 -44
  138. package/dist/idempotency.d.ts +1 -21
  139. package/dist/idempotency.js +8 -29
  140. package/dist/index.d.ts +3 -0
  141. package/dist/index.js +3 -28
  142. package/dist/live-shot-kinds.d.ts +16 -25
  143. package/dist/live-shot-kinds.js +12 -28
  144. package/dist/long-form-pricing.d.ts +0 -5
  145. package/dist/long-form-pricing.js +0 -6
  146. package/dist/long-form-profile.d.ts +0 -3
  147. package/dist/long-form-profile.js +0 -4
  148. package/dist/long-form-revision.d.ts +0 -9
  149. package/dist/long-form-revision.js +0 -11
  150. package/dist/markdown-quote.d.ts +0 -2
  151. package/dist/markdown-quote.js +0 -3
  152. package/dist/mascots.d.ts +0 -5
  153. package/dist/mascots.js +0 -10
  154. package/dist/max-credits.d.ts +0 -1
  155. package/dist/max-credits.js +0 -2
  156. package/dist/mcp-ugc-descriptions.d.ts +0 -2
  157. package/dist/mcp-ugc-descriptions.js +1 -6
  158. package/dist/media-timebase.d.ts +0 -2
  159. package/dist/media-timebase.js +0 -6
  160. package/dist/motion-styles.d.ts +0 -8
  161. package/dist/motion-styles.js +0 -11
  162. package/dist/moves.d.ts +0 -7
  163. package/dist/moves.js +0 -9
  164. package/dist/music.d.ts +0 -5
  165. package/dist/music.js +2 -9
  166. package/dist/naming.d.ts +0 -3
  167. package/dist/naming.js +0 -19
  168. package/dist/openapi.d.ts +0 -13
  169. package/dist/openapi.js +6 -11
  170. package/dist/output-provenance.d.ts +0 -4
  171. package/dist/output-provenance.js +0 -5
  172. package/dist/own-agent-price.d.ts +19 -22
  173. package/dist/own-agent-price.js +30 -25
  174. package/dist/own-agent-runs.d.ts +111 -11
  175. package/dist/own-agent-runs.js +89 -24
  176. package/dist/pacing.d.ts +3 -15
  177. package/dist/pacing.js +18 -18
  178. package/dist/parts-pricing.d.ts +8 -24
  179. package/dist/parts-pricing.js +19 -30
  180. package/dist/post-text.d.ts +0 -2
  181. package/dist/post-text.js +0 -4
  182. package/dist/presenter-beats.d.ts +0 -10
  183. package/dist/presenter-beats.js +0 -14
  184. package/dist/presenter-matte.d.ts +0 -7
  185. package/dist/presenter-matte.js +0 -9
  186. package/dist/presenter-takes.d.ts +0 -3
  187. package/dist/presenter-takes.js +0 -8
  188. package/dist/prices.d.ts +2 -8
  189. package/dist/prices.js +13 -23
  190. package/dist/public-endpoints.d.ts +0 -11
  191. package/dist/public-endpoints.js +0 -14
  192. package/dist/public-responses.d.ts +0 -2
  193. package/dist/public-responses.js +0 -3
  194. package/dist/rate-limit.d.ts +0 -24
  195. package/dist/rate-limit.js +0 -29
  196. package/dist/reference-analysis.d.ts +57 -34
  197. package/dist/reference-analysis.js +0 -69
  198. package/dist/reference-bring.d.ts +33 -0
  199. package/dist/reference-bring.js +28 -0
  200. package/dist/reference-display.d.ts +0 -3
  201. package/dist/reference-display.js +37 -4
  202. package/dist/reference-kinds.d.ts +0 -4
  203. package/dist/reference-kinds.js +0 -6
  204. package/dist/reference-lyrics.d.ts +0 -6
  205. package/dist/reference-lyrics.js +0 -6
  206. package/dist/reference-profile.d.ts +270 -39
  207. package/dist/reference-profile.js +64 -50
  208. package/dist/reference-staging.d.ts +0 -10
  209. package/dist/reference-staging.js +0 -14
  210. package/dist/reference-text-spans.d.ts +0 -4
  211. package/dist/reference-text-spans.js +0 -7
  212. package/dist/reference-voice-over.d.ts +0 -6
  213. package/dist/reference-voice-over.js +0 -7
  214. package/dist/reference-voice.d.ts +0 -7
  215. package/dist/reference-voice.js +0 -12
  216. package/dist/render-backend.d.ts +0 -30
  217. package/dist/render-backend.js +0 -5
  218. package/dist/resolved-timeline.d.ts +4 -5
  219. package/dist/resolved-timeline.js +1 -31
  220. package/dist/run-media.d.ts +0 -1
  221. package/dist/run-media.js +0 -2
  222. package/dist/run-preflight.d.ts +0 -4
  223. package/dist/run-preflight.js +0 -11
  224. package/dist/run-static-warnings.d.ts +0 -8
  225. package/dist/run-static-warnings.js +0 -38
  226. package/dist/runs.d.ts +16 -32
  227. package/dist/runs.js +0 -50
  228. package/dist/scene-bible.d.ts +15 -7
  229. package/dist/scene-bible.js +15 -10
  230. package/dist/scene-graph.d.ts +0 -12
  231. package/dist/scene-graph.js +0 -24
  232. package/dist/scene-place.d.ts +0 -25
  233. package/dist/scene-place.js +0 -24
  234. package/dist/scene-proposal.d.ts +0 -3
  235. package/dist/scene-proposal.js +0 -9
  236. package/dist/script-integrity.d.ts +0 -6
  237. package/dist/script-integrity.js +0 -8
  238. package/dist/script-voice.d.ts +0 -7
  239. package/dist/script-voice.js +0 -16
  240. package/dist/semantic-inserts.d.ts +0 -7
  241. package/dist/semantic-inserts.js +0 -10
  242. package/dist/skill-theme-explainer.js +0 -5
  243. package/dist/skill-theme.d.ts +0 -13
  244. package/dist/skill-theme.js +0 -25
  245. package/dist/skills.d.ts +22 -86
  246. package/dist/skills.js +21 -167
  247. package/dist/speech-rhythm-contract.js +0 -1
  248. package/dist/speech-rhythm.d.ts +0 -4
  249. package/dist/speech-rhythm.js +0 -2
  250. package/dist/templates/backdrop.d.ts +0 -3
  251. package/dist/templates/backdrop.js +0 -5
  252. package/dist/templates/callout.d.ts +0 -4
  253. package/dist/templates/callout.js +0 -6
  254. package/dist/templates/chart.d.ts +0 -4
  255. package/dist/templates/chart.js +0 -6
  256. package/dist/templates/chat-window.d.ts +0 -8
  257. package/dist/templates/chat-window.js +0 -10
  258. package/dist/templates/checklist.d.ts +0 -3
  259. package/dist/templates/checklist.js +0 -6
  260. package/dist/templates/comment-cta.d.ts +0 -14
  261. package/dist/templates/comment-cta.js +0 -19
  262. package/dist/templates/compare.d.ts +0 -6
  263. package/dist/templates/compare.js +0 -7
  264. package/dist/templates/cover-story.d.ts +0 -1
  265. package/dist/templates/cover-story.js +0 -3
  266. package/dist/templates/end-card.d.ts +0 -2
  267. package/dist/templates/end-card.js +0 -3
  268. package/dist/templates/hand-title.d.ts +0 -5
  269. package/dist/templates/hand-title.js +0 -9
  270. package/dist/templates/index.d.ts +0 -57
  271. package/dist/templates/index.js +0 -60
  272. package/dist/templates/lower-third.d.ts +0 -4
  273. package/dist/templates/lower-third.js +0 -5
  274. package/dist/templates/notification.d.ts +0 -6
  275. package/dist/templates/notification.js +0 -7
  276. package/dist/templates/phone-call.d.ts +0 -2
  277. package/dist/templates/phone-call.js +0 -6
  278. package/dist/templates/phone-screen.d.ts +0 -5
  279. package/dist/templates/phone-screen.js +0 -7
  280. package/dist/templates/pointer-chips.d.ts +0 -4
  281. package/dist/templates/pointer-chips.js +0 -6
  282. package/dist/templates/progress.d.ts +0 -3
  283. package/dist/templates/progress.js +0 -5
  284. package/dist/templates/quote.d.ts +0 -3
  285. package/dist/templates/quote.js +0 -4
  286. package/dist/templates/race.d.ts +0 -5
  287. package/dist/templates/race.js +0 -7
  288. package/dist/templates/rating.d.ts +0 -3
  289. package/dist/templates/rating.js +0 -5
  290. package/dist/templates/series-frame.d.ts +0 -16
  291. package/dist/templates/series-frame.js +0 -19
  292. package/dist/templates/size.d.ts +0 -7
  293. package/dist/templates/size.js +0 -8
  294. package/dist/templates/slot.d.ts +0 -2
  295. package/dist/templates/slot.js +0 -2
  296. package/dist/templates/sounds.d.ts +0 -12
  297. package/dist/templates/sounds.js +0 -16
  298. package/dist/templates/stat.d.ts +0 -3
  299. package/dist/templates/stat.js +0 -5
  300. package/dist/templates/tag.d.ts +0 -3
  301. package/dist/templates/tag.js +0 -5
  302. package/dist/templates/terminal.d.ts +0 -6
  303. package/dist/templates/terminal.js +0 -8
  304. package/dist/templates/theme.d.ts +0 -7
  305. package/dist/templates/theme.js +0 -9
  306. package/dist/templates/title-card.d.ts +0 -3
  307. package/dist/templates/title-card.js +0 -5
  308. package/dist/templates/video-grid.d.ts +0 -5
  309. package/dist/templates/video-grid.js +0 -8
  310. package/dist/templates/word-fill.d.ts +0 -3
  311. package/dist/templates/word-fill.js +0 -4
  312. package/dist/templates/word-title.d.ts +0 -2
  313. package/dist/templates/word-title.js +0 -4
  314. package/dist/trend-niches.d.ts +0 -11
  315. package/dist/trend-niches.js +0 -16
  316. package/dist/trend-search.d.ts +0 -66
  317. package/dist/trend-search.js +0 -70
  318. package/dist/tts-backend.d.ts +0 -19
  319. package/dist/tts-backend.js +0 -7
  320. package/dist/ugc-call.d.ts +0 -16
  321. package/dist/ugc-call.js +0 -21
  322. package/dist/ugc-delivery.d.ts +0 -2
  323. package/dist/ugc-delivery.js +0 -4
  324. package/dist/ugc-framing.d.ts +0 -4
  325. package/dist/ugc-framing.js +0 -6
  326. package/dist/ugc-interview.d.ts +0 -18
  327. package/dist/ugc-interview.js +0 -24
  328. package/dist/ugc-layers.d.ts +0 -39
  329. package/dist/ugc-layers.js +0 -39
  330. package/dist/ugc-scenes.d.ts +0 -2
  331. package/dist/ugc-scenes.js +0 -5
  332. package/dist/ugc-video-media.d.ts +0 -5
  333. package/dist/ugc-video-media.js +0 -7
  334. package/dist/uploads.d.ts +1 -15
  335. package/dist/uploads.js +3 -20
  336. package/dist/vendor-response.d.ts +0 -19
  337. package/dist/vendor-response.js +0 -22
  338. package/dist/video-size.d.ts +0 -4
  339. package/dist/video-size.js +0 -7
  340. package/dist/voice-admission.d.ts +2 -11
  341. package/dist/voice-admission.js +0 -13
  342. package/dist/voice-catalog-data.d.ts +0 -2
  343. package/dist/voice-catalog-data.js +0 -3
  344. package/dist/voice-catalog.d.ts +0 -6
  345. package/dist/voice-catalog.js +0 -8
  346. package/dist/voice-listing.d.ts +0 -6
  347. package/dist/voice-listing.js +0 -14
  348. package/dist/voice-pace.d.ts +0 -4
  349. package/dist/voice-pace.js +0 -7
  350. package/dist/voice-preview-approval.js +0 -1
  351. package/dist/voices.d.ts +4 -69
  352. package/dist/voices.js +3 -88
  353. package/dist/workflows/catalog.d.ts +0 -2
  354. package/dist/workflows/catalog.js +0 -4
  355. package/dist/workflows/film-directions.d.ts +0 -3
  356. package/dist/workflows/film-directions.js +0 -4
  357. package/dist/workflows/index.js +0 -1
  358. package/dist/workflows/methods/faceless-explainer.d.ts +33 -0
  359. package/dist/workflows/methods/faceless-explainer.js +0 -1
  360. package/dist/workflows/methods/kinetic-launch.d.ts +66 -1
  361. package/dist/workflows/methods/kinetic-launch.js +0 -2
  362. package/dist/workflows/methods/product-image-story.d.ts +33 -0
  363. package/dist/workflows/methods/product-image-story.js +0 -1
  364. package/dist/workflows/methods/reference-remake.d.ts +33 -0
  365. package/dist/workflows/methods/reference-remake.js +0 -1
  366. package/dist/workflows/methods/shared.d.ts +33 -1
  367. package/dist/workflows/methods/shared.js +0 -3
  368. package/dist/workflows/methods/ugc-faq-answer.d.ts +33 -0
  369. package/dist/workflows/methods/ugc-faq-answer.js +0 -1
  370. package/dist/workflows/methods/ugc-product-intro.d.ts +33 -0
  371. package/dist/workflows/methods/ugc-product-intro.js +0 -1
  372. package/dist/workflows/methods/website-proof-demo.d.ts +66 -1
  373. package/dist/workflows/methods/website-proof-demo.js +0 -2
  374. package/dist/workflows/motion-director.d.ts +0 -11
  375. package/dist/workflows/motion-director.js +0 -11
  376. package/dist/workflows/product-references.js +0 -1
  377. package/dist/workflows/reference-remake.d.ts +114 -17
  378. package/dist/workflows/reference-remake.js +0 -167
  379. package/dist/workflows/remake-chooser.d.ts +0 -6
  380. package/dist/workflows/remake-chooser.js +0 -4
  381. package/dist/workflows/remake-motion.d.ts +0 -16
  382. package/dist/workflows/remake-motion.js +0 -19
  383. package/dist/workflows/validate.d.ts +0 -1
  384. package/dist/workflows/validate.js +0 -5
  385. package/dist/workflows.js +0 -1
  386. package/package.json +1 -1
  387. package/dist/account-actors.js.map +0 -1
  388. package/dist/account.js.map +0 -1
  389. package/dist/actor-bounds.js.map +0 -1
  390. package/dist/actor-qualities.js.map +0 -1
  391. package/dist/actors.js.map +0 -1
  392. package/dist/ad-guide.js.map +0 -1
  393. package/dist/ad-pause-trim.js.map +0 -1
  394. package/dist/api-failure.js.map +0 -1
  395. package/dist/aspect.js.map +0 -1
  396. package/dist/asset-identity.js.map +0 -1
  397. package/dist/assets.js.map +0 -1
  398. package/dist/billing-terms.js.map +0 -1
  399. package/dist/brand-styles.js.map +0 -1
  400. package/dist/broll-policy.js.map +0 -1
  401. package/dist/canvas-fit.js.map +0 -1
  402. package/dist/caption-funnel.js.map +0 -1
  403. package/dist/caption-geometry.js.map +0 -1
  404. package/dist/caption-language.js.map +0 -1
  405. package/dist/contract-dispositions.js.map +0 -1
  406. package/dist/contracts/v1/workflow-brief.js.map +0 -1
  407. package/dist/contracts/v1/workflow-catalog.js.map +0 -1
  408. package/dist/contracts/v1/workflow-client.js.map +0 -1
  409. package/dist/contracts/v1/workflow-dto.js.map +0 -1
  410. package/dist/contracts/v1/workflow-evidence.js.map +0 -1
  411. package/dist/contracts/v1/workflow-execution.js.map +0 -1
  412. package/dist/contracts/v1/workflow-next.js.map +0 -1
  413. package/dist/contracts/v1/workflow-plan.js.map +0 -1
  414. package/dist/contracts/v1/workflow-primitives.js.map +0 -1
  415. package/dist/contracts/v1/workflow-run-read.js.map +0 -1
  416. package/dist/creator-profile.js.map +0 -1
  417. package/dist/default-actor.js.map +0 -1
  418. package/dist/design.js.map +0 -1
  419. package/dist/edit-billing.js.map +0 -1
  420. package/dist/edit-candidate.js.map +0 -1
  421. package/dist/edit-document.js.map +0 -1
  422. package/dist/edit-faceless.js.map +0 -1
  423. package/dist/edit-long-form.js.map +0 -1
  424. package/dist/edit-operations.js.map +0 -1
  425. package/dist/edit-primitives.js.map +0 -1
  426. package/dist/edit-revision.js.map +0 -1
  427. package/dist/edit-rules.js.map +0 -1
  428. package/dist/edit-shots.js.map +0 -1
  429. package/dist/edit-validate.js.map +0 -1
  430. package/dist/edit.js.map +0 -1
  431. package/dist/endpoint-notes.js.map +0 -1
  432. package/dist/endpoints.js.map +0 -1
  433. package/dist/errors.js.map +0 -1
  434. package/dist/explainer-fit.js.map +0 -1
  435. package/dist/face-billing.js.map +0 -1
  436. package/dist/face-delivery.js.map +0 -1
  437. package/dist/faceless-action-shots.js.map +0 -1
  438. package/dist/faceless-customer-anchors.js.map +0 -1
  439. package/dist/faceless-cut-style.js.map +0 -1
  440. package/dist/faceless-image-placement.js.map +0 -1
  441. package/dist/faceless-image-qualification.js.map +0 -1
  442. package/dist/faceless-media-record.js.map +0 -1
  443. package/dist/faceless-price.js.map +0 -1
  444. package/dist/faceless-public-plan.js.map +0 -1
  445. package/dist/faceless-public.js.map +0 -1
  446. package/dist/faceless-short-61.js.map +0 -1
  447. package/dist/faceless-storyboard-timing.js.map +0 -1
  448. package/dist/faceless-storyboard-v2-plan.js.map +0 -1
  449. package/dist/faceless-storyboard-v2-timing.js.map +0 -1
  450. package/dist/faceless-storyboard-v2.js.map +0 -1
  451. package/dist/faceless-storyboard.js.map +0 -1
  452. package/dist/faceless-voices.js.map +0 -1
  453. package/dist/feedback.js.map +0 -1
  454. package/dist/film-directions.js.map +0 -1
  455. package/dist/film-drafts.js.map +0 -1
  456. package/dist/film-guide.js.map +0 -1
  457. package/dist/film-styles.js.map +0 -1
  458. package/dist/generation-shot.js.map +0 -1
  459. package/dist/generations-output.js.map +0 -1
  460. package/dist/generations.js.map +0 -1
  461. package/dist/idempotency.js.map +0 -1
  462. package/dist/index.js.map +0 -1
  463. package/dist/live-shot-kinds.js.map +0 -1
  464. package/dist/long-form-pricing.js.map +0 -1
  465. package/dist/long-form-profile.js.map +0 -1
  466. package/dist/long-form-revision.js.map +0 -1
  467. package/dist/markdown-quote.js.map +0 -1
  468. package/dist/mascots.js.map +0 -1
  469. package/dist/max-credits.js.map +0 -1
  470. package/dist/mcp-ugc-descriptions.js.map +0 -1
  471. package/dist/media-timebase.js.map +0 -1
  472. package/dist/motion-styles.js.map +0 -1
  473. package/dist/moves.js.map +0 -1
  474. package/dist/music.js.map +0 -1
  475. package/dist/naming.js.map +0 -1
  476. package/dist/openapi.js.map +0 -1
  477. package/dist/output-provenance.js.map +0 -1
  478. package/dist/own-agent-price.js.map +0 -1
  479. package/dist/own-agent-runs.js.map +0 -1
  480. package/dist/pacing.js.map +0 -1
  481. package/dist/parts-pricing.js.map +0 -1
  482. package/dist/post-text.js.map +0 -1
  483. package/dist/presenter-beats.js.map +0 -1
  484. package/dist/presenter-matte.js.map +0 -1
  485. package/dist/presenter-takes.js.map +0 -1
  486. package/dist/prices.js.map +0 -1
  487. package/dist/public-endpoints.js.map +0 -1
  488. package/dist/public-responses.js.map +0 -1
  489. package/dist/rate-limit.js.map +0 -1
  490. package/dist/reference-analysis.js.map +0 -1
  491. package/dist/reference-display.js.map +0 -1
  492. package/dist/reference-kinds.js.map +0 -1
  493. package/dist/reference-lyrics.js.map +0 -1
  494. package/dist/reference-profile.js.map +0 -1
  495. package/dist/reference-staging.js.map +0 -1
  496. package/dist/reference-text-spans.js.map +0 -1
  497. package/dist/reference-voice-over.js.map +0 -1
  498. package/dist/reference-voice.js.map +0 -1
  499. package/dist/render-backend.js.map +0 -1
  500. package/dist/resolved-timeline.js.map +0 -1
  501. package/dist/run-media.js.map +0 -1
  502. package/dist/run-preflight.js.map +0 -1
  503. package/dist/run-static-warnings.js.map +0 -1
  504. package/dist/runs.js.map +0 -1
  505. package/dist/scene-bible.js.map +0 -1
  506. package/dist/scene-graph.js.map +0 -1
  507. package/dist/scene-place.js.map +0 -1
  508. package/dist/scene-proposal.js.map +0 -1
  509. package/dist/script-integrity.js.map +0 -1
  510. package/dist/script-voice.js.map +0 -1
  511. package/dist/semantic-inserts.js.map +0 -1
  512. package/dist/skill-theme-explainer.js.map +0 -1
  513. package/dist/skill-theme.js.map +0 -1
  514. package/dist/skills.js.map +0 -1
  515. package/dist/speech-rhythm-contract.js.map +0 -1
  516. package/dist/speech-rhythm.js.map +0 -1
  517. package/dist/templates/backdrop.js.map +0 -1
  518. package/dist/templates/callout.js.map +0 -1
  519. package/dist/templates/chart.js.map +0 -1
  520. package/dist/templates/chat-window.js.map +0 -1
  521. package/dist/templates/checklist.js.map +0 -1
  522. package/dist/templates/comment-cta.js.map +0 -1
  523. package/dist/templates/compare.js.map +0 -1
  524. package/dist/templates/cover-story.js.map +0 -1
  525. package/dist/templates/end-card.js.map +0 -1
  526. package/dist/templates/hand-title.js.map +0 -1
  527. package/dist/templates/index.js.map +0 -1
  528. package/dist/templates/lower-third.js.map +0 -1
  529. package/dist/templates/notification.js.map +0 -1
  530. package/dist/templates/phone-call.js.map +0 -1
  531. package/dist/templates/phone-screen.js.map +0 -1
  532. package/dist/templates/pointer-chips.js.map +0 -1
  533. package/dist/templates/progress.js.map +0 -1
  534. package/dist/templates/quote.js.map +0 -1
  535. package/dist/templates/race.js.map +0 -1
  536. package/dist/templates/rating.js.map +0 -1
  537. package/dist/templates/series-frame.js.map +0 -1
  538. package/dist/templates/size.js.map +0 -1
  539. package/dist/templates/slot.js.map +0 -1
  540. package/dist/templates/sounds.js.map +0 -1
  541. package/dist/templates/stat.js.map +0 -1
  542. package/dist/templates/tag.js.map +0 -1
  543. package/dist/templates/terminal.js.map +0 -1
  544. package/dist/templates/theme.js.map +0 -1
  545. package/dist/templates/title-card.js.map +0 -1
  546. package/dist/templates/video-grid.js.map +0 -1
  547. package/dist/templates/word-fill.js.map +0 -1
  548. package/dist/templates/word-title.js.map +0 -1
  549. package/dist/trend-niches.js.map +0 -1
  550. package/dist/trend-search.js.map +0 -1
  551. package/dist/tts-backend.js.map +0 -1
  552. package/dist/ugc-call.js.map +0 -1
  553. package/dist/ugc-delivery.js.map +0 -1
  554. package/dist/ugc-framing.js.map +0 -1
  555. package/dist/ugc-interview.js.map +0 -1
  556. package/dist/ugc-layers.js.map +0 -1
  557. package/dist/ugc-scenes.js.map +0 -1
  558. package/dist/ugc-video-media.js.map +0 -1
  559. package/dist/uploads.js.map +0 -1
  560. package/dist/vendor-response.js.map +0 -1
  561. package/dist/video-size.js.map +0 -1
  562. package/dist/voice-admission.js.map +0 -1
  563. package/dist/voice-catalog-data.js.map +0 -1
  564. package/dist/voice-catalog.js.map +0 -1
  565. package/dist/voice-listing.js.map +0 -1
  566. package/dist/voice-pace.js.map +0 -1
  567. package/dist/voice-preview-approval.js.map +0 -1
  568. package/dist/voices.js.map +0 -1
  569. package/dist/workflows/catalog.js.map +0 -1
  570. package/dist/workflows/film-directions.js.map +0 -1
  571. package/dist/workflows/index.js.map +0 -1
  572. package/dist/workflows/methods/faceless-explainer.js.map +0 -1
  573. package/dist/workflows/methods/kinetic-launch.js.map +0 -1
  574. package/dist/workflows/methods/product-image-story.js.map +0 -1
  575. package/dist/workflows/methods/reference-remake.js.map +0 -1
  576. package/dist/workflows/methods/shared.js.map +0 -1
  577. package/dist/workflows/methods/ugc-faq-answer.js.map +0 -1
  578. package/dist/workflows/methods/ugc-product-intro.js.map +0 -1
  579. package/dist/workflows/methods/website-proof-demo.js.map +0 -1
  580. package/dist/workflows/motion-director.js.map +0 -1
  581. package/dist/workflows/product-references.js.map +0 -1
  582. package/dist/workflows/reference-remake.js.map +0 -1
  583. package/dist/workflows/remake-chooser.js.map +0 -1
  584. package/dist/workflows/remake-motion.js.map +0 -1
  585. package/dist/workflows/validate.js.map +0 -1
  586. package/dist/workflows.js.map +0 -1
@@ -1,28 +1,18 @@
1
1
  import { z } from "zod";
2
2
  import { FACELESS_EXPLAINER_POSE_PICTURES, FACELESS_IMAGE_CREDITS } from "./faceless-price.js";
3
- // The «own agent» tariff (#1291 F2): your agent writes the film; Clipwright sells its stills, voice with word timings, render and hero. Prices
4
- // are frozen per run at admission, and only delivered work is charged.
5
- /** The tariff runs are admitted on now: the first stills of a draft in a rolling day are free on it (#1369). */
6
3
  export const OWN_AGENT_TARIFF = "own-agent-v2";
7
- /** The tariff of runs admitted before free stills: every still charged. */
8
4
  export const OWN_AGENT_TARIFF_V1 = "own-agent-v1";
9
- /** The run skills of the mode, each with its own unit. */
10
- export const OWN_AGENT_SKILLS = ["film_stills", "film_voice", "film_render", "film_hero"];
11
- /** One still the agent saw, past the free ones. */
5
+ export const OWN_AGENT_SKILLS = ["film_stills", "film_voice", "film_render", "film_hero", "film_edit", "film_take_frames", "film_take_check"];
12
6
  export const OWN_STILL_CREDITS = 1;
13
- /** Stills of one draft that are free in any rolling window of this many hours; a still past them is charged. */
14
7
  export const OWN_FREE_STILLS = 120, OWN_FREE_STILLS_WINDOW_HOURS = 24;
15
- /** A rendered film up to OWN_FILM_INCLUDED_SECONDS, then each second over it. */
16
8
  export const OWN_FILM_RENDER_CREDITS = 100, OWN_FILM_INCLUDED_SECONDS = 60, OWN_FILM_EXTRA_SECOND_CREDITS = 2;
17
- /** A second of delivered voice, rounded up once per take. */
18
9
  export const OWN_VOICE_CREDITS_PER_SECOND = 2;
19
- /** The bounds a run may ask: stills per call, the longest film and take. */
20
10
  export const OWN_STILLS_MAX_PER_CALL = 24, OWN_FILM_MAX_SECONDS = 120, OWN_VOICE_MAX_SECONDS = 120;
21
- /** Up to this many stills come one picture each; a round of more always comes with a sheet (#1372). */
22
11
  export const OWN_STILLS_SINGLE_MAX = 8;
23
- /** A hero's pose picture, priced as the done-for-you explainer's, and the poses a hero is made of. */
24
12
  export const OWN_HERO_POSE_CREDITS = FACELESS_IMAGE_CREDITS, OWN_HERO_POSES = FACELESS_EXPLAINER_POSE_PICTURES;
25
- /** The prices a run's admission freezes; a run settles by its snapshot, never by today's constants. */
13
+ export const OWN_EDIT_CREDITS = 10, OWN_EDIT_MAX_SECONDS = 60;
14
+ export const OWN_TAKE_FRAMES_MAX = 96;
15
+ export const OWN_TAKE_CHECK_CREDITS = 10;
26
16
  export const ownAgentTerms = z.strictObject({
27
17
  tariff: z.enum([OWN_AGENT_TARIFF_V1, OWN_AGENT_TARIFF]),
28
18
  still_credits: z.number().int().nonnegative(),
@@ -30,16 +20,16 @@ export const ownAgentTerms = z.strictObject({
30
20
  included_seconds: z.number().int().positive(),
31
21
  extra_second_credits: z.number().int().nonnegative(),
32
22
  voice_credits_per_second: z.number().int().nonnegative(),
33
- /** A published hero pose; absent on terms frozen before the hero was sold, and a hero run without it is never charged. */
34
23
  pose_credits: z.number().int().nonnegative().optional(),
35
- /** A draft's free stills and their rolling window: present exactly on the tariff that has them. */
24
+ edit_credits: z.number().int().nonnegative().optional(),
25
+ take_check_credits: z.number().int().nonnegative().optional(),
36
26
  free_stills: z.number().int().nonnegative().optional(),
37
27
  free_stills_window_hours: z.number().int().positive().optional(),
38
28
  }).refine(t => (t.tariff === OWN_AGENT_TARIFF) === (t.free_stills !== undefined) && (t.free_stills === undefined) === (t.free_stills_window_hours === undefined), `free stills come with their window, and only on ${OWN_AGENT_TARIFF}`);
39
29
  export const ownAgentTermsNow = () => ({ tariff: OWN_AGENT_TARIFF, still_credits: OWN_STILL_CREDITS, render_credits: OWN_FILM_RENDER_CREDITS,
40
30
  included_seconds: OWN_FILM_INCLUDED_SECONDS, extra_second_credits: OWN_FILM_EXTRA_SECOND_CREDITS, voice_credits_per_second: OWN_VOICE_CREDITS_PER_SECOND,
41
- pose_credits: OWN_HERO_POSE_CREDITS, free_stills: OWN_FREE_STILLS, free_stills_window_hours: OWN_FREE_STILLS_WINDOW_HOURS });
42
- /** Whether the mode is offered. */
31
+ pose_credits: OWN_HERO_POSE_CREDITS, edit_credits: OWN_EDIT_CREDITS, take_check_credits: OWN_TAKE_CHECK_CREDITS, free_stills: OWN_FREE_STILLS,
32
+ free_stills_window_hours: OWN_FREE_STILLS_WINDOW_HOURS });
43
33
  export const isOwnAgentEnabled = (env) => env.CLIPWRIGHT_OWN_AGENT === "1";
44
34
  const seconds = (s, max, what) => {
45
35
  if (!Number.isFinite(s) || s <= 0 || s > max)
@@ -51,17 +41,13 @@ const frames = (n) => {
51
41
  throw new Error(`${n} stills is outside 0–${OWN_STILLS_MAX_PER_CALL}`);
52
42
  return n;
53
43
  };
54
- /** A film of `s` seconds: the base up to the included length, each started second over it on top. */
55
44
  export const ownFilmRenderCredits = (s, terms = ownAgentTermsNow()) => terms.render_credits + terms.extra_second_credits * Math.max(0, seconds(s, OWN_FILM_MAX_SECONDS, "a film") - terms.included_seconds);
56
- /** A take of `s` seconds, rounded up once. */
57
45
  export const ownVoiceCredits = (s, terms = ownAgentTermsNow()) => terms.voice_credits_per_second * seconds(s, OWN_VOICE_MAX_SECONDS, "a take");
58
- /** `n` delivered stills, the first `free` of them granted free when the run was admitted; terms without free stills grant none. */
59
46
  export function ownStillsCredits(n, terms = ownAgentTermsNow(), free = 0) {
60
47
  if (!Number.isSafeInteger(free) || free < 0 || free > (terms.free_stills ?? 0))
61
48
  throw new Error(`${free} free stills is outside these terms`);
62
49
  return terms.still_credits * Math.max(0, frames(n) - free);
63
50
  }
64
- /** `n` published hero poses; terms without a pose price price none. */
65
51
  export function ownHeroCredits(n, terms = ownAgentTermsNow()) {
66
52
  if (!Number.isSafeInteger(n) || n < 0 || n > OWN_HERO_POSES)
67
53
  throw new Error(`${n} poses is outside 0–${OWN_HERO_POSES}`);
@@ -69,13 +55,32 @@ export function ownHeroCredits(n, terms = ownAgentTermsNow()) {
69
55
  throw new Error("these terms price no hero pose");
70
56
  return terms.pose_credits * n;
71
57
  }
72
- /** The charge for a delivery under the run's frozen terms, never above what admission held: a measure past the hold is a defect, not a bill. */
58
+ export function ownEditCredits(s, terms = ownAgentTermsNow()) {
59
+ seconds(s, OWN_EDIT_MAX_SECONDS, "an edit");
60
+ if (terms.edit_credits === undefined)
61
+ throw new Error("these terms price no edit");
62
+ return terms.edit_credits;
63
+ }
64
+ export function ownTakeCheckCredits(n, terms = ownAgentTermsNow()) {
65
+ if (n !== 0 && n !== 1)
66
+ throw new Error(`${n} take verdicts is outside 0–1`);
67
+ if (terms.take_check_credits === undefined)
68
+ throw new Error("these terms price no take check");
69
+ return terms.take_check_credits * n;
70
+ }
71
+ export function ownTakeFramesCredits(sheets) {
72
+ if (!Number.isSafeInteger(sheets) || sheets < 0 || sheets > OWN_TAKE_FRAMES_MAX)
73
+ throw new Error(`${sheets} sheets is outside 0–${OWN_TAKE_FRAMES_MAX}`);
74
+ return 0;
75
+ }
73
76
  export function ownAgentCharge(delivery, terms, heldCredits) {
74
77
  const charge = delivery.skill === "film_stills" ? ownStillsCredits(delivery.frames, terms, delivery.free)
75
78
  : delivery.skill === "film_voice" ? ownVoiceCredits(delivery.seconds, terms)
76
- : delivery.skill === "film_hero" ? ownHeroCredits(delivery.poses, terms) : ownFilmRenderCredits(delivery.seconds, terms);
79
+ : delivery.skill === "film_hero" ? ownHeroCredits(delivery.poses, terms)
80
+ : delivery.skill === "film_edit" ? ownEditCredits(delivery.seconds, terms)
81
+ : delivery.skill === "film_take_frames" ? ownTakeFramesCredits(delivery.sheets)
82
+ : delivery.skill === "film_take_check" ? ownTakeCheckCredits(delivery.checks, terms) : ownFilmRenderCredits(delivery.seconds, terms);
77
83
  if (!Number.isSafeInteger(heldCredits) || charge > heldCredits)
78
84
  throw new Error(`${delivery.skill} charge ${charge} is over its hold ${heldCredits}`);
79
85
  return charge;
80
86
  }
81
- //# sourceMappingURL=own-agent-price.js.map
@@ -8,15 +8,17 @@ export declare const FILM_RENDERS_QUOTE_PATH = "/v1/film-renders/quote";
8
8
  export declare const FILM_RENDERS_PATH = "/v1/film-renders";
9
9
  export declare const FILM_HEROES_QUOTE_PATH = "/v1/film-heroes/quote";
10
10
  export declare const FILM_HEROES_PATH = "/v1/film-heroes";
11
+ export declare const FILM_EDITS_QUOTE_PATH = "/v1/film-edits/quote";
12
+ export declare const FILM_EDITS_PATH = "/v1/film-edits";
13
+ export declare const TAKE_FRAMES_QUOTE_PATH = "/v1/take-frames/quote";
14
+ export declare const TAKE_FRAMES_PATH = "/v1/take-frames";
15
+ export declare const TAKE_CHECKS_QUOTE_PATH = "/v1/take-checks/quote";
16
+ export declare const TAKE_CHECKS_PATH = "/v1/take-checks";
11
17
  export declare const FILM_RUN_PATH = "/v1/film-runs/:id";
12
18
  export declare const OWN_AGENT_FILM_TASK = "own-agent-film";
13
- /** The frame rate of a still's timeline (the SkillFilm composition's) and of the delivered film. */
14
19
  export declare const FILM_STILL_FPS = 30, FILM_RENDER_FPS = 25;
15
- /** A still asked by anchor shows the moment this long after it, so the anchor's entrance has played. */
16
20
  export declare const FILM_STILL_ANCHOR_LAG_SEC = 0.25;
17
- /** The film runs this long after the voice's last sound. */
18
21
  export declare const FILM_TAIL_SEC = 0.8;
19
- /** The slowest narration pace a voice is held at, characters a second, and the most characters one take speaks. */
20
22
  export declare const OWN_VOICE_SLOWEST_CHARS_PER_SECOND = 13, OWN_VOICE_MAX_CHARS = 1500;
21
23
  export declare const filmStillsInput: z.ZodObject<{
22
24
  draft_id: z.ZodString;
@@ -37,7 +39,6 @@ export declare const filmStillsInput: z.ZodObject<{
37
39
  max_credits: z.ZodOptional<z.ZodNumber>;
38
40
  }, z.core.$strict>;
39
41
  export type FilmStillsInput = z.infer<typeof filmStillsInput>;
40
- /** What a client sends: `sheet` may be left out. */
41
42
  export type FilmStillsRequest = z.input<typeof filmStillsInput>;
42
43
  export declare const filmVoiceInput: z.ZodObject<{
43
44
  text: z.ZodString;
@@ -83,7 +84,72 @@ export declare const filmRenderInput: z.ZodObject<{
83
84
  max_credits: z.ZodOptional<z.ZodNumber>;
84
85
  }, z.core.$strict>;
85
86
  export type FilmRenderInput = z.infer<typeof filmRenderInput>;
86
- /** What a hero is drawn from, at least one: a character named by picture or words, else the meaning of the film's script. */
87
+ export declare const FILM_EDIT_WIDTH = 720, FILM_EDIT_HEIGHT = 1280, FILM_EDIT_FPS = 25;
88
+ export declare const FILM_EDIT_MAX_CLIPS = 24, FILM_EDIT_MAX_PIECES = 24, FILM_EDIT_MAX_CAPTIONS = 60, FILM_EDIT_MAX_HOLD_SEC = 3;
89
+ export declare const FILM_EDIT_CAPTION_POSITIONS: readonly ["top", "middle", "bottom", "low"];
90
+ export declare const filmEditInput: z.ZodObject<{
91
+ clips: z.ZodArray<z.ZodObject<{
92
+ run_id: z.ZodOptional<z.ZodString>;
93
+ asset_id: z.ZodOptional<z.ZodString>;
94
+ from: z.ZodNumber;
95
+ to: z.ZodNumber;
96
+ speed: z.ZodDefault<z.ZodNumber>;
97
+ }, z.core.$strict>>;
98
+ voice: z.ZodOptional<z.ZodObject<{
99
+ run_id: z.ZodString;
100
+ at: z.ZodDefault<z.ZodNumber>;
101
+ pieces: z.ZodOptional<z.ZodArray<z.ZodObject<{
102
+ from: z.ZodNumber;
103
+ to: z.ZodNumber;
104
+ at: z.ZodNumber;
105
+ }, z.core.$strict>>>;
106
+ }, z.core.$strict>>;
107
+ captions: z.ZodDefault<z.ZodArray<z.ZodObject<{
108
+ text: z.ZodString;
109
+ start: z.ZodNumber;
110
+ end: z.ZodNumber;
111
+ position: z.ZodDefault<z.ZodEnum<{
112
+ bottom: "bottom";
113
+ low: "low";
114
+ middle: "middle";
115
+ top: "top";
116
+ }>>;
117
+ }, z.core.$strict>>>;
118
+ hold: z.ZodDefault<z.ZodNumber>;
119
+ max_credits: z.ZodOptional<z.ZodNumber>;
120
+ }, z.core.$strict>;
121
+ export type FilmEditInput = z.infer<typeof filmEditInput>;
122
+ export type FilmEditRequest = z.input<typeof filmEditInput>;
123
+ export declare const TAKE_FRAMES_COLUMNS = 8, TAKE_FRAMES_CELL_WIDTH = 240, TAKE_FRAMES_PER_SHEET = 24;
124
+ export declare const TAKE_FRAMES_MIN_FPS = 1, TAKE_FRAMES_MAX_FPS = 24, TAKE_FRAMES_DEFAULT_FPS = 8;
125
+ export declare const TAKE_CHECK_PROMPT_MAX_CHARS = 1500, TAKE_CHECK_MAX_MOVES = 5;
126
+ export declare const takeFramesInput: z.ZodObject<{
127
+ run_id: z.ZodOptional<z.ZodString>;
128
+ asset_id: z.ZodOptional<z.ZodString>;
129
+ fps: z.ZodDefault<z.ZodNumber>;
130
+ from: z.ZodOptional<z.ZodNumber>;
131
+ to: z.ZodOptional<z.ZodNumber>;
132
+ crop: z.ZodOptional<z.ZodObject<{
133
+ x: z.ZodNumber;
134
+ y: z.ZodNumber;
135
+ w: z.ZodNumber;
136
+ h: z.ZodNumber;
137
+ }, z.core.$strict>>;
138
+ max_credits: z.ZodOptional<z.ZodNumber>;
139
+ }, z.core.$strict>;
140
+ export type TakeFramesInput = z.infer<typeof takeFramesInput>;
141
+ export type TakeFramesRequest = z.input<typeof takeFramesInput>;
142
+ export declare const takeCheckInput: z.ZodObject<{
143
+ run_id: z.ZodOptional<z.ZodString>;
144
+ asset_id: z.ZodOptional<z.ZodString>;
145
+ direction: z.ZodString;
146
+ product_image: z.ZodOptional<z.ZodString>;
147
+ moves: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
148
+ max_credits: z.ZodOptional<z.ZodNumber>;
149
+ }, z.core.$strict>;
150
+ export type TakeCheckInput = z.infer<typeof takeCheckInput>;
151
+ export type TakeCheckRequest = z.input<typeof takeCheckInput>;
152
+ export declare const TAKE_DEFECT_LEVELS: readonly ["asset", "action", "camera", "roll"];
87
153
  export declare const FILM_HERO_SOURCE_FIELDS: readonly ["character_reference", "character_details", "script", "voice_run_id"];
88
154
  export declare const filmHeroInput: z.ZodObject<{
89
155
  character_reference: z.ZodOptional<z.ZodString>;
@@ -94,30 +160,33 @@ export declare const filmHeroInput: z.ZodObject<{
94
160
  max_credits: z.ZodOptional<z.ZodNumber>;
95
161
  }, z.core.$strict>;
96
162
  export type FilmHeroInput = z.infer<typeof filmHeroInput>;
97
- /** The seconds a take is held at before it is spoken: every character at the slowest pace, two seconds of lead and tail. */
98
163
  export declare function ownVoiceCeilingSeconds(text: string): number;
99
- /** A film's frames on its voice: the take, then the tail, at the delivered rate. */
100
164
  export declare const ownFilmFrames: (voiceSeconds: number) => number;
101
- /** How long the film on a take runs, to the hundredth (#1376): the take's length is not the film's. */
102
165
  export declare const ownFilmSeconds: (voiceSeconds: number) => number;
103
166
  export declare const ownAgentQuote: z.ZodObject<{
104
167
  skill: z.ZodEnum<{
168
+ film_edit: "film_edit";
105
169
  film_hero: "film_hero";
106
170
  film_render: "film_render";
107
171
  film_stills: "film_stills";
172
+ film_take_check: "film_take_check";
173
+ film_take_frames: "film_take_frames";
108
174
  film_voice: "film_voice";
109
175
  }>;
110
176
  credits: z.ZodNumber;
111
177
  unit: z.ZodEnum<{
178
+ check: "check";
112
179
  film: "film";
113
180
  pose: "pose";
114
181
  second: "second";
182
+ sheet: "sheet";
115
183
  still: "still";
116
184
  }>;
117
185
  units: z.ZodNumber;
118
186
  film_sec: z.ZodOptional<z.ZodNumber>;
119
187
  free_units: z.ZodOptional<z.ZodNumber>;
120
188
  free_left: z.ZodOptional<z.ZodNumber>;
189
+ frames: z.ZodOptional<z.ZodNumber>;
121
190
  warnings: z.ZodArray<z.ZodString>;
122
191
  }, z.core.$strict>;
123
192
  export type OwnAgentQuote = z.infer<typeof ownAgentQuote>;
@@ -133,13 +202,15 @@ export declare const filmWord: z.ZodObject<{
133
202
  start: z.ZodNumber;
134
203
  end: z.ZodNumber;
135
204
  }, z.core.$strict>;
136
- /** One run of the mode as the agent reads it: the run's money and state, and what it delivered. */
137
205
  export declare const filmRun: z.ZodObject<{
138
206
  run_id: z.ZodString;
139
207
  skill: z.ZodEnum<{
208
+ film_edit: "film_edit";
140
209
  film_hero: "film_hero";
141
210
  film_render: "film_render";
142
211
  film_stills: "film_stills";
212
+ film_take_check: "film_take_check";
213
+ film_take_frames: "film_take_frames";
143
214
  film_voice: "film_voice";
144
215
  }>;
145
216
  state: z.ZodString;
@@ -189,10 +260,39 @@ export declare const filmRun: z.ZodObject<{
189
260
  character: z.ZodNullable<z.ZodString>;
190
261
  sheet_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
191
262
  }, z.core.$strict>>;
263
+ take_frames: z.ZodOptional<z.ZodObject<{
264
+ fps: z.ZodNumber;
265
+ frames: z.ZodNumber;
266
+ sheets: z.ZodArray<z.ZodObject<{
267
+ image_url: z.ZodString;
268
+ from: z.ZodNumber;
269
+ to: z.ZodNumber;
270
+ frames: z.ZodNumber;
271
+ }, z.core.$strict>>;
272
+ }, z.core.$strict>>;
273
+ take_check: z.ZodOptional<z.ZodObject<{
274
+ duration_sec: z.ZodNumber;
275
+ findings: z.ZodArray<z.ZodObject<{
276
+ code: z.ZodString;
277
+ level: z.ZodEnum<{
278
+ action: "action";
279
+ asset: "asset";
280
+ camera: "camera";
281
+ roll: "roll";
282
+ }>;
283
+ from: z.ZodNumber;
284
+ to: z.ZodNumber;
285
+ whole_take: z.ZodBoolean;
286
+ why: z.ZodNullable<z.ZodString>;
287
+ }, z.core.$strict>>;
288
+ clean: z.ZodArray<z.ZodObject<{
289
+ from: z.ZodNumber;
290
+ to: z.ZodNumber;
291
+ }, z.core.$strict>>;
292
+ }, z.core.$strict>>;
192
293
  created_at: z.ZodString;
193
294
  finished_at: z.ZodNullable<z.ZodString>;
194
295
  }, z.core.$strict>;
195
296
  export type FilmRun = z.infer<typeof filmRun>;
196
297
  export declare const isOwnAgentSkill: (skill: unknown) => skill is (typeof OWN_AGENT_SKILLS)[number];
197
- /** A take longer than this is refused before money: its hold would pass the longest take the tariff prices. */
198
298
  export declare const OWN_VOICE_CEILING_LIMIT = 120;
@@ -7,8 +7,6 @@ import { MASCOT_POSES } from "./mascots.js";
7
7
  import { maxCreditsField } from "./max-credits.js";
8
8
  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
9
  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
10
  export const FILM_STILLS_QUOTE_PATH = "/v1/film-stills/quote";
13
11
  export const FILM_STILLS_PATH = "/v1/film-stills";
14
12
  export const FILM_VOICES_QUOTE_PATH = "/v1/film-voices/quote";
@@ -17,18 +15,19 @@ export const FILM_RENDERS_QUOTE_PATH = "/v1/film-renders/quote";
17
15
  export const FILM_RENDERS_PATH = "/v1/film-renders";
18
16
  export const FILM_HEROES_QUOTE_PATH = "/v1/film-heroes/quote";
19
17
  export const FILM_HEROES_PATH = "/v1/film-heroes";
18
+ export const FILM_EDITS_QUOTE_PATH = "/v1/film-edits/quote";
19
+ export const FILM_EDITS_PATH = "/v1/film-edits";
20
+ export const TAKE_FRAMES_QUOTE_PATH = "/v1/take-frames/quote";
21
+ export const TAKE_FRAMES_PATH = "/v1/take-frames";
22
+ export const TAKE_CHECKS_QUOTE_PATH = "/v1/take-checks/quote";
23
+ export const TAKE_CHECKS_PATH = "/v1/take-checks";
20
24
  export const FILM_RUN_PATH = "/v1/film-runs/:id";
21
25
  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
26
  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
27
  export const FILM_STILL_ANCHOR_LAG_SEC = 0.25;
26
- /** The film runs this long after the voice's last sound. */
27
28
  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
29
  export const OWN_VOICE_SLOWEST_CHARS_PER_SECOND = 13, OWN_VOICE_MAX_CHARS = 1500;
30
30
  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
31
  const sceneImages = z.array(facelessCustomerSceneImage).max(EXPLAINER_MAX_PRODUCT_PICTURES).optional()
33
32
  .describe(`Up to ${EXPLAINER_MAX_PRODUCT_PICTURES} of your product pictures, p1 first: each on the script words its anchor names, placed by ` +
34
33
  "your code with <Product id=\"p1\"/> while those words are spoken. Send the same list to the stills and the render");
@@ -56,7 +55,80 @@ export const filmRenderInput = z.strictObject({
56
55
  scene_images: sceneImages,
57
56
  max_credits: maxCreditsField,
58
57
  });
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. */
58
+ export const FILM_EDIT_WIDTH = 720, FILM_EDIT_HEIGHT = 1280, FILM_EDIT_FPS = 25;
59
+ export const FILM_EDIT_MAX_CLIPS = 24, FILM_EDIT_MAX_PIECES = 24, FILM_EDIT_MAX_CAPTIONS = 60, FILM_EDIT_MAX_HOLD_SEC = 3;
60
+ export const FILM_EDIT_CAPTION_POSITIONS = ["top", "middle", "bottom", "low"];
61
+ const editSecond = z.number().min(0).max(600);
62
+ const editClip = z.strictObject({
63
+ run_id: runId.optional().describe("A delivered generate_video run of this account"),
64
+ asset_id: assetId.optional().describe("Instead of run_id: a video asset of this account"),
65
+ from: editSecond.describe("The second of the clip the cut starts at"),
66
+ to: editSecond.describe("The second of the clip the cut ends at, after from"),
67
+ 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"),
68
+ }).refine(clip => (clip.run_id === undefined) !== (clip.asset_id === undefined), "name the clip by run_id or by asset_id, one of them")
69
+ .refine(clip => clip.to > clip.from, "to must be after from");
70
+ const voicePiece = z.strictObject({
71
+ from: editSecond.describe("The second of the take the piece starts at (make_voice words give each word's start and end)"),
72
+ to: editSecond.describe("The second of the take the piece ends at, after from"),
73
+ at: editSecond.describe("The second of the edit the piece is heard from"),
74
+ }).refine(piece => piece.to > piece.from, "to must be after from");
75
+ const editCaption = z.strictObject({
76
+ text: z.string().trim().min(1).max(40).regex(/^[^\n{}\\]+$/, "one line, without braces or backslashes")
77
+ .describe("What the caption reads, as written: 2 to 4 words in capitals read best"),
78
+ start: editSecond.describe("The second of the edit it appears"),
79
+ end: editSecond.describe("The second of the edit it goes, after start"),
80
+ position: z.enum(FILM_EDIT_CAPTION_POSITIONS).default("bottom")
81
+ .describe("Where it sits; pick the one that keeps it off the product, its print, the working hands and the face"),
82
+ }).refine(caption => caption.end > caption.start, "end must be after start");
83
+ export const filmEditInput = z.strictObject({
84
+ clips: z.array(editClip).min(1).max(FILM_EDIT_MAX_CLIPS)
85
+ .describe("The cut in order, each a window of one of your clips; they play back to back with hard cuts"),
86
+ voice: z.strictObject({
87
+ run_id: runId.describe("A delivered make_voice run of this account"),
88
+ at: editSecond.default(0.1).describe("Without pieces: the second of the edit the whole take starts at"),
89
+ pieces: z.array(voicePiece).min(1).max(FILM_EDIT_MAX_PIECES).optional()
90
+ .describe("Instead of the whole take: its sentences laid one by one, each on the second its picture starts; pieces may not overlap"),
91
+ }).optional().describe("The voice-over; without it the edit is silent"),
92
+ captions: z.array(editCaption).max(FILM_EDIT_MAX_CAPTIONS).default([])
93
+ .describe("Burned-in captions: bold white with a dark outline"),
94
+ hold: z.number().min(0).max(FILM_EDIT_MAX_HOLD_SEC).default(0)
95
+ .describe("Seconds the last frame is held at the end, for the packshot"),
96
+ max_credits: maxCreditsField,
97
+ });
98
+ export const TAKE_FRAMES_COLUMNS = 8, TAKE_FRAMES_CELL_WIDTH = 240, TAKE_FRAMES_PER_SHEET = 24;
99
+ export const TAKE_FRAMES_MIN_FPS = 1, TAKE_FRAMES_MAX_FPS = 24, TAKE_FRAMES_DEFAULT_FPS = 8;
100
+ export const TAKE_CHECK_PROMPT_MAX_CHARS = 1500, TAKE_CHECK_MAX_MOVES = 5;
101
+ const takeSecond = z.number().min(0).max(600);
102
+ const takeSource = {
103
+ run_id: runId.optional().describe("The take: a delivered generate_video run of this account"),
104
+ asset_id: assetId.optional().describe("Instead of run_id: a video asset of this account"),
105
+ };
106
+ const oneTake = (take) => (take.run_id === undefined) !== (take.asset_id === undefined);
107
+ const ONE_TAKE = "name the take by run_id or by asset_id, one of them";
108
+ export const takeFramesInput = z.strictObject({
109
+ ...takeSource,
110
+ fps: z.number().int().min(TAKE_FRAMES_MIN_FPS).max(TAKE_FRAMES_MAX_FPS).default(TAKE_FRAMES_DEFAULT_FPS)
111
+ .describe("Frames a second: 8 to read the whole take, 12 to 24 on a contact"),
112
+ from: takeSecond.optional().describe("The second of the take the frames start at; omitted, its start"),
113
+ to: takeSecond.optional().describe("The second of the take the frames end at; omitted, its end"),
114
+ crop: z.strictObject({
115
+ 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),
116
+ }).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()
117
+ .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"),
118
+ max_credits: maxCreditsField,
119
+ }).refine(oneTake, ONE_TAKE).refine(v => v.from === undefined || v.to === undefined || v.to > v.from, "to must be after from");
120
+ export const takeCheckInput = z.strictObject({
121
+ ...takeSource,
122
+ direction: z.string().trim().min(1).max(TAKE_CHECK_PROMPT_MAX_CHARS)
123
+ .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"),
124
+ product_image: qualifiedImageUrl.optional()
125
+ .describe("https picture of the product as it really is (your upload or a saved asset): the take's product is compared with it"),
126
+ moves: z.array(takeSecond).max(TAKE_CHECK_MAX_MOVES).optional()
127
+ .describe("Seconds of the take where a hand meets the product (a grip, a lid, a set-down): looked at first"),
128
+ max_credits: maxCreditsField,
129
+ }).refine(oneTake, ONE_TAKE);
130
+ export const TAKE_DEFECT_LEVELS = ["asset", "action", "camera", "roll"];
131
+ const takeWindow = z.strictObject({ from: z.number().min(0), to: z.number().min(0) });
60
132
  export const FILM_HERO_SOURCE_FIELDS = ["character_reference", "character_details", "script", "voice_run_id"];
61
133
  export const filmHeroInput = z.strictObject({
62
134
  character_reference: qualifiedImageUrl.optional().describe("https image of the character the poses are drawn after: a public picture, your upload, a " +
@@ -70,27 +142,22 @@ export const filmHeroInput = z.strictObject({
70
142
  max_credits: maxCreditsField,
71
143
  }).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
144
  .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
145
  export function ownVoiceCeilingSeconds(text) {
75
146
  return Math.ceil(text.length / OWN_VOICE_SLOWEST_CHARS_PER_SECOND) + 2;
76
147
  }
77
- /** A film's frames on its voice: the take, then the tail, at the delivered rate. */
78
148
  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
149
  export const ownFilmSeconds = (voiceSeconds) => +(ownFilmFrames(voiceSeconds) / FILM_RENDER_FPS).toFixed(2);
81
150
  const filmSec = z.number().positive().describe("How long the film runs: the voice, then a short tail; say this length, not the voice's");
82
151
  export const ownAgentQuote = z.strictObject({
83
152
  skill: z.enum(OWN_AGENT_SKILLS),
84
- /** What admission holds: the most the run can be charged. */
85
153
  credits: z.number().int().nonnegative(),
86
- unit: z.enum(["still", "second", "film", "pose"]),
154
+ unit: z.enum(["still", "second", "film", "pose", "sheet", "check"]),
87
155
  units: z.number().int().nonnegative(),
88
- /** `film_render`: how long the film will run. */
89
156
  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
157
  free_units: z.number().int().nonnegative().optional()
92
158
  .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
159
  free_left: z.number().int().nonnegative().optional().describe("Free stills this draft has left in the rolling day after this call"),
160
+ frames: z.number().int().positive().optional(),
94
161
  warnings: z.array(z.string()),
95
162
  });
96
163
  export const filmStill = z.strictObject({
@@ -98,11 +165,9 @@ export const filmStill = z.strictObject({
98
165
  seconds: z.number(),
99
166
  frame: z.number().int().min(0),
100
167
  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
168
  findings: z.array(z.string()),
103
169
  });
104
170
  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
171
  export const filmRun = z.strictObject({
107
172
  run_id: runId,
108
173
  skill: z.enum(OWN_AGENT_SKILLS),
@@ -111,21 +176,21 @@ export const filmRun = z.strictObject({
111
176
  credits_charged: z.number().int().nonnegative().nullable(),
112
177
  warnings: z.array(z.string()),
113
178
  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
179
  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
180
  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
181
  film: z.strictObject({ video_url: z.string().url(), duration_sec: z.number().positive(),
120
182
  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
183
  hero: z.strictObject({ mascot_id: assetId, poses: z.array(z.enum(MASCOT_POSES)), character: z.string().nullable(),
124
184
  sheet_url: z.string().url().nullable().default(null) }).optional(),
185
+ take_frames: z.strictObject({ fps: z.number().int().positive(), frames: z.number().int().positive(),
186
+ 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() })) })
187
+ .optional(),
188
+ take_check: z.strictObject({ duration_sec: z.number().positive(),
189
+ findings: z.array(z.strictObject({ code: z.string(), level: z.enum(TAKE_DEFECT_LEVELS), from: z.number().min(0), to: z.number().min(0),
190
+ whole_take: z.boolean(), why: z.string().nullable() })),
191
+ clean: z.array(takeWindow) }).optional(),
125
192
  created_at: z.string(),
126
193
  finished_at: z.string().nullable(),
127
194
  });
128
195
  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
196
  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