@clipwright/core 0.60.0 → 0.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (596) hide show
  1. package/dist/account-actors.d.ts +0 -43
  2. package/dist/account-actors.js +0 -55
  3. package/dist/account.d.ts +0 -6
  4. package/dist/account.js +0 -18
  5. package/dist/actor-bounds.d.ts +0 -5
  6. package/dist/actor-bounds.js +0 -6
  7. package/dist/actor-qualities.d.ts +0 -3
  8. package/dist/actor-qualities.js +0 -4
  9. package/dist/actors.d.ts +0 -16
  10. package/dist/actors.js +0 -21
  11. package/dist/ad-guide.d.ts +27 -0
  12. package/dist/ad-guide.js +7 -2
  13. package/dist/ad-ids.d.ts +3 -0
  14. package/dist/ad-ids.js +4 -0
  15. package/dist/ad-pause-trim.d.ts +0 -5
  16. package/dist/ad-pause-trim.js +0 -8
  17. package/dist/ads.d.ts +145 -0
  18. package/dist/ads.js +56 -0
  19. package/dist/api-failure.d.ts +6 -44
  20. package/dist/api-failure.js +16 -67
  21. package/dist/aspect.d.ts +0 -29
  22. package/dist/aspect.js +1 -34
  23. package/dist/asset-identity.d.ts +0 -2
  24. package/dist/asset-identity.js +0 -3
  25. package/dist/assets.d.ts +0 -34
  26. package/dist/assets.js +0 -42
  27. package/dist/billing-terms.d.ts +0 -3
  28. package/dist/billing-terms.js +0 -4
  29. package/dist/brand-styles.d.ts +0 -6
  30. package/dist/brand-styles.js +0 -13
  31. package/dist/broll-policy.js +0 -1
  32. package/dist/canvas-fit.d.ts +0 -2
  33. package/dist/canvas-fit.js +0 -4
  34. package/dist/caption-funnel.d.ts +0 -2
  35. package/dist/caption-funnel.js +0 -15
  36. package/dist/caption-geometry.d.ts +0 -6
  37. package/dist/caption-geometry.js +0 -10
  38. package/dist/caption-language.d.ts +0 -3
  39. package/dist/caption-language.js +0 -6
  40. package/dist/contract-dispositions.d.ts +0 -61
  41. package/dist/contract-dispositions.js +3 -96
  42. package/dist/contracts/v1/workflow-brief.d.ts +57 -3
  43. package/dist/contracts/v1/workflow-brief.js +0 -13
  44. package/dist/contracts/v1/workflow-catalog.d.ts +114 -0
  45. package/dist/contracts/v1/workflow-catalog.js +0 -3
  46. package/dist/contracts/v1/workflow-client.d.ts +114 -0
  47. package/dist/contracts/v1/workflow-client.js +0 -1
  48. package/dist/contracts/v1/workflow-dto.js +0 -1
  49. package/dist/contracts/v1/workflow-evidence.js +0 -1
  50. package/dist/contracts/v1/workflow-execution.d.ts +0 -1
  51. package/dist/contracts/v1/workflow-execution.js +0 -4
  52. package/dist/contracts/v1/workflow-next.d.ts +0 -2
  53. package/dist/contracts/v1/workflow-next.js +0 -3
  54. package/dist/contracts/v1/workflow-plan.d.ts +171 -0
  55. package/dist/contracts/v1/workflow-plan.js +0 -1
  56. package/dist/contracts/v1/workflow-primitives.d.ts +0 -1
  57. package/dist/contracts/v1/workflow-primitives.js +0 -2
  58. package/dist/contracts/v1/workflow-run-read.d.ts +0 -1
  59. package/dist/contracts/v1/workflow-run-read.js +0 -3
  60. package/dist/creator-profile.d.ts +0 -30
  61. package/dist/creator-profile.js +0 -45
  62. package/dist/default-actor.js +0 -2
  63. package/dist/design.d.ts +0 -17
  64. package/dist/design.js +0 -18
  65. package/dist/diy-next.d.ts +18 -0
  66. package/dist/diy-next.js +13 -0
  67. package/dist/edit-billing.d.ts +0 -6
  68. package/dist/edit-billing.js +0 -10
  69. package/dist/edit-candidate.d.ts +0 -6
  70. package/dist/edit-candidate.js +0 -9
  71. package/dist/edit-document.d.ts +0 -12
  72. package/dist/edit-document.js +0 -15
  73. package/dist/edit-faceless.d.ts +0 -3
  74. package/dist/edit-faceless.js +0 -4
  75. package/dist/edit-long-form.d.ts +0 -13
  76. package/dist/edit-long-form.js +0 -17
  77. package/dist/edit-music.d.ts +397 -0
  78. package/dist/edit-music.js +77 -0
  79. package/dist/edit-operations.d.ts +0 -1
  80. package/dist/edit-operations.js +0 -2
  81. package/dist/edit-primitives.d.ts +0 -3
  82. package/dist/edit-primitives.js +0 -5
  83. package/dist/edit-revision.d.ts +0 -4
  84. package/dist/edit-revision.js +0 -6
  85. package/dist/edit-rules.d.ts +0 -3
  86. package/dist/edit-rules.js +0 -9
  87. package/dist/edit-shots.d.ts +45 -5
  88. package/dist/edit-shots.js +7 -11
  89. package/dist/edit-validate.d.ts +0 -10
  90. package/dist/edit-validate.js +0 -14
  91. package/dist/edit.js +0 -3
  92. package/dist/endpoint-notes.d.ts +0 -2
  93. package/dist/endpoint-notes.js +0 -3
  94. package/dist/endpoints.d.ts +0 -11
  95. package/dist/endpoints.js +11 -21
  96. package/dist/errors.d.ts +29 -43
  97. package/dist/errors.js +18 -54
  98. package/dist/explainer-fit.d.ts +0 -7
  99. package/dist/explainer-fit.js +0 -10
  100. package/dist/face-billing.d.ts +0 -9
  101. package/dist/face-billing.js +0 -23
  102. package/dist/face-delivery.d.ts +0 -1
  103. package/dist/face-delivery.js +0 -2
  104. package/dist/faceless-action-shots.d.ts +0 -8
  105. package/dist/faceless-action-shots.js +0 -8
  106. package/dist/faceless-customer-anchors.d.ts +0 -1
  107. package/dist/faceless-customer-anchors.js +0 -2
  108. package/dist/faceless-cut-style.js +0 -1
  109. package/dist/faceless-direction-summary.d.ts +0 -2
  110. package/dist/faceless-direction-summary.js +0 -3
  111. package/dist/faceless-image-placement.d.ts +0 -2
  112. package/dist/faceless-image-placement.js +0 -3
  113. package/dist/faceless-image-qualification.js +0 -2
  114. package/dist/faceless-media-record.d.ts +0 -6
  115. package/dist/faceless-media-record.js +0 -11
  116. package/dist/faceless-price.d.ts +0 -45
  117. package/dist/faceless-price.js +0 -64
  118. package/dist/faceless-public-plan.d.ts +0 -13
  119. package/dist/faceless-public-plan.js +0 -11
  120. package/dist/faceless-public.d.ts +0 -26
  121. package/dist/faceless-public.js +0 -59
  122. package/dist/faceless-short-61.js +0 -1
  123. package/dist/faceless-storyboard-timing.js +0 -1
  124. package/dist/faceless-storyboard-v2-plan.js +0 -1
  125. package/dist/faceless-storyboard-v2-timing.d.ts +0 -4
  126. package/dist/faceless-storyboard-v2-timing.js +0 -3
  127. package/dist/faceless-storyboard-v2.js +0 -1
  128. package/dist/faceless-storyboard.js +0 -1
  129. package/dist/faceless-voices.d.ts +0 -16
  130. package/dist/faceless-voices.js +0 -18
  131. package/dist/feedback.d.ts +0 -4
  132. package/dist/feedback.js +0 -5
  133. package/dist/film-directions.d.ts +0 -2
  134. package/dist/film-directions.js +0 -7
  135. package/dist/film-drafts.d.ts +0 -8
  136. package/dist/film-drafts.js +0 -19
  137. package/dist/film-guide.d.ts +0 -3
  138. package/dist/film-guide.js +0 -6
  139. package/dist/film-styles.d.ts +0 -5
  140. package/dist/film-styles.js +0 -8
  141. package/dist/generation-shot.d.ts +0 -5
  142. package/dist/generation-shot.js +0 -8
  143. package/dist/generations-output.d.ts +0 -2
  144. package/dist/generations-output.js +0 -5
  145. package/dist/generations.d.ts +0 -22
  146. package/dist/generations.js +21 -44
  147. package/dist/idempotency.d.ts +1 -21
  148. package/dist/idempotency.js +8 -29
  149. package/dist/index.d.ts +4 -0
  150. package/dist/index.js +4 -28
  151. package/dist/live-shot-kinds.d.ts +16 -25
  152. package/dist/live-shot-kinds.js +12 -28
  153. package/dist/long-form-pricing.d.ts +0 -5
  154. package/dist/long-form-pricing.js +0 -6
  155. package/dist/long-form-profile.d.ts +0 -3
  156. package/dist/long-form-profile.js +0 -4
  157. package/dist/long-form-revision.d.ts +0 -9
  158. package/dist/long-form-revision.js +0 -11
  159. package/dist/markdown-quote.d.ts +0 -2
  160. package/dist/markdown-quote.js +0 -3
  161. package/dist/mascots.d.ts +0 -5
  162. package/dist/mascots.js +0 -10
  163. package/dist/max-credits.d.ts +0 -1
  164. package/dist/max-credits.js +0 -2
  165. package/dist/mcp-ugc-descriptions.d.ts +0 -2
  166. package/dist/mcp-ugc-descriptions.js +1 -6
  167. package/dist/media-timebase.d.ts +0 -2
  168. package/dist/media-timebase.js +0 -6
  169. package/dist/motion-styles.d.ts +0 -8
  170. package/dist/motion-styles.js +0 -11
  171. package/dist/moves.d.ts +0 -7
  172. package/dist/moves.js +0 -9
  173. package/dist/music.d.ts +0 -5
  174. package/dist/music.js +0 -8
  175. package/dist/naming.d.ts +0 -3
  176. package/dist/naming.js +0 -19
  177. package/dist/openapi.d.ts +0 -13
  178. package/dist/openapi.js +9 -11
  179. package/dist/output-provenance.d.ts +0 -4
  180. package/dist/output-provenance.js +0 -5
  181. package/dist/own-agent-price.d.ts +21 -22
  182. package/dist/own-agent-price.js +34 -25
  183. package/dist/own-agent-runs.d.ts +351 -11
  184. package/dist/own-agent-runs.js +144 -24
  185. package/dist/pacing.d.ts +3 -15
  186. package/dist/pacing.js +18 -18
  187. package/dist/parts-pricing.d.ts +0 -28
  188. package/dist/parts-pricing.js +0 -32
  189. package/dist/post-text.d.ts +0 -2
  190. package/dist/post-text.js +0 -4
  191. package/dist/presenter-beats.d.ts +0 -10
  192. package/dist/presenter-beats.js +0 -14
  193. package/dist/presenter-matte.d.ts +0 -7
  194. package/dist/presenter-matte.js +0 -9
  195. package/dist/presenter-takes.d.ts +0 -3
  196. package/dist/presenter-takes.js +0 -8
  197. package/dist/prices.d.ts +2 -8
  198. package/dist/prices.js +13 -23
  199. package/dist/public-endpoints.d.ts +0 -11
  200. package/dist/public-endpoints.js +0 -14
  201. package/dist/public-responses.d.ts +0 -2
  202. package/dist/public-responses.js +0 -3
  203. package/dist/rate-limit.d.ts +0 -24
  204. package/dist/rate-limit.js +0 -29
  205. package/dist/reference-analysis.d.ts +57 -34
  206. package/dist/reference-analysis.js +0 -69
  207. package/dist/reference-bring.d.ts +33 -0
  208. package/dist/reference-bring.js +28 -0
  209. package/dist/reference-display.d.ts +0 -3
  210. package/dist/reference-display.js +37 -4
  211. package/dist/reference-kinds.d.ts +0 -4
  212. package/dist/reference-kinds.js +0 -6
  213. package/dist/reference-lyrics.d.ts +0 -6
  214. package/dist/reference-lyrics.js +0 -6
  215. package/dist/reference-profile.d.ts +270 -39
  216. package/dist/reference-profile.js +64 -50
  217. package/dist/reference-staging.d.ts +0 -10
  218. package/dist/reference-staging.js +0 -14
  219. package/dist/reference-text-spans.d.ts +0 -4
  220. package/dist/reference-text-spans.js +0 -7
  221. package/dist/reference-voice-over.d.ts +0 -6
  222. package/dist/reference-voice-over.js +0 -7
  223. package/dist/reference-voice.d.ts +0 -7
  224. package/dist/reference-voice.js +0 -12
  225. package/dist/render-backend.d.ts +0 -30
  226. package/dist/render-backend.js +0 -5
  227. package/dist/resolved-timeline.d.ts +0 -4
  228. package/dist/resolved-timeline.js +1 -31
  229. package/dist/run-media.d.ts +0 -1
  230. package/dist/run-media.js +0 -2
  231. package/dist/run-preflight.d.ts +0 -4
  232. package/dist/run-preflight.js +0 -11
  233. package/dist/run-static-warnings.d.ts +0 -8
  234. package/dist/run-static-warnings.js +0 -38
  235. package/dist/runs.d.ts +0 -32
  236. package/dist/runs.js +0 -50
  237. package/dist/scene-bible.d.ts +15 -7
  238. package/dist/scene-bible.js +15 -10
  239. package/dist/scene-graph.d.ts +0 -12
  240. package/dist/scene-graph.js +0 -24
  241. package/dist/scene-place.d.ts +0 -25
  242. package/dist/scene-place.js +0 -24
  243. package/dist/scene-proposal.d.ts +0 -3
  244. package/dist/scene-proposal.js +0 -9
  245. package/dist/script-integrity.d.ts +0 -6
  246. package/dist/script-integrity.js +0 -8
  247. package/dist/script-voice.d.ts +0 -7
  248. package/dist/script-voice.js +0 -16
  249. package/dist/semantic-inserts.d.ts +0 -7
  250. package/dist/semantic-inserts.js +0 -10
  251. package/dist/skill-theme-explainer.js +0 -5
  252. package/dist/skill-theme.d.ts +0 -13
  253. package/dist/skill-theme.js +0 -25
  254. package/dist/skills.d.ts +22 -86
  255. package/dist/skills.js +21 -167
  256. package/dist/speech-rhythm-contract.js +0 -1
  257. package/dist/speech-rhythm.d.ts +0 -4
  258. package/dist/speech-rhythm.js +0 -2
  259. package/dist/templates/backdrop.d.ts +0 -3
  260. package/dist/templates/backdrop.js +0 -5
  261. package/dist/templates/callout.d.ts +0 -4
  262. package/dist/templates/callout.js +0 -6
  263. package/dist/templates/chart.d.ts +0 -4
  264. package/dist/templates/chart.js +0 -6
  265. package/dist/templates/chat-window.d.ts +0 -8
  266. package/dist/templates/chat-window.js +0 -10
  267. package/dist/templates/checklist.d.ts +0 -3
  268. package/dist/templates/checklist.js +0 -6
  269. package/dist/templates/comment-cta.d.ts +0 -14
  270. package/dist/templates/comment-cta.js +0 -19
  271. package/dist/templates/compare.d.ts +0 -6
  272. package/dist/templates/compare.js +0 -7
  273. package/dist/templates/cover-story.d.ts +0 -1
  274. package/dist/templates/cover-story.js +0 -3
  275. package/dist/templates/end-card.d.ts +0 -2
  276. package/dist/templates/end-card.js +0 -3
  277. package/dist/templates/hand-title.d.ts +0 -5
  278. package/dist/templates/hand-title.js +0 -9
  279. package/dist/templates/index.d.ts +0 -57
  280. package/dist/templates/index.js +0 -60
  281. package/dist/templates/lower-third.d.ts +0 -4
  282. package/dist/templates/lower-third.js +0 -5
  283. package/dist/templates/notification.d.ts +0 -6
  284. package/dist/templates/notification.js +0 -7
  285. package/dist/templates/phone-call.d.ts +0 -2
  286. package/dist/templates/phone-call.js +0 -6
  287. package/dist/templates/phone-screen.d.ts +0 -5
  288. package/dist/templates/phone-screen.js +0 -7
  289. package/dist/templates/pointer-chips.d.ts +0 -4
  290. package/dist/templates/pointer-chips.js +0 -6
  291. package/dist/templates/progress.d.ts +0 -3
  292. package/dist/templates/progress.js +0 -5
  293. package/dist/templates/quote.d.ts +0 -3
  294. package/dist/templates/quote.js +0 -4
  295. package/dist/templates/race.d.ts +0 -5
  296. package/dist/templates/race.js +0 -7
  297. package/dist/templates/rating.d.ts +0 -3
  298. package/dist/templates/rating.js +0 -5
  299. package/dist/templates/series-frame.d.ts +0 -16
  300. package/dist/templates/series-frame.js +0 -19
  301. package/dist/templates/size.d.ts +0 -7
  302. package/dist/templates/size.js +0 -8
  303. package/dist/templates/slot.d.ts +0 -2
  304. package/dist/templates/slot.js +0 -2
  305. package/dist/templates/sounds.d.ts +24 -12
  306. package/dist/templates/sounds.js +2 -16
  307. package/dist/templates/stat.d.ts +0 -3
  308. package/dist/templates/stat.js +0 -5
  309. package/dist/templates/tag.d.ts +0 -3
  310. package/dist/templates/tag.js +0 -5
  311. package/dist/templates/terminal.d.ts +0 -6
  312. package/dist/templates/terminal.js +0 -8
  313. package/dist/templates/theme.d.ts +0 -7
  314. package/dist/templates/theme.js +0 -9
  315. package/dist/templates/title-card.d.ts +0 -3
  316. package/dist/templates/title-card.js +0 -5
  317. package/dist/templates/video-grid.d.ts +0 -5
  318. package/dist/templates/video-grid.js +0 -8
  319. package/dist/templates/word-fill.d.ts +0 -3
  320. package/dist/templates/word-fill.js +0 -4
  321. package/dist/templates/word-title.d.ts +0 -2
  322. package/dist/templates/word-title.js +0 -4
  323. package/dist/trend-niches.d.ts +0 -11
  324. package/dist/trend-niches.js +0 -16
  325. package/dist/trend-search.d.ts +0 -66
  326. package/dist/trend-search.js +0 -70
  327. package/dist/tts-backend.d.ts +0 -19
  328. package/dist/tts-backend.js +0 -7
  329. package/dist/ugc-call.d.ts +0 -16
  330. package/dist/ugc-call.js +0 -21
  331. package/dist/ugc-delivery.d.ts +0 -2
  332. package/dist/ugc-delivery.js +0 -4
  333. package/dist/ugc-framing.d.ts +0 -4
  334. package/dist/ugc-framing.js +0 -6
  335. package/dist/ugc-interview.d.ts +0 -18
  336. package/dist/ugc-interview.js +0 -24
  337. package/dist/ugc-layers.d.ts +0 -39
  338. package/dist/ugc-layers.js +0 -39
  339. package/dist/ugc-scenes.d.ts +0 -2
  340. package/dist/ugc-scenes.js +0 -5
  341. package/dist/ugc-video-media.d.ts +0 -5
  342. package/dist/ugc-video-media.js +0 -7
  343. package/dist/uploads.d.ts +0 -14
  344. package/dist/uploads.js +0 -17
  345. package/dist/vendor-response.d.ts +0 -19
  346. package/dist/vendor-response.js +0 -22
  347. package/dist/video-size.d.ts +0 -4
  348. package/dist/video-size.js +0 -7
  349. package/dist/voice-admission.d.ts +0 -11
  350. package/dist/voice-admission.js +0 -13
  351. package/dist/voice-catalog-data.d.ts +0 -2
  352. package/dist/voice-catalog-data.js +0 -3
  353. package/dist/voice-catalog.d.ts +0 -6
  354. package/dist/voice-catalog.js +0 -8
  355. package/dist/voice-listing.d.ts +0 -6
  356. package/dist/voice-listing.js +0 -14
  357. package/dist/voice-pace.d.ts +0 -4
  358. package/dist/voice-pace.js +0 -7
  359. package/dist/voice-preview-approval.js +0 -1
  360. package/dist/voices.d.ts +4 -69
  361. package/dist/voices.js +3 -88
  362. package/dist/workflows/catalog.d.ts +0 -2
  363. package/dist/workflows/catalog.js +0 -4
  364. package/dist/workflows/film-directions.d.ts +0 -3
  365. package/dist/workflows/film-directions.js +0 -4
  366. package/dist/workflows/index.js +0 -1
  367. package/dist/workflows/methods/faceless-explainer.d.ts +31 -0
  368. package/dist/workflows/methods/faceless-explainer.js +0 -1
  369. package/dist/workflows/methods/kinetic-launch.d.ts +62 -1
  370. package/dist/workflows/methods/kinetic-launch.js +0 -2
  371. package/dist/workflows/methods/product-image-story.d.ts +31 -0
  372. package/dist/workflows/methods/product-image-story.js +0 -1
  373. package/dist/workflows/methods/reference-remake.d.ts +31 -0
  374. package/dist/workflows/methods/reference-remake.js +0 -1
  375. package/dist/workflows/methods/shared.d.ts +31 -1
  376. package/dist/workflows/methods/shared.js +0 -3
  377. package/dist/workflows/methods/ugc-faq-answer.d.ts +31 -0
  378. package/dist/workflows/methods/ugc-faq-answer.js +0 -1
  379. package/dist/workflows/methods/ugc-product-intro.d.ts +31 -0
  380. package/dist/workflows/methods/ugc-product-intro.js +0 -1
  381. package/dist/workflows/methods/website-proof-demo.d.ts +62 -1
  382. package/dist/workflows/methods/website-proof-demo.js +0 -2
  383. package/dist/workflows/motion-director.d.ts +0 -11
  384. package/dist/workflows/motion-director.js +0 -11
  385. package/dist/workflows/product-references.js +0 -1
  386. package/dist/workflows/reference-remake.d.ts +114 -17
  387. package/dist/workflows/reference-remake.js +0 -167
  388. package/dist/workflows/remake-chooser.d.ts +0 -6
  389. package/dist/workflows/remake-chooser.js +0 -4
  390. package/dist/workflows/remake-motion.d.ts +0 -16
  391. package/dist/workflows/remake-motion.js +0 -19
  392. package/dist/workflows/validate.d.ts +0 -1
  393. package/dist/workflows/validate.js +0 -5
  394. package/dist/workflows.js +0 -1
  395. package/package.json +1 -1
  396. package/dist/account-actors.js.map +0 -1
  397. package/dist/account.js.map +0 -1
  398. package/dist/actor-bounds.js.map +0 -1
  399. package/dist/actor-qualities.js.map +0 -1
  400. package/dist/actors.js.map +0 -1
  401. package/dist/ad-guide.js.map +0 -1
  402. package/dist/ad-pause-trim.js.map +0 -1
  403. package/dist/api-failure.js.map +0 -1
  404. package/dist/aspect.js.map +0 -1
  405. package/dist/asset-identity.js.map +0 -1
  406. package/dist/assets.js.map +0 -1
  407. package/dist/billing-terms.js.map +0 -1
  408. package/dist/brand-styles.js.map +0 -1
  409. package/dist/broll-policy.js.map +0 -1
  410. package/dist/canvas-fit.js.map +0 -1
  411. package/dist/caption-funnel.js.map +0 -1
  412. package/dist/caption-geometry.js.map +0 -1
  413. package/dist/caption-language.js.map +0 -1
  414. package/dist/contract-dispositions.js.map +0 -1
  415. package/dist/contracts/v1/workflow-brief.js.map +0 -1
  416. package/dist/contracts/v1/workflow-catalog.js.map +0 -1
  417. package/dist/contracts/v1/workflow-client.js.map +0 -1
  418. package/dist/contracts/v1/workflow-dto.js.map +0 -1
  419. package/dist/contracts/v1/workflow-evidence.js.map +0 -1
  420. package/dist/contracts/v1/workflow-execution.js.map +0 -1
  421. package/dist/contracts/v1/workflow-next.js.map +0 -1
  422. package/dist/contracts/v1/workflow-plan.js.map +0 -1
  423. package/dist/contracts/v1/workflow-primitives.js.map +0 -1
  424. package/dist/contracts/v1/workflow-run-read.js.map +0 -1
  425. package/dist/creator-profile.js.map +0 -1
  426. package/dist/default-actor.js.map +0 -1
  427. package/dist/design.js.map +0 -1
  428. package/dist/edit-billing.js.map +0 -1
  429. package/dist/edit-candidate.js.map +0 -1
  430. package/dist/edit-document.js.map +0 -1
  431. package/dist/edit-faceless.js.map +0 -1
  432. package/dist/edit-long-form.js.map +0 -1
  433. package/dist/edit-operations.js.map +0 -1
  434. package/dist/edit-primitives.js.map +0 -1
  435. package/dist/edit-revision.js.map +0 -1
  436. package/dist/edit-rules.js.map +0 -1
  437. package/dist/edit-shots.js.map +0 -1
  438. package/dist/edit-validate.js.map +0 -1
  439. package/dist/edit.js.map +0 -1
  440. package/dist/endpoint-notes.js.map +0 -1
  441. package/dist/endpoints.js.map +0 -1
  442. package/dist/errors.js.map +0 -1
  443. package/dist/explainer-fit.js.map +0 -1
  444. package/dist/face-billing.js.map +0 -1
  445. package/dist/face-delivery.js.map +0 -1
  446. package/dist/faceless-action-shots.js.map +0 -1
  447. package/dist/faceless-customer-anchors.js.map +0 -1
  448. package/dist/faceless-cut-style.js.map +0 -1
  449. package/dist/faceless-direction-summary.js.map +0 -1
  450. package/dist/faceless-image-placement.js.map +0 -1
  451. package/dist/faceless-image-qualification.js.map +0 -1
  452. package/dist/faceless-media-record.js.map +0 -1
  453. package/dist/faceless-price.js.map +0 -1
  454. package/dist/faceless-public-plan.js.map +0 -1
  455. package/dist/faceless-public.js.map +0 -1
  456. package/dist/faceless-short-61.js.map +0 -1
  457. package/dist/faceless-storyboard-timing.js.map +0 -1
  458. package/dist/faceless-storyboard-v2-plan.js.map +0 -1
  459. package/dist/faceless-storyboard-v2-timing.js.map +0 -1
  460. package/dist/faceless-storyboard-v2.js.map +0 -1
  461. package/dist/faceless-storyboard.js.map +0 -1
  462. package/dist/faceless-voices.js.map +0 -1
  463. package/dist/feedback.js.map +0 -1
  464. package/dist/film-directions.js.map +0 -1
  465. package/dist/film-drafts.js.map +0 -1
  466. package/dist/film-guide.js.map +0 -1
  467. package/dist/film-styles.js.map +0 -1
  468. package/dist/generation-shot.js.map +0 -1
  469. package/dist/generations-output.js.map +0 -1
  470. package/dist/generations.js.map +0 -1
  471. package/dist/idempotency.js.map +0 -1
  472. package/dist/index.js.map +0 -1
  473. package/dist/live-shot-kinds.js.map +0 -1
  474. package/dist/long-form-pricing.js.map +0 -1
  475. package/dist/long-form-profile.js.map +0 -1
  476. package/dist/long-form-revision.js.map +0 -1
  477. package/dist/markdown-quote.js.map +0 -1
  478. package/dist/mascots.js.map +0 -1
  479. package/dist/max-credits.js.map +0 -1
  480. package/dist/mcp-ugc-descriptions.js.map +0 -1
  481. package/dist/media-timebase.js.map +0 -1
  482. package/dist/motion-styles.js.map +0 -1
  483. package/dist/moves.js.map +0 -1
  484. package/dist/music.js.map +0 -1
  485. package/dist/naming.js.map +0 -1
  486. package/dist/openapi.js.map +0 -1
  487. package/dist/output-provenance.js.map +0 -1
  488. package/dist/own-agent-price.js.map +0 -1
  489. package/dist/own-agent-runs.js.map +0 -1
  490. package/dist/pacing.js.map +0 -1
  491. package/dist/parts-pricing.js.map +0 -1
  492. package/dist/post-text.js.map +0 -1
  493. package/dist/presenter-beats.js.map +0 -1
  494. package/dist/presenter-matte.js.map +0 -1
  495. package/dist/presenter-takes.js.map +0 -1
  496. package/dist/prices.js.map +0 -1
  497. package/dist/public-endpoints.js.map +0 -1
  498. package/dist/public-responses.js.map +0 -1
  499. package/dist/rate-limit.js.map +0 -1
  500. package/dist/reference-analysis.js.map +0 -1
  501. package/dist/reference-display.js.map +0 -1
  502. package/dist/reference-kinds.js.map +0 -1
  503. package/dist/reference-lyrics.js.map +0 -1
  504. package/dist/reference-profile.js.map +0 -1
  505. package/dist/reference-staging.js.map +0 -1
  506. package/dist/reference-text-spans.js.map +0 -1
  507. package/dist/reference-voice-over.js.map +0 -1
  508. package/dist/reference-voice.js.map +0 -1
  509. package/dist/render-backend.js.map +0 -1
  510. package/dist/resolved-timeline.js.map +0 -1
  511. package/dist/run-media.js.map +0 -1
  512. package/dist/run-preflight.js.map +0 -1
  513. package/dist/run-static-warnings.js.map +0 -1
  514. package/dist/runs.js.map +0 -1
  515. package/dist/scene-bible.js.map +0 -1
  516. package/dist/scene-graph.js.map +0 -1
  517. package/dist/scene-place.js.map +0 -1
  518. package/dist/scene-proposal.js.map +0 -1
  519. package/dist/script-integrity.js.map +0 -1
  520. package/dist/script-voice.js.map +0 -1
  521. package/dist/semantic-inserts.js.map +0 -1
  522. package/dist/skill-theme-explainer.js.map +0 -1
  523. package/dist/skill-theme.js.map +0 -1
  524. package/dist/skills.js.map +0 -1
  525. package/dist/speech-rhythm-contract.js.map +0 -1
  526. package/dist/speech-rhythm.js.map +0 -1
  527. package/dist/templates/backdrop.js.map +0 -1
  528. package/dist/templates/callout.js.map +0 -1
  529. package/dist/templates/chart.js.map +0 -1
  530. package/dist/templates/chat-window.js.map +0 -1
  531. package/dist/templates/checklist.js.map +0 -1
  532. package/dist/templates/comment-cta.js.map +0 -1
  533. package/dist/templates/compare.js.map +0 -1
  534. package/dist/templates/cover-story.js.map +0 -1
  535. package/dist/templates/end-card.js.map +0 -1
  536. package/dist/templates/hand-title.js.map +0 -1
  537. package/dist/templates/index.js.map +0 -1
  538. package/dist/templates/lower-third.js.map +0 -1
  539. package/dist/templates/notification.js.map +0 -1
  540. package/dist/templates/phone-call.js.map +0 -1
  541. package/dist/templates/phone-screen.js.map +0 -1
  542. package/dist/templates/pointer-chips.js.map +0 -1
  543. package/dist/templates/progress.js.map +0 -1
  544. package/dist/templates/quote.js.map +0 -1
  545. package/dist/templates/race.js.map +0 -1
  546. package/dist/templates/rating.js.map +0 -1
  547. package/dist/templates/series-frame.js.map +0 -1
  548. package/dist/templates/size.js.map +0 -1
  549. package/dist/templates/slot.js.map +0 -1
  550. package/dist/templates/sounds.js.map +0 -1
  551. package/dist/templates/stat.js.map +0 -1
  552. package/dist/templates/tag.js.map +0 -1
  553. package/dist/templates/terminal.js.map +0 -1
  554. package/dist/templates/theme.js.map +0 -1
  555. package/dist/templates/title-card.js.map +0 -1
  556. package/dist/templates/video-grid.js.map +0 -1
  557. package/dist/templates/word-fill.js.map +0 -1
  558. package/dist/templates/word-title.js.map +0 -1
  559. package/dist/trend-niches.js.map +0 -1
  560. package/dist/trend-search.js.map +0 -1
  561. package/dist/tts-backend.js.map +0 -1
  562. package/dist/ugc-call.js.map +0 -1
  563. package/dist/ugc-delivery.js.map +0 -1
  564. package/dist/ugc-framing.js.map +0 -1
  565. package/dist/ugc-interview.js.map +0 -1
  566. package/dist/ugc-layers.js.map +0 -1
  567. package/dist/ugc-scenes.js.map +0 -1
  568. package/dist/ugc-video-media.js.map +0 -1
  569. package/dist/uploads.js.map +0 -1
  570. package/dist/vendor-response.js.map +0 -1
  571. package/dist/video-size.js.map +0 -1
  572. package/dist/voice-admission.js.map +0 -1
  573. package/dist/voice-catalog-data.js.map +0 -1
  574. package/dist/voice-catalog.js.map +0 -1
  575. package/dist/voice-listing.js.map +0 -1
  576. package/dist/voice-pace.js.map +0 -1
  577. package/dist/voice-preview-approval.js.map +0 -1
  578. package/dist/voices.js.map +0 -1
  579. package/dist/workflows/catalog.js.map +0 -1
  580. package/dist/workflows/film-directions.js.map +0 -1
  581. package/dist/workflows/index.js.map +0 -1
  582. package/dist/workflows/methods/faceless-explainer.js.map +0 -1
  583. package/dist/workflows/methods/kinetic-launch.js.map +0 -1
  584. package/dist/workflows/methods/product-image-story.js.map +0 -1
  585. package/dist/workflows/methods/reference-remake.js.map +0 -1
  586. package/dist/workflows/methods/shared.js.map +0 -1
  587. package/dist/workflows/methods/ugc-faq-answer.js.map +0 -1
  588. package/dist/workflows/methods/ugc-product-intro.js.map +0 -1
  589. package/dist/workflows/methods/website-proof-demo.js.map +0 -1
  590. package/dist/workflows/motion-director.js.map +0 -1
  591. package/dist/workflows/product-references.js.map +0 -1
  592. package/dist/workflows/reference-remake.js.map +0 -1
  593. package/dist/workflows/remake-chooser.js.map +0 -1
  594. package/dist/workflows/remake-motion.js.map +0 -1
  595. package/dist/workflows/validate.js.map +0 -1
  596. package/dist/workflows.js.map +0 -1
