@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,35 +1,24 @@
1
1
  import { CAPTION_POSITION_VERTICAL, captionBandBox } from "./caption-geometry.js";
2
2
  import { captionPlaceAt, fitPlacedRect, placeAnchorOf, placeByCaptions, plannedFace, resolvePlace, sharedArea, usualFace } from "./scene-place.js";
3
3
  import { lexicalTokens, quoteOccurrences } from "./semantic-inserts.js";
4
- // Overlays and layout windows of a long-form `make_ugc` run (#778 S2b): drawn over the actor slots, never planned as inserts.
5
4
  export const OVERLAY_POSITIONS = ["top_left", "top_right", "bottom_left", "bottom_right", "top", "bottom"];
6
5
  export const LAYER_ENTERS = ["cut", "fade", "slide", "tilt_in", "pop", "scale_up"];
7
- /** How an overlay leaves (#973 S3); absent is a cut, as every overlay before it. */
8
6
  export const LAYER_EXITS = ["cut", "fade", "pop_out", "slide"];
9
- /** The most an overlay's appearance moves off its first word, in seconds. */
10
7
  export const MAX_ENTER_OFFSET_S = 0.5;
11
8
  export const LAYOUT_WINDOW_KINDS = ["split", "card"];
12
9
  export const FULL_FRAME_TRANSITIONS = ["cut", "wipe", "flash", "zoom"];
13
- /** `glitch` breaks the cut with a colour split and an inverted frame (#1175 S5 C8); `power` closes the screen to a line and a dot and opens it the
14
- * same way (C9). */
15
10
  export const INSERT_TRANSITIONS = [...FULL_FRAME_TRANSITIONS, "light_leak", "glitch", "power"];
16
- /** A video insert's key moment slowed down and back (`ramp`) or caught in a short repeating loop (`stutter`) (#1175 S5 C6). */
17
11
  export const INSERT_RETIMES = ["ramp", "stutter"];
18
12
  export const INSERT_FITS = ["cover", "contain", "auto"];
19
- /** `auto` holds a picture still while filling cuts at most this share of it, and past it scrolls or pans it end to end (#1051 S2). */
20
13
  export const INSERT_STILL_CUT = 0.08;
21
- /** `auto` moves a picture only while this share of it shows at once: a 16:10 screenshot (35% in 9:16) pans; past it, it shows whole over blur. */
22
14
  export const INSERT_MIN_SHOWN = 0.25;
23
- /** A picture's scroll runs down or up a tall picture, its pan left or right across a wide one (#1051 S2). */
24
15
  export const INSERT_MOTIONS = { scroll: ["down", "up"], pan: ["left", "right"] };
25
- /** How a product picture comes onto its stage: tilted in depth and settling flat, slid in as a card, lit by a spotlight, or pushed in slowly. */
26
16
  export const INSERT_STAGE_ENTRANCES = ["lean_in", "slide_card", "spotlight", "push"];
27
17
  export const SPLIT_MEDIA_SIDES = ["top", "bottom"];
28
18
  export const SPLIT_MEDIA_SHARE = { min: 0.3, max: 0.7, default: 0.5 };
29
19
  export const MAX_OVERLAYS = 30;
30
20
  export const MAX_LAYOUT_WINDOWS = 15;
31
21
  export const MAX_OVERLAYS_AT_ONCE = 3;
