@clipwright/core 0.60.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 (587) 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 +0 -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 +57 -3
  38. package/dist/contracts/v1/workflow-brief.js +0 -13
  39. package/dist/contracts/v1/workflow-catalog.d.ts +114 -0
  40. package/dist/contracts/v1/workflow-catalog.js +0 -3
  41. package/dist/contracts/v1/workflow-client.d.ts +114 -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 +0 -1
  46. package/dist/contracts/v1/workflow-execution.js +0 -4
  47. package/dist/contracts/v1/workflow-next.d.ts +0 -2
  48. package/dist/contracts/v1/workflow-next.js +0 -3
  49. package/dist/contracts/v1/workflow-plan.d.ts +171 -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 +0 -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 +0 -9
  92. package/dist/face-billing.js +0 -23
  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 +0 -2
  101. package/dist/faceless-direction-summary.js +0 -3
  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 +0 -45
  108. package/dist/faceless-price.js +0 -64
  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 +0 -26
  112. package/dist/faceless-public.js +0 -59
  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 +1 -0
  141. package/dist/index.js +1 -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 +0 -8
  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 +0 -28
  179. package/dist/parts-pricing.js +0 -32
  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 +0 -4
  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 +0 -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 +0 -14
  335. package/dist/uploads.js +0 -17
  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 +0 -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 +31 -0
  359. package/dist/workflows/methods/faceless-explainer.js +0 -1
  360. package/dist/workflows/methods/kinetic-launch.d.ts +62 -1
  361. package/dist/workflows/methods/kinetic-launch.js +0 -2
  362. package/dist/workflows/methods/product-image-story.d.ts +31 -0
  363. package/dist/workflows/methods/product-image-story.js +0 -1
  364. package/dist/workflows/methods/reference-remake.d.ts +31 -0
  365. package/dist/workflows/methods/reference-remake.js +0 -1
  366. package/dist/workflows/methods/shared.d.ts +31 -1
  367. package/dist/workflows/methods/shared.js +0 -3
  368. package/dist/workflows/methods/ugc-faq-answer.d.ts +31 -0
  369. package/dist/workflows/methods/ugc-faq-answer.js +0 -1
  370. package/dist/workflows/methods/ugc-product-intro.d.ts +31 -0
  371. package/dist/workflows/methods/ugc-product-intro.js +0 -1
  372. package/dist/workflows/methods/website-proof-demo.d.ts +62 -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-direction-summary.js.map +0 -1
  441. package/dist/faceless-image-placement.js.map +0 -1
  442. package/dist/faceless-image-qualification.js.map +0 -1
  443. package/dist/faceless-media-record.js.map +0 -1
  444. package/dist/faceless-price.js.map +0 -1
  445. package/dist/faceless-public-plan.js.map +0 -1
  446. package/dist/faceless-public.js.map +0 -1
  447. package/dist/faceless-short-61.js.map +0 -1
  448. package/dist/faceless-storyboard-timing.js.map +0 -1
  449. package/dist/faceless-storyboard-v2-plan.js.map +0 -1
  450. package/dist/faceless-storyboard-v2-timing.js.map +0 -1
  451. package/dist/faceless-storyboard-v2.js.map +0 -1
  452. package/dist/faceless-storyboard.js.map +0 -1
  453. package/dist/faceless-voices.js.map +0 -1
  454. package/dist/feedback.js.map +0 -1
  455. package/dist/film-directions.js.map +0 -1
  456. package/dist/film-drafts.js.map +0 -1
  457. package/dist/film-guide.js.map +0 -1
  458. package/dist/film-styles.js.map +0 -1
  459. package/dist/generation-shot.js.map +0 -1
  460. package/dist/generations-output.js.map +0 -1
  461. package/dist/generations.js.map +0 -1
  462. package/dist/idempotency.js.map +0 -1
  463. package/dist/index.js.map +0 -1
  464. package/dist/live-shot-kinds.js.map +0 -1
  465. package/dist/long-form-pricing.js.map +0 -1
  466. package/dist/long-form-profile.js.map +0 -1
  467. package/dist/long-form-revision.js.map +0 -1
  468. package/dist/markdown-quote.js.map +0 -1
  469. package/dist/mascots.js.map +0 -1
  470. package/dist/max-credits.js.map +0 -1
  471. package/dist/mcp-ugc-descriptions.js.map +0 -1
  472. package/dist/media-timebase.js.map +0 -1
  473. package/dist/motion-styles.js.map +0 -1
  474. package/dist/moves.js.map +0 -1
  475. package/dist/music.js.map +0 -1
  476. package/dist/naming.js.map +0 -1
  477. package/dist/openapi.js.map +0 -1
  478. package/dist/output-provenance.js.map +0 -1
  479. package/dist/own-agent-price.js.map +0 -1
  480. package/dist/own-agent-runs.js.map +0 -1
  481. package/dist/pacing.js.map +0 -1
  482. package/dist/parts-pricing.js.map +0 -1
  483. package/dist/post-text.js.map +0 -1
  484. package/dist/presenter-beats.js.map +0 -1
  485. package/dist/presenter-matte.js.map +0 -1
  486. package/dist/presenter-takes.js.map +0 -1
  487. package/dist/prices.js.map +0 -1
  488. package/dist/public-endpoints.js.map +0 -1
  489. package/dist/public-responses.js.map +0 -1
  490. package/dist/rate-limit.js.map +0 -1
  491. package/dist/reference-analysis.js.map +0 -1
  492. package/dist/reference-display.js.map +0 -1
  493. package/dist/reference-kinds.js.map +0 -1
  494. package/dist/reference-lyrics.js.map +0 -1
  495. package/dist/reference-profile.js.map +0 -1
  496. package/dist/reference-staging.js.map +0 -1
  497. package/dist/reference-text-spans.js.map +0 -1
  498. package/dist/reference-voice-over.js.map +0 -1
  499. package/dist/reference-voice.js.map +0 -1
  500. package/dist/render-backend.js.map +0 -1
  501. package/dist/resolved-timeline.js.map +0 -1
  502. package/dist/run-media.js.map +0 -1
  503. package/dist/run-preflight.js.map +0 -1
  504. package/dist/run-static-warnings.js.map +0 -1
  505. package/dist/runs.js.map +0 -1
  506. package/dist/scene-bible.js.map +0 -1
  507. package/dist/scene-graph.js.map +0 -1
  508. package/dist/scene-place.js.map +0 -1
  509. package/dist/scene-proposal.js.map +0 -1
  510. package/dist/script-integrity.js.map +0 -1
  511. package/dist/script-voice.js.map +0 -1
  512. package/dist/semantic-inserts.js.map +0 -1
  513. package/dist/skill-theme-explainer.js.map +0 -1
  514. package/dist/skill-theme.js.map +0 -1
  515. package/dist/skills.js.map +0 -1
  516. package/dist/speech-rhythm-contract.js.map +0 -1
  517. package/dist/speech-rhythm.js.map +0 -1
  518. package/dist/templates/backdrop.js.map +0 -1
  519. package/dist/templates/callout.js.map +0 -1
  520. package/dist/templates/chart.js.map +0 -1
  521. package/dist/templates/chat-window.js.map +0 -1
  522. package/dist/templates/checklist.js.map +0 -1
  523. package/dist/templates/comment-cta.js.map +0 -1
  524. package/dist/templates/compare.js.map +0 -1
  525. package/dist/templates/cover-story.js.map +0 -1
  526. package/dist/templates/end-card.js.map +0 -1
  527. package/dist/templates/hand-title.js.map +0 -1
  528. package/dist/templates/index.js.map +0 -1
  529. package/dist/templates/lower-third.js.map +0 -1
  530. package/dist/templates/notification.js.map +0 -1
  531. package/dist/templates/phone-call.js.map +0 -1
  532. package/dist/templates/phone-screen.js.map +0 -1
  533. package/dist/templates/pointer-chips.js.map +0 -1
  534. package/dist/templates/progress.js.map +0 -1
  535. package/dist/templates/quote.js.map +0 -1
  536. package/dist/templates/race.js.map +0 -1
  537. package/dist/templates/rating.js.map +0 -1
  538. package/dist/templates/series-frame.js.map +0 -1
  539. package/dist/templates/size.js.map +0 -1
  540. package/dist/templates/slot.js.map +0 -1
  541. package/dist/templates/sounds.js.map +0 -1
  542. package/dist/templates/stat.js.map +0 -1
  543. package/dist/templates/tag.js.map +0 -1
  544. package/dist/templates/terminal.js.map +0 -1
  545. package/dist/templates/theme.js.map +0 -1
  546. package/dist/templates/title-card.js.map +0 -1
  547. package/dist/templates/video-grid.js.map +0 -1
  548. package/dist/templates/word-fill.js.map +0 -1
  549. package/dist/templates/word-title.js.map +0 -1
  550. package/dist/trend-niches.js.map +0 -1
  551. package/dist/trend-search.js.map +0 -1
  552. package/dist/tts-backend.js.map +0 -1
  553. package/dist/ugc-call.js.map +0 -1
  554. package/dist/ugc-delivery.js.map +0 -1
  555. package/dist/ugc-framing.js.map +0 -1
  556. package/dist/ugc-interview.js.map +0 -1
  557. package/dist/ugc-layers.js.map +0 -1
  558. package/dist/ugc-scenes.js.map +0 -1
  559. package/dist/ugc-video-media.js.map +0 -1
  560. package/dist/uploads.js.map +0 -1
  561. package/dist/vendor-response.js.map +0 -1
  562. package/dist/video-size.js.map +0 -1
  563. package/dist/voice-admission.js.map +0 -1
  564. package/dist/voice-catalog-data.js.map +0 -1
  565. package/dist/voice-catalog.js.map +0 -1
  566. package/dist/voice-listing.js.map +0 -1
  567. package/dist/voice-pace.js.map +0 -1
  568. package/dist/voice-preview-approval.js.map +0 -1
  569. package/dist/voices.js.map +0 -1
  570. package/dist/workflows/catalog.js.map +0 -1
  571. package/dist/workflows/film-directions.js.map +0 -1
  572. package/dist/workflows/index.js.map +0 -1
  573. package/dist/workflows/methods/faceless-explainer.js.map +0 -1
  574. package/dist/workflows/methods/kinetic-launch.js.map +0 -1
  575. package/dist/workflows/methods/product-image-story.js.map +0 -1
  576. package/dist/workflows/methods/reference-remake.js.map +0 -1
  577. package/dist/workflows/methods/shared.js.map +0 -1
  578. package/dist/workflows/methods/ugc-faq-answer.js.map +0 -1
  579. package/dist/workflows/methods/ugc-product-intro.js.map +0 -1
  580. package/dist/workflows/methods/website-proof-demo.js.map +0 -1
  581. package/dist/workflows/motion-director.js.map +0 -1
  582. package/dist/workflows/product-references.js.map +0 -1
  583. package/dist/workflows/reference-remake.js.map +0 -1
  584. package/dist/workflows/remake-chooser.js.map +0 -1
  585. package/dist/workflows/remake-motion.js.map +0 -1
  586. package/dist/workflows/validate.js.map +0 -1
  587. package/dist/workflows.js.map +0 -1