@@ -1,15 +1,11 @@
1
1
  import { z } from "zod";
2
- import { accountNotAdmittedError, apiError, debtOutstandingError, editCeilingReachedError, editConflictError, editingDisabledError, editingNotPricedError, editInvalidError, insufficientCreditsError, maxCreditsExceededError, runNotEditableError, } from "./errors.js";
2
+ import { accountNotAdmittedError, apiError, debtOutstandingError, editCeilingReachedError, editConflictError, editingDisabledError, editingNotPricedError, editInvalidError, insufficientCreditsError, maxCreditsExceededError, runNotEditableError, takeUncheckedError, } from "./errors.js";
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,15 @@ 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.
218
+ const unchecked = takeUncheckedError.safeParse(body);
219
+ if (unchecked.success && status === 409) {
220
+ const { error } = unchecked.data;
221
+ return { kind: "client_error", status, message: error.message, code: error.code, next: error.next, blocked: error.blocked };
222
+ }
258
223
  const generic = apiError.safeParse(body);
259
224
  const message = generic.success
260
225
  ? generic.data.error.message
261
226
  : 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
227
  const rawCode = generic.success ? generic.data.error.code : undefined;
265
228
  const code = rawCode !== undefined && BEHAVIOURAL_CODES.has(rawCode) ? undefined : rawCode;
