@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
package/dist/actors.js CHANGED
@@ -5,28 +5,21 @@ import { sharpCropOf } from "./scene-place.js";
5
5
  import { ACTOR_FOR_GENDER, actorId, ASPECT_RATIOS, LEGACY_RUN_RESOLUTION, RESOLUTIONS } from "./skills.js";
6
6
  import { defaultVoiceOf, DEFAULT_VOICE_PRESET, speaksOwnVoices, VOICE_PRESETS } from "./voices.js";
7
7
  export const ACTORS_PATH = "/v1/actors";
8
- /** An account's personal actor: the quote is free, the run is paid. The API routes repeat */
9
- /** these paths as literals, and a test keeps them equal. */
10
8
  export const CREATE_ACTOR_QUOTE_PATH = "/v1/skills/create_actor/quote";
11
9
  export const CREATE_ACTOR_RUN_PATH = "/v1/skills/create_actor/run";
12
- /** A catalog actor's picture on the API's own host (#1125): short, stable and unsigned, so chat clients show it inline. */
13
10
  export const ACTOR_PREVIEW_PATH = "/v1/public/actor-previews/:actor_id/:version/:file";
14
- /** One file name per view of a version: `9x16`, `9x16-wide-mic`, `16x9-left`. */
15
11
  export function actorPreviewFile(view) {
16
12
  return `${[view.aspect_ratio.replace(":", "x"), view.framing, view.gaze, view.prop].filter(Boolean).join("-")}.png`;
17
13
  }
18
14
  export function actorPreviewUrl(origin, actor, view) {
19
15
  return `${origin}/v1/public/actor-previews/${encodeURIComponent(actor.actor_id)}/${actor.version}/${actorPreviewFile(view)}`;
20
16
  }
21
- /** The path of one actor. The id is encoded, since it comes from the caller. */
22
17
  export function actorItemPath(id) {
23
18
  return `${ACTORS_PATH}/${encodeURIComponent(id)}`;
24
19
  }
25
- // Default portrait dimensions and gender were measured on 2026-09-09 (#64, D50).
26
20
  export const DEFAULT_ACTOR_SOURCE = { width: 432, height: 768, origin: "default" };
27
21
  export const DEFAULT_ACTOR = { gender: "male" };
28
22
  export const DEFAULT_ACTOR_GENDER = DEFAULT_ACTOR.gender;
29
- /** actor_gender without image or actor_id becomes that gender's catalogue actor, named in warnings[] (rule 3): quote and run read the same input. */
30
23
  export function settleActorGender(input) {
31
24
  const gender = input.actor_gender;
32
25
  if (gender === undefined || input.image !== undefined || input.actor_id !== undefined || input.person !== undefined)
@@ -37,7 +30,6 @@ export function settleActorGender(input) {
37
30
  "from list_actors; pass actor_id to pick another"] };
38
31
  }
39
32
  export const DEFAULT_PRESENTER_WARNING = "no presenter was chosen: the default presenter is a man; pass actor_gender, or actor_id from list_actors, to pick another";
40
- /** With no presenter named the default actor, a man, presents: said in warnings[] with how to pick another. */
41
33
  export function defaultPresenterWarnings(input) {
42
34
  return input.image === undefined && input.actor_id === undefined && input.actor_gender === undefined && input.person === undefined
43
35
  ? [DEFAULT_PRESENTER_WARNING] : [];
@@ -51,8 +43,6 @@ export function actorForInput(input, selected) {
51
43
  }
52
44
  return input.image === undefined ? DEFAULT_ACTOR : null;
53
45
  }