package/dist/skills.js CHANGED
@@ -14,9 +14,9 @@ import { MAX_MOTION_STYLE_SPANS, MOTION_STYLE_CHOICES, MOTION_STYLE_DESCRIPTION,
14
14
  import { LIVE_SHOT_FRAMINGS, LIVE_SHOT_KINDS, LIVE_SHOT_PRODUCT_PLACEMENTS, LIVE_SHOT_TRANSITIONS, liveShotCastKey, liveShotProductPlacement, liveShotSetupKey, MAX_SHOT_CAST, TALKING_ACTION_VOICE_OVER, talkingPose } from "./live-shot-kinds.js";
15
15
  import { countWords } from "./pacing.js";
16
16
  import { pauseTrim, VOICE_PACE_MAX, VOICE_PACE_MIN } from "./reference-voice.js";
17
- import { AD_PAUSE_TRIM } from "./ad-pause-trim.js";
17
+ import { AD_PAUSE_TRIM, isAdStyleUgcInput } from "./ad-pause-trim.js";
18
18
  import { generationShot, negationIn, shotIssues } from "./generation-shot.js";
19
- import { SCENE_DESCRIPTION, sceneBible, sceneDirectionMark, shotStart } from "./scene-bible.js";
19
+ import { runSpeech, SCENE_DESCRIPTION, sceneBible, sceneDirectionMark, shotStart, speechActions } from "./scene-bible.js";
20
20
  import { proposeField, sceneProposal, sceneProposalAccept } from "./scene-proposal.js";
21
21
  import { lexicalTokens, quoteOccurrences } from "./semantic-inserts.js";
22
22
  import { frameCanvasOf, FULL_FRAME_TRANSITIONS, INSERT_FITS, INSERT_MOTIONS, INSERT_RETIMES, INSERT_STAGE_ENTRANCES, INSERT_TRANSITIONS, LAYER_ENTERS, LAYER_EXITS, layerRefusals, LAYOUT_WINDOW_KINDS, MAX_ENTER_OFFSET_S, MAX_LAYOUT_WINDOWS, MAX_OVERLAYS, OVERLAY_POSITIONS, PRESENTER_FRAMINGS, SPLIT_MEDIA_SHARE, SPLIT_MEDIA_SIDES } from "./ugc-layers.js";
@@ -55,7 +55,6 @@ import { wordTitle } from "./templates/word-title.js";
55
55
  import { seriesFrame } from "./templates/series-frame.js";
56
56
  import { commentCta } from "./templates/comment-cta.js";
57
57
  import { cutToNothingError, DEFAULT_TTS_MODEL, GOOGLE_TTS_MODEL, isModelVoiceName, MODEL_DEFAULT_VOICE_BY_GENDER, MODEL_VOICE_MODEL, resolveTtsModel, MAX_SCRIPT_CHARS, SCRIPT_LENGTH_DESCRIPTION, speaksOwnVoices, STRESS_MARKING_DESCRIPTION, ttsScriptLimitError, TTS_MODELS, voicePresetOf, VOICE_ID_PATTERN, VOICE_NAME_PATTERN, VOICE_PRESET_NAMES, } from "./voices.js";
58
- /** Caption looks the renderer draws, each a fixed font, colours, placement and word animation. */
59
58
  export const CAPTION_PRESETS = {
60
59
  hormozi: "the default: heavy white uppercase with a thick black outline, up to three words per cue, one keyword per cue in yellow " +
61
60
  "(emphasised, else the longest non-stop-word)",
@@ -85,10 +84,8 @@ export const CAPTION_PRESETS = {
85
84
  punch: "mid-frame setup and punch: a small white lead-in line over one or two large blue glowing keywords; other words small and white",
86
85
  };
87
86
  export const CAPTION_PRESET_IDS = Object.keys(CAPTION_PRESETS);
88
- /** An earlier style name kept valid. */
89
87
  export const CAPTION_STYLE_ALIASES = { minimal: "minimalist" };
90
88
  export const CAPTION_STYLES = [...CAPTION_PRESET_IDS, ...Object.keys(CAPTION_STYLE_ALIASES)];
91
- /** The preset a style name draws: an alias resolves to its preset. */
92
89
  export function captionPresetOf(style) {
93
90
  return style in CAPTION_STYLE_ALIASES ? CAPTION_STYLE_ALIASES[style] : style;
94
91
  }
@@ -98,88 +95,60 @@ const CAPTION_STYLE_DESCRIPTION = "Caption look when captions=true. " +
98
95
  " Previews: https://clipwright.io/captions";
99
96
  export const MAX_CAPTION_EMPHASIS = 60;
100
97
  export const MAX_CAPTION_EMPHASIS_CHARS = 120;
101
- /** `full` captions every spoken word; `highlights` only the windows around `caption_emphasis` quotes. */
102
98
  export const CAPTION_MODES = ["full", "highlights"];
103
99
  export { CAPTION_POSITION_VERTICAL };
104
100
  export const CAPTION_POSITIONS = Object.keys(CAPTION_POSITION_VERTICAL);
105
- /** `punch`: a small lead-in line over the quote as a large glowing keyword; `pill`: the quote alone in a rounded pill; */
106
- /** `color`: the quote in the style's accent colour, same size; `box`: the quote on a soft box of the accent colour, same size (#1104). */
107
101
  export const CAPTION_EMPHASIS_LOOKS = ["punch", "pill", "color", "box"];
108
102
  const emphasisQuote = z.string().min(1).max(MAX_CAPTION_EMPHASIS_CHARS).refine((text) => text.trim().length > 0);
109
103
  export const captionEmphasisItem = z.union([emphasisQuote,
110
104
  z.object({ quote: emphasisQuote, look: z.enum(CAPTION_EMPHASIS_LOOKS).optional(),
111
105
  punch_in: z.boolean().optional().describe("Long form only: zoom into the presenter while the quote is spoken. " +
112
106
  "Drawn only where captions are drawn and the presenter is on screen; otherwise warnings[] names it.") }).strict()]);
113
- /** An emphasis item as quote, look and punch-in; a plain string, or an object without a look, takes the preset's look. */
114
107
  export function captionEmphasisOf(item) {
115
108
  return typeof item === "string" ? { quote: item, look: undefined }
116
109
  : { quote: item.quote, look: item.look, ...(item.punch_in === true ? { punchIn: true } : {}) };
117
110
  }
118
- /** Composition semantics of a run, written at admission: 2 draws captions and crops pictures */
119
- /** to fill the frame; a run stored without it keeps the earlier render, so it re-renders the same. */
120
111
  export const UGC_COMPOSITION_VERSION = 2;
121
- /** `end_hold_s`: the last frame held after the last word, in seconds (#991). */
122
112
  export const END_HOLD_MIN_S = 0.2;
123
113
  export const END_HOLD_MAX_S = 5;
114
+ export const AD_END_HOLD_S = 0.5;
115
+ export const AD_END_HOLD_WARNING = `end_hold_s: the last frame holds ${AD_END_HOLD_S} s after the last word, an ad's default; pass end_hold_s to change it`;
124
116
  export function compositionVersionOf(storedInput) {
125
117
  return storedInput !== null && typeof storedInput === "object" &&
126
118
  storedInput.composition_version === UGC_COMPOSITION_VERSION ? 2 : 1;
127
119
  }
128
120
  export const LOOKS = ["natural", "commercial", "raw_iphone"];
129
- /** Public formats = formats MEASURED live, not the vendor docs: declaring more would */
130
- /** accept values the pipeline later rejects. */
131
121
  export const ASPECT_RATIOS = ["9:16", "1:1", "16:9"];
132
- /** Output resolution offered (720p: 720×1280, 1080p: 1080×1920 at 9:16). Resolution does not */
133
- /** change the price of a make_ugc second. */
134
122
  export const RESOLUTIONS = ["720p", "1080p"];
135
- /** What a stored run or plan may hold: 4k is no longer offered, and a run admitted with it still reads (#1189). */
136
123
  export const STORED_RESOLUTIONS = [...RESOLUTIONS, "4k"];
137
- /** The refusal of a 4k request, before any charge (#1189). */
138
124
  export const RESOLUTION_4K_REFUSAL = "4k is not offered; use 1080p";
139
- /** The offered resolutions, as a request field: 4k is named with its refusal, not as an unknown value. */
140
125
  export const offeredResolution = z.enum(RESOLUTIONS, {
141
126
  error: (issue) => issue.input === "4k" ? RESOLUTION_4K_REFUSAL : undefined,
142
127
  });
143
- /** A new make_ugc run the client names no resolution for is 720p (#911): enough for an ad, and the render costs less. */
144
128
  export const DEFAULT_RESOLUTION = "720p";
145
- /** A stored run without a resolution was admitted before #911 pinned one, when silence meant 1080p. */
146
129
  export const LEGACY_RUN_RESOLUTION = "1080p";
147
130
  export const DEV_RESOLUTION = "720p";
148
- /** Resolution of a stored run: an explicit choice beats any default, or dev would */
149
- /** silently replace what the user asked for. */
150
131
  export function resolveResolution(requested, isDev) {
151
132
  if (requested)
152
133
  return requested;
153
134
  return isDev ? DEV_RESOLUTION : LEGACY_RUN_RESOLUTION;
154
135
  }
155
- /** The resolution admission pins into a make_ugc run, short or long-form, so a later default change never reaches an admitted run. */
156
136
  export function admittedUgcResolution(input) {
157
137
  return input.resolution ?? DEFAULT_RESOLUTION;
158
138
  }
159
- /** Length cap for ANY URL from a foreign body; without it the field takes the whole */
160
- /** body cap. The value is the upper bound any browser and CDN handles. */
161
139
  export const MAX_URL_LENGTH = 2048;
162
- /** Skills in the shared run namespace. `runs.skill` is text, so it is read through `parseSkill`. */
163
140
  export const SKILLS = ["make_ugc", "create_actor", "make_faceless", "edit_shot", "revise_long_form", "generate_image", "generate_video"];
164
141
  export function parseSkill(value) {
165
142
  return SKILLS.find((skill) => skill === value) ?? null;
166
143
  }
167
- /** What `make_ugc` does: one text for both contract surfaces, the public REST catalog */
168
- /** and MCP `tools/list`, so they never describe different skills. */
169
144
  export const MAKE_UGC_DESCRIPTION = "Start generation of a lip-synced UGC video. The actor comes from actor_id (a saved actor from list_actors) or image, " +
170
145
  "otherwise the default actor is used. Format and resolution follow the request and the source, defaulting to 720x1280. " +
171
146
  "Captions are OPT-IN: ask the user first. A field the renderer does not honor yet says NOT HONORED YET in its description.";
172
- /** How to CALL the skill over MCP. Kept apart from the description: neighboring tool */
173
- /** names and polling are protocol details not meant for the REST catalog. */
174
147
  export const MAKE_UGC_AGENT_PROTOCOL = "Returns a run_id at once; poll get_run with its poll.arguments until 'succeeded' (video_url) or 'failed'. A 'failed' run " +
175
148
  "whose video is still being made can go back to 'queued' and succeed later, named in warnings[]. attempt=2,3,… starts a " +
176
149
  "NEW run for the same input. For a video like a reference reel, use analyze_reference, then plan_reference_remake with its analysis_id.";
177
- /** The `instructions` of the MCP initialize result, one text for the stdio and the hosted server: */
178
- /** a client that connects over MCP alone reads this and no skill file. */
179
- /** The music stop (#1063) is said only where the server offers music, so an agent never asks for a field it refuses. */
180
150
  const MUSIC_STOP = isMusicEnabled() ? " Music: ask whether the user wants music under the voice, and show its " +
181
151
  "price from the quote; it is off unless asked." : "";
182
- /** The explainer offer (#1216) likewise only where the server sells the format; its second way (#1356) only where the film tools are listed. */
183
152
  const EXPLAINER_SOLD = facelessExplainerEnabled(typeof process === "undefined" ? {} : process.env);
184
153
  const OWN_WAY = "you write the film yourself, starting with get_film_guide, paid by part (voice, hero poses, stills, render), " +
185
154
  "each part quoted before it is made";
@@ -196,10 +165,8 @@ function explainerOffer(ownAgent, sold) {
196
165
  "off, passed as character_details; reuse one only when the user asks or the brand has its own. A delivered explainer keeps " +
197
166
  "its hero as a mascot (list_assets with mascot true); its id as mascot_id gives the same hero again with no pose pictures made or charged.";
198
167
  }
199
- /** The line a server that lists get_ad_guide adds after the make_ugc ad advice (#1539 P3). */
200
- export const AD_GUIDE_INSTRUCTION = " Before you write an ad's devices and live shots, read get_ad_guide (free).";
201
- /** The text for a server with the film tools listed or not; `explainer` is whether the API sells the format, this environment's flag when omitted; */
202
- /** `adGuide` whether it lists get_ad_guide. */
168
+ export const AD_GUIDE_INSTRUCTION = " Before you write an ad's devices and live shots, or make an ad yourself shot by shot with generate_image, " +
169
+ "generate_video, make_voice and render_edit, read get_ad_guide (free).";
203
170
  export const mcpServerInstructions = ({ ownAgent, explainer, adGuide }) => serverInstructions(explainerOffer(ownAgent, explainer ?? EXPLAINER_SOLD), adGuide === true);
204
171
  const serverInstructions = (offer, adGuide) => "Clipwright makes short presenter (UGC) videos, faceless narrated videos, single images and silent clips. It renders " +
205
172
  "them on its servers and returns the MP4 or image file; it publishes nothing anywhere.\n\n" +
@@ -281,18 +248,13 @@ export const MCP_SERVER_INSTRUCTIONS = mcpServerInstructions({ ownAgent: false }
281
248
  export const MAKE_FACELESS_DESCRIPTION = "Start a paid finished faceless video from a script or brief. You select 30–90 seconds; " +
282
249
  "the video ends with its narration, runs at least 25 seconds (an explainer, as long as its narration) and at most a quarter past the selection, never beyond 90. " +
283
250
  "The video has an opening animated clip and image scenes. Captions are on by default and can be turned off.";
284
- /** How to call `make_faceless` over MCP, kept apart from the REST description. */
285
251
  export const MAKE_FACELESS_AGENT_PROTOCOL = "It answers a run_id at once; poll get_run with its poll.arguments until 'succeeded' (video_url) or 'failed'. " +
286
252
  "attempt=2,3,… starts a NEW run for the same input.";
287
253
  const IMAGE_MOTION_DESCRIPTION = "Optional picture zoom. A picture fills the frame, cut to its shape when the shapes differ " +
288
254
  "(warnings[] names the share cut). amount is the zoom beyond filling: in grows from 1 to 1+amount, out shrinks from 1+amount to 1. No motion by default.";
289
- /** One clip segment. `segments` makes `script` optional, changing `required[]` in `tools/list`, */
290
- /** so the shape was declared once up front instead of changing the public form later. */
291
255
  export const ugcSegment = z.object({
292
256
  kind: z.enum(["actor", "media"]),
293
- /** The actor's line. Absent on a `media` segment, where a neighboring actor speaks. */
294
257
  script: z.string().min(1).max(MAX_SCRIPT_CHARS).optional(),
295
- /** Full-frame cutaway. Required on `media`, forbidden on `actor`. */
296
258
  media_url: z.string().url().max(MAX_URL_LENGTH).optional(),
297
259
  media_type: z.enum(["image", "video"]).optional()
298
260
  .describe("Explicit media source type; omission means video, regardless of URL suffix. Availability follows the segments field."),
@@ -336,7 +298,6 @@ const mediaSource = {
336
298
  };
337
299
  const hasOneSource = (item) => (item.media_url === undefined) !== (item.asset_id === undefined);
338
300
  const ONE_SOURCE = { path: ["media_url"], message: "pass exactly one of media_url or asset_id" };
339
- /** An insert's own box within the frame (#1030), in shares of its width and height. */
340
301
  export const insertBox = z.strictObject({ left: z.number(), top: z.number(), width: z.number().min(0.1), height: z.number().min(0.1) })
341
302
  .refine(box => box.left >= 0 && box.top >= 0 && box.left + box.width <= 1.0001 && box.top + box.height <= 1.0001, { message: "box must lie within the frame" });
342
303
  export const ugcInsert = z.object({
@@ -390,14 +351,12 @@ const layerMedia = {
390
351
  enter: z.enum(LAYER_ENTERS).optional()
391
352
  .describe("How it appears: cut (default), fade, slide (in from the nearest edge), tilt_in, pop or scale_up."),
392
353
  };
393
- /** An overlay's motion beyond its enter (#973 S3): absent is the 8-frame enter on its first word and a cut out. */
394
354
  const overlayMotion = {
395
355
  exit: z.enum(LAYER_EXITS).optional().describe("How it leaves: cut (default), fade, pop_out or slide."),
396
356
  enter_offset_s: z.number().min(-MAX_ENTER_OFFSET_S).max(MAX_ENTER_OFFSET_S).optional()
397
357
  .describe("Seconds from its first word, negative before; an overlay still showing then leaves."),
398
358
  enter_duration_s: z.number().min(0.05).max(1.5).optional().describe("Default 0.32."),
399
359
  };
400
- /** Media drawn over the visible presenter at a fixed place; the presenter stays on screen and is billed. */
401
360
  const overlayPosition = z.enum(OVERLAY_POSITIONS).optional()
402
361
  .describe("A corner (top_left, top_right, bottom_left, bottom_right), or a band across the top or bottom.");
403
362
  const ONE_PLACE = { path: ["position"], message: "pass exactly one of position or place" };
@@ -412,14 +371,12 @@ export const OVERLAYS_DESCRIPTION = "Text-anchored images or videos over the vis
412
371
  "screen at once, on boxes that do not overlap. Captions move to the middle or bottom third off an overlay, never over the face, and hide " +
413
372
  "while neither is free. Hidden under full-frame inserts. Same requirements as inserts: script, long-form qualification on the server " +
414
373
  "and explicit broll_policy=anyone. The presenter stays on screen, so the price does not change.";
415
- /** The slim MCP overlay: `place` is any object here, its forms sit in the description and the server checks it strictly, as templates do. */
416
374
  export const mcpUgcOverlay = z.object({
417
375
  ...layerMedia,
418
376
  ...overlayMotion,
419
377
  position: overlayPosition,
420
378
  place: z.record(z.string(), z.unknown()).optional().describe(`Instead of position, a pinned box: ${PLACE_FORMS}`),
421
379
  }).strict();
422
- /** A reframing of the presenter: split shares a 9:16 frame with the media, card shows the media in a centred card. */
423
380
  export const ugcLayoutWindow = z.object({
424
381
  ...layerMedia,
425
382
  layout: z.enum(LAYOUT_WINDOW_KINDS).describe("split (9:16 only): presenter and media share the frame, captions on the seam unless caption_place " +
@@ -432,7 +389,6 @@ export const ugcLayoutWindow = z.object({
432
389
  }).refine(layout => (layout.media_side === undefined && layout.media_share === undefined) || layout.layout === "split", {
433
390
  path: ["media_side"], message: "media_side and media_share work on a split window only",
434
391
  });
435
- /** A presenter size on its words (reference-elements S2): a hard cut in, settled over a few frames, back to the take at its end. */
436
392
  export const ugcFraming = z.object({
437
393
  id: insertId.describe("Unique across inserts, overlays, layout_windows, templates and framing."),
438
394
  anchor: layerMedia.anchor,
@@ -444,7 +400,6 @@ export const ugcFraming = z.object({
444
400
  }).strict();
445
401
  const SCENE_PLACE = "Over placement only: the box it is drawn in, scaled whole, by the frame or the face. Without it the scene keeps off the " +
446
402
  `presenter's face and a held product; a place on the face needs allow_face, and one over either is drawn as asked and named in warnings[]. ${PLACE_FORMS}`;
447
- /** A graphic made for this run from words (#1107): no library kind draws it, so it is authored, checked and drawn on its words. */
448
403
  export const ugcScene = z.object({
449
404
  id: insertId.describe("Unique across inserts, overlays, layout_windows, templates, framing and scenes."),
450
405
  anchor: layerMedia.anchor,
@@ -458,16 +413,13 @@ export const ugcScene = z.object({
458
413
  .describe("Your colours for it; omitted, our palette."),
459
414
  place: place.optional().describe(SCENE_PLACE),
460
415
  }).strict();
461
- /** The slim MCP scene: `place` is any object here, its forms sit in the description and the server checks it strictly, as overlays do. */
462
416
  export const mcpUgcScene = ugcScene.extend({ place: z.record(z.string(), z.unknown()).optional().describe(SCENE_PLACE) }).strict();
463
- /** The video's motion style and the words drawn in another (#1123); the same object on make_ugc, make_faceless and the remake. */
464
417
  export const motionStyle = z.strictObject({
465
418
  style: z.enum(MOTION_STYLE_CHOICES).optional().describe("The whole video's style; absent: the design's style, else plain."),
466
419
  spans: z.array(z.strictObject({ style: z.enum(MOTION_STYLE_CHOICES), anchor: wordAnchor, cover_words: layerMedia.cover_words }))
467
420
  .min(1).max(MAX_MOTION_STYLE_SPANS).optional().describe("Words drawn in another style, apart and in any order."),
468
421
  }).refine(value => value.style !== undefined || value.spans !== undefined, { message: "motion_style needs style or spans" })
469
422
  .describe(MOTION_STYLE_DESCRIPTION);
470
- /** A template's place (#973 S4); overlays and templates may stand by it with `{ layer }`. */
471
423
  const TEMPLATE_PLACE = `Over placement only: a box as an overlay's place (not by captions); the template scales whole into it. ${PLACE_FORMS}`;
472
424
  const templateEnvelope = {
473
425
  id: insertId.describe("Unique across inserts, overlays, layout_windows and templates."),
@@ -479,7 +431,6 @@ const templateEnvelope = {
479
431
  place: place.optional().describe(TEMPLATE_PLACE),
480
432
  };
481
433
  const templateItem = (kind) => z.object({ ...templateEnvelope, kind: z.literal(kind.kind), data: kind.data }).strict();
482
- /** A graphic template (#778 S3): REST and the SDK take the strict union, `data` checked by `kind`. */
483
434
  export const ugcTemplate = z.discriminatedUnion("kind", [templateItem({ ...tag, kind: "tag" }),
484
435
  templateItem({ ...lowerThird, kind: "lower_third" }), templateItem({ ...endCard, kind: "end_card" }),
485
436
  templateItem({ ...titleCard, kind: "title_card" }), templateItem({ ...quote, kind: "quote" }), templateItem({ ...stat, kind: "stat" }),
@@ -494,13 +445,11 @@ export const ugcTemplate = z.discriminatedUnion("kind", [templateItem({ ...tag,
494
445
  templateItem({ ...wordFill, kind: "word_fill" }), templateItem({ ...coverStory, kind: "cover_story" }),
495
446
  templateItem({ ...seriesFrame, kind: "series_frame" }), templateItem({ ...commentCta, kind: "comment_cta" }),
496
447
  templateItem({ ...backdrop, kind: "backdrop" })]);
497
- /** The slim MCP item: `data` is any object here, the catalog sits in the description and the server checks it strictly (D3). */
498
448
  export const mcpUgcTemplate = z.object({ ...templateEnvelope, place: z.record(z.string(), z.unknown()).optional().describe(TEMPLATE_PLACE),
499
449
  kind: z.enum(offeredTemplateKinds().map(kind => kind.kind)),
500
450
  data: z.record(z.string(), z.unknown()).describe("The kind's fields, as its catalog line in templates names them.") }).strict();
501
451
  export const TEMPLATES_DESCRIPTION = templateCatalogText(offeredTemplateKinds());
502
452
  const callVoice = z.string().regex(VOICE_NAME_PATTERN, "a call voice is a voice name from list_voices").optional();
503
- /** The call phone's measured place and rise (#914 D1e): the run maps `rect_face` onto our presenter's face when it finds one, else uses `rect`. */
504
453
  export const callStage = z.strictObject({
505
454
  rect: stagingRect.refine(rect => rect.width > 0 && rect.height > 0 && rect.left + rect.width <= 1 + 1e-6 && rect.top + rect.height <= 1 + 1e-6, "the phone's rect must lie inside the frame").describe("Where the phone settles, in shares of the frame."),
506
455
  rect_face: stagingFaceRect.optional().describe("The same place relative to the presenter's face: origin the face centre, unit the face height."),
@@ -513,7 +462,6 @@ export const callStage = z.strictObject({
513
462
  }).optional(),
514
463
  layer: z.enum(["behind_presenter"]).optional(),
515
464
  });
516
- /** A phone call after a quote (#857 S5): the presenter listens, then freezes, while the agent and the caller speak; then resumes. */
517
465
  export const ugcCall = z.strictObject({
518
466
  after: wordAnchor.describe("The words the call follows: the presenter stops after the quote's last word and resumes on the next one."),
519
467
  lines: z.array(z.strictObject({ speaker: z.enum(CALL_SPEAKERS),
@@ -529,14 +477,11 @@ export const ugcCall = z.strictObject({
529
477
  stage: callStage.optional().describe("Where the in-call phone settles and how it rises, as a reference measured them (plan_reference_remake writes it); " +
530
478
  "omitted is the reference call scene's own place and rise."),
531
479
  });
532
- /** The slim MCP call, which keeps tools/list under its ceiling: the server checks it strictly, as the template items (D3). */
533
480
  export const mcpUgcCall = z.record(z.string(), z.unknown())
534
481
  .describe(`A call the presenter listens to: { after: { quote }, lines: [{ speaker: agent|caller, text }] (2–${MAX_CALL_LINES}), voices?, phone? }.`);
535
- /** Slim MCP caption_place and presenter_place (#973), checked strictly by the server. */
536
482
  export const mcpCaptionPlace = z.record(z.string(), z.unknown()).describe("Pinned captions instead of caption_position: {relative_to:frame|face," +
537
483
  "y,edge?:top|center|bottom,max_width?}; y is a frame share, or face heights from the face centre.");
538
484
  export const mcpPresenterPlace = z.record(z.string(), z.unknown()).describe("{face_height,face_centre:[x,y]} in frame shares; needs actor_id.");
539
- /** An interview (#972): the off-screen speaker's words are marked inside script; the presenter answers on screen and holds still while they speak. */
540
485
  export const ugcInterview = z.strictObject({
541
486
  turns: z.array(z.strictObject({ anchor: wordAnchor, cover_words: z.number().int().positive().max(10000).optional() }))
542
487
  .min(1).max(MAX_INTERVIEW_TURNS)
@@ -551,26 +496,19 @@ export const ugcInterview = z.strictObject({
551
496
  listening: z.enum(INTERVIEW_LISTENING).optional().describe("freeze (default): the presenter holds still while the off-screen speaker talks, " +
552
497
  "which adds production seconds, not presenter seconds."),
553
498
  });
554
- /** The slim MCP interview, which keeps tools/list under its ceiling: the server checks it strictly. */
555
499
  export const mcpUgcInterview = z.record(z.string(), z.unknown()).describe("Off-screen speaker: { turns: [{ anchor: { quote }, cover_words? }] (words of " +
556
500
  "script they say), off_screen?: { voice?, caption?: { style?, place? } }, gaze?: camera|left|right }. The presenter answers and holds still while they talk.");
557
- /** Where the presenter looks on some of their words (#972); a change of gaze is a cut to the actor's view with that gaze. */
558
501
  export const ugcPresenterGaze = z.strictObject({
559
502
  anchor: wordAnchor, cover_words: z.number().int().positive().max(10000).optional(), gaze: z.enum(INTERVIEW_GAZES),
560
503
  });
561
504
  export const PRESENTER_GAZE_DESCRIPTION = "Where the presenter looks on these words, as the viewer sees it: camera, left or right. Needs actor_id with " +
562
505
  "that view (list_actors); a change of gaze is a cut.";
563
- /** The slim MCP gaze list: the server checks each item strictly. */
564
506
  export const mcpPresenterGaze = z.array(z.record(z.string(), z.unknown())).min(1).max(MAX_PRESENTER_GAZE)
565
507
  .describe(`[{ anchor: { quote }, cover_words?, gaze: camera|left|right }]. ${PRESENTER_GAZE_DESCRIPTION}`);
566
- export { CAST_INSERT_ID, castSlotOf, fetchedProductWarnings, fetchesProduct, liveShotFetchesProduct, LIVE_SHOT_FRAMINGS, LIVE_SHOT_KINDS, LIVE_SHOT_PRODUCT_PLACEMENTS, LIVE_SHOT_TRANSITIONS, liveShotCastKey, liveShotProductPlacement, liveShotSetupKey, lipsyncMotionMarked, lipsyncMotionShot, MAX_SHOT_CAST, omniShotIds, omniShotsMarked, productSheetMarked, TALKING_ACTION_VOICE_OVER, talkingActionVoiceOver, handsInsertShots, voiceOverShotWarnings, talkingPose } from "./live-shot-kinds.js";
567
- /** The most presenter takes one video renders (#1192); a live shot is at least one of them. */
508
+ export { CAST_INSERT_ID, castSlotOf, fetchedProductWarnings, fetchesProduct, liveShotFetchesProduct, LIVE_SHOT_FRAMINGS, LIVE_SHOT_KINDS, LIVE_SHOT_PRODUCT_PLACEMENTS, LIVE_SHOT_TRANSITIONS, liveShotCastKey, liveShotProductPlacement, liveShotSetupKey, lipsyncMotionMarked, lipsyncMotionShot, MAX_SHOT_CAST, omniShotIds, omniShotsMarked, productSheetMarked, seedanceShotIds, seedanceShotModels, shotNamesPrint, TALKING_ACTION_VOICE_OVER, talkingActionVoiceOver, handsInsertShots, voiceOverShotWarnings, talkingPose } from "./live-shot-kinds.js";
568
509
  export const MAX_PRESENTER_TAKES = 16;
569
510
  export const MAX_LIVE_SHOTS = MAX_PRESENTER_TAKES;
570
- /** A shot drawn from a picture of its own place: every talking_action and action shot, and a talking shot with a pose (#1536). */
571
511
  const drawnInSetup = (shot) => shot.kind !== "talking" || talkingPose(shot);
572
- /** One setup still per setup (#1146): the acting shots drawn in one place name one product placement, or none, so the product never moves. */
573
- /** A shot that names no product takes its setup's placement (`settleShotProducts`), so only named placements can disagree. */
574
512
  function sameProductPerSetup(shots, talkingPoses) {
575
513
  const placements = new Map();
576
514
  for (const shot of shots) {
@@ -584,8 +522,6 @@ function sameProductPerSetup(shots, talkingPoses) {
584
522
  }
585
523
  return true;
586
524
  }
587
- /** Shots of one setup share one picture: a talking_action, action or posed talking shot that names no product takes the placement another */
588
- /** shot of its setup names, and warnings[] names it (rule 3). Disagreeing placements are left to the schema's refusal. */
589
525
  export function settleShotProducts(shots) {
590
526
  const named = new Map();
591
527
  for (const shot of shots) {
@@ -609,7 +545,6 @@ export function settleShotProducts(shots) {
609
545
  `shot "${from}" of the same setup; give a shot its own setup to show it otherwise`);
610
546
  return { shots: settled, warnings };
611
547
  }
612
- /** Shots of one setup start from one picture, so the people in it are the same: one cast, or none, per setup (#1192). */
613
548
  function sameCastPerSetup(shots) {
614
549
  const casts = new Map();
615
550
  for (const shot of shots) {
@@ -622,17 +557,14 @@ function sameCastPerSetup(shots) {
622
557
  }
623
558
  return true;
624
559
  }
625
- /** The catalogue actor `actor_gender` picks without image or actor_id: each gender's first in list_actors. */
626
560
  export const ACTOR_FOR_GENDER = { female: "actor_anna", male: "actor_alex" };
627
561
  export const MAX_LIVE_SHOT_TEXT = 2000;
628
562
  export const MAX_CAST_ROLE = 200;
629
- /** A person beside the actor in a live shot (#1192): their picture, who they are, and what they do in this shot. */
630
563
  export const ugcLiveShotCastMember = z.strictObject({
631
564
  asset_id: assetId.describe("A PNG or JPEG picture of the person (ast_…), yours to use."),
632
565
  role: z.string().trim().min(1).max(MAX_CAST_ROLE).describe("Who they are in the scene, such as the customer or the friend."),
633
566
  action: z.string().trim().min(1).max(MAX_LIVE_SHOT_TEXT).optional().describe("What they do in this shot; omitted, they stay in the scene."),
634
567
  });
635
- /** The live shot's fields. Their public texts stay as before the ad epic (#1539): it ships behind an account list until one switch at its end. */
636
568
  const ugcLiveShotFields = {
637
569
  id: insertId.describe("Unique across shots."),
638
570
  kind: z.enum(LIVE_SHOT_KINDS).describe("talking: the actor speaks to the lens with natural gestures; talking_action: speaks the words while " +
@@ -662,7 +594,6 @@ const ugcLiveShotFields = {
662
594
  shot: generationShot.optional().describe("action only: the clip as a shot, second by second, in place of action alone; its beats run from 0 to " +
663
595
  "the last beat's to_s and are stretched to the take's own length."),
664
596
  };
665
- /** A shot's own checks. Without talking poses (#1536) a talking shot refuses setup, start and product, in the order and words as before. */
666
597
  const liveShotChecks = (talkingPoses) => (shot, context) => {
667
598
  const custom = z.ZodIssueCode.custom;
668
599
  const talkingOnly = !talkingPoses && shot.kind === "talking";
@@ -674,7 +605,6 @@ const liveShotChecks = (talkingPoses) => (shot, context) => {
674
605
  for (const issue of shotIssues(shot.shot, shot.shot.beats.at(-1).to_s)) {
675
606
  context.addIssue({ code: custom, path: ["shot", ...issue.path], message: issue.message });
676
607
  }
677
- // The cast's actions are written beside the shot, so they describe what is visible too.
678
608
  shot.cast?.forEach((person, at) => {
679
609
  const word = person.action === undefined ? null : negationIn(person.action);
680
610
  if (word !== null)
@@ -693,19 +623,14 @@ const liveShotChecks = (talkingPoses) => (shot, context) => {
693
623
  context.addIssue({ code: custom, path: ["cast"], message: "a talking shot shows the actor alone; use talking_action or action for a cast" });
694
624
  };
695
625
  export const ugcLiveShot = z.strictObject(ugcLiveShotFields).superRefine(liveShotChecks(true));
696
- /** The shot as accounts outside the ad epic's list send it (#1539): a talking shot has no pose. */
697
626
  const ugcLiveShotWithoutPoses = z.strictObject(ugcLiveShotFields).superRefine(liveShotChecks(false));
698
627
  export const LIVE_SHOTS_DESCRIPTION = "Live shots of the actor on some words of script: talking, talking_action (speaks while acting) or action " +
699
628
  "(acts while the words play as voice-over). Shots may not overlap; words outside them are the presenter's usual take. Needs a 9:16 frame " +
700
629
  "and long-form qualification on the server; each kind has its own presenter-second price in list_prices.";
701
- /** The slim MCP shot list: the server checks each item strictly. */
702
630
  export const mcpLiveShots = z.array(z.record(z.string(), z.unknown())).min(1).max(MAX_LIVE_SHOTS)
703
631
  .describe(`[{ id, kind: talking|talking_action|action, anchor: { quote }, cover_words?, action?, setup?, framing?: wide|full, product?: { placement: hand|beside }, start?, cast?: [{ asset_id, role, action? }], transition?: cut|flash|light_leak|whoosh, shot?: as generate_video shot (action only) }]. ${LIVE_SHOTS_DESCRIPTION}`);
704
- /** What admission pins for an `asset_id` insert; the run reads this key and checks this hash, never the asset row.
705
- * Server-only: it lives at the top of the stored input, and a public body naming it is refused as an unknown field. */
706
632
  export const pinnedInsertAsset = z.object({
707
633
  insert_id: insertId,
708
- /** A template's media slot; ids refuse `.`, so `<id>.<slot>` keys never meet an overlay's (A1). */
709
634
  slot: z.string().regex(/^[a-z][a-z0-9_]{0,31}$/).optional(),
710
635
  asset_id: assetId,
711
636
  key: z.string().min(1).max(1024),
@@ -720,15 +645,11 @@ export const pinnedInsertAsset = z.object({
720
645
  codec: z.string().min(1).optional(),
721
646
  pix_fmt: z.string().min(1).optional(),
722
647
  }).strict();
723
- /** Actor segment cap: a limit on ONE run, not on daily spend. */
724
648
  export const MAX_ACTOR_SEGMENTS = 10;
725
649
  export const MAX_SEGMENTS = 20;
726
- /** Narrated-path caps differ because a media shot costs nothing and an actor shot does: */
727
- /** as many inserts as the timeline holds. */
728
650
  export const MAX_INSERTS = Math.floor((RESOLVED_TIMELINE_MAX_SLOTS - 1) / 2);
729
651
  export const MAX_NARRATED_ACTOR_SHOTS = MAX_PRESENTER_TAKES;
730
652
  export const actorId = z.string().regex(/^actor_[a-z0-9][a-z0-9_-]{0,63}$/);
731
- /** The shots field; without talking poses (#1536) its product check and words are as before them. */
732
653
  const liveShotsField = (shot, talkingPoses) => z.array(shot).min(1).max(MAX_LIVE_SHOTS)
733
654
  .refine(shots => new Set(shots.map(one => one.id)).size === shots.length, { message: "shot IDs must be unique" })
734
655
  .refine(shots => sameProductPerSetup(shots, talkingPoses), { message: `${talkingPoses ? "talking_action, action and posed talking shots"
@@ -738,8 +659,6 @@ const liveShotsField = (shot, talkingPoses) => z.array(shot).min(1).max(MAX_LIVE
738
659
  "people: give them the same cast (asset_id and role, in one order) or none, or give them different setups" })
739
660
  .optional().describe(LIVE_SHOTS_DESCRIPTION);
740
661
  export const makeUgcInputShape = {
741
- // Exactly one of `script | segments` must be present, enforced by `.refine` below;
742
- // JSON Schema cannot express that via `required[]`, so the description says it.
743
662
  script: z
744
663
  .string({ error: "script must be the text the actor says, as a string" })
745
664
  .min(1, "script is empty: pass the words the actor says")
@@ -794,8 +713,6 @@ export const makeUgcInputShape = {
794
713
  presenter_framing: z.enum(PRESENTER_FRAMINGS).optional().describe("close (default), wide (presenter lower, room above) or full (head to feet). Needs the actor's view of that name (list_actors), 9:16 " +
795
714
  "only; full falls to wide, then close, plus warnings[]."),
796
715
  presenter_mic: z.boolean().optional().describe("true: presenter holds a tiny mic. Needs the actor's mic view in that framing (list_actors; library ones are wide); else no mic plus warnings[]."),
797
- // https URLs only: the vendor takes URLs, and storage URLs are never passed to vendors,
798
- // so a `data:` URI is refused on input rather than accepted and dropped.
799
716
  image: z
800
717
  .string({ error: "image must be the https url of the photo, as a string" })
801
718
  .url("image is not a url: pass the https address of the photo, or upload it first")
@@ -807,7 +724,6 @@ export const makeUgcInputShape = {
807
724
  "use — private or loopback host, http, unreachable, redirecting, over 10 MB, or not one of " +
808
725
  "those image types — is refused (unusable_source) before any charge. We do not detect the " +
809
726
  "face's gender: pass actor_gender or voice, or the default male voice is used with a warning."),
810
- // No .default(): silence differs from a hint, and silence gets a warning.
811
727
  actor_gender: z
812
728
  .enum(["female", "male"])
813
729
  .optional()
@@ -839,20 +755,15 @@ export const makeUgcInputShape = {
839
755
  "reach it, from the actor's wide view when the close one is too close; when even that is too close, warnings[] names the face height drawn. " +
840
756
  "Requires actor_id and script with overlays, inserts, layout_windows, framing or call. The price does not change."),
841
757
  look: z.enum(LOOKS).default("natural"),
842
- // No .default(), so the resolver tells silence (snap with a warning) from an explicit
843
- // choice (refused on conflict). DEFAULT_ASPECT_RATIO (aspect.ts) fills it in.
844
758
  aspect_ratio: z
845
759
  .enum(ASPECT_RATIOS)
846
760
  .optional()
847
761
  .describe(`Output format: ${ASPECT_RATIOS.join(" | ")}. Omitted means 9:16 without an image; with an image, ` +
848
762
  "the supported format nearest the image's shape, even a landscape one — pass it explicitly whenever you pass image. A mismatch " +
849
763
  "above 15% between the request and the source is refused (aspect_conflict) before any charge."),
850
- // No .default(): admission pins it (`admittedUgcResolution`), and a stored run without it is read as the 1080p it was admitted at.
851
764
  resolution: offeredResolution
852
765
  .optional()
853
766
  .describe(`Output resolution: ${RESOLUTIONS.join(" | ")} (short side 720 / 1080 px). Omitted means 720p.`),
854
- // No .default(), like resolution: an explicit voice differs from silence. `voice` is a
855
- // name form checked by `serverUgcInput`; `voice_id` is a raw vendor id.
856
767
  voice: z
857
768
  .string({ error: "voice must be a voice name from list_voices, as a string" })
858
769
  .regex(VOICE_NAME_PATTERN, "voice is not a voice name: take one from list_voices, or pass voice_id")
@@ -897,28 +808,19 @@ export const makeUgcInputShape = {
897
808
  pause_trim: z.union([z.literal(false), pauseTrim]).optional().describe("Cut pauses past these s; false keeps all. Default with " +
898
809
  `templates, scenes, shots: ${AD_PAUSE_TRIM.sentence_end_s} sentence, ${AD_PAUSE_TRIM.comma_s} comma.`),
899
810
  end_hold_s: z.number().min(END_HOLD_MIN_S).max(END_HOLD_MAX_S).optional().describe("Seconds the last frame stays after the last word: the " +
900
- "presenter freezes and every layer on screen then stays. Production seconds, not presenter seconds. Needs script and long-form qualification."),
811
+ "presenter freezes and every layer on screen then stays. Production seconds, not presenter seconds. Needs script and long-form qualification. " +
812
+ `Default ${AD_END_HOLD_S} with shots, or with templates or scenes beside inserts, overlays, windows or framing.`),
901
813
  webhook_url: z.string().url().max(MAX_URL_LENGTH).optional(),
902
- /** Removed visible label (clipwright#488). The key stays in the shape so that the refusal */
903
- /** names its reason instead of answering `unknown_field`. */
904
814
  disclosure_overlay: z.boolean().optional(),
905
815
  visible_ai_label: z.boolean().optional().describe("Visible AI label for newly marked presenter videos, including long form; defaults to true in the server admission policy. " +
906
816
  "False hides only the visible label and does not disable invisible marking or signed provenance. " +
907
817
  "Historical outputs are unchanged."),
908
- /** How to fill a frame the clip does not cover. No `.default()`: absence means no layout */
909
- /** is needed. `contain` fits whole, `white` pads white, `blur` fills with the blurred frame. */
910
818
  background: z.enum(["white", "blur", "contain"]).optional(),
911
819
  max_credits: maxCreditsField,
912
820
  };
913
- /** Agent retry parameter: the attempt NUMBER. Kept apart from `makeUgcInputShape` because it */
914
- /** is a skill input (the `:N` idempotency-key suffix in the SDK), not a render parameter. */
915
821
  export const agentRetryShape = { attempt: z.number().int().min(1).optional() };
916
- // Shared REST/MCP/SDK schema: actor_id, person and image are mutually exclusive.
917
- // The registry rejects character; person is accepted with a warning.
918
822
  const refinedUgcInput = (shape) => z
919
823
  .object(shape)
920
- // Exactly one of script | segments: with neither there is nothing to render; with
921
- // both, silently picking one would be a silent substitution.
922
824
  .refine((v) => (v.script === undefined) !== (v.segments === undefined), {
923
825
  message: "pass exactly one of script | segments",
924
826
  })
@@ -950,7 +852,6 @@ const refinedUgcInput = (shape) => z
950
852
  for (const refusal of framingRefusals({ ...v, script: v.script }))
951
853
  context.addIssue({ code: z.ZodIssueCode.custom, ...refusal });
952
854
  })
953
- // Template refusals sit in the schema, so REST, quote_ugc and MCP refuse alike before any hold (D4, A9).
954
855
  .superRefine((v, context) => {
955
856
  for (const refusal of [...templateRefusals(v), ...editSoundRefusals({ ...v, fullTemplates: hasFullFrameTemplate(v.templates) })])
956
857
  context.addIssue({ code: z.ZodIssueCode.custom, ...refusal });
@@ -1026,11 +927,7 @@ const refinedUgcInput = (shape) => z
1026
927
  context.addIssue({ code: z.ZodIssueCode.custom, path: [refusal.field], message: refusal.message });
1027
928
  }
1028
929
  })
1029
- // The character cap depends on the model; refused here, before any reserve or vendor call.
1030
- // Only the server knows the model of a voice unknown to the client, and checks it there.
1031
- .refine(
1032
- // The client does not know an `actor_id`'s gender; today's preset models do not depend on it.
1033
- (v) => modelUnknownToClient(v) || speechTextRefusal(v) === undefined, {
930
+ .refine((v) => modelUnknownToClient(v) || speechTextRefusal(v) === undefined, {
1034
931
  path: ["script"],
1035
932
  error: (issue) => speechTextRefusal(issue.input),
1036
933
  })
@@ -1043,15 +940,11 @@ const refinedUgcInput = (shape) => z
1043
940
  path: ["actor_gender"],
1044
941
  message: "actor_gender is not combined with person: omit person, and actor_gender alone picks a list_actors actor of that gender",
1045
942
  })
1046
- // List-wide limits and per-role required fields are checked here.
1047
- // Image type, duration and motion are checked by ugcSegment.
1048
943
  .refine((v) => v.segments === undefined || v.segments.some((s) => s.kind === "actor"), {
1049
944
  message: "segments must contain at least one actor segment: nobody speaks otherwise",
1050
945
  })
1051
946
  .refine((v) => v.segments === undefined ||
1052
947
  v.segments.filter((s) => s.kind === "actor").length <= MAX_ACTOR_SEGMENTS, {
1053
- // A per-run limit, not a daily spend cap: confusing the two would promise a
1054
- // protection this number does not give.
1055
948
  message: `at most ${MAX_ACTOR_SEGMENTS} actor segments per clip`,
1056
949
  })
1057
950
  .refine((v) => v.segments === undefined ||
@@ -1060,18 +953,12 @@ const refinedUgcInput = (shape) => z
1060
953
  v.segments.every((s) => s.kind !== "actor" || s.media_url === undefined), { message: "actor segment must not carry `media_url`: use a media segment for footage" })
1061
954
  .refine((v) => v.segments === undefined ||
1062
955
  v.segments.every((s) => s.kind !== "media" || s.media_url !== undefined), { message: "media segment requires `media_url`: there is no footage to show otherwise" })
1063
- // One voice selector at most; checked here, not in the shape, since .refine drops .shape.
1064
- // With both omitted the resolver picks a voice by the actor's gender (`resolveVoiceSelection`).
1065
956
  .refine((v) => !(v.voice !== undefined && v.voice_id !== undefined), { message: "pass at most one of voice | voice_id" })
1066
- // Length includes whitespace; a nonempty string can still have no speech.
1067
957
  .refine((v) => v.segments !== undefined || countWords(v.script ?? "") >= 1, {
1068
958
  message: "script has 0 speakable words",
1069
959
  });
1070
960
  export const makeUgcInput = refinedUgcInput(makeUgcInputShape);
1071
- /** make_ugc for an account outside the ad epic's list (#1539): talking shots without poses (#1536), refused in the words they were before. */
1072
961
  export const makeUgcInputWithoutTalkingPoses = refinedUgcInput({ ...makeUgcInputShape, shots: liveShotsField(ugcLiveShotWithoutPoses, false) });
1073
- /** Why the run's model refuses the text: the cap on the whole of it, then each spoken unit */
1074
- /** left with no words. The model is read from the joined text, as the run reads it. */
1075
962
  function speechTextRefusal(input) {
1076
963
  const text = spokenTextOf(input);
1077
964
  const model = resolveTtsModel({ ...input, script: text }, input.actor_gender);
@@ -1080,10 +967,7 @@ function speechTextRefusal(input) {
1080
967
  function modelUnknownToClient(v) {
1081
968
  return v.tts_model === undefined && v.voice !== undefined && voicePresetOf(v.voice) === undefined && !isModelVoiceName(v.voice);
1082
969
  }
1083
- /** What a model with its own voices and no word timings refuses, each line naming what to pass instead. */
1084
- /** One list for the input schema and for the run's check before its first paid step. */
1085
970
  export function speechModelRefusals(input) {
1086
- // The model the voice name selects, by the function quote and the run; a script never decides it.
1087
971
  const model = input.tts_model ?? resolveTtsModel({ voice: input.voice, script: "" });
1088
972
  const ownVoice = input.voice !== undefined && isModelVoiceName(input.voice);
1089
973
  if (!speaksOwnVoices(model)) {
@@ -1097,7 +981,6 @@ export function speechModelRefusals(input) {
1097
981
  }
1098
982
  const ownVoices = `from list_voices with model=${model}`;
1099
983
  const defaultVoice = "to get the model's default voice for the actor's gender";
1100
- // With tts_model named too, a voice of another model alone would be refused against that tts_model.
1101
984
  const dropModel = input.tts_model === undefined ? "" : " and omit tts_model";
1102
985
  const otherModel = ownVoice ? `or choose a voice of another speech model from list_voices${dropModel}` : "or choose another tts_model";
1103
986
  const candidates = [
@@ -1126,8 +1009,6 @@ export function speechModelRefusals(input) {
1126
1009
  ];
1127
1010
  return candidates.filter(([, refused]) => refused).map(([field, , message]) => ({ field, message }));
1128
1011
  }
1129
- /** API input: the server's `voiceRefusal` checks the voice name and `voiceIdRefusal` a raw id. The catalog is not */
1130
- /** imported here, since clients read this barrel; the server uses `@clipwright/core/voice-admission`. */
1131
1012
  export function serverUgcInputWith(voiceRefusal, voiceIdRefusal = () => undefined, base = makeUgcInput) {
1132
1013
  return base
1133
1014
  .refine((v) => v.voice === undefined || voiceRefusal(v.voice) === undefined, {
@@ -1138,7 +1019,6 @@ export function serverUgcInputWith(voiceRefusal, voiceIdRefusal = () => undefine
1138
1019
  path: ["voice_id"],
1139
1020
  error: (issue) => voiceIdRefusal(issue.input.voice_id),
1140
1021
  })
1141
- // A call speaks ElevenLabs catalog voices only: a model's own voice has no dialogue.
1142
1022
  .superRefine((v, context) => {
1143
1023
  for (const speaker of CALL_SPEAKERS) {
1144
1024
  const name = v.call?.voices?.[speaker];
@@ -1152,7 +1032,6 @@ export function serverUgcInputWith(voiceRefusal, voiceIdRefusal = () => undefine
1152
1032
  if (why)
1153
1033
  context.addIssue({ code: z.ZodIssueCode.custom, path: ["interview", "off_screen", "voice"], message: why });
1154
1034
  })
1155
- // The cap the client skipped: the server knows the model of an admitted catalog voice.
1156
1035
  .refine((v) => !modelUnknownToClient(v) ||
1157
1036
  voiceRefusal(v.voice) !== undefined ||
1158
1037
  speechTextRefusal(v) === undefined, {
@@ -1160,46 +1039,43 @@ export function serverUgcInputWith(voiceRefusal, voiceIdRefusal = () => undefine
1160
1039
  error: (issue) => speechTextRefusal(issue.input),
1161
1040
  });
1162
1041
  }
1163
- /** A stored run input already passed admission; a model or cap change must not make an */
1164
- /** old run unreadable. The snapshot keeps the actor's gender: the parse feeds the timeline digest, so it stays this narrow. */
1165
1042
  export const storedUgcInput = z.object({
1166
1043
  ...makeUgcInputShape,
1167
1044
  resolution: z.enum(STORED_RESOLUTIONS).optional(),
1168
1045
  tts_model: z.string().optional(),
1169
1046
  actor_snapshot: z.object({ gender: z.enum(["female", "male"]).optional() }).optional(),
1170
- // One more for the product image of live shots (#1103), and each live shot's cast pictures (#1192).
1171
1047
  insert_assets: z.array(pinnedInsertAsset).min(1)
1172
1048
  .max(MAX_INSERTS + MAX_OVERLAYS + MAX_LAYOUT_WINDOWS + MAX_TEMPLATE_MEDIA + 1 + MAX_LIVE_SHOTS * MAX_SHOT_CAST).optional(),
1173
1049
  composition_version: z.literal(UGC_COMPOSITION_VERSION).optional(),
1174
- /** The model admission resolved; absent on runs admitted before 2026-10-25. */
1175
1050
  resolved_tts_model: z.string().optional(),
1176
- /** Set when `design` is the account's brand kit pinned at admission, not the call's own (#1122). */
1177
1051
  design_source: z.literal("brand_kit").optional(),
1178
- /** Set when `pause_trim` is the ad-style default pinned at admission, not the call's own (#1136). */
1179
1052
  pause_trim_source: z.literal("ad_default").optional(),
1180
- /** Set when admission froze the scene director for the run's live shots (#1491). */
1053
+ end_hold_source: z.literal("ad_default").optional(),
1181
1054
  scene_direction: sceneDirectionMark.optional(),
1182
- /** Set when the run's talking_action shots follow the hands-insert rule (#1521); absent, they all speak as admitted before. */
1183
1055
  talking_action_take: z.literal(TALKING_ACTION_VOICE_OVER).optional(),
1184
- /** Set when the run's edited first frames take the product from one product sheet (#1536 S2); absent, they take the photo. */
1185
1056
  product_sheet: z.literal(true).optional(),
1186
- /** Set when the run's posed talking and talking_action takes lip-sync from their first frame with a motion prompt (#1543). */
1187
1057
  lipsync_motion: z.literal(true).optional(),
1188
- /** Set when the run's action shots and hands inserts are drawn on Gemini Omni 1.2 and priced at its second (#1535). */
1189
1058
  omni_shots: z.literal(true).optional(),
1059
+ speech: runSpeech.optional(),
1060
+ speech_actions: speechActions.optional(),
1061
+ seedance_shots: z.array(insertId).min(1).max(MAX_LIVE_SHOTS).optional(),
1062
+ seedance_no_text_shots: z.array(insertId).min(1).max(MAX_LIVE_SHOTS).optional(),
1190
1063
  });
1191
- /** Whether a run takes the narrated long-form path: one script with inserts, overlays, layout windows, framing, a call, an interview or gaze. */
1192
1064
  export function isNarratedUgcInput(input) {
1193
1065
  return input.segments === undefined && (input.inserts !== undefined || input.overlays !== undefined || input.layout_windows !== undefined ||
1194
1066
  input.framing !== undefined || input.call !== undefined || input.interview !== undefined || input.presenter_gaze !== undefined ||
1195
1067
  input.end_hold_s !== undefined || input.shots !== undefined);
1196
1068
  }
1197
- /** The pinned asset of an `asset_id` insert, overlay, layout window or template slot in a stored input; a public input has none. */
1069
+ export function withAdEndHold(input) {
1070
+ if (input.end_hold_s !== undefined || typeof input.script !== "string" || input.segments !== undefined || !isAdStyleUgcInput(input) ||
1071
+ !isNarratedUgcInput(input))
1072
+ return input;
1073
+ return { ...input, end_hold_s: AD_END_HOLD_S, end_hold_source: "ad_default" };
1074
+ }
1198
1075
  export function pinnedInsertAssetOf(input, insertId, slot) {
1199
1076
  const pinned = input.insert_assets;
1200
1077
  return pinned?.find(asset => asset.insert_id === insertId && asset.slot === slot);
1201
1078
  }
1202
- /** What the run voices apart: the script, or each actor segment's line. */
1203
1079
  function spokenUnitsOf(input) {
1204
1080
  if (input.script !== undefined)
1205
1081
  return [input.script];
@@ -1207,12 +1083,9 @@ function spokenUnitsOf(input) {
1207
1083
  .filter((segment) => segment.kind === "actor")
1208
1084
  .map((segment) => segment.script ?? "");
1209
1085
  }
1210
- /** Joins the spoken text without checks: the shared base for gates and the helper. */
1211
1086
  function spokenTextOf(input) {
1212
1087
  return spokenUnitsOf(input).join(" ");
1213
1088
  }
1214
- /** The ONLY place where "script or joined segments" becomes a `string`. The non-empty */
1215
- /** check lives here, restoring the guard before the paid TTS call that the schema no longer holds. */
1216
1089
  export function resolvedScript(input) {
1217
1090
  const text = spokenTextOf(input);
1218
1091
  if (countWords(text) < 1) {
@@ -1220,30 +1093,18 @@ export function resolvedScript(input) {
1220
1093
  }
1221
1094
  return text;
1222
1095
  }
1223
- // The INPUT type (`MakeUgcInputArgs`) lives in `contract-dispositions.ts`: it comes from the
1224
- // OFFERED shape, so SDK autocomplete does not show rejected fields.
1225
- /** A plain run's tariff before parts-v1 (#800): 30 credits per second of finished video, known by having no billing terms frozen at admission (#840 D2). */
1226
1096
  export const UGC_PER_SECOND_TARIFF = "ugc-per-second-v1";
1227
- /** That tariff's rate: runs admitted before parts-v1 settle at it; the duration is rounded up before multiplying. */
1228
1097
  export const CREDITS_PER_SECOND = 30;
1229
1098
  export const quoteResponse = z.object({
1230
1099
  long_form_pricing: longFormQuoteSchema.optional(),
1231
- /** The tariff the run is admitted at: `ugc-per-second-v1`, or long form's `pricingVersion` (#840 D3). A string, not an enum: a */
1232
- /** tariff the client does not know yet must not break `quote`; optional, so a quote stored before it still reads. */
1233
1100
  tariff: z.string().min(1).max(200).optional(),
1234
- /** The estimate by part (#800): presenter seconds by engine, production seconds, live-avatar stills; the minimum applies after. */
1235
1101
  price_lines: z.array(partsLineSchema).optional(),
1236
1102
  minimum_credits: z.number().int().nonnegative().optional(),
1237
1103
  skill: z.string(),
1238
1104
  credits_estimate: z.number().int().nonnegative(),
1239
1105
  duration_estimate_sec: z.number().positive(),
1240
- // Unhonored parameters are declared up front, never silently ignored.
1241
1106
  warnings: z.array(z.string()).default([]),
1242
- // The contract version sits in the response too, so an agent reading the quote
1243
- // sees which contract the price was given under.
1244
1107
  contract_version: z.string(),
1245
- /** What we know about the frame source. `null` only when `image` was given but probing */
1246
- /** failed; without `image` the default actor's dimensions are reported. */
1247
1108
  source: z
1248
1109
  .object({
1249
1110
  width: z.number().positive(),
@@ -1251,23 +1112,16 @@ export const quoteResponse = z.object({
1251
1112
  aspect_ratio: z.string(),
1252
1113
  })
1253
1114
  .nullable(),
1254
- /** Who is in the frame; `null` for a client `image`. */
1255
1115
  actor: z
1256
1116
  .object({
1257
1117
  gender: z.enum(["female", "male"]),
1258
1118
  actor_id: actorId.optional(),
1259
1119
  version: z.number().int().positive().optional(),
1260
- /** The picture of the view the run renders; a library actor's only, a personal actor's is in list_actors (#1125). */
1261
1120
  preview_url: z.url().optional(),
1262
1121
  })
1263
1122
  .nullable(),
1264
- /** The format that will actually be rendered for this input. */
1265
1123
  resolved_aspect_ratio: z.enum(ASPECT_RATIOS),
1266
- /** A string, not an enum: a model the client does not know yet must not break `quote`. */
1267
1124
  tts_model: z.string().min(1),
1268
- /** The design DNA the run draws in and where it came from (#1122); absent when the run names none and the account saved no kit. */
1269
1125
  design: resolvedDesign.extend({ source: z.enum(["request", "brand_kit"]) }).optional(),
1270
- /** The scene the quote proposes and its options with their prices (#1491); absent where the quote proposes none. */
1271
1126
  scene_proposal: sceneProposal.optional(),
1272
1127
  });
1273
- //# sourceMappingURL=skills.js.map