32
- /** The first MAX_OVERLAYS_AT_ONCE of `others` on screen together at a word of `range`, or undefined when fewer ever are. */
33
22
  export function overlayCrowd(others, range) {
34
23
  for (const word of [range.startWord, ...others.map(other => other.range.startWord)]) {
35
24
  if (word < range.startWord || word >= range.coverWord)
@@ -40,13 +29,11 @@ export function overlayCrowd(others, range) {
40
29
  }
41
30
  return undefined;
42
31
  }
43
- /** The frame of a `W:H` format in pixels, as the composition's `canvasForRatio` derives it: the short side 1080, both sides even. */
44
32
  export function frameCanvasOf(aspectRatio) {
45
33
  const [w, h] = aspectRatio.split(":").map(Number);
46
34
  const even = (value) => { const rounded = Math.round(value); return rounded % 2 === 0 ? rounded : rounded + 1; };
47
35
  return w >= h ? { width: even((1080 * w) / h), height: 1080 } : { width: 1080, height: even((1080 * h) / w) };
48
36
  }
49
- /** The most an overlay at `position` takes, as `overlayBox` draws it: a corner 42% wide, a band the width less margins, 30% high. */
50
37
  export function overlayRect(position, canvas) {
51
38
  const margin = Math.round(0.04 * Math.min(canvas.width, canvas.height));
52
39
  const band = position === "top" || position === "bottom";
@@ -55,26 +42,19 @@ export function overlayRect(position, canvas) {
55
42
  const top = position.startsWith("top") ? margin : canvas.height - margin - height;
56
43
  return { left: left / canvas.width, top: top / canvas.height, width: width / canvas.width, height: height / canvas.height };
57
44
  }
58
- /** Two footprints collide when they share an area; touching edges do not. */
59
45
  export function rectsOverlap(a, b) {
60
46
  return a.left < b.left + b.width && b.left < a.left + a.width && a.top < b.top + b.height && b.top < a.top + a.height;
61
47
  }
62
- /** How the presenter is framed: close as every portrait was, wide, lower with room above (#884 S5d), or full, head to feet (#1175 S7). */
63
- /** wide and full are 9:16 views only. */
64
48
  export const PRESENTER_FRAMINGS = ["close", "wide", "full"];
65
- /** Where the presenter's face sits: 12–48% of the height and the middle 60% of a 9:16 clip, which other formats fit whole and centre (#778 S3). */
66
- /** A wide 9:16 view puts it at 33–58% and the middle half, as measured on a HeyGen render (#884 S5d). */
67
49
  export function faceZone(aspectRatio, framing = "close") {
68
50
  if (framing === "wide" && aspectRatio === "9:16")
69
51
  return { left: 0.25, top: 0.33, width: 0.5, height: 0.25 };
70
- // A full-height face is 0.087–0.092 of the height (#1171 live takes), the head at the top: the zone holds the head and the shoulders.
71
52
  if (framing === "full" && aspectRatio === "9:16")
72
53
  return { left: 0.3, top: 0.03, width: 0.4, height: 0.2 };
73
54
  const { width, height } = frameCanvasOf(aspectRatio);
74
55
  const share = 0.6 * Math.min(1, (9 / 16) / (width / height));
75
56
  return { left: (1 - share) / 2, top: 0.12, width: share, height: 0.36 };
76
57
  }
77
- /** The words an item covers, `[startWord, coverWord)`, as an insert anchor resolves; a string names why it does not resolve. */
78
58
  export function layerWordRange(tokens, item) {
79
59
  let range;
80
60
  if ("startWord" in item.anchor) {
@@ -111,16 +91,12 @@ export function admissionScene(input, aspectRatio, framing) {
111
91
  : { vertical: input.caption_position ? CAPTION_POSITION_VERTICAL[input.caption_position] : undefined };
112
92
  return { face, captions: captionBandBox(input.caption_style, aspectRatio, canvas, at) };
113
93
  }
114
- /** The sides a place may take next to the captions: a page grows sideways with its words. */
115
94
  export const CAPTION_SIDES = ["below", "above"];
116
- /** The framings an admitted run may render: a wider request renders narrower when the actor has no such view (full falls to wide, then close); */
117
- /** wide and full need an actor and 9:16. */
118
95
  export function admissionFramings(input) {
119
96
  if (input.actor_id === undefined || (input.aspect_ratio ?? "9:16") !== "9:16")
120
97
  return ["close"];
121
98
  return input.presenter_framing === "full" ? ["close", "wide", "full"] : input.presenter_framing === "wide" ? ["close", "wide"] : ["close"];
122
99
  }
123
- /** How many layers a place leans on through `{ layer }`, Infinity in a loop or past a missing or preset anchor; a template is an anchor as drawn. */
124
100
  export function placeDepth(overlays, id, seen = new Set()) {
125
101
  const item = overlays.find(other => other.id === id);
126
102
  const anchor = item?.place ? placeAnchorOf(item.place) : undefined;
@@ -131,10 +107,7 @@ export function placeDepth(overlays, id, seen = new Set()) {
131
107
  const target = overlays.find(other => other.id === anchor);
132
108
  return seen.has(anchor) || !(target?.place || target?.own) ? Infinity : 1 + placeDepth(overlays, anchor, new Set([...seen, id]));
133
109
  }
134
- /** A template's own rect in pixels: the shape its place scales it to. */
135
110
  export const ownPixels = (own, canvas) => ({ width: own.width * canvas.width, height: own.height * canvas.height });
136
- /** Each layer's box at admission, by id: a preset's footprint, a template's own rect, a place resolved on the usual face (a template's shape scaled
137
- * whole into it); a place on a broken chain has none. */
138
111
  export function overlayFootprints(overlays, aspectRatio, framing, scene) {
139
112
  const canvas = frameCanvasOf(aspectRatio), face = scene?.face ?? usualFace(aspectRatio, canvas, framing), boxes = new Map();
140
113
  const resolve = (item) => {
@@ -162,13 +135,9 @@ export function overlayFootprints(overlays, aspectRatio, framing, scene) {
162
135
  return boxes;
163
136
  }
164
137
  const FRAME = { left: 0, top: 0, width: 1, height: 1 };
165
- /** Over this share of the face's box a placed overlay covers the face; under it, it touches the edge (#973 S1). */
166
138
  export const FACE_COVER_SHARE = 0.1;
167
- /** Under this share of the frame's short side an overlay would not read. */
168
139
  export const OVERLAY_MIN_SIDE = 0.03;
169
- /** Over this share of the frame an overlay hides a presenter who is still billed. */
170
140
  export const OVERLAY_COVERED_PRESENTER = 0.6;
171
- /** Admission warnings for placed overlays and templates: a box at the face's edge, and a box that hides most of a billed presenter. */
172
141
  export function placeWarnings(input, extras) {
173
142
  const overlays = Array.isArray(input.overlays) ? input.overlays : [];
174
143
  const aspect = typeof input.aspect_ratio === "string" ? input.aspect_ratio : "9:16", warnings = new Set();
@@ -192,7 +161,6 @@ export function placeWarnings(input, extras) {
192
161
  }
193
162
  return [...warnings];
194
163
  }
195
- /** The refusals a placed overlay or template meets on its anchor and on its box in every framing, at the path `at` names (#973 S1, S4). */
196
164
  export function placedRefusals(what, item, range, at, scene) {
197
165
  const refusals = [], { items, canvas } = scene, named = `${what} "${item.id}"`;
198
166
  const anchor = placeAnchorOf(item.place), target = anchor === undefined ? undefined : items.find(other => other.id === anchor);
@@ -226,7 +194,6 @@ export function placedRefusals(what, item, range, at, scene) {
226
194
  refusals.push({ path, message });
227
195
  return refusals;
228
196
  }
229
- /** Every refusal of overlays and layout windows against the script, named by path; empty when they render. `extras` adds the run's templates. */
230
197
  export function layerRefusals(input, extras) {
231
198
  const refusals = [];
232
199
  const tokens = lexicalTokens(input.script);
@@ -272,7 +239,6 @@ export function layerRefusals(input, extras) {
272
239
  });
273
240
  for (const overlay of overlays) {
274
241
  const { item, index } = overlay, at = (...rest) => ["overlays", index, "place", ...rest];
275
- // Captions placed by caption_place never move, so an overlay that meets them is refused unless it stands by them (#973 S2).
276
242
  if (input.caption_place && !placeByCaptions(item.place) && footprints.some(({ boxes, captions }) => {
277
243
  const box = boxes.get(item.id);
278
244
  return box !== undefined && captions !== undefined && rectsOverlap(box, captions);
@@ -297,7 +263,6 @@ export function layerRefusals(input, extras) {
297
263
  }
298
264
  const together = overlays.slice(0, at).filter(other => overlaps(other.range, overlay.range));
299
265
  const preset = (item) => item.place === undefined && item.position !== undefined;
300
- // A place over its anchor is drawn on it by asking, so the pair is no clash.
301
266
  const over = (a, b) => a.place !== undefined && "side" in a.place && a.place.side === "over" && placeAnchorOf(a.place) === b.id;
302
267
  const clash = together.find(other => preset(other.item) && preset(overlay.item)
303
268
  ? rectsOverlap(overlayRect(other.item.position, canvas), overlayRect(overlay.item.position, canvas))
@@ -322,8 +287,6 @@ export function layerRefusals(input, extras) {
322
287
  }
323
288
  return refusals;
324
289
  }
325
- /** Each overlay's first frame moved by its enter_offset_s (#973 S3), inside its own frames and the video. Overlays that left on or before its first */
326
- /** word and still show then leave as it enters, so no more overlays share the screen than their words allow. */
327
290
  export function offsetOverlayFrames(frames, overlays, fps, warnings) {
328
291
  const out = frames.map(entry => ({ ...entry })), byId = new Map(out.map(entry => [entry.id, entry]));
329
292
  const word = new Map(out.map(entry => [entry.id, entry.startFrame])), ids = new Set(overlays.map(item => item.id));
@@ -346,7 +309,6 @@ export function offsetOverlayFrames(frames, overlays, fps, warnings) {
346
309
  }
347
310
  return out;
348
311
  }
349
- /** Frames of each word range on the run's narration, by the rule inserts follow: a range ends where its first uncovered word starts. */
350
312
  export function resolveLayerFrames(input) {
351
313
  const lexical = input.words.filter(word => !/^\p{P}+$/u.test(word.word));
352
314
  if (lexical.length !== input.tokens.length || lexical.some((word, index) => lexicalTokens(word.word)[0] !== input.tokens[index])) {
@@ -361,4 +323,3 @@ export function resolveLayerFrames(input) {
361
323
  return { id: layer.id, startFrame, endFrame };
362
324
  });
363
325
  }
364
- //# sourceMappingURL=ugc-layers.js.map
@@ -31,14 +31,12 @@ interface ScenesInput extends Partial<Pick<LayerCheckInput, "aspect_ratio" | "pr
31
31
  id: string;
32
32
  }[] | undefined;
33
33
  }
34
- /** Scenes sit on the script's words and share the id space of the other layers; `presenter: false` is a frame with no presenter (make_faceless). */
35
34
  export declare function sceneRefusals(input: ScenesInput, options?: {
36
35
  presenter?: boolean;
37
36
  }): {
38
37
  path: (string | number)[];
39
38
  message: string;
40
39
  }[];
41
- /** Purple stays only where the customer named one in the scene's own colours. */
42
40
  export declare const sceneAllowsPurple: (scene: {
43
41
  colors?: readonly string[] | undefined;
44
42
  }) => boolean;
@@ -3,7 +3,6 @@ import { isScenePurple } from "./scene-graph.js";
3
3
  import { lexicalTokens } from "./semantic-inserts.js";
4
4
  import { placeAnchorOf, placeByCaptions, resolvePlace, sharedArea } from "./scene-place.js";
5
5
  import { admissionFramings, admissionScene, FACE_COVER_SHARE, frameCanvasOf, layerWordRange } from "./ugc-layers.js";
6
- // Scenes (#1107): graphics no library kind draws, authored for the run from words, checked, and drawn on their words beside templates.
7
6
  export const MAX_SCENES = 12;
8
7
  export const SCENE_BRIEF_MAX_CHARS = 2000;
9
8
  export const SCENE_TEXT_MAX_CHARS = 200;
@@ -13,7 +12,6 @@ export const SCENES_DESCRIPTION = "Graphics made for this video from your words,
13
12
  `${SCENE_CREDITS} credits per scene, its own quote line, charged only for scenes drawn in the delivered video. ` +
14
13
  "Needs script and long-form qualification on the server.";
15
14
  export const SCENES_DISABLED_MESSAGE = "scenes are not available right now; omit scenes";
16
- /** A scene's place (#1327): over the presenter, by the frame or the face, scaled whole, and off the planned face unless allow_face says so. */
17
15
  function placeRefusal(scene, input, presenter) {
18
16
  const named = `scene "${scene.id}"`;
19
17
  if (!presenter)
@@ -33,7 +31,6 @@ function placeRefusal(scene, input, presenter) {
33
31
  });
34
32
  return covers ? `${named} covers the presenter's face; move it, or pass allow_face: true to cover it on purpose` : undefined;
35
33
  }
36
- /** Scenes sit on the script's words and share the id space of the other layers; `presenter: false` is a frame with no presenter (make_faceless). */
37
34
  export function sceneRefusals(input, options = {}) {
38
35
  if (!input.scenes?.length)
39
36
  return [];
@@ -55,6 +52,4 @@ export function sceneRefusals(input, options = {}) {
55
52
  }
56
53
  return refusals;
57
54
  }
58
- /** Purple stays only where the customer named one in the scene's own colours. */
59
55
  export const sceneAllowsPurple = (scene) => (scene.colors ?? []).some(isScenePurple);
60
- //# sourceMappingURL=ugc-scenes.js.map
@@ -1,16 +1,11 @@
1
1
  import type { MakeUgcInput, PinnedInsertAsset } from "./skills.js";
2
- /** Codecs Remotion's OffthreadVideo decodes with its bundled FFmpeg, locally and on Lambda; asset ingest takes the same two. */
3
2
  export declare const MEDIA_VIDEO_CODECS: readonly ["h264", "hevc"];
4
3
  export interface VideoSourceFacts {
5
4
  codec?: string | null | undefined;
6
5
  pixFmt?: string | null | undefined;
7
6
  colorTransfer?: string | null | undefined;
8
7
  }
9
- /** Why a video source cannot be drawn, or `null`. A fact that is not known is not refused here; the run measures it. */
10
8
  export declare function videoMediaRefusal(facts: VideoSourceFacts): string | null;
11
- /** The quote's warning for a pinned video asset the narration may outlast; the slow speech edge gives the longest its words can take. */
12
9
  export declare function videoHoldWarnings(input: Pick<MakeUgcInput, "script" | "inserts" | "overlays" | "layout_windows">, pinned: readonly PinnedInsertAsset[] | undefined): string[];
13
- /** A picture whose short side is under this many pixels cannot fill a 1080 p frame sharply: it is set on a stage at the size its pixels carry. */
14
10
  export declare const PICTURE_MIN_SHORT_SIDE = 1080;
15
- /** The quote's warning for each pinned picture insert too small to fill the frame, naming the photo and the reason. */
16
11
  export declare function pictureQualityWarnings(input: Pick<MakeUgcInput, "inserts">, pinned: readonly PinnedInsertAsset[] | undefined): string[];
@@ -1,11 +1,8 @@
1
1
  import { WORDS_PER_SECOND_MIN } from "./pacing.js";
2
2
  import { lexicalTokens } from "./semantic-inserts.js";
3
3
  import { layerWordRange } from "./ugc-layers.js";
4
- // Video media in inserts, overlays and layout windows of a long-form `make_ugc` run (#778 S2c): muted, held on its last frame when short.
5
- /** Codecs Remotion's OffthreadVideo decodes with its bundled FFmpeg, locally and on Lambda; asset ingest takes the same two. */
6
4
  export const MEDIA_VIDEO_CODECS = ["h264", "hevc"];
7
5
  const HDR_TRANSFERS = { smpte2084: "PQ", "arib-std-b67": "HLG" };
8
- /** Why a video source cannot be drawn, or `null`. A fact that is not known is not refused here; the run measures it. */
9
6
  export function videoMediaRefusal(facts) {
10
7
  if (facts.codec && !MEDIA_VIDEO_CODECS.includes(facts.codec)) {
11
8
  return `is ${facts.codec} video: video media takes H.264 or HEVC; re-encode it as H.264`;
@@ -19,7 +16,6 @@ export function videoMediaRefusal(facts) {
19
16
  return null;
20
17
  }
21
18
  const LISTS = [["inserts", "insert"], ["overlays", "overlay"], ["layout_windows", "layout window"]];
22
- /** The quote's warning for a pinned video asset the narration may outlast; the slow speech edge gives the longest its words can take. */
23
19
  export function videoHoldWarnings(input, pinned) {
24
20
  if (!pinned?.length || typeof input.script !== "string")
25
21
  return [];
@@ -36,9 +32,7 @@ export function videoHoldWarnings(input, pinned) {
36
32
  `it covers can take up to ${longestSec.toFixed(1)} s; if the narration outlasts the clip, its last frame holds to the end`] : [];
37
33
  }));
38
34
  }
39
- /** A picture whose short side is under this many pixels cannot fill a 1080 p frame sharply: it is set on a stage at the size its pixels carry. */
40
35
  export const PICTURE_MIN_SHORT_SIDE = 1080;
41
- /** The quote's warning for each pinned picture insert too small to fill the frame, naming the photo and the reason. */
42
36
  export function pictureQualityWarnings(input, pinned) {
43
37
  if (!pinned?.length)
44
38
  return [];
@@ -51,4 +45,3 @@ export function pictureQualityWarnings(input, pinned) {
51
45
  : `${what}; it is shown whole on a stage at the size its pixels carry, never filled to the frame`];
52
46
  });
53
47
  }
54
- //# sourceMappingURL=ugc-video-media.js.map
package/dist/uploads.d.ts CHANGED
@@ -1,42 +1,31 @@
1
1
  import { z } from "zod";
2
- /** The same cap as the source probe. */
3
2
  export declare const UPLOAD_MAX_BYTES: number;
4
- /** Uploads per account over a sliding day; a link lives one day. */
5
- export declare const UPLOAD_DAILY_CAP = 20;
3
+ export declare const UPLOAD_DAILY_CAP = 200;
6
4
  export declare const UPLOAD_WINDOW_SECONDS = 86400;
7
5
  export declare const UPLOAD_URL_TTL_SECONDS = 86400;
8
- /** As long as a run's media (`RENDER_RETENTION_DAYS`): a draft may name an upload on the run's first day. */
9
6
  export declare const UPLOAD_OBJECT_RETENTION_DAYS = 365;
10
- /** No WebP on purpose: the probe cannot read its dimensions, and without them the format cannot be checked. */
11
7
  export declare const UPLOAD_MEDIA_TYPES: readonly ["image/png", "image/jpeg"];
12
8
  export type UploadMediaType = (typeof UPLOAD_MEDIA_TYPES)[number];
13
9
  export declare const UPLOADS_PATH = "/v1/uploads";
14
- /** Remote uploads (clipwright#758): a server-side download, a presigned PUT, and the read that confirms one. */
15
10
  export declare const UPLOAD_IMPORT_PATH = "/v1/uploads/import";
16
11
  export declare const UPLOAD_INTENTS_PATH = "/v1/uploads/intents";
17
12
  export declare const UPLOAD_ITEM_PATH = "/v1/uploads/:id";
18
- /** A presigned PUT url lives 15 minutes; the intent it serves can be finished for a day. */
19
13
  export declare const UPLOAD_PUT_URL_TTL_SECONDS = 900;
20
14
  export declare const UPLOAD_INTENT_FINISH_SECONDS = 86400;
21
- /** The finisher's lease outlives its storage calls by 35 s, and those stay under the SDK's 30 s per request plus margin. */
22
15
  export declare const UPLOAD_FINISH_LEASE_SECONDS = 60;
23
16
  export declare const UPLOAD_FINISH_IO_DEADLINE_MS = 25000;
24
- /** A repeated key answers the earlier result only within a day and only while that result is still usable. */
25
17
  export declare const IDEMPOTENCY_REPLAY_SECONDS = 86400;
26
- /** Outbound downloads: attempts per account per hour, imports at once per `api` instance, and one import's deadline. */
27
18
  export declare const URL_FETCH_PER_HOUR = 30;
28
19
  export declare const URL_FETCH_WINDOW_SECONDS = 3600;
29
20
  export declare const URL_IMPORT_CONCURRENCY = 4;
30
21
  export declare const URL_IMPORT_IMAGE_DEADLINE_MS = 20000;
31
22
  export declare const URL_IMPORT_MAX_REDIRECTS = 3;
32
- /** The longest side a customer picture may have. */
33
23
  export declare const UPLOAD_MAX_SIDE = 8192;
34
24
  export declare const uploadId: z.ZodString;
35
25
  export declare const uploadImportRequest: z.ZodObject<{
36
26
  url: z.ZodString;
37
27
  }, z.core.$strict>;
38
28
  export type UploadImportRequest = z.infer<typeof uploadImportRequest>;
39
- /** `filename` is a hint for people and is not part of the request's identity. */
40
29
  export declare const uploadIntentRequest: z.ZodObject<{
41
30
  media_type: z.ZodEnum<{
42
31
  "image/jpeg": "image/jpeg";
@@ -75,7 +64,6 @@ export declare const uploadResponse: z.ZodObject<{
75
64
  expires_at: z.ZodString;
76
65
  }, z.core.$strip>;
77
66
  export type UploadResponse = z.infer<typeof uploadResponse>;
78
- /** `GET /v1/uploads/{id}`: one upload with a link signed now, and when a generation or revision stops taking it. */
79
67
  export declare const uploadItemResponse: z.ZodObject<{
80
68
  upload_id: z.ZodString;
81
69
  content_digest: z.ZodString;
@@ -103,7 +91,6 @@ export declare const uploadItemRead: z.ZodObject<{
103
91
  bytes: z.ZodNumber;
104
92
  }, z.core.$loose>;
105
93
  export type UploadItemRead = z.infer<typeof uploadItemRead>;
106
- /** `GET /v1/uploads`: the account's uploads a revision still takes, newest first, one per picture, each with a link signed now. */
107
94
  export declare const uploadList: z.ZodObject<{
108
95
  uploads: z.ZodArray<z.ZodObject<{
109
96
  upload_id: z.ZodString;
@@ -139,7 +126,6 @@ export declare const uploadListRead: z.ZodObject<{
139
126
  }, z.core.$loose>>;
140
127
  }, z.core.$loose>;
141
128
  export type UploadListRead = z.infer<typeof uploadListRead>;
142
- /** Type by the first bytes, not by header or extension: the sender writes those. */
143
129
  export declare function sniffUploadMediaType(bytes: Uint8Array): UploadMediaType | null;
144
130
  export declare function uploadExtension(mediaType: UploadMediaType): "png" | "jpg";
145
131
  export declare const UPLOAD_IMAGE_DESCRIPTION: string;
package/dist/uploads.js CHANGED
@@ -1,41 +1,30 @@
1
1
  import { z } from "zod";
2
- /** The same cap as the source probe. */
3
2
  export const UPLOAD_MAX_BYTES = 10 * 1024 * 1024;
4
- /** Uploads per account over a sliding day; a link lives one day. */
5
- export const UPLOAD_DAILY_CAP = 20;
3
+ export const UPLOAD_DAILY_CAP = 200;
6
4
  export const UPLOAD_WINDOW_SECONDS = 86_400;
7
5
  export const UPLOAD_URL_TTL_SECONDS = 86_400;
8
- /** As long as a run's media (`RENDER_RETENTION_DAYS`): a draft may name an upload on the run's first day. */
9
6
  export const UPLOAD_OBJECT_RETENTION_DAYS = 365;
10
- /** No WebP on purpose: the probe cannot read its dimensions, and without them the format cannot be checked. */
11
7
  export const UPLOAD_MEDIA_TYPES = ["image/png", "image/jpeg"];
12
8
  export const UPLOADS_PATH = "/v1/uploads";
13
- /** Remote uploads (clipwright#758): a server-side download, a presigned PUT, and the read that confirms one. */
14
9
  export const UPLOAD_IMPORT_PATH = "/v1/uploads/import";
15
10
  export const UPLOAD_INTENTS_PATH = "/v1/uploads/intents";
16
11
  export const UPLOAD_ITEM_PATH = "/v1/uploads/:id";
17
- /** A presigned PUT url lives 15 minutes; the intent it serves can be finished for a day. */
18
12
  export const UPLOAD_PUT_URL_TTL_SECONDS = 900;
19
13
  export const UPLOAD_INTENT_FINISH_SECONDS = 86_400;
20
- /** The finisher's lease outlives its storage calls by 35 s, and those stay under the SDK's 30 s per request plus margin. */
21
14
  export const UPLOAD_FINISH_LEASE_SECONDS = 60;
22
15
  export const UPLOAD_FINISH_IO_DEADLINE_MS = 25_000;
23
- /** A repeated key answers the earlier result only within a day and only while that result is still usable. */
24
16
  export const IDEMPOTENCY_REPLAY_SECONDS = 86_400;
25
- /** Outbound downloads: attempts per account per hour, imports at once per `api` instance, and one import's deadline. */
26
17
  export const URL_FETCH_PER_HOUR = 30;
27
18
  export const URL_FETCH_WINDOW_SECONDS = 3600;
28
19
  export const URL_IMPORT_CONCURRENCY = 4;
29
20
  export const URL_IMPORT_IMAGE_DEADLINE_MS = 20_000;
30
21
  export const URL_IMPORT_MAX_REDIRECTS = 3;
31
- /** The longest side a customer picture may have. */
32
22
  export const UPLOAD_MAX_SIDE = 8192;
33
23
  export const uploadId = z.string().regex(/^upl_[a-f0-9]{32}$/);
34
24
  const sha256Hex = z.string().regex(/^[a-f0-9]{64}$/);
35
25
  export const uploadImportRequest = z.strictObject({
36
26
  url: z.string().url().startsWith("https://").max(2048),
37
27
  });
38
- /** `filename` is a hint for people and is not part of the request's identity. */
39
28
  export const uploadIntentRequest = z.strictObject({
40
29
  media_type: z.enum(UPLOAD_MEDIA_TYPES),
41
30
  bytes: z.number().int().positive().max(UPLOAD_MAX_BYTES),
@@ -62,29 +51,24 @@ export const uploadResponse = z.object({
62
51
  height: z.number().int().positive(),
63
52
  expires_at: z.string().datetime(),
64
53
  });
65
- /** `GET /v1/uploads/{id}`: one upload with a link signed now, and when a generation or revision stops taking it. */
66
54
  export const uploadItemResponse = uploadResponse.extend({ usable_until: z.string().datetime() });
67
55
  export const uploadItemRead = uploadItemResponse.extend({
68
56
  media_type: z.string().min(1), bytes: z.number().int().positive(),
69
57
  }).loose();
70
- /** `GET /v1/uploads`: the account's uploads a revision still takes, newest first, one per picture, each with a link signed now. */
71
58
  export const uploadList = z.strictObject({
72
59
  uploads: z.array(z.strictObject({
73
60
  ...uploadResponse.shape,
74
61
  created_at: z.string().datetime(),
75
- /** When a revision stops taking it: the stored object's retention less the admission margin, rounded down to the ms. */
76
62
  usable_until: z.string().datetime(),
77
63
  })),
78
64
  contract_version: z.string().min(1),
79
65
  });
80
- // What installed clients parse: the media type is an open string, the size has no cap, and unknown keys are kept.
81
66
  export const uploadListRead = uploadList.extend({
82
67
  uploads: z.array(uploadList.shape.uploads.element.extend({
83
68
  media_type: z.string().min(1), bytes: z.number().int().positive(),
84
69
  }).loose()),
85
70
  }).loose();
86
71
  const PNG_SIGNATURE = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];
87
- /** Type by the first bytes, not by header or extension: the sender writes those. */
88
72
  export function sniffUploadMediaType(bytes) {
89
73
  if (bytes.length >= 8 && PNG_SIGNATURE.every((b, i) => bytes[i] === b))
90
74
  return "image/png";
@@ -103,7 +87,7 @@ export const UPLOAD_IMAGE_DESCRIPTION = "Get an upload_id and a signed https url
103
87
  `${UPLOAD_OBJECT_RETENTION_DAYS} days. For ` +
104
88
  "workflow assets the upload_id is both asset_id and content_digest: the SHA-256 of the original " +
105
89
  "bytes. Set `aspect_ratio` EXPLICITLY to match the picture. For a file on your disk while this server is remote, " +
106
- "use create_upload. Free; 20 uploads per day per account, at most 30 url downloads per hour.";
90
+ "use create_upload. Free; 200 uploads per day per account, at most 30 url downloads per hour.";
107
91
  export const CREATE_UPLOAD_DESCRIPTION = "Upload a LOCAL PNG or JPEG (up to 10 MB) through a one-time presigned PUT; use it when this server is remote and " +
108
92
  "you have a shell. Pass media_type, the exact size in bytes and the file's sha256 (`sha256sum <file>` or " +
109
93
  "`shasum -a 256 <file>`). Within 15 minutes run: `curl -X PUT -H 'content-type: <media_type>' --data-binary " +
@@ -111,8 +95,7 @@ export const CREATE_UPLOAD_DESCRIPTION = "Upload a LOCAL PNG or JPEG (up to 10 M
111
95
  "PUT finished, the upload_id works as a generation reference (quote_image says how); before that it answers " +
112
96
  "upload_not_finished. Call get_upload to confirm and to " +
113
97
  "read content_digest, width and height; other tools that take an upload_id need that call first. Use the " +
114
- "upload_id within 24 hours. Free; counts toward 20 uploads per day.";
98
+ "upload_id within 24 hours. Free; counts toward 200 uploads per day.";
115
99
  export const GET_UPLOAD_DESCRIPTION = "Read one upload by upload_id: a freshly signed https url, content_digest, media_type, bytes, width, height and " +
116
100
  "usable_until. After create_upload it also confirms the PUT: it answers upload_not_finished until the file is " +
117
101
  "there and upload_expired after 24 hours. Free.";
118
- //# sourceMappingURL=uploads.js.map
@@ -1,39 +1,20 @@
1
- /** What is known about the paid request when it threw. `unsent`: it never left. `responded`: */
2
- /** the vendor answered, with the status as a number, since 200 and 402 cost differently. */
3
1
  export type VendorDispatchFact = {
4
2
  readonly kind: "unsent";
5
3
  } | {
6
4
  readonly kind: "responded";
7
5
  readonly status: number;
8
6
  };
9
- /** The paid request never left: a preflight, a guard or a free step failed. */
10
7
  export declare function markVendorUnsent<E>(error: E): E;
11
- /** The vendor answered, with this status. */
12
8
  export declare function markVendorResponse<E>(error: E, status: number): E;
13
- /** What is known about the request. `undefined` means NOTHING is known, a statement of */
14
- /** ignorance, not of refusal. Reads non-Error values too, since `catch` gets `unknown`. */
15
9
  export declare function vendorDispatchFact(error: unknown): VendorDispatchFact | undefined;
16
- /** The vendor's verdict on the job itself, an axis apart from dispatch: an accepted request */
17
- /** may still fail later. `succeeded` means the vendor finished, even if we could not use it. */
18
10
  export type VendorJobVerdict = "succeeded" | "failed";
19
- /** Marks the error with what the vendor said about the job ITSELF. */
20
11
  export declare function markVendorJobVerdict<E>(error: E, verdict: VendorJobVerdict): E;
21
- /** The vendor's verdict on the job. `undefined`: nothing terminal was said (polling broke, */
22
- /** timed out, wrong status). That is ignorance, and an operation must not be closed on it. */
23
12
  export declare function vendorJobVerdict(error: unknown): VendorJobVerdict | undefined;
24
- /** Marks a failed job the vendor itself reports as not billed (#857 S3). */
25
- /** Only the adapter that read the vendor's answer sets it; no mark means the job may be billed. */
26
13
  export declare function markVendorJobUnbilled<E>(error: E): E;
27
14
  export declare function vendorJobUnbilled(error: unknown): boolean;
28
- /** Whose fault a vendor refusal is. `unknown` is the honest answer and keeps the previous */
29
- /** behavior (not zero). */
30
15
  export type VendorRefusalClass = "account_standing" | "vendor" | "unknown";
31
- /** Marks the error with what the vendor itself said about the refusal cause. */
32
16
  export declare function markVendorRefusal<E>(error: E, refusal: VendorRefusalClass): E;
33
- /** An unmarked error is `unknown`: fail-closed here means the previous behavior. */
34
17
  export declare function vendorRefusalClass(error: unknown): VendorRefusalClass;
35
- /** Marks the refusal class with the adapter's OWN answer; otherwise the required member */
36
- /** would ask the vendor a question whose answer goes nowhere. */
37
18
  export declare function withRefusalClass<T>(backend: {
38
19
  classifyRefusal(error: unknown): VendorRefusalClass;
39
20
  }, call: () => Promise<T>): Promise<T>;
@@ -1,10 +1,4 @@
1
- // What happened to a paid request, as a flag on the error rather than a guess from its text.
2
- // No flag means "unknown", not "unsent": fail-closed, so a possible charge is never hidden.
3
- /** Property name, long and project-prefixed: it lands on foreign error objects, and a short */
4
- /** name like `status` would overwrite someone else's field. */
5
1
  const VENDOR_DISPATCH_FACT = "clipwrightVendorDispatchFact";
6
- /** Shared flag writer. Non-enumerable, so it does not clutter serialized logs. A primitive */
7
- /** cannot be marked and reads as unknown, which is the fail-closed side. */
8
2
  function mark(error, fact) {
9
3
  if (typeof error !== "object" || error === null) {
10
4
  return error;
@@ -13,22 +7,16 @@ function mark(error, fact) {
13
7
  value: fact,
14
8
  enumerable: false,
15
9
  writable: false,
16
- // `configurable` so a second mark does not throw: an outer adapter layer may
17
- // refine the fact.
18
10
  configurable: true,
19
11
  });
20
12
  return error;
21
13
  }
22
- /** The paid request never left: a preflight, a guard or a free step failed. */
23
14
  export function markVendorUnsent(error) {
24
15
  return mark(error, { kind: "unsent" });
25
16
  }
26
- /** The vendor answered, with this status. */
27
17
  export function markVendorResponse(error, status) {
28
18
  return mark(error, { kind: "responded", status });
29
19
  }
30
- /** What is known about the request. `undefined` means NOTHING is known, a statement of */
31
- /** ignorance, not of refusal. Reads non-Error values too, since `catch` gets `unknown`. */
32
20
  export function vendorDispatchFact(error) {
33
21
  if (typeof error !== "object" || error === null) {
34
22
  return undefined;
@@ -47,7 +35,6 @@ export function vendorDispatchFact(error) {
47
35
  return undefined;
48
36
  }
49
37
  const VENDOR_JOB_VERDICT = "clipwrightVendorJobVerdict";
50
- /** Marks the error with what the vendor said about the job ITSELF. */
51
38
  export function markVendorJobVerdict(error, verdict) {
52
39
  if (typeof error !== "object" || error === null) {
53
40
  return error;
@@ -60,8 +47,6 @@ export function markVendorJobVerdict(error, verdict) {
60
47
  });
61
48
  return error;
62
49
  }
63
- /** The vendor's verdict on the job. `undefined`: nothing terminal was said (polling broke, */
64
- /** timed out, wrong status). That is ignorance, and an operation must not be closed on it. */
65
50
  export function vendorJobVerdict(error) {
66
51
  if (typeof error !== "object" || error === null) {
67
52
  return undefined;
@@ -70,8 +55,6 @@ export function vendorJobVerdict(error) {
70
55
  return value === "succeeded" || value === "failed" ? value : undefined;
71
56
  }
72
57
  const VENDOR_JOB_UNBILLED = "clipwrightVendorJobUnbilled";
73
- /** Marks a failed job the vendor itself reports as not billed (#857 S3). */
74
- /** Only the adapter that read the vendor's answer sets it; no mark means the job may be billed. */
75
58
  export function markVendorJobUnbilled(error) {
76
59
  if (typeof error !== "object" || error === null)
77
60
  return error;
@@ -82,7 +65,6 @@ export function vendorJobUnbilled(error) {
82
65
  return typeof error === "object" && error !== null && error[VENDOR_JOB_UNBILLED] === true;
83
66
  }
84
67
  const VENDOR_REFUSAL_CLASS = "clipwrightVendorRefusalClass";
85
- /** Marks the error with what the vendor itself said about the refusal cause. */
86
68
  export function markVendorRefusal(error, refusal) {
87
69
  if (typeof error !== "object" || error === null) {
88
70
  return error;
@@ -95,7 +77,6 @@ export function markVendorRefusal(error, refusal) {
95
77
  });
96
78
  return error;
97
79
  }
98
- /** An unmarked error is `unknown`: fail-closed here means the previous behavior. */
99
80
  export function vendorRefusalClass(error) {
100
81
  if (typeof error !== "object" || error === null) {
101
82
  return "unknown";
@@ -103,8 +84,6 @@ export function vendorRefusalClass(error) {
103
84
  const value = error[VENDOR_REFUSAL_CLASS];
104
85
  return value === "account_standing" || value === "vendor" ? value : "unknown";
105
86
  }
106
- /** Marks the refusal class with the adapter's OWN answer; otherwise the required member */
107
- /** would ask the vendor a question whose answer goes nowhere. */
108
87
  export async function withRefusalClass(backend, call) {
109
88
  try {
110
89
  return await call();
@@ -113,4 +92,3 @@ export async function withRefusalClass(backend, call) {
113
92
  throw markVendorRefusal(error, backend.classifyRefusal(error));
114
93
  }
115
94
  }
116
- //# sourceMappingURL=vendor-response.js.map
@@ -1,13 +1,9 @@
1
1
  import { z } from "zod";
2
2
  import { type UgcDeliveryRecord } from "./ugc-delivery.js";
3
- /** The delivered video's measured frame in pixels; a run whose file was not measured has none. */
4
3
  export declare const runVideo: z.ZodObject<{
5
4
  width: z.ZodNumber;
6
5
  height: z.ZodNumber;
7
6
  }, z.core.$strict>;
8
7
  export type RunVideo = z.infer<typeof runVideo>;
9
- /** The size measured on the delivered file, read from the stored output; never from the request, and `null` when unknown. */
10
- /** `sealed` checks a delivery proof's seal: `measuredRunVideo` in the `./idempotency` subpath passes it. */
11
8
  export declare function measuredVideoSize(finalOutput: unknown, sealed: (proof: UgcDeliveryRecord) => boolean): RunVideo | null;
12
- /** The short name of a measured size: `720p`, `1080p`, `4K`; any other size is named by its pixels. */
13
9
  export declare function videoResolutionLabel(size: RunVideo): string;
@@ -1,33 +1,26 @@
1
1
  import { z } from "zod";
2
2
  import { ugcDeliveryRecordSchema } from "./ugc-delivery.js";
3
3
  const side = z.number().int().positive().safe();
4
- /** The delivered video's measured frame in pixels; a run whose file was not measured has none. */
5
4
  export const runVideo = z.strictObject({ width: side, height: side });
6
5
  const record = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
7
- /** The size measured on the delivered file, read from the stored output; never from the request, and `null` when unknown. */
8
- /** `sealed` checks a delivery proof's seal: `measuredRunVideo` in the `./idempotency` subpath passes it. */
9
6
  export function measuredVideoSize(finalOutput, sealed) {
10
7
  const output = record(finalOutput);
11
8
  if (output === null)
12
9
  return null;
13
10
  const proof = ugcDeliveryRecordSchema.safeParse(output.ugc_delivery_evidence);
14
11
  if (proof.success) {
15
- // The proof counts only sealed and for the file the output names: a later delivery of the run replaces it.
16
12
  const { videoKey, durationSec, width, height } = proof.data.record;
17
13
  return sealed(proof.data) && videoKey === output.video_key && durationSec === output.duration_seconds ? { width, height } : null;
18
14
  }
19
- // A proof that is present but unreadable is not a measurement either.
20
15
  if (output.ugc_delivery_evidence !== undefined)
21
16
  return null;
22
17
  const size = runVideo.safeParse({ width: output.width, height: output.height });
23
18
  return size.success ? size.data : null;
24
19
  }
25
20
  const NAMED_SHORT_SIDES = [480, 540, 720, 1080, 1440];
26
- /** The short name of a measured size: `720p`, `1080p`, `4K`; any other size is named by its pixels. */
27
21
  export function videoResolutionLabel(size) {
28
22
  const short = Math.min(size.width, size.height);
29
23
  if (short === 2160)
30
24
  return "4K";
31
25
  return NAMED_SHORT_SIDES.includes(short) ? `${short}p` : `${size.width}×${size.height}`;
32
26
  }
33
- //# sourceMappingURL=video-size.js.map