266
229
  const diagnostics = workflow.success ? { issues: workflow.data.error.issues, warnings: workflow.data.error.warnings } : {};
@@ -275,7 +238,6 @@ export function parseApiFailure(input) {
275
238
  windowSeconds: undefined,
276
239
  };
277
240
  }
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
241
  if (status === 503 && (code === "generations_disabled" || code === "generations_marking_pending" || code === "assets_disabled"
280
242
  || code === "url_import_disabled")) {
281
243
  return { kind: "client_error", ...diagnostics, status, message, code };
@@ -285,25 +247,22 @@ export function parseApiFailure(input) {
285
247
  }
286
248
  return { kind: "client_error", ...diagnostics, status, message, code };
287
249
  }
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
250
  function messageFromStatus(status, bodyText) {
291
- // An unread body says nothing about who answered, so no source is guessed.
292
251
  if (bodyText === undefined) {
293
252
  return `HTTP ${status}: the response body could not be read, so the reason is only known by status`;
294
253
  }
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
254
  const tail = excerpt(bodyText);
298
255
  const head = status === 429
299
256
  ? "HTTP 429: too many requests, and the body did not carry a Clipwright error object"
300
257
  : `HTTP ${status}: the response body is not a Clipwright error object`;
301
258
  return tail === undefined ? head : `${head}. Body: ${tail}`;
302
259
  }