54
- /** Gender for the default voice: `actor_id` → pin; `image` → `actor_gender`; else the default actor. */
55
- /** Only from the same actor's pin, not the catalog: personal actors are not in it. */
56
46
  export function voiceGenderFor(input, pin) {
57
47
  if (input.actor_id !== undefined) {
58
48
  if (pin?.actor_id !== input.actor_id) {
@@ -64,7 +54,6 @@ export function voiceGenderFor(input, pin) {
64
54
  }
65
55
  export const IMAGE_DEFAULT_VOICE_WARNING = `no voice was chosen for the face in image: the default ${VOICE_PRESETS[DEFAULT_VOICE_PRESET].gender} ` +
66
56
  `voice "${DEFAULT_VOICE_PRESET}" is used; pass voice (from list_voices) or actor_gender to match the face`;
67
- /** The same warning for the run's model: a model with its own voices names its default and where its voices are listed. */
68
57
  export function imageDefaultVoiceWarning(ttsModel) {
69
58
  if (!speaksOwnVoices(ttsModel))
70
59
  return IMAGE_DEFAULT_VOICE_WARNING;
@@ -80,14 +69,11 @@ export function voiceActorGenderWarning(voice, voiceGender, actorGender) {
80
69
  `so the face and the voice will not match. Choose a ${actorGender} voice from list_voices, ` +
81
70
  "or another actor, if that is not what you want.");
82
71
  }
83
- /** The actor's gender WITHOUT throwing: a pin's comes from the snapshot, not the catalog. */
84
72
  function actorGenderOf(input, pinGender) {
85
73
  if (input.actor_id !== undefined)
86
74
  return pinGender;
87
75
  return input.image === undefined ? DEFAULT_ACTOR_GENDER : input.actor_gender;
88
76
  }
89
- /** An explicit voice is used as requested, but a mismatch with the actor's gender is */
90
- /** NAMED in warnings, never left silent. */
91
77
  export function buildVoiceActorMatchWarnings(input, voiceGenderOf, pinGender) {
92
78
  if (input.voice === undefined)
93
79
  return [];
@@ -97,7 +83,6 @@ export function buildVoiceActorMatchWarnings(input, voiceGenderOf, pinGender) {
97
83
  return [];
98
84
  return [voiceActorGenderWarning(input.voice, voiceGender, actorGender)];
99
85
  }
100
- /** Reads input fields only, without the pin: the run path calls it on the stored input. */
101
86
  export function buildActorGenderWarnings(input) {
102
87
  const explicit = input.voice_id !== undefined ? "voice_id" : input.voice !== undefined ? "voice" : undefined;
103
88
  if (input.actor_gender !== undefined) {
@@ -105,13 +90,10 @@ export function buildActorGenderWarnings(input) {
105
90
  }
106
91
  return input.image !== undefined && explicit === undefined ? [imageDefaultVoiceWarning(input.tts_model)] : [];
107
92
  }
108
- /** The presenter's framing as rendered: the view admission pinned, close without one (#884 S5d). */
109
93
  export function renderedPresenterFraming(pin) {
110
94
  const framing = pin?.asset?.framing;
111
95
  return framing === "wide" || framing === "full" ? framing : "close";
112
96
  }
113
- /** presenter_place's face on a view whose face is known small (a full view, a personal actor's wide view): when even the least crop it needs is
114
- * past what the portrait holds sharp, the quote says the presenter is framed wider (#1196), before the run measures the exact face. */
115
97
  function presenterPlaceSoftness(input, pin) {
116
98
  const place = input.presenter_place, asset = pin?.asset, view = renderedPresenterFraming(pin);
117
99
  const largest = view === "full" ? ACTOR_FULL_PORTRAIT_FACE_HEIGHT
@@ -125,8 +107,6 @@ function presenterPlaceSoftness(input, pin) {
125
107
  return `presenter_place face height ${place.face_height.toFixed(2)}: the actor's ${view} portrait shows the face under ${largest} of its height, so a ` +
126
108
  `crop that tight would be soft; the presenter is framed wider, at face height ${(largest * Math.max(1, sharp)).toFixed(2)} or less`;
127
109
  }
128
- /** What a wide, full or mic request did not get, one line each, read from the pin admission made: a view is pinned only when drawn (#884 S5d, */
129
- /** rule 3). A take is never widened or cropped to match: a full framing[] size on a narrower take names it (#1175 S7). */
130
110
  export function presenterViewWarnings(input, pin) {
131
111
  const warnings = [];
132
112
  const whose = pin?.actor_id === undefined ? undefined : `${actorIdScope(pin.actor_id) === "account" ? "personal actor" : "actor"} ${pin.actor_id}`;
@@ -184,4 +164,3 @@ export const actorCatalogEntry = z.object({
184
164
  })).min(1),
185
165
  });
186
166
  export const actorsResponse = z.object({ actors: z.array(actorCatalogEntry) });
187
- //# sourceMappingURL=actors.js.map
package/dist/ad-guide.js CHANGED
@@ -1,7 +1,5 @@
1
1
  import { z } from "zod";
2
- // The ad guide (#1539 P3): short rules for an agent building an ad with make_ugc, served read-only and free.
3
2
  export const AD_GUIDE_PATH = "/v1/ad-guide";
4
3
  export const adGuide = z.strictObject({
5
4
  guide: z.string().min(1).describe("The ad guide, Markdown: the word → device catalogue, the hook, poses, live shots, captions, hands and density"),
6
5
  });
7
- //# sourceMappingURL=ad-guide.js.map
@@ -1,5 +1,4 @@
1
1
  import type { PauseTrimTargets } from "./reference-voice.js";
2
- /** The pauses a run with templates, scenes or live shots is cut down to when it names no pause_trim. */
3
2
  export declare const AD_PAUSE_TRIM: Readonly<{
4
3
  sentence_end_s: 0.15;
5
4
  comma_s: 0.08;
@@ -13,15 +12,11 @@ interface AdStyleInput {
13
12
  interview?: unknown;
14
13
  format?: string | undefined;
15
14
  }
16
- /** A video that cuts graphics or live shots on its words; an interview keeps its own pauses. */
17
15
  export declare const isAdStyleUgcInput: (input: AdStyleInput) => boolean;
18
- /** The pauses a faceless narration is cut to (#1228): the call's own, `false` to keep them, else the ad default when the video draws on its */
19
- /** words. Read from the stored request by the quote, the run and its warnings alike, so any faceless format resolves it the same way. */
20
16
  export declare function facelessPauseTrim(input: AdStyleInput): PauseTrimTargets | false | undefined;
21
17
  export declare const facelessPauseTrimWarnings: (input: Omit<AdStyleInput, "pause_trim"> & {
22
18
  pause_trim?: unknown;
23
19
  }) => string[];
24
- /** The request with the default pinned and marked, so the run and its record say it; a run that named pause_trim, false included, is left as asked. */
25
20
  export declare function withAdPauseTrim<T extends AdStyleInput>(input: T): T & {
26
21
  pause_trim_source?: "ad_default";
27
22
  };
@@ -1,24 +1,16 @@
1
- // Ad-style runs trim narration pauses by default (#1136): graphics and live shots cut on the words, and long pauses read as a slow ad.
2
- /** The pauses a run with templates, scenes or live shots is cut down to when it names no pause_trim. */
3
1
  export const AD_PAUSE_TRIM = Object.freeze({ sentence_end_s: 0.15, comma_s: 0.08 });
4
2
  export const AD_PAUSE_TRIM_WARNING = `pause_trim: narration pauses are shortened to ${AD_PAUSE_TRIM.sentence_end_s} s after a sentence and ` +
5
3
  `${AD_PAUSE_TRIM.comma_s} s after a comma, the default for a video with graphics or live shots; pass pause_trim false to keep every pause, ` +
6
4
  "or your own targets";
7
- /** A video that cuts graphics or live shots on its words; an interview keeps its own pauses. */
8
5
  export const isAdStyleUgcInput = (input) => input.interview === undefined &&
9
6
  [input.templates, input.scenes, input.shots].some(items => (items?.length ?? 0) > 0);
10
- /** A faceless video drawn on its words: one with templates, scenes or shots, or an explainer, whose scenes land word by word (#1216). */
11
7
  const facelessDrawsOnWords = (input) => input.format === "explainer" || isAdStyleUgcInput({ templates: input.templates, scenes: input.scenes, shots: input.shots });
12
- /** The pauses a faceless narration is cut to (#1228): the call's own, `false` to keep them, else the ad default when the video draws on its */
13
- /** words. Read from the stored request by the quote, the run and its warnings alike, so any faceless format resolves it the same way. */
14
8
  export function facelessPauseTrim(input) {
15
9
  return input.pause_trim ?? (facelessDrawsOnWords(input) ? { ...AD_PAUSE_TRIM } : undefined);
16
10
  }
17
11
  export const facelessPauseTrimWarnings = (input) => input.pause_trim === undefined && facelessDrawsOnWords(input) ? [AD_PAUSE_TRIM_WARNING] : [];
18
- /** The request with the default pinned and marked, so the run and its record say it; a run that named pause_trim, false included, is left as asked. */
19
12
  export function withAdPauseTrim(input) {
20
13
  if (input.pause_trim !== undefined || !isAdStyleUgcInput(input))
21
14
  return input;
22
15
  return { ...input, pause_trim: { ...AD_PAUSE_TRIM }, pause_trim_source: "ad_default" };
23
16
  }
24
- //# sourceMappingURL=ad-pause-trim.js.map
@@ -1,17 +1,13 @@
1
1
  import { z } from "zod";
2
2
  import { workflowCommandErrorRead } from "./contracts/v1/workflow-execution.js";
3
- /** Rate-limit failure: a 429 from us or from a proxy or edge in between. */
4
3
  export interface RateLimitedFailure extends WorkflowDiagnostics {
5
4
  kind: "rate_limited";
6
5
  status: number;
7
6
  message: string;
8
- /** Seconds to wait before retrying; `undefined` when the server did not say. */
9
7
  retryAfterSeconds: number | undefined;
10
- /** Bucket size. Only our own body carries it; a proxy body does not. */
11
8
  limit: number | undefined;
12
9
  windowSeconds: number | undefined;
13
10
  }
14
- /** Fewer credits than the run weighs. Terminal: a retry does not change the balance. */
15
11
  export interface InsufficientCreditsFailure {
16
12
  kind: "insufficient_credits";
17
13
  status: number;
@@ -19,7 +15,6 @@ export interface InsufficientCreditsFailure {
19
15
  balanceCredits: number;
20
16
  requiredCredits: number;
21
17
  }
22
- /** The call's reserve is above the ceiling it was sent with. Terminal for this ceiling: a person approves a higher one. */
23
18
  export interface MaxCreditsExceededFailure {
24
19
  kind: "max_credits_exceeded";
25
20
  status: number;
@@ -27,29 +22,23 @@ export interface MaxCreditsExceededFailure {
27
22
  holdCredits: number;
28
23
  maxCredits: number;
29
24
  }
30
- /** Outstanding debt. Terminal; buying credits clears it, since incoming credits pay debt first. */
31
- /** Kept apart from `insufficient_credits` because an indebted account may still hold a balance. */
32
25
  export interface DebtOutstandingFailure {
33
26
  kind: "debt_outstanding";
34
27
  status: number;
35
28
  message: string;
36
29
  debtCredits: number;
37
30
  }
38
- /** Account not admitted to the beta. Terminal, and money does not fix it. */
39
- /** Not a `client_error`: there is nothing in the call to fix, so the advice differs. */
40
31
  export interface NotAdmittedFailure {
41
32
  kind: "not_admitted";
42
33
  status: number;
43
34
  message: string;
44
35
  }
45
- /** A save of a draft lost to another save. Terminal for this body: `version` is what is stored now. */
46
36
  export interface EditConflictFailure {
47
37
  kind: "edit_conflict";
48
38
  status: number;
49
39
  message: string;
50
40
  version: number;
51
41
  }
52
- /** The run has no draft to read or to save: `state` and `reason` are the ones its shots state. */
53
42
  export interface RunNotEditableFailure {
54
43
  kind: "run_not_editable";
55
44
  status: number;
@@ -57,18 +46,14 @@ export interface RunNotEditableFailure {
57
46
  state: string;
58
47
  reason: string | null;
59
48
  }
60
- /** Paid edits are closed. Terminal until paid edits open: a retry is refused the same way. */
61
49
  export interface EditingClosedFailure {
62
50
  kind: "editing_closed";
63
51
  status: number;
64
52
  message: string;
65
53
  code: string;
66
- /** `flag_off`, `ceiling_not_set`, or a reason of a newer server; null when the code carries none. */
67
54
  reason: string | null;
68
- /** The price seams still unset, on `editing_not_priced`. */
69
55
  seams: string[] | null;
70
56
  }
71
- /** A root has as many revisions running, or failed and unfinished, as it may; `runIds` are the ones counted. */
72
57
  export interface EditCeilingReachedFailure {
73
58
  kind: "edit_ceiling_reached";
74
59
  status: number;
@@ -79,7 +64,6 @@ export interface EditCeilingReachedFailure {
79
64
  counted: number;
80
65
  runIds: string[];
81
66
  }
82
- /** One rule of the run an edit document breaks, as the validator states it. */
83
67
  export interface EditIssueRead {
84
68
  code: string;
85
69
  message: string;
@@ -87,7 +71,6 @@ export interface EditIssueRead {
87
71
  from_frame?: number | undefined;
88
72
  to_frame?: number | undefined;
89
73
  }
90
- /** The document breaks the rules of the run it edits; `issues` are in the server's order. */
91
74
  export interface EditInvalidFailure {
92
75
  kind: "edit_invalid";
93
76
  status: number;
@@ -108,53 +91,33 @@ export type WorkflowFailure = {
108
91
  warnings: string[];
109
92
  };
110
93
  }[WorkflowFailureKind];
111
- /** 5xx: the server says the fault is its own. Safe to retry. */
112
94
  export interface ServerFailure extends WorkflowDiagnostics {
113
95
  kind: "server_error";
114
96
  status: number;
115
97
  message: string;
116
98
  retryAfterSeconds: number | undefined;
117
99
  }
118
- /** Everything else (4xx): repeating the same request gives the same answer. */
119
100
  export interface ClientFailure extends WorkflowDiagnostics {
120
101
  kind: "client_error";
121
102
  status: number;
122
103
  message: string;
123
- /** Code from the body, if the body followed the contract at all. */
124
104
  code: string | undefined;
125
105
  }
126
106
  export type ApiFailure = RateLimitedFailure | InsufficientCreditsFailure | MaxCreditsExceededFailure | DebtOutstandingFailure | NotAdmittedFailure | EditConflictFailure | RunNotEditableFailure | EditingClosedFailure | EditCeilingReachedFailure | EditInvalidFailure | WorkflowFailure | ServerFailure | ClientFailure;
127
- /** Retry decision in one place. Not retrying a 429 aborts a paid run; retrying a 402 */
128
- /** loops on a money refusal and burns the rate limit. */
129
107
  export declare function isRetryableFailure(failure: ApiFailure): boolean;
130
- /** Delay before a retry, ms. `fallbackMs` is also the floor: no `Retry-After` does not */
131
- /** permit polling faster than usual. Meaningful only after `isRetryableFailure`. */
132
108
  export declare function retryDelayMs(failure: ApiFailure, fallbackMs: number): number;
133
- /** `Retry-After` in seconds, both RFC 9110 forms: our middleware sends a delta, proxies */
134
- /** often send an HTTP-date. `now` is a parameter so date parsing stays testable. */
135
109
  export declare function parseRetryAfterSeconds(raw: string | null | undefined, now: Date): number | undefined;
136
110
  export interface ApiFailureInput {
137
111
  status: number;
138
- /** Raw body text; `res.json()` throws on HTML. `undefined` means the body could not */
139
- /** be read, which differs from an empty or foreign body. */
140
112
  bodyText: string | undefined;
141
- /** The `Retry-After` header value as the server sent it. */
142
113
  retryAfterHeader?: string | null | undefined;
143
- /** Reference time for the HTTP-date form. */
144
114
  now?: Date;
145
115
  }
146
- /** Status + body + header to an actionable failure. The body refines the status but never */
147
- /** overrides it; on a mismatch the class comes from the status, the text from the body. */
148
116
  export declare function parseApiFailure(input: ApiFailureInput): ApiFailure;
149
- /** Failure expanded for an agent: numbers, an imperative and a retry flag, in the same */
150
- /** `next_action` shape as `make_ugc` and `get_run`. Built once for MCP, CLI and SDK. */
151
117
  export interface AgentFailureReport {
152
- /** Imperative: repeat this same call later, or stop. */
153
118
  status: "RETRY_LATER" | "FAILED";
154
- /** Machine-readable reason; `http_<status>` for foreign bodies. */
155
119
  code: string;
156
120
  message: string;
157
- /** Duplicates `status` for code paths: a string is easy to compare wrongly. */
158
121
  retryable: boolean;
159
122
  next_action: string;
160
123
  retry_after_seconds?: number;
@@ -163,28 +126,21 @@ export interface AgentFailureReport {
163
126
  balance_credits?: number;
164
127
  required_credits?: number;
165
128
  debt_credits?: number;
166
- /** What the call reserves and the ceiling it was sent with, on `max_credits_exceeded`. */
167
129
  hold_credits?: number;
168
130
  max_credits?: number;
169
- /** The stored version of a draft, on `edit_conflict`. */
170
131
  version?: number;
171
- /** Why a run has no draft, on `run_not_editable`; why paid edits are closed, on `editing_closed`. */
172
132
  state?: string;
173
133
  reason?: string | null;
174
- /** The unset price seams, on `editing_closed`. `limit` stays the rate limit's bucket size. */
175
134
  seams?: string[] | null;
176
- /** Which revision ceiling a root reached, with its root, bound, count and the runs counted. */
177
135
  ceiling?: string;
178
136
  root_run_id?: string;
179
137
  allowed?: number;
180
138
  counted?: number;
181
139
  run_ids?: string[];
182
- /** The rules an edit or workflow document breaks. */
183
140
  issues?: EditIssueRead[] | WorkflowFailure["issues"];
184
141
  warnings?: string[];
185
142
  }
186
143
  export declare const UPLOAD_NOT_FINISHED_NEXT_ACTION: string;
187
- /** A refused key is fixed by the human, not by changing the call: `get_account` takes no arguments to fix. */
188
144
  export declare const UNAUTHORIZED_NEXT_ACTION: string;
189
145
  export declare function agentFailureReport(failure: ApiFailure): AgentFailureReport;
190
146
  export {};
@@ -3,13 +3,9 @@ import { accountNotAdmittedError, apiError, debtOutstandingError, editCeilingRea
3
3
  import { PUBLIC_APP_BASE_URL } from "./public-endpoints.js";
4
4
  import { rateLimitedError } from "./rate-limit.js";
5
5
  import { workflowCommandErrorRead } from "./contracts/v1/workflow-execution.js";
6
- /** Retry decision in one place. Not retrying a 429 aborts a paid run; retrying a 402 */
7
- /** loops on a money refusal and burns the rate limit. */
8
6
  export function isRetryableFailure(failure) {
9
7
  return failure.kind === "rate_limited" || failure.kind === "server_error";
10
8
  }
11
- /** Delay before a retry, ms. `fallbackMs` is also the floor: no `Retry-After` does not */
12
- /** permit polling faster than usual. Meaningful only after `isRetryableFailure`. */
13
9
  export function retryDelayMs(failure, fallbackMs) {
14
10
  const fromServer = failure.kind === "rate_limited" || failure.kind === "server_error"
15
11
  ? failure.retryAfterSeconds
@@ -33,17 +29,10 @@ const MONTHS = [
33
29
  const MONTH = MONTHS.join("|");
34
30
  const DAY_SHORT = "Mon|Tue|Wed|Thu|Fri|Sat|Sun";
35
31
  const DAY_LONG = "Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday";
36
- /** IMF-fixdate: `Sun, 06 Nov 1994 08:49:37 GMT` — the form senders MUST use. */
37
32
  const IMF_FIXDATE = new RegExp(`^(?:${DAY_SHORT}), (\\d{2}) (${MONTH}) (\\d{4}) (\\d{2}):(\\d{2}):(\\d{2}) GMT$`);
38
- /** RFC 850: `Sunday, 06-Nov-94 08:49:37 GMT` — obsolete, but recipients must accept it. */
39
33
  const RFC850_DATE = new RegExp(`^(?:${DAY_LONG}), (\\d{2})-(${MONTH})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2}) GMT$`);
40
- /** asctime: `Sun Nov 6 08:49:37 1994` — also obsolete and also mandatory. */
41
34
  const ASCTIME_DATE = new RegExp(`^(?:${DAY_SHORT}) (${MONTH}) ([ \\d]\\d) (\\d{2}):(\\d{2}):(\\d{2}) (\\d{4})$`);
42
- /** HTTP-date to epoch ms: the three RFC 9110 §5.6.7 forms, built via `Date.UTC`, not `Date.parse`, */
43
- /** which misreads two-digit years and treats asctime as local time. Near-miss spellings are rejected. */
44
35
  function httpDateToEpochMs(raw, now) {
45
- /** `Date.UTC` normalizes invalid fields (July 32 becomes August 1), so fields are range-checked. */
46
- /** Second 60 is allowed on purpose: RFC 9110 permits a leap second. */
47
36
  const utc = (year, month, day, h, m, s) => {
48
37
  const monthIndex = MONTHS.indexOf(month);
49
38
  const dayNumber = Number.parseInt(day, 10);
@@ -54,12 +43,8 @@ function httpDateToEpochMs(raw, now) {
54
43
  return undefined;
55
44
  if (dayNumber < 1)
56
45
  return undefined;
57
- // `Date.UTC` maps years 0–99 to 1900+year, turning a garbage date into a zero wait.
58
- // HTTP dates never precede 1900.
59
46
  if (year < 1900)
60
47
  return undefined;
61
- // The calendar is checked at midnight, apart from the time of day, so a leap
62
- // second at 23:59:60 does not roll the day over and look invalid.
63
48
  const midnight = new Date(Date.UTC(year, monthIndex, dayNumber));
64
49
  if (midnight.getUTCDate() !== dayNumber || midnight.getUTCMonth() !== monthIndex) {
65
50
  return undefined;
@@ -74,8 +59,6 @@ function httpDateToEpochMs(raw, now) {
74
59
  const rfc850 = RFC850_DATE.exec(raw);
75
60
  if (rfc850 !== null) {
76
61
  const [, day, month, shortYear, h, m, s] = rfc850;
77
- // RFC 9110 century rule: use the current century, and step back a hundred years
78
- // only if that lands more than 50 years in the future.
79
62
  const nowYear = now.getUTCFullYear();
80
63
  let year = Math.floor(nowYear / 100) * 100 + Number.parseInt(shortYear, 10);
81
64
  if (year - nowYear > 50)
@@ -89,8 +72,6 @@ function httpDateToEpochMs(raw, now) {
89
72
  }
90
73
  return undefined;
91
74
  }
92
- /** `Retry-After` in seconds, both RFC 9110 forms: our middleware sends a delta, proxies */
93
- /** often send an HTTP-date. `now` is a parameter so date parsing stays testable. */
94
75
  export function parseRetryAfterSeconds(raw, now) {
95
76
  if (raw === null || raw === undefined)
96
77
  return undefined;
@@ -101,18 +82,12 @@ export function parseRetryAfterSeconds(raw, now) {
101
82
  const seconds = Number.parseInt(trimmed, 10);
102
83
  return Number.isSafeInteger(seconds) ? seconds : undefined;
103
84
  }
104
- // A strict grammar, not `Date.parse`: V8's legacy parser turns garbage like "-5"
105
- // into a date, which would become a wait of decades.
106
85
  const at = httpDateToEpochMs(trimmed, now);
107
86
  if (at === undefined || Number.isNaN(at))
108
87
  return undefined;
109
- // A past date means "now": zero, never negative.
110
88
  return Math.max(0, Math.ceil((at - now.getTime()) / 1000));
111
89
  }
112
- /** How many characters of a foreign body to carry into the message. */
113
90
  const BODY_EXCERPT_LIMIT = 200;
114
- /** One-line excerpt of an unreadable body, so "HTTP 429" carries a hint like "error code: 1015". */
115
- /** Truncated because an HTML error page can run to tens of kilobytes. */
116
91
  function excerpt(bodyText) {
117
92
  if (bodyText === undefined)
118
93
  return undefined;
@@ -121,7 +96,6 @@ function excerpt(bodyText) {
121
96
  return undefined;
122
97
  return flat.length > BODY_EXCERPT_LIMIT ? `${flat.slice(0, BODY_EXCERPT_LIMIT)}…` : flat;
123
98
  }
124
- /** `JSON.parse` that never throws: nothing promises a proxy body is JSON. */
125
99
  function safeJson(bodyText) {
126
100
  if (bodyText === undefined)
127
101
  return undefined;
@@ -132,15 +106,11 @@ function safeJson(bodyText) {
132
106
  return undefined;
133
107
  }
134
108
  }
135
- /** Codes that drive client behavior, not just text. Derived from the schema literals, */
136
- /** so a rename in `errors.ts` or `rate-limit.ts` reaches here on its own. */
137
109
  const BEHAVIOURAL_CODES = new Set([
138
110
  rateLimitedError.shape.error.shape.code.value,
139
111
  insufficientCreditsError.shape.error.shape.code.value,
140
112
  maxCreditsExceededError.shape.error.shape.code.value,
141
113
  debtOutstandingError.shape.error.shape.code.value,
142
- // Recognized only on its own status, like the three above, so a cached body on a
143
- // 402 cannot tell the agent that buying credits is pointless.
144
114
  accountNotAdmittedError.shape.error.shape.code.value,
145
115
  editConflictError.shape.error.shape.code.value,
146
116
  runNotEditableError.shape.error.shape.code.value,
@@ -151,8 +121,6 @@ const BEHAVIOURAL_CODES = new Set([
151
121
  editInvalidError.shape.error.shape.code.value,
152
122
  ...workflowCommandErrorRead.shape.error.shape.code.options,
153
123
  ]);
154
- // The revision refusals are read with their closed vocabularies open: a reason, limit or issue code
155
- // a newer server adds must not turn a refusal into a retryable `server_error`.
156
124
  const editingClosedRead = z.union([
157
125
  z.object({ error: editingDisabledError.shape.error.extend({ reason: z.string().min(1) }) }),
158
126
  z.object({ error: editingNotPricedError.shape.error.extend({ seams: z.array(z.string().min(1)) }) }),
@@ -164,8 +132,6 @@ const editInvalidRead = z.object({
164
132
  issues: z.array(editInvalidError.shape.error.shape.issues.element.extend({ code: z.string().min(1) })).min(1),
165
133
  }),
166
134
  });
167
- /** Status + body + header to an actionable failure. The body refines the status but never */
168
- /** overrides it; on a mismatch the class comes from the status, the text from the body. */
169
135
  export function parseApiFailure(input) {
170
136
  const { status, bodyText } = input;
171
137
  const now = input.now ?? new Date();
@@ -209,8 +175,6 @@ export function parseApiFailure(input) {
209
175
  debtCredits: error.debt_credits,
210
176
  };
211
177
  }
212
- // The admission gate is recognized on 403 only; without this branch the code,
213
- // being in `BEHAVIOURAL_CODES`, would be suppressed even on an honest 403.
214
178
  const notAdmitted = status === 403 ? accountNotAdmittedError.safeParse(body) : undefined;
215
179
  if (notAdmitted?.success === true) {
216
180
  return {
@@ -219,7 +183,6 @@ export function parseApiFailure(input) {
219
183
  message: notAdmitted.data.error.message,
220
184
  };
221
185
  }
222
- // The two refusals of a draft are recognized on 409 only, each with the fields the caller acts on.
223
186
  const conflict = status === 409 ? editConflictError.safeParse(body) : undefined;
224
187
  if (conflict?.success === true) {
225
188
  const { error } = conflict.data;
@@ -230,7 +193,6 @@ export function parseApiFailure(input) {
230
193
  const { error } = notEditable.data;
231
194
  return { kind: "run_not_editable", status, message: error.message, state: error.state, reason: error.reason };
232
195
  }
233
- // The revision refusals, each on its own status: a closed door is not a server fault and is not retried.
234
196
  const closed = status === 503 ? editingClosedRead.safeParse(body) : undefined;
235
197
  if (closed?.success === true) {
236
198
  const { error } = closed.data;
@@ -253,14 +215,10 @@ export function parseApiFailure(input) {
253
215
  const { error } = workflow.data;
254
216
  return { kind: error.code, status, message: error.message, issues: error.issues, warnings: error.warnings };
255
217
  }
256
- // From here the body is foreign or unparsed. The generic envelope still gives
257
- // text and code; otherwise the message is built from the status.
258
218
  const generic = apiError.safeParse(body);
259
219
  const message = generic.success
260
220
  ? generic.data.error.message
261
221
  : messageFromStatus(status, bodyText);
262
- // A behavioral code off its own status is dropped, or the report would pair
263
- // "rate_limited" with `retryable: false`. The body text still reaches `message`.
264
222
  const rawCode = generic.success ? generic.data.error.code : undefined;
265
223
  const code = rawCode !== undefined && BEHAVIOURAL_CODES.has(rawCode) ? undefined : rawCode;
266
224
  const diagnostics = workflow.success ? { issues: workflow.data.error.issues, warnings: workflow.data.error.warnings } : {};
@@ -275,7 +233,6 @@ export function parseApiFailure(input) {
275
233
  windowSeconds: undefined,
276
234
  };
277
235
  }
278
- // A closed door is not a server fault: its code reaches the agent, and a retry would not open it (clipwright#724, #758).
279
236
  if (status === 503 && (code === "generations_disabled" || code === "generations_marking_pending" || code === "assets_disabled"
280
237
  || code === "url_import_disabled")) {
281
238
  return { kind: "client_error", ...diagnostics, status, message, code };
@@ -285,15 +242,10 @@ export function parseApiFailure(input) {
285
242
  }
286
243
  return { kind: "client_error", ...diagnostics, status, message, code };
287
244
  }
288
- /** Message when the body said nothing usable, instead of a parser `SyntaxError` */
289
- /** that looks like a client bug where the server honestly answered 429. */
290
245
  function messageFromStatus(status, bodyText) {
291
- // An unread body says nothing about who answered, so no source is guessed.
292
246
  if (bodyText === undefined) {
293
247
  return `HTTP ${status}: the response body could not be read, so the reason is only known by status`;
294
248
  }
295
- // The source is not named here either: our server or any hop may send a foreign
296
- // body. The excerpt lets the reader see who answered.
297
249
  const tail = excerpt(bodyText);
298
250
  const head = status === 429
299
251
  ? "HTTP 429: too many requests, and the body did not carry a Clipwright error object"
@@ -303,7 +255,6 @@ function messageFromStatus(status, bodyText) {
303
255
  export const UPLOAD_NOT_FINISHED_NEXT_ACTION = "Finish the upload first: PUT the file to the put_url from create_upload with the given put_headers, confirm it " +
304
256
  "with get_upload, then repeat this call. If the message says the upload is finishing, the file is already there: " +
305
257
  "wait a few seconds and repeat. Nothing was charged and no run was created.";
306
- /** A refused key is fixed by the human, not by changing the call: `get_account` takes no arguments to fix. */
307
258
  export const UNAUTHORIZED_NEXT_ACTION = "STOP. Clipwright did not accept this connection's key or sign-in: it is missing, mistyped or revoked. Nothing was " +
308
259
  `charged. With a key, the human creates a new one at ${PUBLIC_APP_BASE_URL}/api-keys (a new account at ` +
309
260
  `${PUBLIC_APP_BASE_URL}/auth/sign-up comes with trial credits), puts it in the MCP server's environment as ` +
@@ -321,8 +272,6 @@ export function agentFailureReport(failure) {
321
272
  status: "RETRY_LATER",
322
273
  code: "rate_limited",
323
274
  retryable: true,
324
- // No claim about money: a 429 can hit a status poll of an already charged run.
325
- // Only the server knows, and its wording arrives in `message`.
326
275
  next_action: seconds === undefined
327
276
  ? "Too many requests. Wait a few seconds, then repeat the SAME call — do not start a new one."
328
277
  : `Too many requests. Wait ${seconds} seconds, then repeat the SAME call — do not start a new one.`,
@@ -337,8 +286,6 @@ export function agentFailureReport(failure) {
337
286
  status: "FAILED",
338
287
  code: "insufficient_credits",
339
288
  retryable: false,
340
- // Numbers repeat in the imperative: the agent shows one line, and the user
341
- // needs them to decide how much to buy.
342
289
  next_action: `STOP. Do NOT retry: this account has ${failure.balanceCredits} credits and the call ` +
343
290
  `needs ${failure.requiredCredits}. Retrying cannot change that. Tell the user to top up ` +
344
291
  "the balance, then call again. Nothing was charged and no run was created.",
@@ -363,8 +310,6 @@ export function agentFailureReport(failure) {
363
310
  status: "FAILED",
364
311
  code: "debt_outstanding",
365
312
  retryable: false,
366
- // Buying credits is the fix: incoming credits clear debt first. The text differs
367
- // from `insufficient_credits` because an indebted account may hold a balance.
368
313
  next_action: `STOP. Do NOT retry: an outstanding debt of ${failure.debtCredits} credits blocks new ` +
369
314
  "paid runs. Tell the user to buy credits — incoming credits clear the debt before any " +
370
315
  "of them reach the balance. Clearing it lifts this block, but the run still needs " +
@@ -379,7 +324,6 @@ export function agentFailureReport(failure) {
379
324
  status: "RETRY_LATER",
380
325
  code: `http_${failure.status}`,
381
326
  retryable: true,
382
- // The source is not named: our server, a corporate gateway and a CDN all send 5xx.
383
327
  next_action: "The call failed with a server-side error. Repeat the SAME call in a few seconds. If it " +
384
328
  "keeps failing, stop and tell the user; do not start a new run with a different " +
385
329
  "idempotency key.",
@@ -392,8 +336,6 @@ export function agentFailureReport(failure) {
392
336
  status: "FAILED",
393
337
  code: "account_not_admitted",
394
338
  retryable: false,
395
- // Nothing in the call to fix and credits do not help. No promise of admission:
396
- // a deleted, anonymized account answers with the same code.
397
339
  next_action: "STOP. The account is not admitted to the beta. Do NOT retry and do NOT offer to buy " +
398
340
  "credits: neither changes the answer. Tell the user the account has no beta access and " +
399
341
  "to contact support about it.",
@@ -404,7 +346,6 @@ export function agentFailureReport(failure) {
404
346
  status: "FAILED",
405
347
  code: "edit_conflict",
406
348
  retryable: false,
407
- // A save repeated after a lost answer meets its own write here, so the advice starts with a read.
408
349
  next_action: `STOP. Do NOT repeat this save unchanged: the draft is at version ${failure.version}, and this call ` +
409
350
  "stored nothing. Read the draft. If it already holds your document, an earlier save of it went " +
410
351
  "through; otherwise apply your change to the draft you read and save it with that draft's version.",
@@ -442,7 +383,6 @@ export function agentFailureReport(failure) {
442
383
  status: "FAILED",
443
384
  code: "edit_ceiling_reached",
444
385
  retryable: false,
445
- // Revisions and shot candidates share this code under separate limits, so the text names neither.
446
386
  next_action: failure.limit === "in_flight"
447
387
  ? `STOP. A paid edit of ${failure.rootRunId} is still running (${runs}); follow it with get_run and start the ` +
448
388
  "next one after it finishes. If get_run says it is held for review, contact support: only support " +
@@ -484,7 +424,6 @@ export function agentFailureReport(failure) {
484
424
  status: "FAILED",
485
425
  code: failure.code ?? `http_${failure.status}`,
486
426
  retryable: false,
487
- // An unfinished presigned upload is fixed by the upload itself, not by changing this call (clipwright#758).
488
427
  next_action: failure.code === "upload_not_finished" ? UPLOAD_NOT_FINISHED_NEXT_ACTION :
489
428
  failure.code === "unauthorized" ? UNAUTHORIZED_NEXT_ACTION :
490
429
  "STOP. Do NOT retry: the request itself was rejected, so repeating it unchanged gives " +
@@ -492,4 +431,3 @@ export function agentFailureReport(failure) {
492
431
  };
493
432
  }
494
433
  }
495
- //# sourceMappingURL=api-failure.js.map