260
+ export const TAKE_UNCHECKED_NEXT_ACTION = "Do not render yet: each clip the message names was made with generate_video and has no passing check_take on its file. Quote " +
261
+ "the check in next (add direction: the shot's part of the prompt the take was made with), run check_take after the user's go-ahead, " +
262
+ "and cut only takes that pass. Nothing was charged and no run was created.";
303
263
  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
264
  "with get_upload, then repeat this call. If the message says the upload is finishing, the file is already there: " +
305
265
  "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
266
  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
267
  `charged. With a key, the human creates a new one at ${PUBLIC_APP_BASE_URL}/api-keys (a new account at ` +
309
268
  `${PUBLIC_APP_BASE_URL}/auth/sign-up comes with trial credits), puts it in the MCP server's environment as ` +
@@ -321,8 +280,6 @@ export function agentFailureReport(failure) {
321
280
  status: "RETRY_LATER",
322
281
  code: "rate_limited",
323
282
  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
283
  next_action: seconds === undefined
327
284
  ? "Too many requests. Wait a few seconds, then repeat the SAME call — do not start a new one."
328
285
  : `Too many requests. Wait ${seconds} seconds, then repeat the SAME call — do not start a new one.`,
@@ -337,8 +294,6 @@ export function agentFailureReport(failure) {
337
294
  status: "FAILED",
338
295
  code: "insufficient_credits",
339
296
  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
297
  next_action: `STOP. Do NOT retry: this account has ${failure.balanceCredits} credits and the call ` +
343
298
  `needs ${failure.requiredCredits}. Retrying cannot change that. Tell the user to top up ` +
344
299
  "the balance, then call again. Nothing was charged and no run was created.",
@@ -363,8 +318,6 @@ export function agentFailureReport(failure) {
363
318
  status: "FAILED",
364
319
  code: "debt_outstanding",
365
320
  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
321
  next_action: `STOP. Do NOT retry: an outstanding debt of ${failure.debtCredits} credits blocks new ` +
369
322
  "paid runs. Tell the user to buy credits — incoming credits clear the debt before any " +
370
323
  "of them reach the balance. Clearing it lifts this block, but the run still needs " +
@@ -379,7 +332,6 @@ export function agentFailureReport(failure) {
379
332
  status: "RETRY_LATER",
380
333
  code: `http_${failure.status}`,
381
334
  retryable: true,
382
- // The source is not named: our server, a corporate gateway and a CDN all send 5xx.
383
335
  next_action: "The call failed with a server-side error. Repeat the SAME call in a few seconds. If it " +
384
336
  "keeps failing, stop and tell the user; do not start a new run with a different " +
385
337
  "idempotency key.",
@@ -392,8 +344,6 @@ export function agentFailureReport(failure) {
392
344
  status: "FAILED",
393
345
  code: "account_not_admitted",
394
346
  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
347
  next_action: "STOP. The account is not admitted to the beta. Do NOT retry and do NOT offer to buy " +
398
348
  "credits: neither changes the answer. Tell the user the account has no beta access and " +
399
349
  "to contact support about it.",
@@ -404,7 +354,6 @@ export function agentFailureReport(failure) {
404
354
  status: "FAILED",
405
355
  code: "edit_conflict",
406
356
  retryable: false,
407
- // A save repeated after a lost answer meets its own write here, so the advice starts with a read.
408
357
  next_action: `STOP. Do NOT repeat this save unchanged: the draft is at version ${failure.version}, and this call ` +
409
358
  "stored nothing. Read the draft. If it already holds your document, an earlier save of it went " +
410
359
  "through; otherwise apply your change to the draft you read and save it with that draft's version.",
@@ -442,7 +391,6 @@ export function agentFailureReport(failure) {
442
391
  status: "FAILED",
443
392
  code: "edit_ceiling_reached",
444
393
  retryable: false,
445
- // Revisions and shot candidates share this code under separate limits, so the text names neither.
446
394
  next_action: failure.limit === "in_flight"
447
395
  ? `STOP. A paid edit of ${failure.rootRunId} is still running (${runs}); follow it with get_run and start the ` +
448
396
  "next one after it finishes. If get_run says it is held for review, contact support: only support " +
@@ -484,12 +432,13 @@ export function agentFailureReport(failure) {
484
432
  status: "FAILED",
485
433
  code: failure.code ?? `http_${failure.status}`,
486
434
  retryable: false,
487
- // An unfinished presigned upload is fixed by the upload itself, not by changing this call (clipwright#758).
488
- next_action: failure.code === "upload_not_finished" ? UPLOAD_NOT_FINISHED_NEXT_ACTION :
489
- failure.code === "unauthorized" ? UNAUTHORIZED_NEXT_ACTION :
490
- "STOP. Do NOT retry: the request itself was rejected, so repeating it unchanged gives " +
491
- "the same answer. Read the message, fix the call, or tell the user what is wrong.",
435
+ ...(failure.next && { next: failure.next }),
436
+ ...(failure.blocked && { blocked: failure.blocked }),
437
+ next_action: failure.code === "take_unchecked" ? TAKE_UNCHECKED_NEXT_ACTION :
438
+ failure.code === "upload_not_finished" ? UPLOAD_NOT_FINISHED_NEXT_ACTION :
439
+ failure.code === "unauthorized" ? UNAUTHORIZED_NEXT_ACTION :
440
+ "STOP. Do NOT retry: the request itself was rejected, so repeating it unchanged gives " +
441
+ "the same answer. Read the message, fix the call, or tell the user what is wrong.",
492
442
  };
493
443
  }
494
444
  }
495
- //# sourceMappingURL=api-failure.js.map
package/dist/aspect.d.ts CHANGED
@@ -1,20 +1,11 @@
1
1
  import { type AspectRatio, type Resolution } from "./skills.js";
2
2
  import type { AspectSource } from "./default-actor.js";
3
- /** Width-to-height ratio of each supported format. */
4
3
  export declare const ASPECT_RATIO_VALUES: Record<AspectRatio, number>;
5
- /** Default format. A constant, not a schema `.default()`, so "asked for 9:16" stays */
6
- /** distinguishable from "said nothing": only the latter never gets a refusal. */
7
4
  export declare const DEFAULT_ASPECT_RATIO: AspectRatio;
8
- /** ≤2% counts as a match: the difference is invisible and needs no crop. */
9
5
  export declare const ASPECT_MATCH_THRESHOLD = 0.02;
10
- /** ≤15% snaps to a format with a warning about the vendor's center-crop. */
11
6
  export declare const ASPECT_SNAP_THRESHOLD = 0.15;
12
- /** Relative distance between two aspect ratios, divided by the SMALLER one: the larger */
13
- /** error trips the threshold earlier, so the check errs toward asking. */
14
7
  export declare function aspectDistance(a: number, b: number): number;
15
- /** The supported format nearest to an arbitrary ratio. */
16
8
  export declare function snapAspect(ratio: number): AspectRatio;
17
- /** Resolver verdict: a format with explanations, or a refusal before the paid step. */
18
9
  export type AspectResolution = {
19
10
  kind: "resolved";
20
11
  aspectRatio: AspectRatio;
@@ -24,48 +15,28 @@ export type AspectResolution = {
24
15
  message: string;
25
16
  };
26
17
  export interface ResolveAspectInput {
27
- /** What the client asked for; `undefined` means it said nothing. */
28
18
  requested: AspectRatio | undefined;
29
- /** The measured source. `null` only when a URL was given but probing failed; */
30
- /** without `image` the source is `DEFAULT_ACTOR_SOURCE`. */
31
19
  source: AspectSource | null;
32
20
  }
33
- /** Which format to render. A silent client is never refused; a refusal happens only when */
34
- /** the client named a format more than 15% away from the source. */
35
21
  export declare function resolveAspectRatio(input: ResolveAspectInput): AspectResolution;
36
- /** Exact source ratio label, reduced by GCD: 432×768 → `9:16`, 1920×1080 → `16:9`. Unlike */
37
- /** `snapAspect` (what we render), this reports what was sent, so a quote never misstates input. */
38
22
  export declare function exactAspectLabel(width: number, height: number): string;
39
- /** The format we ask the VENDOR for is the one nearest the SOURCE, not the requested one: */
40
- /** the vendor damages the frame only on a mismatch, and our own layout is declared in warnings. */
41
23
  export declare function vendorAspectFor(source: AspectSource, supported: readonly AspectRatio[]): AspectRatio;
42
- /** What we predicted and what the vendor actually delivered. */
43
24
  export interface DeliveredClip {
44
25
  width: number;
45
26
  height: number;
46
- /** Container duration: the longest stream, AAC tail included. */
47
27
  durationSec: number;
48
- /** Picture duration (video frames / fps), measured only on request; the charge basis (#699). */
49
28
  videoDurationSec?: number;
50
29
  }
51
- /** Compares vendor output with the prediction, so every paid run re-measures vendor */
52
- /** behavior. Silent on a match: a warning on every run devalues all warnings. */
53
30
  export declare function deliveryWarnings(args: {
54
31
  predicted: DeliveredClip;
55
32
  actual: DeliveredClip;
56
- /** Duration tolerance: the vendor rounds, and fractions of a second are not a mismatch. */
57
33
  durationToleranceSec?: number;
58
34
  }): string[];
59
- /** Upscaling is named, like a format snap, but only for a FOREIGN frame: our actor's */
60
- /** dimensions are a product property. */
61
35
  export declare function upscaleWarning(source: AspectSource | null, resolution: Resolution, aspectRatio: AspectRatio): string | null;
62
- /** A delivered video whose short side is not the requested resolution's is named (#1173, rules 3 and 4). */
63
36
  export declare function deliveredResolutionWarning(requested: Resolution, delivered: {
64
37
  width: number;
65
38
  height: number;
66
39
  }): string | null;
67
- /** The frame we expect from the vendor: format PLUS resolution. Format alone flagged */
68
- /** every 720p run as a mismatch. */
69
40
  export declare function expectedVendorFrame(resolution: Resolution, aspectRatio: AspectRatio): {
70
41
  width: number;
71
42
  height: number;
package/dist/aspect.js CHANGED
@@ -1,25 +1,15 @@
1
1
  import { ASPECT_RATIOS } from "./skills.js";
2
- // Output format from the request and the source. We never crop: a mismatch is either
3
- // a warning or a refusal before the paid call. Pure functions.
4
- /** Width-to-height ratio of each supported format. */
5
2
  export const ASPECT_RATIO_VALUES = {
6
3
  "9:16": 9 / 16,
7
4
  "1:1": 1,
8
5
  "16:9": 16 / 9,
9
6
  };
10
- /** Default format. A constant, not a schema `.default()`, so "asked for 9:16" stays */
11
- /** distinguishable from "said nothing": only the latter never gets a refusal. */
12
7
  export const DEFAULT_ASPECT_RATIO = "9:16";
13
- /** ≤2% counts as a match: the difference is invisible and needs no crop. */
14
8
  export const ASPECT_MATCH_THRESHOLD = 0.02;
15
- /** ≤15% snaps to a format with a warning about the vendor's center-crop. */
16
9
  export const ASPECT_SNAP_THRESHOLD = 0.15;
17
- /** Relative distance between two aspect ratios, divided by the SMALLER one: the larger */
18
- /** error trips the threshold earlier, so the check errs toward asking. */
19
10
  export function aspectDistance(a, b) {
20
11
  return Math.abs(a - b) / Math.min(a, b);
21
12
  }
22
- /** The supported format nearest to an arbitrary ratio. */
23
13
  export function snapAspect(ratio) {
24
14
  let best = ASPECT_RATIOS[0];
25
15
  let bestDistance = Number.POSITIVE_INFINITY;
@@ -32,13 +22,9 @@ export function snapAspect(ratio) {
32
22
  }
33
23
  return best;
34
24
  }
35
- /** Which format to render. A silent client is never refused; a refusal happens only when */
36
- /** the client named a format more than 15% away from the source. */
37
25
  export function resolveAspectRatio(input) {
38
26
  const { requested, source } = input;
39
27
  if (source === null) {
40
- // Probing the foreign URL failed. That is not a client claim about the format,
41
- // so the unverified format is a warning, not a refusal.
42
28
  return {
43
29
  kind: "resolved",
44
30
  aspectRatio: requested ?? DEFAULT_ASPECT_RATIO,
@@ -53,8 +39,6 @@ export function resolveAspectRatio(input) {
53
39
  if (distance <= ASPECT_MATCH_THRESHOLD) {
54
40
  return { kind: "resolved", aspectRatio: target, warnings: [] };
55
41
  }
56
- // Measured vendor behavior depends on direction: a frame wider than the source is
57
- // padded white, a narrower one is scaled up and center-cropped at the sides.
58
42
  const targetRatio = ASPECT_RATIO_VALUES[target];
59
43
  const snapWarning = targetRatio > sourceRatio
60
44
  ? `source is ${source.width}×${source.height}; rendering ${target} is wider than the source, ` +
@@ -64,8 +48,6 @@ export function resolveAspectRatio(input) {
64
48
  if (distance <= ASPECT_SNAP_THRESHOLD || requested === undefined) {
65
49
  return { kind: "resolved", aspectRatio: target, warnings: [snapWarning] };
66
50
  }
67
- // Explicit conflict. The text must name the remedy: for an autonomous agent a
68
- // refusal without a next step is as bad as a failure.
69
51
  const cure = source.origin === "default"
70
52
  ? `the default actor is ${snapAspect(sourceRatio)} (${source.width}×${source.height}); ` +
71
53
  `pass \`image\` with a source close to ${target} to render ${target}`
@@ -76,8 +58,6 @@ export function resolveAspectRatio(input) {
76
58
  message: `requested aspect_ratio ${target} conflicts with the source by ${Math.round(distance * 100)}%: ${cure}`,
77
59
  };
78
60
  }
79
- /** Exact source ratio label, reduced by GCD: 432×768 → `9:16`, 1920×1080 → `16:9`. Unlike */
80
- /** `snapAspect` (what we render), this reports what was sent, so a quote never misstates input. */
81
61
  export function exactAspectLabel(width, height) {
82
62
  const gcd = (a, b) => (b === 0 ? a : gcd(b, a % b));
83
63
  const w = Math.round(width);
@@ -87,8 +67,6 @@ export function exactAspectLabel(width, height) {
87
67
  const divisor = gcd(w, h);
88
68
  return `${w / divisor}:${h / divisor}`;
89
69
  }
90
- /** The format we ask the VENDOR for is the one nearest the SOURCE, not the requested one: */
91
- /** the vendor damages the frame only on a mismatch, and our own layout is declared in warnings. */
92
70
  export function vendorAspectFor(source, supported) {
93
71
  if (supported.length === 0) {
94
72
  throw new Error("vendorAspectFor: backend declares no supported aspect ratios");
@@ -105,8 +83,6 @@ export function vendorAspectFor(source, supported) {
105
83
  }
106
84
  return best;
107
85
  }
108
- /** Compares vendor output with the prediction, so every paid run re-measures vendor */
109
- /** behavior. Silent on a match: a warning on every run devalues all warnings. */
110
86
  export function deliveryWarnings(args) {
111
87
  const { predicted, actual } = args;
112
88
  const tolerance = args.durationToleranceSec ?? 0.05;
@@ -116,17 +92,13 @@ export function deliveryWarnings(args) {
116
92
  }
117
93
  const durationDelta = actual.durationSec - predicted.durationSec;
118
94
  if (Math.abs(durationDelta) > tolerance) {
119
- // Padding to a whole second is a known, measured case (0.6 s of audio came back as
120
- // 1.0 s) and is named separately from unknown mismatches.
121
95
  const paddedToWholeSecond = durationDelta > 0 && Number.isInteger(actual.durationSec) && actual.durationSec <= 1;
122
96
  warnings.push(paddedToWholeSecond
123
- ? `the clip was padded to ${actual.durationSec}s from ${predicted.durationSec}s of audio` // skill-scope: dynamic — warning text, not SQL
97
+ ? `the clip was padded to ${actual.durationSec}s from ${predicted.durationSec}s of audio`
124
98
  : `the clip came back ${actual.durationSec}s instead of ${predicted.durationSec}s`);
125
99
  }
126
100
  return warnings;
127
101
  }
128
- /** Upscaling is named, like a format snap, but only for a FOREIGN frame: our actor's */
129
- /** dimensions are a product property. */
130
102
  export function upscaleWarning(source, resolution, aspectRatio) {
131
103
  if (source === null || source.origin !== "probed")
132
104
  return null;
@@ -139,21 +111,17 @@ export function upscaleWarning(source, resolution, aspectRatio) {
139
111
  `the source is upscaled, which softens the picture. Send at least ${frameShort} px ` +
140
112
  "on the short side to avoid it.");
141
113
  }
142
- /** Short frame side per resolution, measured live. */
143
114
  const SHORT_SIDE_BY_RESOLUTION = {
144
115
  "720p": 720,
145
116
  "1080p": 1080,
146
117
  "4k": 2160,
147
118
  };
148
- /** A delivered video whose short side is not the requested resolution's is named (#1173, rules 3 and 4). */
149
119
  export function deliveredResolutionWarning(requested, delivered) {
150
120
  if (Math.min(delivered.width, delivered.height) === SHORT_SIDE_BY_RESOLUTION[requested])
151
121
  return null;
152
122
  return `resolution ${requested} was requested, but the video is delivered at ` +
153
123
  `${delivered.width}×${delivered.height}; resolution does not change the price`;
154
124
  }
155
- /** The frame we expect from the vendor: format PLUS resolution. Format alone flagged */
156
- /** every 720p run as a mismatch. */
157
125
  export function expectedVendorFrame(resolution, aspectRatio) {
158
126
  const short = SHORT_SIDE_BY_RESOLUTION[resolution];
159
127
  const ratio = ASPECT_RATIO_VALUES[aspectRatio];
@@ -165,4 +133,3 @@ export function expectedVendorFrame(resolution, aspectRatio) {
165
133
  ? { width: even(short * ratio), height: even(short) }
166
134
  : { width: even(short), height: even(short / ratio) };
167
135
  }
168
- //# sourceMappingURL=aspect.js.map
@@ -1,6 +1,4 @@
1
1
  import { z } from "zod";
2
- /** The asset id and kinds as a leaf module: `skills.ts` names them, and `assets.ts` would import it back through `runs.ts`. */
3
2
  export declare const ASSET_KINDS: readonly ["image", "video"];
4
- /** WebP is kept only as a generation's own output: its dimensions are not read from customer bytes. */
5
3
  export declare const ASSET_MEDIA_TYPES: readonly ["image/png", "image/jpeg", "image/webp", "video/mp4"];
6
4
  export declare const assetId: z.ZodString;
@@ -1,7 +1,4 @@
1
1
  import { z } from "zod";
2
- /** The asset id and kinds as a leaf module: `skills.ts` names them, and `assets.ts` would import it back through `runs.ts`. */
3
2
  export const ASSET_KINDS = ["image", "video"];
4
- /** WebP is kept only as a generation's own output: its dimensions are not read from customer bytes. */
5
3
  export const ASSET_MEDIA_TYPES = ["image/png", "image/jpeg", "image/webp", "video/mp4"];
6
4
  export const assetId = z.string().regex(/^ast_[a-f0-9]{32}$/);
7
- //# sourceMappingURL=asset-identity.js.map
package/dist/assets.d.ts CHANGED
@@ -1,55 +1,37 @@
1
1
  import { z } from "zod";
2
2
  import { ASSET_KINDS, ASSET_MEDIA_TYPES, assetId } from "./asset-identity.js";
3
- /** Account assets (clipwright#724 F2): pictures and clips kept until the customer deletes them, under a cap per account. */
4
3
  export declare const ASSETS_PATH = "/v1/assets";
5
- /** Raw bytes of one picture or clip, for the cabinet; role, name and the rights confirmation travel in the query. */
6
4
  export declare const ASSET_BYTES_PATH = "/v1/assets/bytes";
7
5
  export declare const ASSET_ITEM_PATH = "/v1/assets/:id";
8
6
  export declare const ASSET_ACCOUNT_MAX_COUNT = 2000;
9
- /** Storage per account: 1 GB until its first credit purchase, then 20 GB. */
10
7
  export declare const ASSET_TRIAL_MAX_BYTES = 1000000000;
11
8
  export declare const ASSET_ACCOUNT_MAX_BYTES = 20000000000;
12
- /** New assets per account over a sliding day, deleted ones included: a delete does not give the slot back. */
13
9
  export declare const ASSET_INGEST_DAILY_CAP = 100;
14
10
  export declare const ASSET_INGEST_WINDOW_SECONDS = 86400;
15
- /** Raw bytes of a picture passed inline; its base64 still fits the 1 MiB JSON body of the API and of MCP. */
16
11
  export declare const ASSET_BASE64_MAX_BYTES = 700000;
17
12
  export declare const ASSET_BASE64_MAX_CHARS: number;
18
13
  export declare const ASSET_URL_TTL_SECONDS = 3600;
19
- /** A deleted asset's object, and a run's files after its media delete (#1093), stay this long, so a generation admitted just */
20
- /** before the delete still reads it. The one number for both; the cleanups read it here. */
21
14
  export declare const ASSET_DELETE_GRACE_DAYS = 7;
22
15
  export declare const ASSET_NAME_MAX_CHARS = 80;
23
16
  export declare const ASSET_LIST_MAX_LIMIT = 100;
24
- /** The page `list_assets` asks when the agent names no limit (#1372): the API's 50 overflowed an agent's tool output. */
25
17
  export declare const ASSET_TOOL_PAGE = 8;
26
- /** The most characters one `list_assets` answer carries (#1376): a page of 20 assets with their signed links runs past an agent's tool output,
27
- * so a page longer than this is asked again at the count that fits. */
28
18
  export declare const ASSET_TOOL_ANSWER_CHARS = 12000;
29
- /** A customer clip: up to 100 MiB and 120 s, a non-fragmented MP4 in h264 or hevc. */
30
19
  export declare const ASSET_VIDEO_MAX_BYTES: number;
31
20
  export declare const ASSET_VIDEO_MAX_SECONDS = 120;
32
21
  export declare const ASSET_VIDEO_CODECS: readonly ["h264", "hevc"];
33
- /** A clip sent as the body of `POST /v1/assets/bytes`: the API holds the body in memory before staging it. */
34
22
  export declare const ASSET_BYTES_ROUTE_VIDEO_MAX_BYTES: number;
35
- /** How long a clip in processing may take before reads call it failed: a 90 s download inside a 5 minute task. */
36
23
  export declare const ASSET_PROCESSING_SECONDS = 600;
37
24
  export declare const ASSET_VIDEO_DOWNLOAD_DEADLINE_MS = 90000;
38
25
  export declare const ASSET_INGEST_TASK_MAX_DURATION_SECONDS = 300;
39
26
  export declare const ASSET_PUT_MEDIA_TYPES: readonly ["image/png", "image/jpeg", "video/mp4"];
40
27
  export type AssetPutMediaType = (typeof ASSET_PUT_MEDIA_TYPES)[number];
41
- /** The task that downloads or reads a staged file, checks it and publishes the asset. */
42
28
  export declare const INGEST_ASSET_MEDIA_TASK = "ingest-asset-media";
43
- /** The cabinet's preview of an asset (S4a): a WebP at `assets/<account>/<id>/preview.webp`, long side at most 512, no upscale. */
44
29
  export declare const ASSET_PREVIEW_TASK = "make-asset-preview";
45
30
  export declare const ASSET_PREVIEW_MAX_SIDE = 512;
46
31
  export declare const ASSET_PREVIEW_QUALITY = 75;
47
32
  export declare const ASSET_PREVIEW_SWEEP_BATCH = 200;
48
- /** Past this many attempts a row leaves the queue as `gave_up`: an OOM or a hung R2 never loops for ever. */
49
33
  export declare const ASSET_PREVIEW_MAX_ATTEMPTS = 6;
50
- /** How long creating an asset waits to queue its preview; past it the hourly sweep picks the row up. */
51
34
  export declare const ASSET_PREVIEW_ENQUEUE_TIMEOUT_MS = 2000;
52
- /** Terminal codes only; a passing failure throws, and the next attempt or the sweep repeats it. */
53
35
  export declare const ASSET_PREVIEW_ERRORS: readonly ["decode_failed", "size_mismatch", "empty_output", "gave_up"];
54
36
  export type AssetPreviewError = (typeof ASSET_PREVIEW_ERRORS)[number];
55
37
  export declare const ASSET_ROLES: readonly ["character", "location", "style", "prop", "other"];
@@ -57,11 +39,9 @@ export type AssetRole = (typeof ASSET_ROLES)[number];
57
39
  export { ASSET_KINDS, ASSET_MEDIA_TYPES, assetId };
58
40
  export type AssetKind = (typeof ASSET_KINDS)[number];
59
41
  export type AssetMediaType = (typeof ASSET_MEDIA_TYPES)[number];
60
- /** `post`: a reel resolved from its link by analyze_reference (#930 S3), always analysis-only. */
61
42
  export declare const ASSET_SOURCE_TYPES: readonly ["generation", "upload", "url", "base64", "bytes", "put", "post"];
62
43
  export type AssetSourceType = (typeof ASSET_SOURCE_TYPES)[number];
63
44
  export declare const assetName: z.ZodString;
64
- /** A file the client PUTs itself: its type, exact size and sha256, checked against the bytes before the asset exists. */
65
45
  export declare const assetPutSource: z.ZodObject<{
66
46
  media_type: z.ZodEnum<{
67
47
  "image/jpeg": "image/jpeg";
@@ -71,8 +51,6 @@ export declare const assetPutSource: z.ZodObject<{
71
51
  bytes: z.ZodNumber;
72
52
  sha256: z.ZodString;
73
53
  }, z.core.$strict>;
74
- /** Where the asset's bytes come from: an own generation, an own upload, a public https url (`kind: "video"` for a clip), */
75
- /** inline base64, or a presigned PUT. */
76
54
  export declare const assetSource: z.ZodUnion<readonly [z.ZodObject<{
77
55
  run_id: z.ZodString;
78
56
  }, z.core.$strict>, z.ZodObject<{
@@ -101,9 +79,7 @@ export declare const assetSource: z.ZodUnion<readonly [z.ZodObject<{
101
79
  }, z.core.$strict>;
102
80
  }, z.core.$strict>]>;
103
81
  export type AssetSource = z.infer<typeof assetSource>;
104
- /** Why a render or generation refuses an analysis-only asset (#884); the caller prefixes the field and the id. */
105
82
  export declare const ANALYSIS_ONLY_ASSET_REFUSAL: string;
106
- /** The customer's own material needs `rights_confirmed` (stated once, at creation) or `analysis_only`, which keeps it out of every render. */
107
83
  export declare const createAssetRequest: z.ZodObject<{
108
84
  source: z.ZodUnion<readonly [z.ZodObject<{
109
85
  run_id: z.ZodString;
@@ -144,7 +120,6 @@ export declare const createAssetRequest: z.ZodObject<{
144
120
  analysis_only: z.ZodOptional<z.ZodLiteral<true>>;
145
121
  }, z.core.$strict>;
146
122
  export type CreateAssetRequest = z.infer<typeof createAssetRequest>;
147
- /** The query of `POST /v1/assets/bytes`. */
148
123
  export declare const assetBytesQuery: z.ZodObject<{
149
124
  role: z.ZodEnum<{
150
125
  character: "character";
@@ -245,7 +220,6 @@ export declare const asset: z.ZodObject<{
245
220
  updated_at: z.ZodString;
246
221
  }, z.core.$strict>;
247
222
  export type Asset = z.infer<typeof asset>;
248
- /** Where a PUT goes: signed for 15 minutes with exactly these two headers, and finished within a day. */
249
223
  export declare const assetPutUpload: z.ZodObject<{
250
224
  put_url: z.ZodString;
251
225
  put_headers: z.ZodObject<{
@@ -259,7 +233,6 @@ export declare const assetPutUpload: z.ZodObject<{
259
233
  expires_at: z.ZodString;
260
234
  finish_by: z.ZodString;
261
235
  }, z.core.$strict>;
262
- /** An asset before it exists: waiting for its PUT, being checked, or refused with the reason. */
263
236
  export declare const ASSET_PENDING_STATES: readonly ["awaiting_upload", "processing", "failed"];
264
237
  export declare const pendingAsset: z.ZodObject<{
265
238
  asset_id: z.ZodString;
@@ -419,10 +392,8 @@ export declare const assetItem: z.ZodUnion<readonly [z.ZodObject<{
419
392
  }, z.core.$strict>>;
420
393
  }, z.core.$strict>]>;
421
394
  export type AssetItem = z.infer<typeof assetItem>;
422
- /** Why a pending asset failed, as `error.code`; these never come as an HTTP error of their own. */
423
395
  export declare const ASSET_INGEST_FAILURE_CODES: readonly ["upload_expired", "upload_size_mismatch", "upload_digest_mismatch", "unsupported_media_type", "invalid_image", "invalid_video", "payload_too_large", "url_fetch_refused", "url_fetch_failed", "asset_cap_exceeded", "asset_ingest_cap_exceeded", "url_import_disabled", "ingest_timed_out", "ingest_enqueue_failed", "ingest_failed"];
424
396
  export type AssetIngestFailureCode = (typeof ASSET_INGEST_FAILURE_CODES)[number];
425
- /** What starts an asset check: which pending asset, and whether its bytes are at a url or already staged. */
426
397
  export declare const ingestAssetMediaPayload: z.ZodObject<{
427
398
  assetId: z.ZodString;
428
399
  accountId: z.ZodString;
@@ -433,12 +404,10 @@ export declare const ingestAssetMediaPayload: z.ZodObject<{
433
404
  }>;
434
405
  }, z.core.$strict>;
435
406
  export type IngestAssetMediaPayload = z.infer<typeof ingestAssetMediaPayload>;
436
- /** The preview task takes the id only; it reads the account from the row. */
437
407
  export declare const assetPreviewPayload: z.ZodObject<{
438
408
  assetId: z.ZodString;
439
409
  }, z.core.$strict>;
440
410
  export type AssetPreviewPayload = z.infer<typeof assetPreviewPayload>;
441
- /** One run per asset across every caller: created with `scope: "global"`, since a raw string inside a task is per run. */
442
411
  export declare const assetPreviewIdempotencyKey: (id: string) => string;
443
412
  export declare const assetPreviewKey: (accountId: string, id: string) => string;
444
413
  export declare const assetUsage: z.ZodObject<{
@@ -447,7 +416,6 @@ export declare const assetUsage: z.ZodObject<{
447
416
  max_count: z.ZodNumber;
448
417
  max_bytes: z.ZodNumber;
449
418
  }, z.core.$strict>;
450
- /** `pending` holds the account's assets still in progress and those refused within the day; the first page only. */
451
419
  export declare const assetList: z.ZodObject<{
452
420
  assets: z.ZodArray<z.ZodObject<{
453
421
  asset_id: z.ZodString;
@@ -754,9 +722,7 @@ export declare const assetListRead: z.ZodObject<{
754
722
  }, z.core.$loose>;
755
723
  }, z.core.$loose>;
756
724
  export type AssetListRead = z.infer<typeof assetListRead>;
757
- /** The asset's own object: a new id per asset, so a copy never overwrites another asset. */
758
725
  export declare function assetKey(accountId: string, id: string, sha256: string, mediaType: AssetMediaType): string;
759
- /** The asset_cap_exceeded text: the account's own ceilings, and on a bytes refusal below 20 GB what raises it. */
760
726
  export declare function assetCapMessage(cap: "count" | "bytes", usage: {
761
727
  count: number;
762
728
  bytes: number;